GNU bug report logs - #76182
31.0.50; minibuffer-allow-text-properties not reliable

Previous Next

Package: emacs;

Reported by: Visuwesh <visuweshm <at> gmail.com>

Date: Mon, 10 Feb 2025 16:29:01 UTC

Severity: normal

Found in version 31.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Visuwesh <visuweshm <at> gmail.com>, Juri Linkov <juri <at> linkov.net>
Cc: 76182 <at> debbugs.gnu.org
Subject: bug#76182: 31.0.50; minibuffer-allow-text-properties not reliable
Date: Tue, 11 Feb 2025 14:11:09 +0200
> From: Visuwesh <visuweshm <at> gmail.com>
> Date: Mon, 10 Feb 2025 21:58:07 +0530
> 
> Despite what the docstring says, setting the variable to t does not seem
> to be reliable.  Take the following scenario:
> 
>         1. emacs -Q
>         2. Paste in
>             (let ((cand (list (propertize "test" 'prop 1)
>                               (propertize "test1" 'prop 2))))
>               (minibuffer-with-setup-hook
>                   (lambda ()
>                     (setq-local minibuffer-allow-text-properties t))
>                 (get-text-property 0 'prop (completing-read "test: " cand nil t))))
>            *scratch* buffer or wherever.
>         3. Evaluate the form.
>         4. In the minibuffer prompt, type "test" then press RET.
>         5. Observe how the return value is nil.
>         6. Evaluate the form again but this time press TAB and RET.
>         7. Observe how it returns 1 as expected.
>         8. Evaluate the form again but this time type "te", press TAB,
>            type "1" and press RET.
>         9. Observe how it returns nil.  Here if you examine the string
>            returned, you will find that the text-property is retained
>            only for indices 2--5.
> 
> Is this expected?  I would expect the form to always return the value of
> the property 'prop' regardless how I completed the string.

Juri, any comments?




This bug report was last modified 83 days ago.

Previous Next


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