unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Augusto Stoffel <arstoffel@gmail.com>, Juri Linkov <juri@linkov.net>
Cc: Daniel Mendler <mail@daniel-mendler.de>, Ergus <spacibba@aol.com>,
	"emacs-devel@gnu.org" <emacs-devel@gnu.org>
Subject: RE: [External] : Re: Completions and history
Date: Wed, 13 Apr 2022 16:40:48 +0000	[thread overview]
Message-ID: <SJ0PR10MB548847FC050516724E68D1B5F3EC9@SJ0PR10MB5488.namprd10.prod.outlook.com> (raw)
In-Reply-To: <87ee215h1j.fsf@gmail.com>

> > Maybe the same key `C-c C-l' could be bound by default
> > in the minibuffer to enable history completion?
> 
> Discussing default keybindings tends to be rather
> unfruitful, but still: unless I'm missing something,
> `M-r' (previous-matching-history-element)
> is strictly less powerful than `C-M-r'
> (isearch-backward-regexp).

Dunno why you would choose to compare those two.

Anyway, Isearch key `C-M-r' is "more powerful" than
Isearch key `C-r' too.  So what?  There are good
reasons why Emacs has two different keys for those
different commands.

> History completion is quite handy and would be a
> better use for `M-r' in my opinion.

Of course it's quite handy.  So is simple history
search with `M-r` (previous-matching-history-element).

Let's please not try to cram the proposed feature
onto an existing key binding.  Users should _also_
be able to complete against history items.

As the guy who long ago tried to get Emacs more
interested in using completion for minibuffer
reading, I'm convinced of its utility.

That doesn't mean completion is always the best way
to let users choose something.  It's just one way.

It doesn't mean that completion should replace other
longstanding ways to choose things, especially when
it doesn't offer the same possibilities.
___

I'll give you an analogous how-to-choose from
Icicles, FWIW:

You can use key `C-,' in the minibuffer during
completion to change to a different sort order.

How to choose the sort order?  One way is completion:
You can pick one from those available in the current
context (you can see them in *Completions*).  Another
way is just cycling among them, without bothering to
see them all or bothering to type input to match one.

Icicles offers both possibilities, both (1) as a user
preference (Customize option) and (2) on the fly, for
any given use of `C-,'.

In fact, the option allows three possibilities:

 1. Always use completion.
 2. Always use cycling.
 3. Use completion if there are more than N sort
    orders to choose from; else use cycling.

`C-u' flips the behavior: if the option would
normally call for completion then cycle instead,
and vice versa.

Why go to the trouble of providing those different
ways to change the sort order?  Because completion,
though "quite handy", as you say, isn't always the
best or quickest way to choose something.  Cycling
isn't always the best way either.

A simple rule is fine, but a given user, with a
given command that involves choosing something,
can want this or that behavior.  Let users choose
what they want easily.





  parent reply	other threads:[~2022-04-13 16:40 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20220411112901.kv3lsyvx6yxwjbph.ref@Ergus>
2022-04-11 11:29 ` Completions and history Ergus
2022-04-11 16:56   ` Juri Linkov
2022-04-11 17:40     ` Ergus
2022-04-12 16:20       ` Juri Linkov
2022-04-12 16:53         ` Ergus
2022-04-12 16:59         ` Ergus
2022-04-12 17:12           ` Juri Linkov
2022-04-12 17:35             ` Ergus
2022-04-12 18:10               ` Juri Linkov
2022-04-12 17:24       ` Augusto Stoffel
2022-04-12 17:50         ` [External] : " Drew Adams
2022-04-12 18:05           ` Juri Linkov
2022-04-12 19:49             ` Drew Adams
2022-04-13  7:50               ` Juri Linkov
2022-04-13 12:00                 ` Augusto Stoffel
2022-04-13 12:12                   ` Po Lu
2022-04-14  2:56                     ` Richard Stallman
2022-04-13 16:40                   ` Drew Adams [this message]
2022-04-13 17:58                     ` Juri Linkov
2022-04-13 17:57                   ` Juri Linkov
2022-04-13 15:49                 ` Drew Adams

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=SJ0PR10MB548847FC050516724E68D1B5F3EC9@SJ0PR10MB5488.namprd10.prod.outlook.com \
    --to=drew.adams@oracle.com \
    --cc=arstoffel@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=juri@linkov.net \
    --cc=mail@daniel-mendler.de \
    --cc=spacibba@aol.com \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).