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: Jim Porter <jporterbugs <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>, Daniel Mendler <mail <at> daniel-mendler.de>
Cc: liuhui1610 <at> gmail.com, arstoffel <at> gmail.com, monnier <at> iro.umontreal.ca, 61283 <at> debbugs.gnu.org
Subject: bug#61283: 29.0.60; pcomplete-completions-at-point loses text properties, breaking pcomplete-from-help annotations
Date: Wed, 17 May 2023 23:44:17 -0700
On 5/17/2023 10:39 PM, Eli Zaretskii wrote:
> Why do you think it will be safe for emacs-29?
> 
> And why do we have to fix this in Emacs 29.1?  This only affects
> Eshell, AFAIU, is that true?

It affects M-x shell for me too. Maybe I'm just doing something wrong 
though. I tried this:

  emacs -Q -f shell
  ls -<TAB>

From that, I get completions like "--block-size=", which doesn't show 
the annotation. With the annotation, it should be "--block-size=SIZE".

Currently, Pcomplete passes the annotation around by propertizing the 
first character of the candidate string. That ends up not working, since 
the completion code uses the characters in the buffer and concats the 
suffix from Pcomplete. So then the pcomplete-annotation almost always 
gets thrown out.

I think a safe (but incomplete) fix would be to put the annotation on 
the *last* character of the candidate string. Then it usually wouldn't 
get thrown out. It won't work in *every* case, but it would only fail in 
rare edge cases.




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.