GNU bug report logs - #62847
29.0.90; Propertized space in Org Agenda's mode-name

Previous Next

Package: emacs;

Reported by: Gustavo Barros <gusbrs.2016 <at> gmail.com>

Date: Fri, 14 Apr 2023 23:05:02 UTC

Severity: normal

Found in version 29.0.90

Full log


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

From: Mattias EngdegÄrd <mattiase <at> acm.org>
To: Ihor Radchenko <yantar92 <at> posteo.net>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 62847 <at> debbugs.gnu.org,
 Stefan Monnier <monnier <at> iro.umontreal.ca>, gusbrs.2016 <at> gmail.com
Subject: Re: bug#62847: 29.0.90; Propertized space in Org Agenda's mode-name
Date: Sun, 16 Apr 2023 14:02:39 +0200
16 apr. 2023 kl. 13.29 skrev Ihor Radchenko <yantar92 <at> posteo.net>:

> I am wondering if there is any relevant warning raised by the byte
> compiler when doing something like
> (let ((str " ")) (add-text-properties 0 1 '(foo bar) str))

No, but it wouldn't be very hard to add one, but it would miss a lot of code that has no idea whether it is working on a string literal or not.

Counter to my usual preference for static checks I'd prefer a dynamic warning in this case because it would be precise and the run-time cost would likely be acceptable.

That requires a 'literal' flag for string objects and there's no obvious space for one, but perhaps we can grab the LSB of the `intervals` pointer.

Even if such a check defaults to off, it could be enabled selectively to root out bugs like this one. I'll see what I can do.





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

Previous Next


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