From: Gregory Heytings <gregory@heytings.org>
To: Daniel Mendler <mail@daniel-mendler.de>
Cc: Jim Porter <jporterbugs@gmail.com>, Eli Zaretskii <eliz@gnu.org>,
60464@debbugs.gnu.org, Stefan Monnier <monnier@iro.umontreal.ca>
Subject: bug#60464: 29.0.60; Regression - pcomplete-arg fails with argument 'last
Date: Sun, 01 Jan 2023 17:28:10 +0000 [thread overview]
Message-ID: <226b32f79f9a9894478c@heytings.org> (raw)
In-Reply-To: <98f323a8-5e92-b81f-3cd0-a31447d6eb65@daniel-mendler.de>
>> After working a bit more on this bug, I concluded that what Stefan
>> initially suggested, to use the string representation of the value, is
>> safer than trying to extract the string corresponding to the argument
>> that the user typed in from the command line.
>
> This approach seems totally wrong to me.
>
Feel free to suggest something else.
>
> You now introduced a third representation.
>
No, there are two representations: pcomplete-arg returns a string
representation of the value, with that value attached to the string, when
its caller does not expect a non-string value.
>
> Also the approach is pointless. Why would the caller of the function
> want to get the string representation, given that the original value is
> available as text property?
>
Because the pcomplete functions, in particular pcomplete-here-using-help,
expect strings.
>
> I suggest you go back to the way you implemented this before and return
> the actual command line string with the value attached as text property.
> I don't see why that should be less safe. It is just a matter of
> determining the correct buffer boundaries.
>
Perhaps I should have explained what I mean by "less safe": it is
unexpectedly complex to compute the correct buffer boundaries in all
cases. If you don't believe me, try it yourself.
next prev parent reply other threads:[~2023-01-01 17:28 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 [this message]
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
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=226b32f79f9a9894478c@heytings.org \
--to=gregory@heytings.org \
--cc=60464@debbugs.gnu.org \
--cc=eliz@gnu.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.