[Top][All Lists]

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

Re: Suggestion to have highlight related bindings consistent between sea

From: Kaushal
Subject: Re: Suggestion to have highlight related bindings consistent between search-map and hi-lock-map
Date: Sun, 12 Jul 2015 09:21:11 -0400


I am more interested in having the bindings be consistent. If people are used to the C-x w prefix and the consensus is to keep it, I'll respect the democracy.

Here is the reasoning for the proposed changes especially for `highlight-regexp` and `unhighlight-regexp`.

I understood that currently `highlight-regexp` is bound to "C-x w h" where `h` stands for Highlight. But then the same was bound to `M-s h r` in the other prefix map.

I could confuse which prefix had the `r` binding to highlight Regexp and could end up doing "C-x w r"! (in which case `r` stands for Removing highlights). Why should we have a key do polar opposite stuff in two keymaps?

So I surveyed the existing bindings in C-x w keymap:

h -> [h]ighlight-regexp
r -> unhighlight-regexp ([r]remove)
. -> highlight-symbol-at-[point]

On the other hand, in M-s h map:

h -> nil
r -> highlight-[r]egexp
u -> [u]nhighlight-regexp
. -> highlight-symbol-at-[point]

To me, the M-s h map seemed to have more harmony as the h binding wasn't used up to bind anything because we have a couple of highlighting function (regexp, symbol at point). Also, even if r for remove makes sense in C-x w map, remove isn't part of the function name (whereas u for unhighlight is).

And lastly, the h in M-s h also makes sense.. every binding in M-s h has to do with Highlighting.

M-s h r will Highlight Regexp
M-s h . will Highlight symbol at .
M-s h u will Un-Highlight regexp
.. and so on

I realize that these bindings changes I suggest are trivial. One can argue that why not just rebind them in your init. But why not make them consistent so that they are easy to adopt without confusion for anyone them for the first time? Why should there be an extra effort to remember that r in C-x w r removes highlight whereas r in M-s h r highlights regexp?

If and when this consistency change is made, existing users can simply relearn them if they are used to the other way or choose them rebind to the bindings they are already used to.

Kaushal Modi

On Jul 12, 2015 3:07 AM, "Vaidheeswaran C" <address@hidden> wrote:
On Sunday 12 July 2015 01:18 AM, Juri Linkov wrote:

> And maybe we could just remove the duplicate keymap ‘C-x w’
> altogether

When this happens please make the prefix configurable, much like what
outline minor mode does.

Hide Outline Minor Mode Prefix:  @
    State : STANDARD.
   Prefix key to use for Outline commands in Outline minor mode. Hide
   The value of this variable is checked as part of loading Outline mode.
   After that, changing the prefix key requires manipulating keymaps.

C-x w is what I am used to and there is NOT an emacs session where I
DO NOT use this binding.  M-s interface and bindings still confuse me.

ps: `r' stands for REMOVING highlights.

reply via email to

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