GNU bug report logs - #60464
29.0.60; Regression - pcomplete-arg fails with argument 'last

Previous Next

Package: emacs;

Reported by: Daniel Mendler <mail <at> daniel-mendler.de>

Date: Sun, 1 Jan 2023 10:48:02 UTC

Severity: normal

Found in version 29.0.60

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Gregory Heytings <gregory <at> heytings.org>
Cc: Jim Porter <jporterbugs <at> gmail.com>, Eli Zaretskii <eliz <at> gnu.org>, 60464 <at> debbugs.gnu.org, Daniel Mendler <mail <at> daniel-mendler.de>
Subject: bug#60464: 29.0.60; Regression - pcomplete-arg fails with argument 'last
Date: Wed, 04 Jan 2023 09:25:48 -0500
>  (defun pcomplete-arg (&optional index offset)
>    (let ((arg
>           (nth (+ (pcase index
>  	           ('first 0)
>  	           ('last  pcomplete-last)
>  	           (_      (- pcomplete-index (or index 0))))
>  	         (or offset 0))
>                pcomplete-args)))
> -    arg
> +    (if (or (stringp arg)
> +            (eq index 'last))
> +        arg
> +      (propertize
> +       (car (split-string (pcomplete-actual-arg index offset)))
> +       'pcomplete-arg-value arg))))
>
> IOW, instead of unconditionally returning arg, we now sometimes (when arg is
> not already a string and when index is not last) return the textual
> representation of that argument (what the user typed in) with the value of
> arg attached to it.

I don't understand the `last` condition.
Could you explain it (e.g. with a concrete example that breaks if you
don't include it)?


        Stefan





This bug report was last modified 2 years and 152 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.