Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

dabbrev-expand ignores case sometimes

12 views
Skip to first unread message

C K Kashyap

unread,
Jul 19, 2012, 9:09:50 AM7/19/12
to help-gn...@gnu.org
Hi,

I noticed that at times when I do a M-/ and try to complete a word that already exists in the buffer (I assume, this is what I need to do if I need to do what I did using C-p or C-n on vi), the word completion happens but with weird casing. Sometime all caps etc. I wonder if there is some setting I need to do when I get into this situation.

Regards,
Kashyap

Jambunathan K

unread,
Jul 19, 2012, 10:04:37 AM7/19/12
to C K Kashyap, help-gn...@gnu.org
Have you customized dabrrev?

See (info "(emacs) Dabbrev Customization")


>
> Regards,
> Kashyap
>
>

--

C K Kashyap

unread,
Jul 19, 2012, 11:03:28 AM7/19/12
to Jambunathan K, help-gn...@gnu.org
I have not customized dabrrev ... I believe I run into this accidentally when I type in some control/alt combinations inadvertently.

Regards,
Kashyap

Jambunathan K

unread,
Jul 19, 2012, 12:01:04 PM7/19/12
to C K Kashyap, help-gn...@gnu.org

Can you be more specific. What is the guarantee that you haven't typed
M-l, M-u or M-c?

C K Kashyap

unread,
Jul 20, 2012, 1:06:09 AM7/20/12
to Jambunathan K, help-gn...@gnu.org
hmmm I am pretty sure its not M-I M-i or M-c . It's only M-/ and it simply expands in an unexplainable manner.

Regards,
Kashyap

Ludwig, Mark

unread,
Jul 26, 2012, 5:03:09 PM7/26/12
to C K Kashyap, Jambunathan K, help-gn...@gnu.org
Did you figure this out?

I believe you're running into behavior I have also seen. Consider the following scenario.

In an otherwise empty buffer, enter the following three non-blank lines (blanks here for readability):

Test1String
TEST2STRING
Test

Run the following tests, each with the cursor at the end of the third line. (It does not matter if there is a newline after the third line.)

Firstly, invoke M-/ and what you will get is Test2string.
Secondly, delete the third line and replace it with "TEST1" before invoking M-/ and what you will get is TEST1STRING.
Thirdly, delete the third line and replace it with "test2" before invoking M-/ and what you will get is test2string.

I don't what this case-matching behavior is called, but it catches me occasionally too....

Cheers,
Mark

Suvayu Ali

unread,
Aug 5, 2012, 3:43:30 PM8/5/12
to help-gn...@gnu.org
On Thu, Jul 26, 2012 at 09:03:09PM +0000, Ludwig, Mark wrote:
>
> I don't what this case-matching behavior is called, but it catches me occasionally too....
>

If you want dabbrev to respect the case while completing, try setting
this: (setq dabbrev-case-replace nil)

--
Suvayu

Open source is the future. It sets us free.

0 new messages