GNU bug report logs - #26291
In mode-line-format, `:propertize' drops some existing text properties

Previous Next

Package: emacs;

Reported by: Clément Pit-Claudel <cpitclaudel <at> gmail.com>

Date: Wed, 29 Mar 2017 02:40:01 UTC

Severity: minor

Tags: moreinfo

Merged with 28595

Found in version 26.0.60

Fixed in version 26.1

Done: Clément Pit--Claudel <clement.pitclaudel <at> live.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 26291 in the body.
You can then email your comments to 26291 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#26291; Package emacs. (Wed, 29 Mar 2017 02:40:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Clément Pit-Claudel <cpitclaudel <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 29 Mar 2017 02:40:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Clément Pit-Claudel <cpitclaudel <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: In mode-line-format, `:propertize' drops some existing text properties
Date: Tue, 28 Mar 2017 19:42:02 -0400
Hi all,

Based on the docs, the three following forms should yield the same results:

(format-mode-line `(:propertize #("AB" 1 2 (x 0)) y 0))
(format-mode-line `(:propertize ("A" #("B" 0 1 (x 0))) y 0))
(format-mode-line '(:propertize ("A" (:propertize "B" x 0)) y 0))

But they don't:

(format-mode-line `(:propertize #("AB" 1 2 (x 0)) y 0))
=> #("AB" 0 2 (y 0)) ;; x 0 is dropped

(format-mode-line '(:propertize ("A" (:propertize "B" x 0)) y 0))
⇒ #("AB" 0 1 (y 0) 1 2 (x 0)) ;; y 0 is dropped on 1..2

(format-mode-line `(:propertize ("A" #("B" 0 1 (x 0))) y 0))
⇒ #("AB" 0 1 (y 0) 1 2 (y 0 x 0)) ;; Seems right

Am I misreading the docs?
Clément.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#26291; Package emacs. (Wed, 29 Mar 2017 14:29:01 GMT) Full text and rfc822 format available.

Message #8 received at 26291 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Clément Pit-Claudel <cpitclaudel <at> gmail.com>
Cc: 26291 <at> debbugs.gnu.org
Subject: Re: bug#26291: In mode-line-format,
 `:propertize' drops some existing text properties
Date: Wed, 29 Mar 2017 17:28:34 +0300
> From: Clément Pit-Claudel <cpitclaudel <at> gmail.com>
> Date: Tue, 28 Mar 2017 19:42:02 -0400
> 
> (format-mode-line `(:propertize #("AB" 1 2 (x 0)) y 0))
> (format-mode-line `(:propertize ("A" #("B" 0 1 (x 0))) y 0))
> (format-mode-line '(:propertize ("A" (:propertize "B" x 0)) y 0))
> 
> But they don't:
> 
> (format-mode-line `(:propertize #("AB" 1 2 (x 0)) y 0))
> => #("AB" 0 2 (y 0)) ;; x 0 is dropped
> 
> (format-mode-line '(:propertize ("A" (:propertize "B" x 0)) y 0))
> ⇒ #("AB" 0 1 (y 0) 1 2 (x 0)) ;; y 0 is dropped on 1..2
> 
> (format-mode-line `(:propertize ("A" #("B" 0 1 (x 0))) y 0))
> ⇒ #("AB" 0 1 (y 0) 1 2 (y 0 x 0)) ;; Seems right
> 
> Am I misreading the docs?

Which docs were you reading that led you to believe the above should
work?

(And btw, why did you use backticks here?  I don't think they are
needed in this case.)




Forcibly Merged 26291 28559. Request was from Noam Postavsky <npostavs <at> users.sourceforge.net> to control <at> debbugs.gnu.org. (Mon, 25 Sep 2017 23:53:01 GMT) Full text and rfc822 format available.

Disconnected #28559 from all other report(s). Request was from Noam Postavsky <npostavs <at> users.sourceforge.net> to control <at> debbugs.gnu.org. (Tue, 26 Sep 2017 00:20:02 GMT) Full text and rfc822 format available.

Removed tag(s) fixed. Request was from Noam Postavsky <npostavs <at> users.sourceforge.net> to control <at> debbugs.gnu.org. (Tue, 26 Sep 2017 00:20:02 GMT) Full text and rfc822 format available.

Forcibly Merged 26291 28595. Request was from Noam Postavsky <npostavs <at> users.sourceforge.net> to control <at> debbugs.gnu.org. (Tue, 26 Sep 2017 00:20:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 28 Oct 2017 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 175 days ago.

Previous Next


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