emacs-devel
[Top][All Lists]
Advanced

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

Re: [patch] Run occur command restricted to a region


From: Kaushal Modi
Subject: Re: [patch] Run occur command restricted to a region
Date: Thu, 29 Dec 2016 18:50:27 +0000

I agree with Drew's reasoning behind not using up the M-s b/f bindings for occur-backward/forward. But I don't like the idea of having M-s o as a submap binding. M-s o is super useful as it is now.

Here's a suggestion for bindings that might work out. I am not at a computer, so cannot verify if M-s M-o is already taken,.. but if not then how about

M-s M-o f for occur-forward, and
M-s M-o b for occur-backward

??

The above bindings are easy to press and also easy to remember.


On Thu, Dec 29, 2016, 11:47 PM Drew Adams <address@hidden> wrote:
>  (define-key search-map "o"    'occur)
> +(define-key search-map "b"    'occur-backward)
> +(define-key search-map "f"    'occur-forward)

FWIW, I don't think those keys (`M-s b' and `M-s f') should be
bound to those commands.  If we want to bind the new commands
during Isearch then I suggest that the occur commands be grouped
on prefix key `M-s o':

  M-s oo   occur
  M-s ob   occur-backward
  M-s of   occur-backward

`M-s' is a _general_ search prefix key.  There is nothing
particularly mnemonic about `b' or `f' being `occur-backward'
or `occur-forward'.  And we should not sacrifice 3 `M-s' keys
to these commands.

I, and perhaps other users, and perhaps in the future vanilla
Emacs, have other bindings on `M-s'.  And `M-s' bindings can
be anything at all related to the encompassing context of
searching.

--

Kaushal Modi


reply via email to

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