bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#61283: 29.0.60; pcomplete-completions-at-point loses text properties


From: Stefan Monnier
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
User-agent: Gnus/5.13 (Gnus v5.13)

>> 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.







reply via email to

[Prev in Thread] Current Thread [Next in Thread]