GNU bug report logs -
#61283
29.0.60; pcomplete-completions-at-point loses text properties, breaking pcomplete-from-help annotations
Previous Next
Full log
Message #35 received at 61283 <at> debbugs.gnu.org (full text, mbox):
On 5/17/23 07:45, Jim Porter wrote:
> I do have a mostly-complete patch for this though, but it's *certainly*
> too complex for Emacs 29. The general strategy I'm using is to rely on
> the fact that the completion list for 'try-completion', etc can be an
> alist where the "keys" (i.e the CAR of each element of the main list)
> are the strings to be completed. So then you can do something like:
>
> '(("foo" (pcomplete-annotation . "=bar"))
> ;; ...
> )
>
> Then, in 'pcomplete-completions-at-point', I can get the annotations[1]
> in the :annotation-function on the completion table that we return.
>
> This is obviously a pretty invasive change and would require changing a
> number of internal assumptions in Pcomplete (though I don't think it
> would break the public API). If this sounds even remotely like a
> reasonable way to go forward, I'll try to clean up my patch a bit more
> and post it for feedback; it's currently a bit of a mess, I'm afraid...
Thank you. Carrying the annotation and echo information as part of an
alist seems like a good approach, since interference with the candidate
strings cannot lead to problems. Ideally the candidate strings would not
get modified like this by the `completion-table-with-quoting', but that
may be unavoidable given the nature of `completion-table-with-quoting'.
If the modification is too complex, Emacs 29 is of course not the right
place for it.
Daniel
This bug report was last modified 1 year and 277 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.