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: Sun, 23 Mar 2008 04:17:25 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (x86_64-pc-linux-gnu)

>> However, I agree that putting all buffers pushes this features to the
>> extreme because then the list of defaults is the same as the completion
>> list.  But there is one significant difference: the list of defaults is
>> sorted by recency, so switching between several work buffers (more than
>> two) is much easier with `C-x b M-n M-n M-n RET'.
>
> I never said there's no difference.  I just think this special case is
> not justified.  Most likely `C-x b M-p M-p M-p RET' would work just
> as well.

This assumes that the user prefers C-x b to switch to a new buffer.
But it is not the case since more often many other commands switch to
a buffer that don't leave a new buffer name in the history list.

>> OTOH, searching the completion list would be useful in itself
>> independent of searching the history list or the list of defaults
>> because often these three are disjoint sets, and the list of defaults
>> can be presented even when the completion list is empty.
>
> If you like it, feel free to customize your Emacs to provide you this
> kind of refinement with different commands to search the history, the
> list of defaults, and the list of completions.  But I think the default
> search function bound to M-r/M-s would benefit from searching all
> of them.

Hmm, now I tend to agree with you that M-s could search the list of
completions as well.  Since the list of defaults usually is very short,
we could search it first and after that search the list of completions.
When the list of defaults is not very short then often there is no
completions at all, so this should work quite well.

The only problem with C-x b is that the buffer list is sorted
alphabetically in the list of completions, but it would be much more
useful to search them in the order of recency.

I see they are sorted in the function `minibuffer-completion-help' as

      /* Sort and remove duplicates.  */
      Lisp_Object tmp = completions = Fsort (completions, Qstring_lessp);

Maybe we should create a new function `minibuffer-completion-help-unsorted'
for C-x b and possibly other commands that might need to keep the original
order of elements too?

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




reply via email to

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