From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Gregory Heytings <gregory@heytings.org>
Cc: Daniel Mendler <mail@daniel-mendler.de>,
Eli Zaretskii <eliz@gnu.org>,
60464@debbugs.gnu.org, Jim Porter <jporterbugs@gmail.com>
Subject: bug#60464: 29.0.60; Regression - pcomplete-arg fails with argument 'last
Date: Wed, 04 Jan 2023 10:56:26 -0500 [thread overview]
Message-ID: <jwvr0wae1q5.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <ae6be09dfea753ef1af9@heytings.org> (Gregory Heytings's message of "Wed, 04 Jan 2023 15:39:26 +0000")
Gregory Heytings [2023-01-04 15:39:26] wrote:
>> Your implementation with the 'last condition doesn't make sense.
> Can you please try to make it fail?
>> It is not a good idea to treat 'last specially such that we return a
>> different type in this case.
> I'm not the one who wrote that code. According to my analysis of the code,
> the only place where pcomplete-arg is called with a 'last' argument is
> pcomplete-parse-arguments, where you will see the following:
>
> (defun pcomplete-parse-arguments (&optional expand-p)
> ...
> (let ((results (funcall pcomplete-parse-arguments-function)))
> (when results
> (setq ...
> pcomplete-stub (pcomplete-arg 'last))
> (let ...
> (if (and (listp pcomplete-stub) ;??
> (not pcomplete-expand-only-p))
> ;; If `pcomplete-stub' is a list, it means it's a list of
> ;; completions computed during parsing, e.g. Eshell uses
> ;; that to turn globs into lists of completions.
That's also my understanding. So I think The Right Fix (or at least The
Better Fix) is to pay no special attention to `last` in `pcomplete-arg`
and instead in the above code of `pcomplete-parse-arguments` to look for
the `pcomplete-arg-value` property.
Maybe for `emacs-29` we can use your patch (with a comment about why
`last` is handled specially pointing to its handling in
`pcomplete-parse-arguments`) and then in `master` we remove this special
handling of `last`?
Stefan
next prev parent reply other threads:[~2023-01-04 15:56 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-01 10:47 bug#60464: 29.0.60; Regression - pcomplete-arg fails with argument 'last Daniel Mendler
2023-01-01 11:16 ` Gregory Heytings
2023-01-01 11:21 ` Daniel Mendler
2023-01-01 11:35 ` Gregory Heytings
2023-01-01 11:53 ` Daniel Mendler
2023-01-01 12:04 ` Gregory Heytings
2023-01-01 16:59 ` Gregory Heytings
2023-01-01 17:18 ` Daniel Mendler
2023-01-01 17:28 ` Gregory Heytings
2023-01-01 17:34 ` Daniel Mendler
2023-01-01 17:45 ` Gregory Heytings
2023-01-01 18:02 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-01 18:26 ` Daniel Mendler
2023-01-01 17:47 ` Eli Zaretskii
2023-01-01 18:29 ` Gregory Heytings
2023-01-01 20:01 ` Eli Zaretskii
2023-01-01 17:57 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-01 18:19 ` Gregory Heytings
2023-01-01 18:38 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-01 18:42 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-01 19:13 ` Gregory Heytings
2023-01-04 5:51 ` Jim Porter
2023-01-04 13:48 ` Gregory Heytings
2023-01-04 14:25 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-04 14:35 ` Daniel Mendler
2023-01-04 14:46 ` Gregory Heytings
2023-01-04 15:14 ` Daniel Mendler
2023-01-04 15:18 ` Eli Zaretskii
2023-01-04 15:22 ` Daniel Mendler
2023-01-04 15:39 ` Gregory Heytings
2023-01-04 15:48 ` Daniel Mendler
2023-01-04 15:56 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-01-04 16:08 ` Gregory Heytings
2023-01-14 21:27 ` Gregory Heytings
2023-01-04 18:49 ` Jim Porter
2023-01-04 18:41 ` Jim Porter
2023-01-04 14:36 ` Gregory Heytings
2023-01-04 15:19 ` Daniel Mendler
2023-01-04 14:50 ` Eli Zaretskii
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=jwvr0wae1q5.fsf-monnier+emacs@gnu.org \
--to=bug-gnu-emacs@gnu.org \
--cc=60464@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=gregory@heytings.org \
--cc=jporterbugs@gmail.com \
--cc=mail@daniel-mendler.de \
--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 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.