[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: C-r and C-s in minibuffer should search completion
From: |
Stefan Monnier |
Subject: |
Re: C-r and C-s in minibuffer should search completion |
Date: |
Sun, 30 Mar 2008 18:41:39 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
>>> However, there is one problem now: `C-x b M-n M-n' puts in the minibuffer
>>> the name of the current buffer because the current buffer is in the front
>>> of the buffer list acquired from the completion table in read-buffer.
>>
>> This is a very minor problem.
> This is a usability problem for users who will prefer using `C-x b M-n M-n'
> to switch buffers by recency. And the current buffer will be annoying
> in this list.
Again, a very minor problem.
>>> But it makes no sense to switch to the current buffer, so the case 'B'
>>
>> Then switch-to-buffer should use a completion predicate that rules out
>> the current-buffer. And the history functions should pay attention to it.
> The completion list still should contain the current buffer for other
> commands that read a buffer name and whose semantics may require
> the presence of the current buffer in the completion list.
Is that supposed to disagree with what I wrote?
> Since removing the current buffer from the list of defaults is necessary
> only for three commands `C-x b', `C-x 4 b' and `C-x 5 b', I propose just
> to check for their names before removing the current buffer from the list:
No, this is the wrong way to go about it. The special code should be in
C-x b, C-x 4 b, and C-x 5 b. Checking the caller inside the minibuffer
is *bad*. I already suggested a much better solution: use
a minibuffer-completion-predicate. That's what it's for.
Stefan
- Re: C-r and C-s in minibuffer should search completion, (continued)
- Re: minibuffer-default-add-shell-commands, Reiner Steib, 2008/03/30
- Re: minibuffer-default-add-shell-commands, Juri Linkov, 2008/03/30
- Re: minibuffer-default-add-shell-commands, Reiner Steib, 2008/03/30
- Re: C-r and C-s in minibuffer should search completion, Juri Linkov, 2008/03/29
- Re: C-r and C-s in minibuffer should search completion, Stefan Monnier, 2008/03/30
- Re: C-r and C-s in minibuffer should search completion, Juri Linkov, 2008/03/30
- Re: C-r and C-s in minibuffer should search completion,
Stefan Monnier <=
- Re: C-r and C-s in minibuffer should search completion, Juri Linkov, 2008/03/30
- Re: C-r and C-s in minibuffer should search completion, Stefan Monnier, 2008/03/30