From: "Drew Adams" <drew.adams@oracle.com>
To: "'Juri Linkov'" <juri@jurta.org>
Cc: 'Xavier Maillard' <xma@gnu.org>,
monnier@iro.umontreal.ca, emacs-devel@gnu.org
Subject: RE: C-r and C-s in minibuffer should search completion
Date: Sat, 29 Mar 2008 19:38:17 -0700 [thread overview]
Message-ID: <002901c8920f$1cde6200$0200a8c0@us.oracle.com> (raw)
In-Reply-To: <87y7816odc.fsf@jurta.org>
> >> Maybe we should avoid this inconsistency by using
> >> another key for switch-to-completions?
> >
> > FWIW, Icicles uses `C-insert' for this. And hitting it
> > again takes you back to the minibuffer (and copies the
> > completion at point in *Completions* to the
> > minibuffer` for editing). That key won't work for emacs
> > -nw, but `M-insert' presumably would (in the form of
> > `ESC insert').
>
> I agree that `M-insert' makes sense for inserting the completion from
> the *Completions* buffer to the minibuffer.
It makes sense to use the same key to go both directions (minibuffer <-->
*Completions*), as I mentioned. Why not?
> > There is little connection between the idea of having
> > `down' and `up' move to the next and previous items in
> > a series and the idea of switching windows/buffers.
>
> <M-down> and <M-up> are used by many other programs that open a pop-up
> list of history/completion items. So they are natural key
> for most users and especially for newbies.
As I said, there is little connection with the meaning of "next" and "previous".
That's the point.
Slavishly copying other programs is not a sufficient argument, especially when
it comes to key bindings. It can be a secondary argument, but it shouldn't be
the only or the primary argument. Otherwise, Emacs would quickly resemble the
lowest common denominator, or worse. Other programs are for the most part
inferior to Emacs wrt key bindings.
Emacs generally chooses key bindings in a reasoned way. I gave arguments why
down/up should be reserved for successor/predecessor operations, if possible.
You've given no argument for using them for something that is unrelated to that,
beyond saying that some other programs use them to open a popup list.
There is no reason to have two different keys for switching to *Completions*,
which is what you are proposing, AFAICT. If there is already a key that switches
to *Completions*, then why can't users also use it to switch to *Completions*
when it contains the history list?
Why do they need another key for that? That's like saying that although we
already have `C-f' for forward-char, we should add `C-<whatever>' for
forward-char whenever the buffer contains lines of poetry.
> I also suggest using <M-down> for IDE-like autocompletion that opens
> a pop-up window with completion in a program buffer. This is usually
> bound to C-SPC in IDE like Eclipse, but C-SPC is already taken for
> set-mark-command in Emacs.
>
> > Finally, why use a separate window for history items? Why
> > not simply use *Completions* and let users complete against
> > history items? IOW, use the normal completion mechanism,
> > with everything that it provides.
>
> As there exists already a key that open the *Completions* buffer,
> it makes sense to do the same for the history list.
Makes sense to do what "the same"? Add another key, just for switching to
*Completions* whenever it contains a history list? Why not really "do the same
for the history list" - treat it exactly the same as every other list in
*Completions*? When you say "same" it seems you mean "different".
Unless I'm missing something, all you've done is fill *Completions* with a set
of completions that come from the history list. That's useful, but there is
nothing special about it. Completing previous inputs is no different from
completing command names or file names or buffer names or anything else. Why add
key bindings unnecessarily (Occam)?
You need one minibuffer key binding to let users complete against the history
list; that's all.
> Below is a patch that implements these ideas.
>
> > That is what I suggested when I mentioned `M-o', which is
> > the key that Icicles uses for this. You can use `M-o' from
> > any minibuffer, not just during completion. It uses a
> > recursive minibuffer to let you choose from the current
> > input history (using completion) - your choice is inserted
> > in the minibuffer, where you can edit it for the original
> > minibuffer reading.
>
> You earlier objected to using the same keys that have different
> bindings in the minibuffer and outside it (cf. using `TAB' in the
> minibuffer).
Because the indentation binding of TAB is useful in the minibuffer. I made a
specific argument about TAB. You cannot generalize from my opposition to
changing the meaning of TAB in the minibuffer to suppose that I oppose the reuse
of any keys by giving them different minibuffer bindings.
And TAB is a particular case in another sense: it is apparently in demand for
everything under the sun. I argued to reserve it for things that are related to
its existing meanings.
> Since by default M-o is a prefix key for font-lock-fontify
> function, I think we should find another key.
I chose `M-o' precisely because its global binding is not useful in the
minibuffer. (Do you think it is?) This is not about blanket rules; you have to
consider the details - TAB is not `M-o'.
But I don't care whether you use `M-o' or not. It was just a suggestion. I do
care that you not use TAB for that, with or without modifiers.
> One candidate I propose is C-M-TAB.
When will you guys leave TAB alone? Save M-TAB, S-TAB, C-M-TAB, C-S-TAB, and so
on for operations that are more closely related to TAB's existing behaviors (and
there are already enough of those!). Yes, you could make an argument that this
behavior is slightly related, but tomorrow we will find 23 other possible uses
for TAB that are all more closely related.
I also suggested that completion against the current history use a recursive
minibuffer, and that the choice be inserted into the parent minibuffer for
editing. That is useful, especially for minibuffer input that does not involve
completion. You don't want to be limited to completing the current input against
a previous input. You might want to insert more than one previous input (using
completion), and edit the combination.
I don't agree with any of the proposed changes, but I have no illusions that my
disagreement will make any difference. On n'arrete pas le "progres".
next prev parent reply other threads:[~2008-03-30 2:38 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-20 19:13 C-r and C-s in minibuffer should search completion Stefan Monnier
2008-03-20 19:35 ` Juri Linkov
2008-03-20 20:07 ` Lennart Borgman (gmail)
2008-03-20 20:38 ` Juri Linkov
2008-03-20 20:54 ` Drew Adams
2008-03-20 23:07 ` Juri Linkov
2008-03-20 22:13 ` Stefan Monnier
2008-03-20 22:27 ` Drew Adams
2008-03-20 23:03 ` Juri Linkov
2008-03-21 1:26 ` Stefan Monnier
2008-03-22 1:17 ` Juri Linkov
2008-03-22 17:04 ` Stefan Monnier
2008-03-23 2:17 ` Juri Linkov
2008-03-23 3:24 ` Stefan Monnier
2008-03-29 1:00 ` Xavier Maillard
2008-03-29 12:30 ` Juri Linkov
2008-03-29 16:23 ` Drew Adams
2008-03-30 0:38 ` Juri Linkov
2008-03-30 2:38 ` Drew Adams [this message]
2008-03-20 20:44 ` Drew Adams
2008-03-25 21:44 ` Juri Linkov
2008-03-26 2:31 ` Stefan Monnier
2008-03-26 7:01 ` Drew Adams
2008-03-26 14:41 ` Stefan Monnier
2008-03-26 17:07 ` Drew Adams
2008-03-26 10:56 ` Juri Linkov
2008-03-26 14:47 ` Stefan Monnier
2008-03-27 0:44 ` Juri Linkov
2008-03-27 2:43 ` Stefan Monnier
2008-03-27 23:43 ` Juri Linkov
2008-03-29 4:03 ` Stefan Monnier
2008-03-30 0:44 ` Juri Linkov
2008-03-30 4:01 ` Stefan Monnier
2008-03-30 18:32 ` Juri Linkov
2008-03-30 22:41 ` Stefan Monnier
2008-03-30 23:50 ` Juri Linkov
2008-03-31 2:11 ` Stefan Monnier
2008-04-03 22:59 ` Juri Linkov
2008-04-04 1:18 ` Stefan Monnier
2008-04-06 20:45 ` Juri Linkov
2008-04-07 15:32 ` Stefan Monnier
2008-04-15 22:28 ` Juri Linkov
2008-04-16 2:08 ` Stefan Monnier
2008-04-16 23:16 ` Juri Linkov
2008-04-17 1:41 ` Stefan Monnier
2008-04-17 9:18 ` Juri Linkov
2008-04-18 1:07 ` Stefan Monnier
2008-04-19 20:11 ` Juri Linkov
2008-04-19 21:10 ` Stefan Monnier
2008-04-19 22:46 ` Juri Linkov
2008-04-20 2:44 ` Stefan Monnier
2008-04-21 21:51 ` Juri Linkov
2008-04-22 3:11 ` Stefan Monnier
2008-04-22 20:59 ` Juri Linkov
2008-04-23 2:28 ` Stefan Monnier
2008-04-21 3:07 ` Richard Stallman
2008-04-21 22:54 ` Juri Linkov
2008-04-22 3:10 ` Stefan Monnier
2008-03-30 0:44 ` minibuffer-default-add-shell-commands (was: C-r and C-s in minibuffer should search completion) Juri Linkov
2008-03-30 4:08 ` minibuffer-default-add-shell-commands Stefan Monnier
2008-03-30 18:28 ` minibuffer-default-add-shell-commands Juri Linkov
2008-03-30 11:30 ` minibuffer-default-add-shell-commands Reiner Steib
2008-03-30 18:31 ` minibuffer-default-add-shell-commands Juri Linkov
2008-03-30 20:25 ` minibuffer-default-add-shell-commands Reiner Steib
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='002901c8920f$1cde6200$0200a8c0@us.oracle.com' \
--to=drew.adams@oracle.com \
--cc=emacs-devel@gnu.org \
--cc=juri@jurta.org \
--cc=monnier@iro.umontreal.ca \
--cc=xma@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.