unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Gregory Heytings <gregory@heytings.org>
To: Daniel Mendler <mail@daniel-mendler.de>
Cc: 60021@debbugs.gnu.org
Subject: bug#60021: 29.0.60; Eshell completion errors in the presence of buffer redirects
Date: Tue, 20 Dec 2022 08:55:13 +0000	[thread overview]
Message-ID: <c49d952daba00d1a2fca@heytings.org> (raw)
In-Reply-To: <017a4928-bec0-68a8-82ea-ea8c305b32c4@daniel-mendler.de>


>> Daniel, can you please try the attached patch and tell us if it fixes 
>> the issue without introducing regressions?
>
> Thanks for looking into this!
>

Thanks for your reply!

>
> I inspected the patch and it seems like a reasonable fix for the 
> problem. I wonder about the introduction of the `pcomplete-arg-value' 
> string property. Is the introduction of this property necessary? Do you 
> have a use case for this right now?
>

Not right now, no.  It's a kind of compromise.  Previously pcomplete-args 
(and pcomplete.el in general) assumed that 
pcomplete-parse-argument-function would return strings, and only strings. 
When that's not the case, such as in eshell, it fails.  For example, with 
your recipe, when '#<*scratch*>' is parsed, a buffer object is returned. 
That value could have been transformed into a string with 'format', but 
that would mean that the original value has been lost (from the point of 
view of pcomplete).  The solution we found is to wrap that value in a 
string, the textual representation of the argument, namely the string 
"#<*scratch*>" in your recipe.  With that solution it becomes possible to 
design other pcomplete functions that would use that value.

>
> If the recipes of #59956 and #60021 are fixed by this on your setup, I 
> trust it will work properly on my setup. No reason for additional 
> testing on my side.
>

They are fixed, but I don't use eshell (and neither does Stefan M IIUC), 
so I may very well have missed some important other cases in which that 
fix would introduce a regression.






  reply	other threads:[~2022-12-20  8:55 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-12 21:23 bug#60021: 29.0.60; Eshell completion errors in the presence of buffer redirects Daniel Mendler
2022-12-12 22:24 ` Gregory Heytings
2022-12-12 22:51   ` Daniel Mendler
2022-12-12 23:34     ` Gregory Heytings
2022-12-13 13:46       ` Daniel Mendler
2022-12-13 13:50         ` Gregory Heytings
2022-12-13 14:15           ` Daniel Mendler
2022-12-13 14:20             ` Gregory Heytings
2022-12-19 22:24               ` Gregory Heytings
2022-12-20  6:45                 ` Daniel Mendler
2022-12-20  8:55                   ` Gregory Heytings [this message]
2022-12-20  9:47                     ` Daniel Mendler
2022-12-20 10:00                       ` Gregory Heytings
2022-12-29 22:03                         ` Gregory Heytings
2022-12-30  4:42                           ` Daniel Mendler
2022-12-12 22:41 ` Augusto Stoffel
2022-12-12 22:45   ` Daniel Mendler

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=c49d952daba00d1a2fca@heytings.org \
    --to=gregory@heytings.org \
    --cc=60021@debbugs.gnu.org \
    --cc=mail@daniel-mendler.de \
    /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).