Subject: bug#23859: closed (Re: bug#23859: 25.1.50; Inconsistent behavior of (format "%_width_s" string-has-text-property))

From: [email-masked] (GNU bug Tracking System)
Date: Tue, 28 Jun 2016 16:39:02 +0000

Your bug report

#23859: 25.1.50; Inconsistent behavior of (format "%_width_s" string-has-text-property)

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
23859: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=23859
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#23859: 25.1.50; Inconsistent behavior of (format "%_width_s" string-has-text-property)
From: Eli Zaretskii <[email-masked]>
To: Chunyang Xu <[email-masked]>
Cc: [email-masked]
Date: Tue, 28 Jun 2016 19:37:51 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

> From: Chunyang Xu <[email-masked]>
> Date: Wed, 29 Jun 2016 00:28:46 +0800
> Cc: [email-masked]
> 
> > (format "%4s" (propertize "hi" 'face 'bold))
> >     ⇒ #("  hi" 0 4 (face bold))
> >
> > If this still breaks your code, I'm sorry, but you will have to adapt.
> > The old behavior was buggy and inconsistent (see bug#23730), and the
> > only way to make the behavior consistent and easily predictable was to
> > copy the properties onto the entire text produced from a given
> > argument, including any padding.  Which is what should be expected to
> > happen on master now.
> 
> 
> Thanks. It works as you described. My code now works as usual without
> any changes, since white spaces (with the text properties I want)
> still remains invisible.

Great, closing.

Thanks for reporting the bug.

Subject: 25.1.50; Inconsistent behavior of (format "%_width_s" string-has-text-property)
From: Chunyang Xu <[email-masked]>
To: [email-masked]
Date: Tue, 28 Jun 2016 12:32:57 +0800
List-Id: <debbugs-submit.debbugs.gnu.org>

;; 24.5
(format "%4s" (propertize "hi" 'face 'bold))
    ⇒ #("  hi" 2 4 (face bold))

;; master
(format "%4s" (propertize "hi" 'face 'bold))
    ⇒ #("  hi" 0 2 (face bold))

is the new behavior wanted? I have code relying on the old behavior.

In GNU Emacs 25.1.50.1 (x86_64-apple-darwin15.5.0, NS appkit-1404.47 Version 10.11.5 (Build 15F34))
 of 2016-06-25 built on MBA.lan
Repository revision: a985d2b09bb88f31b27b02c3131cb34c5879d767