From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Jim Porter <jporterbugs@gmail.com>
Cc: 61221-done@debbugs.gnu.org
Subject: bug#61221: 30.0.50; [PATCH] Support completion of quoted variable refs in Eshell
Date: Thu, 23 Feb 2023 17:39:02 -0500 [thread overview]
Message-ID: <jwvwn48c8l5.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <dfc6502e-3f91-ef8f-2891-e3cab123b342@gmail.com> (Jim Porter's message of "Thu, 23 Feb 2023 14:11:54 -0800")
>>> + ('lambda ; test-completion
>>> + (let ((result (test-completion string names pred)))
>>> + (if (eq result t) string result)))
>> Hmm... why not just always return `result`?
>
> As I understand it, returning 't' means "there is just one matching
> completion, and the match is exact"[1], but in this case, that's not really
> true: after completing "~user/" there are still more matching completions
> (the contents of the user's home directory).
What you describe is for `try-completion`, not `test-completion`.
> This is really just trying to match what happens when calling
> 'completion-file-name-table':
>
> (completion-file-name-table "~user/" nil nil)
> => "~user/"
>
> (try-completion "~user/" '("~user/") nil)
> => t
The `action` arg is not `lambda` is these examples.
Stefan
next prev parent reply other threads:[~2023-02-23 22:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-02 2:28 bug#61221: 30.0.50; [PATCH] Support completion of quoted variable refs in Eshell Jim Porter
2023-02-05 15:33 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-23 6:42 ` Jim Porter
2023-02-23 18:02 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-23 22:11 ` Jim Porter
2023-02-23 22:39 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-02-23 23:17 ` Jim Porter
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=jwvwn48c8l5.fsf-monnier+emacs@gnu.org \
--to=bug-gnu-emacs@gnu.org \
--cc=61221-done@debbugs.gnu.org \
--cc=jporterbugs@gmail.com \
--cc=monnier@iro.umontreal.ca \
/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).