Subject: Re: bug#11482: 24.0.96; Keep `M-s' as a prefix key for search (conflict with Gnus)

From: Juri Linkov <[email-masked]>
Date: Thu, 17 May 2012 03:14:15 +0300

>> > But if Gnus binds `M-s' to a command, that conflicts with
>> > the general use of `M-s' as a prefix key (for search).
>> > That is the bug: Gnus should not bind `M-s' to a command.
>> > `M-s' should remain a prefix key (for search).
>>
>> Gnus could bind `gnus-summary-search-article-forward' to `M-s M-s'.
>> It is still easy to type.
>
> Obviously not what I was hoping for, since, as I say, Icicles uses `M-s M-s' as
> a prefix key for all of its many (Icicles) search commands.

For Icicles you could use a key prefix with Icicles specific mnemonics like
`M-s I'.

> But it does satisfy the bug report, at least: it does not make `M-s' a simple
> command binding.

There are more currently conflicting modes listed in admin/FOR-RELEASE:

  ** Check for modes which bind M-s that conflicts with a new global binding M-s
  and change key bindings where necessary.  The current list of modes:

  1. Gnus binds `M-s' to `gnus-summary-search-article-forward'.

  2. Minibuffer binds `M-s' to `next-matching-history-element'
     (not useful any more since C-s can now search in the history).

  3. `center-line' in Text mode was already moved to the text formatting
     keymap as `M-o M-s' (thus this binding is not necessary any more
     in `nroff-mode-map' too and can be removed now from the nroff mode
     because it can now use the global key binding `M-o M-s' `center-line').

  4. PCL-CVS binds `M-s' to `cvs-status', and log-edit-mode binds it to
     `log-edit-comment-search-forward'.  Perhaps search commands
     on the global key binding `M-s' are useless in these modes.

  5. Rmail binds `\es' to `rmail-search'/`rmail-summary-search'.

(If this problem is not release-critical then it should be removed from
admin/FOR-RELEASE.  It is recorded now here in bug#11482.)

Like the proposed keybinding `M-s M-s' for Gnus, the minibuffer could
rebind `next-matching-history-element' to `M-s M-s'.  And perhaps Shell
could bind `comint-history-isearch-forward-regexp' to `M-s M-s' as well.

However, I have doubts about rebinding `rmail-search' to `M-s M-s'
because of the comment in rmail.el:

    ;; I find I can't live without the default M-r command -- rms.

Does this statement apply to `M-s' too?