emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Proposal: add a binding for `imenu' under M-g


From: Sean Whitton
Subject: Re: Proposal: add a binding for `imenu' under M-g
Date: Thu, 21 Apr 2022 12:03:27 -0700
User-agent: Emacs/29.0.50 (x86_64-pc-linux-gnu)

Hello,

On Thu 21 Apr 2022 at 10:20AM +03, Juri Linkov wrote:

>> * when I reach for M-s commands (isearch-forward-*, occur,
>>   highlight-*/hi-lock-*), I feel like I am looking for a command that
>>   operates on a set of _matches_ (jumping successively through the set,
>>   collecting & displaying the set, highlighting the set),
>>
>> * when I reach for M-g commands, I feel like I want to jump to "precise"
>>   locations, i.e. locations that are not defined by pattern matching,
>>   but by some other semantics (e.g. line numbers, error reports).
>>
>> So M-. could very well bound to M-g d and/or M-g M-d, and it wouldn't
>> break my (perhaps twisted) grokking of the M-g prefix: I use it to visit
>> the "canonical" location for a symbol, defined by TAGS files, LSP
>> servers…  though it's true that M-. sometimes does "match" more than one
>> locations.
>>
>> Consequently, having imenu on the M-g prefix sounds more natural to me.
>
> Do you think that additionally to 'M-g i' imenu should be bound also to 'M-g 
> M-i'?
> Then it could be typed without releasing the Meta modifier.  But the problem 
> is
> that 'M-i' is equivalent to 'TAB', so this means taking the keybinding 'M-g 
> TAB'
> that might have more sense for another command associated with TABs like
> navigating to the next link, then 'M-g S-TAB' to the previous link, etc.

I don't object but it doesn't seem useful to me, for the following
reason.  g and i are on opposite halves of qwerty, so if you're touch
typing properly then you would use a different Alt key to type each of
M-g and M-i.  Then M-g M-i is four keypresses whereas M-g i is three.

-- 
Sean Whitton



reply via email to

[Prev in Thread] Current Thread [Next in Thread]