emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Stepping Back: A Wealth Of Completion systems Re: [ELPA] New package


From: Eli Zaretskii
Subject: Re: Stepping Back: A Wealth Of Completion systems Re: [ELPA] New package: vertico
Date: Sat, 10 Apr 2021 10:09:54 +0300

> Cc: philipk@posteo.net, emacs-devel@gnu.org
> From: Dmitry Gutov <dgutov@yandex.ru>
> Date: Sat, 10 Apr 2021 02:12:51 +0300
> 
> > I don't think I understand how xref-show-definitions-completing-read
> > is different from, say, read-file-name.  Can you explain?
> 
> We've touched on this previously in the poll/discussion about the default:
> 
> https://lists.gnu.org/archive/html/emacs-devel/2021-01/msg00029.html
> 
> The values which xref-show-definitions-completing-read asks you to 
> choose from are relatively complex, and hard to type out.
> 
> Further, there's often only 2-3 values to choose from (in the Elisp's 
> case, at least), so choosing the first one should be a frequent enough 
> occasion.
> 
> With a selection-based menu you look at all options and make a choice: 
> often just press RET; maybe press TAB, or C-n, or <down> a few times 
> before that.
> 
> With completing-read, you have to press TAB first, to see the choices, 
> and then type some of your choice's contents, keeping in mind perhaps 
> its distinguishing characteristics. That's simply more effort than the 
> other approach.
> 
> File name completion is different because you're not as likely to simply 
> choose the first option, there can be a *lot* of files in the dir, and 
> typing an average file name is much easier.
> 
> Mind you, I generally prefer completion UIs that show the options before 
> you start typing, but xref-show-definitions-completing-read makes a 
> really strong case for it. Which is unfortunate, because otherwise it's 
> my #1 choice for xref-show-definitions-function's default value, and 
> changing Emacs's completion UI is not in the cards in any near future.
> 
> So I would only be happy if you disagree with this assessment.

I think our interpretation of "completion vs selection" are different,
at least to some extent.  For me, completion is for when you (almost)
know what you want to type, and type enough of it to have a single TAB
more or less do the rest of the job.  IOW, it's a typing-saving tool.
Selection is for when you don't know what to type, and need the full
list to choose from.  IOW, it's a discovery tool.

With that in mind, completion for symbols in invoking M-. and
completion for file names in invoking some file-related command have
the same traits, at least for me.  Where selection is needed, we pop
up the XREF buffer at the end.  This default operation makes sense to
me.  By contrast, using xref-show-definitions-completing-read, I'm
asked to choose twice: first in a "normal" completion context, then
again in a strange way (it says "Choose" without showing me anything
to choose from, and I need to type TAB to see a *Completions* buffer).
I guess to each their own, but the latter method strikes me as weird
and inconvenient.  IMO, its place is in Company-style "completion"
when writing code -- there one would like to see the list of
pertinents alternatives to select from without typing anything, not
when the user invokes a command and needs help in typing as few
characters as possible.



reply via email to

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