GNU bug report logs - #33740
[PATCH] Customizable flymake mode-line indicator

Previous Next

Package: emacs;

Reported by: Andrii Kolomoiets <andreyk.mad <at> gmail.com>

Date: Fri, 14 Dec 2018 09:21:01 UTC

Severity: wishlist

Tags: fixed, patch

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 33740 <at> debbugs.gnu.org, joaotavora <at> gmail.com, andreyk.mad <at> gmail.com
Subject: Re: bug#33740: [PATCH] Customizable flymake mode-line indicator
Date: Thu, 19 Sep 2019 17:28:40 +0200
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> I did something as radical as actually reading the doc string to
> mode-line-format, and doing this
>
> (put 'my-format 'risky-local-variable t)
>
> makes this work as expected.  Then I guess I can proceed with the
> original flymake feature implementation.

But... no.

As a test case, go to any .el file in Emacs and say `M-x flymake-mode',
and you'll get a lighter in the minor modes in the mode lines saying
something like " Flymake[0 3 17]" or whatever.

Then try this:

(setq flymake--mode-line-format (concat (propertize " bar " 'face 'bold) "foo"))

Both "bar" and "foo" will be bold in the mode line.

(setq flymake--mode-line-format (concat "foo" (propertize " bar " 'face 'bold)))

Neither "foo" nor "bar" will be bold.

So it seems like whatever is computing the mode line is somehow copying
the faces from the first character in the lighter string and applies
them to the entire lighter?  Very confusing.

This does not happen outside of the minor modes in the mode line (i.e.,
if I add an element outside of the minor modes, text properties are not
overwritten this way).

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 4 years and 140 days ago.

Previous Next


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