all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: help-gnu-emacs@gnu.org
Subject: Re: Completion: display of candidates
Date: Tue, 19 Feb 2019 10:28:36 -0500	[thread overview]
Message-ID: <jwv7edviz01.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: 87lg2cgruy.fsf@gnu.org

>> For example `partial-completion` (which is included in the default
>> `completion-styles`) does accept * so you can do `M-x r*v*uf TAB` to
>> find revert-buffer.
> Hm, that there can be dependencies between (1) finding completion
> candidates and (2) completion styles doesn't spark joy in my heart.

The completion table is not necessarily looked up with the user's typed
string.  It's meant to be nothing more than a standardized
representation of a *set* of candidates.  How this set is filtered on
the basis of the user's string is under the control of the
completion styles.

> I thought of (1) as a kind of generic backend and (2) as a frontend
> which users select based on personal preference.  But since both have
> to work with the user's input string, I don't see how to make it
> better...

The completion-table does not see "the user's input string".  It only
sees "a string" (chosen by the completion-style) and should return the
set of candidates which have that string as a prefix.  In some cases,
the string it will see is "" and it should hence return the complete
list of candidates (after which the completion style will perform its
own filtering on it).

> Yeah, in the end I've waived my hands and went without text properties
> and just selected a unicode character which is unlikely to be used in
> file names as separator.  The results are quite satisfying.

Great,


        Stefan




  reply	other threads:[~2019-02-19 15:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-18  7:54 Completion: display of candidates Tassilo Horn
2019-02-18 13:26 ` Stefan Monnier
2019-02-18 14:55   ` Tassilo Horn
2019-02-18 18:05     ` Stefan Monnier
2019-02-18 19:24       ` Tassilo Horn
2019-02-18 20:48         ` Stefan Monnier
2019-02-19  7:27           ` Tassilo Horn
2019-02-19 15:28             ` Stefan Monnier [this message]
     [not found]               ` <87imxe1pfs.fsf@gnu.org>
2019-02-20 16:54                 ` Stefan Monnier

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=jwv7edviz01.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=help-gnu-emacs@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.