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


Message #65 received at 61283 <at> debbugs.gnu.org (full text, mbox):

From: Daniel Mendler <mail <at> daniel-mendler.de>
To: Jim Porter <jporterbugs <at> gmail.com>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: liuhui1610 <at> gmail.com, Eli Zaretskii <eliz <at> gnu.org>,
 Augusto Stoffel <arstoffel <at> gmail.com>, 61283 <at> debbugs.gnu.org
Subject: Re: bug#61283: 29.0.60; pcomplete-completions-at-point loses text
 properties, breaking pcomplete-from-help annotations
Date: Thu, 18 May 2023 10:37:40 +0200
On 5/18/23 09:11, Jim Porter wrote:
> Hmm, yeah. That would be pretty tricky to get working 100% reliably. 
> Like Daniel mentions, I think this doesn't come up (often?) for the 
> specific case in this bug, but a fully-robust solution would be ideal. 
> Maybe the 'metadata' operation[1] would be usable for this with some 
> extra work. I'll have to think about this...
> 
> ... since getting a 100% reliable solution here might take quite a bit 
> more work than I thought, how about a not-quite-100% hack? Instead of 
> propertizing the first character of each candidate, propertize the 
> *last* character (or the entire string?). That won't get thrown out 
> quite so easily.

I've tried propertizing other parts of the string and finding the
position with `text-property-not-all' in the annotation function.
Unfortunately this did not work since the quoting in
`completion--twq-all' recreates the entire string. However it can happen
that the string content after quoting just stays the same. This is what
I tried to use in my patch, by just returning the original string in
that case.

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.