emacs-devel
[Top][All Lists]
Advanced

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

Re: C-r and C-s in minibuffer should search completion


From: Juri Linkov
Subject: Re: C-r and C-s in minibuffer should search completion
Date: Fri, 21 Mar 2008 01:03:29 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (x86_64-pc-linux-gnu)

>>> I believe C-s and C-r in the minibuffer should not only search the
>>> history but the completion table as well (at least when it's not
>>> a function).
>
> Sorry, I meant M-r/M-s.
>
>> There is one problem: what to search first - the history or the
>> completion table.  Either preference will cause inconveniences.
>
> No problem: Make sure you start the search in between the two sets, so
> that M-r will first search one and M-s will first search the other.
> I'd guess M-r should first search through history, while M-s should
> first search through the completion table.

I think it would be unnatural to use M-s to search a list of elements
not available for navigation in the minibuffer using M-p and M-n,
because a set of keys M-p/M-n/M-r/M-s should operate on the same
space for consistency.  Otherwise, it would be confusing when
M-s will insert in the minibuffer an element not from the list
where M-p and M-n navigate.

One solution is to add a new key to switch dimensions like proposed
by Drew and Lennart, i.e. after typing a special key to change the
current mode, M-n/M-p will navigate to the next/previous completion
candidate in the minibuffer, M-s/M-r will search the completion list
forward/backward in the minibuffer.

> BTW, once this is done, we can revert the recent change to the
> `read-buffer' that adds all the buffers to the list of defaults.

Why?  The buffer list in the list of defaults is useful not only for
searching, but also for browsing, i.e. switching to the penultimate
buffer is easy with `C-x b M-n M-n RET', to the third-to-last buffer -
`C-x b M-n M-n M-n RET', etc.  This is harmless improvement since
it doesn't change the existing behavior, just adds more buffers
sorted by recency beyond a single most recent buffer.

-- 
Juri Linkov
http://www.jurta.org/emacs/




reply via email to

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