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

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

bug#67112: closed (30.0.50; [PATCH] Fix completion annotations when usin


From: GNU bug Tracking System
Subject: bug#67112: closed (30.0.50; [PATCH] Fix completion annotations when using 'pcomplete-here-using-help')
Date: Mon, 20 Nov 2023 00:49:01 +0000

Your message dated Sun, 19 Nov 2023 16:48:41 -0800
with message-id <dd51d668-722b-4aea-f357-ac8ee63ae131@gmail.com>
and subject line Re: bug#67112: 30.0.50; [PATCH] Fix completion annotations 
when using 'pcomplete-here-using-help'
has caused the debbugs.gnu.org bug report #67112,
regarding 30.0.50; [PATCH] Fix completion annotations when using 
'pcomplete-here-using-help'
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
67112: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=67112
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: 30.0.50; [PATCH] Fix completion annotations when using 'pcomplete-here-using-help' Date: Sat, 11 Nov 2023 13:43:04 -0800
X-Debbugs-Cc: monnier@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.)

Attachment: 0001-Forward-completion-text-properties-when-using-comple.patch
Description: Text document


--- End Message ---
--- Begin Message --- Subject: Re: bug#67112: 30.0.50; [PATCH] Fix completion annotations when using 'pcomplete-here-using-help' Date: Sun, 19 Nov 2023 16:48:41 -0800
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*.


--- End Message ---

reply via email to

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