bug-gnu-emacs
[Top][All Lists]
Advanced

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

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


From: Drew Adams
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'.





reply via email to

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