GNU bug report logs - #61283
29.0.60; pcomplete-completions-at-point loses text properties, breaking pcomplete-from-help annotations

Previous Next

Package: emacs;

Reported by: Daniel Mendler <mail <at> daniel-mendler.de>

Date: Sun, 5 Feb 2023 00:24:01 UTC

Severity: normal

Merged with 65844

Found in versions 29.0.60, 30.0.50

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Daniel Mendler <mail <at> daniel-mendler.de>, liuhui1610 <at> gmail.com, 61283 <at> debbugs.gnu.org, arstoffel <at> gmail.com, jporterbugs <at> gmail.com
Subject: bug#61283: 29.0.60; pcomplete-completions-at-point loses text properties, breaking pcomplete-from-help annotations
Date: Thu, 18 May 2023 09:37:57 -0400
>> But this means that the following simple patch to `completion--twq-all'
>> also fixes the issue. It ensures that the original string is preserved
>> in the common case where string quoting was ineffective. This approach
>> may be better than refactoring pcomplete.el. The patch may even be safe
>> enough for emacs-29.

Sounds like a good enough "quick hack" for Emacs-29, indeed.

I don't think it's a good long term solution, tho, because it's a hack
in the generic `completion-table-with-quoting` code added specifically
for `pcomplete-from-help`.  I'd *much* prefer a hack which touches
only `pcomplete.el`.
[ Maybe I'd be OK with a solution in the generic code but only if it's
  an actual robust solution, rather than a hack.  ]

> Why do you think it will be safe for emacs-29?

Because it replace a string with one which is `equal` to the other.
There is of course a risk that the string object is later mutated under
the assumption that it's a fresh new string, so it's not 100% safe in
theory, but I'd judge it to be very safe.

> And why do we have to fix this in Emacs 29.1?

We don't.  From where I stand the main interest of the
`pcomplete-from-help` feature is the completion itself rather than the
additional help it can provide, so I'm perfectly fine with not fixing it
for Emacs-29.






This bug report was last modified 1 year and 278 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.