GNU bug report logs - #25318
24.5; Put `M-s' on a prefix keymap in Isearch

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Sun, 1 Jan 2017 04:58:01 UTC

Severity: wishlist

Tags: wontfix

Found in version 24.5

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 25318 <at> debbugs.gnu.org
Subject: bug#25318: 24.5; Put `M-s' on a prefix keymap in Isearch
Date: Sun, 29 Sep 2019 19:37:30 +0200
Drew Adams <drew.adams <at> oracle.com> writes:

> Currently, `isearch-mode-map' has a number of key sequences bound in it
> that begin with prefix-key `M-s':
>
> M-s C-e		isearch-yank-line
> M-s SPC		isearch-toggle-lax-whitespace
> M-s '		isearch-toggle-char-fold
> M-s _		isearch-toggle-symbol
> M-s c		isearch-toggle-case-fold
> M-s e		isearch-edit-string
> M-s i		isearch-toggle-invisible
> M-s o		isearch-occur
> M-s r		isearch-toggle-regexp
> M-s w		isearch-toggle-word
> M-s h r		isearch-highlight-regexp

[...]

> Since these keys do not form any _specific_ grouping, I'd propose a
> name for the keymap such as `isearch-misc-map' (better than nothing).

As you point out, these commands aren't functional grouping of any kind,
so I don't think it makes sense to put them on a separate map.  It's not
like anybody would want to put all those functions somewhere else, which
is the primary reason to have sub-keymaps.

> This will let users and other libraries move the prefix keymap to a
> different prefix key if they want, or define `M-s C-h' to show only the
> bindings on prefix `M-s', and so on.
>
> As it stands now, a 3rd-party library cannot do what this bug report
> requests, because there are likely other libraries, which may be loaded
> before it, and which bind `M-s <whatever' directly in
> `isearch-mode-map'.  Those bindings would be wiped out by a later
> binding of `M-s' to a prefix map.
>
> But if this is done in core Emacs then there will be no such problem
> (there is no problem if a library binds `M-s <whatever>' directly in
> `isearch-mode-map' AFTER the prefix map has been placed on
> `isearch-mode-map).

So your use case is that you want to bind `M-s' to a prefix map
out-of-tree?  

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 5 years and 237 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.