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@debbugs.gnu.org
Subject: bug#61221: 30.0.50; [PATCH] Support completion of quoted variable refs in Eshell
Date: Sun, 05 Feb 2023 10:33:42 -0500 [thread overview]
Message-ID: <jwv5ycgjfxs.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <0e3cf425-be9d-4759-d024-ac07ccecba9c@gmail.com> (Jim Porter's message of "Wed, 1 Feb 2023 18:28:08 -0800")
> Probably the most controversial part of this patch is in #0002, where
> I added another dynamic variable 'pcomplete-exit-function' that Pcomplete
> handlers can set to tell Pcomplete what to do after exiting
> a completion. Maybe it would be better to have handlers throw some special
> value for 'pcomplete-completions' that contains this info (sort of like the
> value that a 'completion-at-point-function' returns). I'm not sure what the
> best (and most-compatible) way to do this would be...
BTW, a low-tech way to get similar results is to change your completion
table. Instead of having entries like
user-login-name
make it contains entries like:
user-login-name"
or
user-login-name'
or even
'user-login-name'
[ assuming you change the `pcomplete-stub` so that it also contains the
leading ' of course. ]
Regarding `pcomplete-exit-function`:
- It's ugly and I don't like it, but given the general design of the
current Pcomplete API, I think it's OK.
- Please add a good docstring to that variable (the fact that the other
vars nearby don't have any is no excuse, instead it's a(nother)
problem that should be fixed).
- Maybe `pcomplete-exit-function` should override the default exit
function (i.e. the handing of `pcomplete-termination-string`) rather
than being added to it?
E.g. we could start with `pcomplete-exit-function` bound to the
default (the one that handles `pcomplete-termination-string`) and let
the rest of the code modify it either with `setq` (to completely
override) or `add-function`.
Stefan
next prev parent reply other threads:[~2023-02-05 15:33 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 [this message]
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
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=jwv5ycgjfxs.fsf-monnier+emacs@gnu.org \
--to=bug-gnu-emacs@gnu.org \
--cc=61221@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).