From: Drew Adams <drew.adams@oracle.com>
To: Spencer Baugh <sbaugh@catern.com>, Juri Linkov <juri@linkov.net>
Cc: "emacs-devel@gnu.org" <emacs-devel@gnu.org>
Subject: RE: [External] : Re: Updating *Completions* as you type
Date: Wed, 18 Oct 2023 03:04:27 +0000 [thread overview]
Message-ID: <SJ0PR10MB54887390B5BC643282ACDB77F3D5A@SJ0PR10MB5488.namprd10.prod.outlook.com> (raw)
In-Reply-To: <87bkcwx3ft.fsf@catern.com>
> > I think we should choose a key to toggle completion
> > type between history/default/regular completion.
>
> That works too of course, although it causes some
> more proliferation of keys.
The approach I took in Icicles is preferable, IMO.
Food for thought:
1. There can be any number of sort orders to choose
from at any given time, i.e., in any given context.
For different calls to `completing-read' (e.g.
for different commands), some very different sort
orders can make sense.
And one of the available ways of sorting is to do
nothing - NOT sort the available candidates. This
can be useful if the completion function already
provides them in a useful order, or if any sorting
at all would be expensive for some reason.
2. Instead of wasting multiple keys, one for each
sort-order choice, a single key cycles among them:
`C-,'.
3. For any `completing-read' call there can also be
a set of alternative sort orders. You can toggle
to the current alternative sort using `C-M-,'.
And you can cycle among the available alternative
orders using `M-,' (just like `C-,').
4. Both `C-,' and `M-,' also provide another way to
choose a sort order, besides cycling to it: use
completion to choose it by name.
5. You can choose, with an option, whether, by default,
to (1) always use cycling to choose a sort order,
(2) always use completion, or (3) cycle if there are
fewer than N orders to choose from and complete if
there are N or more.
6. Reversing the current sort order is just `C-,' with
a numeric prefix arg, e.g., `C-9 C-,'.
7. Regardless of your user-option preference (#5), you
can flip to the other kind of choosing as a one-off,
on the fly, using a non-numeric prefix arg. E.g.,
if the option says to use cycling in the current
situation then `C-u C-,' switches to choosing the
order by name (completing).
8. It's very easy for users to define new sort orders.
This is quite important, IMO. It should seem clear,
from your discussion so far, why this makes sense.
9. The available sort orders for `C-,' are defined by
a user option. But commands can adjust this list
of possibilities by adding command-specific sort
orders or removing some that might be inappropriate.
10. The sort order you last chose remains in effect
for subsequent completion (e.g. other commands).
But if the sort order isn't appropriate for some
command it can turn sorting off, in which case
`C-,' lets you choose an appropriate order.
11. IMO, there is no reason at all to have different
sort orders for display and for cycling:
`display-sort-function' and `cycle-sort-function'.
At least I haven't seen (or heard) any reason.
Can anyone say why these aren't the same thing in
Emacs?
And even if there were some use case where someone
might want them to differ, why wouldn't the normal,
default case be for them to be the same (synced)?
You're apparently already beginning to wonder about
a difference between a "current" completion in
*Completions* (the one that's highlighted) and a
"current" completion in the minibuffer, no? Why
let them differ, ever - what's the use case?
In my code (both Icicles and tiny `sortie.el') the
two are the same. The current candidate in the
minibuffer is always the candidate highlighted in
*Completions* (and vice versa - identical).
12. The current sort order, and whether it's reversed,
is indicated in the mode-line of *Completions*, so
you always know what sauce you're being cooked in.
https://www.emacswiki.org/emacs/Icicles_-_Completions_Display#SortOrder
13. I wonder if any of you have even looked at the doc
describing the features I'm talking about. I get
the impression you're maybe starting to re-invent
the wheel, without looking at how existing round
things have been rolling along so far.
https://www.emacswiki.org/emacs/Icicles_-_Sorting_Candidates
(Many of the same sorting features are available with
`sortie.el' as with Icicles. Trying it with library
`keysee.el' is a simple way to see what it's like.)
https://www.emacswiki.org/emacs/Sortie
https://www.emacswiki.org/emacs/KeySee
next prev parent reply other threads:[~2023-10-18 3:04 UTC|newest]
Thread overview: 107+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-12 23:53 Updating *Completions* as you type sbaugh
2023-10-13 6:31 ` Eli Zaretskii
2023-10-13 18:01 ` Spencer Baugh
2023-10-14 7:09 ` Eli Zaretskii
2023-10-14 19:26 ` Björn Bidar
[not found] ` <874jit2ef7.fsf@>
2023-10-14 19:38 ` Eli Zaretskii
2023-10-14 16:51 ` Juri Linkov
2023-10-14 17:56 ` sbaugh
2023-10-14 19:51 ` Dmitry Gutov
2023-10-13 6:34 ` Juri Linkov
2023-10-13 19:04 ` Spencer Baugh
2023-10-14 16:58 ` Juri Linkov
2023-10-14 20:05 ` sbaugh
2023-10-15 6:06 ` Eli Zaretskii
2023-10-15 15:55 ` sbaugh
2023-10-16 11:38 ` Eli Zaretskii
2023-10-16 14:50 ` Michael Albinus
2023-10-16 15:58 ` [External] : " Drew Adams
2023-10-16 12:16 ` sbaugh
2023-10-17 18:23 ` Juri Linkov
2023-10-18 23:27 ` Spencer Baugh
2023-10-15 7:32 ` Juri Linkov
2023-10-16 19:28 ` Rudolf Adamkovič
2023-10-17 18:38 ` Juri Linkov
2023-10-15 20:31 ` Eshel Yaron
2023-10-16 3:18 ` [External] : " Drew Adams
2023-10-16 16:54 ` Juri Linkov
2023-10-17 13:48 ` sbaugh
2023-10-17 18:35 ` Juri Linkov
2023-10-17 22:57 ` Spencer Baugh
2023-10-18 3:04 ` Drew Adams [this message]
2023-10-18 6:56 ` Juri Linkov
2023-10-18 12:25 ` Spencer Baugh
2023-10-18 17:32 ` Juri Linkov
2023-10-18 23:33 ` Spencer Baugh
2023-10-19 2:29 ` Spencer Baugh
2023-10-19 6:55 ` Juri Linkov
2023-11-19 19:22 ` sbaugh
2023-11-20 7:51 ` Juri Linkov
2023-11-20 15:24 ` Spencer Baugh
2023-11-20 17:47 ` Juri Linkov
2023-11-20 18:50 ` Spencer Baugh
2023-11-21 7:58 ` Juri Linkov
2023-11-21 12:40 ` sbaugh
2023-11-21 17:09 ` Juri Linkov
2023-11-21 20:45 ` Spencer Baugh
2023-11-22 7:51 ` Juri Linkov
2023-11-22 16:11 ` Spencer Baugh
2023-11-23 7:58 ` Juri Linkov
2023-11-23 12:36 ` sbaugh
2023-11-24 7:58 ` Juri Linkov
2023-11-25 16:44 ` Spencer Baugh
2023-11-25 18:31 ` Juri Linkov
2023-11-26 13:33 ` sbaugh
2023-11-27 7:28 ` Juri Linkov
2023-11-28 14:38 ` Spencer Baugh
2023-11-28 15:03 ` Eli Zaretskii
2023-11-28 17:13 ` Juri Linkov
2023-11-28 17:36 ` Eli Zaretskii
2023-11-29 7:11 ` Juri Linkov
2023-11-29 13:09 ` Eli Zaretskii
2023-11-29 14:14 ` Spencer Baugh
2023-11-29 14:54 ` Eli Zaretskii
2023-11-29 15:21 ` Spencer Baugh
2023-11-29 15:52 ` Eli Zaretskii
2023-11-29 19:17 ` Spencer Baugh
2023-11-30 6:12 ` Eli Zaretskii
2023-11-30 12:33 ` Spencer Baugh
2023-11-30 14:10 ` Eli Zaretskii
2023-11-28 23:56 ` Spencer Baugh
2023-11-29 3:33 ` Eli Zaretskii
2023-12-03 17:25 ` Juri Linkov
2023-12-03 17:56 ` Eli Zaretskii
2023-12-06 17:17 ` Juri Linkov
2023-11-28 17:16 ` Juri Linkov
2023-11-28 23:36 ` Turning completion table lambdas into symbols Spencer Baugh
2023-11-28 23:51 ` Dmitry Gutov
2023-11-29 19:26 ` Spencer Baugh
2023-12-01 0:36 ` Dmitry Gutov
2023-11-29 7:18 ` Juri Linkov
2023-11-21 12:54 ` Updating *Completions* as you type John Yates
2023-11-21 17:03 ` Juri Linkov
2023-11-21 22:27 ` John Yates
2023-10-20 6:49 ` Juri Linkov
2023-10-17 15:01 ` sbaugh
2023-10-17 18:20 ` Juri Linkov
2023-10-17 23:37 ` Spencer Baugh
2023-10-17 23:44 ` Spencer Baugh
2023-10-18 6:51 ` Juri Linkov
2023-10-18 12:47 ` Spencer Baugh
2023-10-18 17:28 ` Juri Linkov
2023-10-18 23:32 ` Spencer Baugh
2023-10-16 3:19 ` [External] : " Drew Adams
2023-10-20 9:35 ` zcomplete Philip Kaludercic
2023-10-22 17:28 ` zcomplete Juri Linkov
2023-10-23 5:00 ` zcomplete Protesilaos Stavrou
2023-10-23 6:45 ` zcomplete Juri Linkov
2023-10-13 18:11 ` Updating *Completions* as you type Daniel Semyonov
2023-10-13 18:48 ` Spencer Baugh
2023-10-16 3:16 ` [External] : " Drew Adams
2023-10-16 9:25 ` Philip Kaludercic
2023-10-16 16:03 ` Drew Adams
2023-10-20 7:45 ` Philip Kaludercic
2023-10-20 16:10 ` Drew Adams
2023-10-16 22:55 ` Emanuel Berg
2023-10-17 6:09 ` Emanuel Berg
2023-10-17 0:44 ` Michael Heerdegen
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=SJ0PR10MB54887390B5BC643282ACDB77F3D5A@SJ0PR10MB5488.namprd10.prod.outlook.com \
--to=drew.adams@oracle.com \
--cc=emacs-devel@gnu.org \
--cc=juri@linkov.net \
--cc=sbaugh@catern.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 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.