[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: troubleshoot C-M-/ key binding (dabbrev-completion)
From: |
Michael V. Antosha |
Subject: |
Re: troubleshoot C-M-/ key binding (dabbrev-completion) |
Date: |
Sun, 21 Jan 2024 23:59:15 +0200 |
On 1/21/24, Martin Marshall <law@martinmarshall.com> wrote:
> "Michael V. Antosha" <michael.antosha@gmail.com> writes:
>
>> 3. Using C-M-/ (i.e. pressing Ctrl+Alt+SLASH) seems to have the same
>> effect as M-/ (dabbrev-expand).
>
> What effect is that?
I prepared a description of a test procedure to specify the effect,
but I chose to skip sending it to keep my post shorter and because it
seems unnecessary now (explained below).
> Are you sure there are multiple completion candidates in the buffer?
Yes.
> If there's only one candidate in the buffer, `dabbrev-completion' will
> immediately complete the word without bringing up a "*Completions*"
> buffer. That would look like the same thing `dabbrev-expand' does.
I understand differences and similarities between the two commands, I
first tested their behavior without key bindings, through M-x
dabbrev-*
> You can check which key Emacs thinks you pressed and which command it
> called by invoking `view-lossage' (bound to "C-h l").
Martin, thank you very much!
That's really useful.
What I'm seeing now proves my original suspicion:
- when I press "Alt+SLASH" emacs interprets it as ESC / [dabbrev-expand]
- when I press "Ctrl+Alt+SLASH" emacs interprets it, as ESC / [dabbrev-expand]
ESC / [dabbrev-expand]
C-h l [view-lossage]
What could I do further to find out why these different combinations
are understood by emacs as ESC / sequence?
For comparison, Ctrl+Alt+BACKSLASH works fine.
Below are keys/commands from C-h l after pressing Ctr+BACKSLASH, then
Alt+BACKSLASH, then Ctrl+Alt+BACKSLASH:
C-\ [toggle-input-method]
...
ESC \ [delete-horizontal-space]
...
ESC C-\ [indent-region]
C-h l [view-lossage]
I also tried to emulate C-M-/ by pressing ESC and then pressing Ctrl+SLASH,
the result is quite unexpected:
ESC C-_ [nil]
C-h l [view-lossage]
--
Michael V. Antosha