GNU bug report logs - #12490
24.2; Search inside Minibuffer don't work with M-x (M-x C-s)

Previous Next

Package: emacs;

Reported by: Jakub Jankiewicz <jcubic <at> onet.pl>

Date: Sat, 22 Sep 2012 20:53:02 UTC

Severity: normal

Tags: confirmed, fixed, patch

Found in version 24.2

Fixed in version 28.1

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: Drew Adams <drew.adams <at> oracle.com>
To: Juri Linkov <juri <at> jurta.org>, Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Jakub Jankiewicz <jcubic <at> onet.pl>, 12490 <at> debbugs.gnu.org, Stefan Kangas <stefan <at> marxist.se>
Subject: bug#12490: 24.2; Search inside Minibuffer don't work with M-x (M-x C-s)
Date: Sat, 30 Nov 2019 15:41:38 -0800 (PST)
> This patch allows searching thru all commands available via M-x,

That's not "searching" - certainly not isearching.

> i.e. it's like using isearch in the *Completions* buffer like
>   M-x TAB <PgUp> C-s command

That _is_ isearching (in buffer *Completions*).

> with without opening the *Completions* buffer, with just
>   M-x C-s command
> to search commands available with M-x M-n M-n M-n ...

It's not searching.  We use a different key, such
as `M-s' or `M-r', to insert a matching history
element.  `M-s' is `next-matching history-element'.
It has nothing in common with Isearch.

IMHO, we should never bind `C-s' in the minibuffer
to anything.  Why?  Because the minibuffer is a
buffer where text editing and cursor movment are
allowed/encouraged/normal.  We shouldn't remove
the ability to use Isearch there (using the global
`C-s' binding).

`C-s' in the minibuffer should, as it has before
(prior to Emacs 23, it seems), provide Isearch on
the minibuffer contents, just like it does in other
buffers.

I see now that someone changed this in Emacs 23,
at least for `read-buffer', to make `C-s' do what
has been described in this thread.  IMHO, that was
a step backward, not forward.  (I didn't notice it
because I have my own `read-buffer' code.)

It's fine to have other keys to find and retrieve
past inputs, completion candidates, defaults, etc.
That's something we've always done (`M-s', `M-n',
etc.).

Co-opting `C-s' to do that kind of thing was (and
is) misguided, IMO.  Spreading it from `C-x b' to
`M-x' will be yet another step backward.

My FWIW vote is to remove any default bindings of
`C-s' in the minibuffer, to let it do its useful
job there of `isearch-forward'.




This bug report was last modified 4 years and 279 days ago.

Previous Next


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