GNU bug report logs -
#67112
30.0.50; [PATCH] Fix completion annotations when using 'pcomplete-here-using-help'
Previous Next
Reported by: Jim Porter <jporterbugs <at> gmail.com>
Date: Sat, 11 Nov 2023 21:44:02 UTC
Severity: normal
Tags: patch
Found in version 30.0.50
Done: Jim Porter <jporterbugs <at> gmail.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 67112 in the body.
You can then email your comments to 67112 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
monnier <at> iro.umontreal.ca, bug-gnu-emacs <at> gnu.org
:
bug#67112
; Package
emacs
.
(Sat, 11 Nov 2023 21:44:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Jim Porter <jporterbugs <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
monnier <at> iro.umontreal.ca, bug-gnu-emacs <at> gnu.org
.
(Sat, 11 Nov 2023 21:44:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
X-Debbugs-Cc: monnier <at> iro.umontreal.ca
Starting from "emacs -Q -f shell" (or eshell, doesn't matter) on a
GNU/Linux system, type "cp -" and then press TAB. The completions buffer
shows a list of completions. However, they don't show the annotations,
which in this case should be a helpful string for any option taking an
argument.
For example, one completion is "--backup". This takes an optional
"CONTROL" argument, which should show in the completions list. However,
it doesn't. With the attached patch, the completions list now correctly
shows "--backup[=CONTROL]".
This was happening because 'pcomplete-here-using-help' passes along the
annotation as a text property on the first character of each completion
candidate. That property failed to propagate through
'completion-table-with-quoting' though. So the fix is to propagate text
properties on the first character of the candidate, since that's already
a convention in a couple places with completion tables.
(There's a larger question about whether 'pcomplete-here-using-help' is
doing this in the right way. Maybe instead of returning a list of
candidates with text properties for annotations and such, it should
instead return a programmed completion table that specifies an
'annotation-function' for the table's metadata. However, that's both a
much more invasive change, and I think we'd still want this patch to
help improve other parts of completion tables. For example, with this
patch, 'completion-table-merge' could annotate which table each
candidate is from, and then we could resolve the FIXME in that function.)
[0001-Forward-completion-text-properties-when-using-comple.patch (text/plain, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#67112
; Package
emacs
.
(Sun, 19 Nov 2023 23:17:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 67112 <at> debbugs.gnu.org (full text, mbox):
Version: 30.1
On 11/11/2023 1:43 PM, Jim Porter wrote:
> This was happening because 'pcomplete-here-using-help' passes along the
> annotation as a text property on the first character of each completion
> candidate. That property failed to propagate through
> 'completion-table-with-quoting' though. So the fix is to propagate text
> properties on the first character of the candidate, since that's already
> a convention in a couple places with completion tables.
Merged to the master branch as 16ac377aab2, and closing this now.
Reply sent
to
Jim Porter <jporterbugs <at> gmail.com>
:
You have taken responsibility.
(Mon, 20 Nov 2023 00:49:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Jim Porter <jporterbugs <at> gmail.com>
:
bug acknowledged by developer.
(Mon, 20 Nov 2023 00:49:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 67112-done <at> debbugs.gnu.org (full text, mbox):
On 11/19/2023 3:16 PM, Jim Porter wrote:
> Merged to the master branch as 16ac377aab2, and closing this now.
Oops. Closing this *now*.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 18 Dec 2023 12:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 145 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.