all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Question regarding flymake and the mode line
@ 2020-05-08  7:25 Fredrik Salomonsson
  2020-05-08 15:33 ` Stefan Monnier
  0 siblings, 1 reply; 2+ messages in thread
From: Fredrik Salomonsson @ 2020-05-08  7:25 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,

I like to keep my mode line to a single color. Blueish when active and gray
when inactive. But flymake messes up my color scheme as it shows a pink and
orange number regardless of the state of the mode line.

From what I can understand, flymake; for the error number face uses the
`compilation-error' face to set the face property when constructing the
string for the mode line. Similar for the warning number. I can set the
compilation faces to blue and that will set the correct color for when the
mode line is active. But this messes up the compilation colors, and the
number is the wrong color when the mode line is inactive.

Is there a way to tell flymake to respect the colors from mode-line and
mode-line-inactive?

I tried adding an advice around the lighter for flymake and remove the
faces. But that makes flymake disappear from the mode line entirely. Not
sure why.

(defun plattfot--strip-text-properties (flymake--mode-line-format)
  "Remove text properties from FLYMAKE--MODE-LINE-FORMAT."
  (let ((str (funcall flymake--mode-line-format)))
    (remove-text-properties 0 (length str) '(face nil) str)
    str))

(advice-add 'flymake--mode-line-format :around
#'plattfot--strip-text-properties)

Using emacs-26.3 and flymake-1.0.8. My theme is here:
https://github.com/plattfot/plattfot-theme.el

Thanks
-- 
s/Fred[re]+i[ck]+/Fredrik/g


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Question regarding flymake and the mode line
  2020-05-08  7:25 Question regarding flymake and the mode line Fredrik Salomonsson
@ 2020-05-08 15:33 ` Stefan Monnier
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2020-05-08 15:33 UTC (permalink / raw)
  To: help-gnu-emacs

> Is there a way to tell flymake to respect the colors from mode-line and
> mode-line-inactive?

Not that I can see.  I suggest you `M-x report-emacs-bug`.

In the mean time, you could workaround this by setting the
compilation-error face to blend into your mode-line nicely and then use
`face-remap-alist` in compilation-mode buffers to make it look "the way
it used to" there.


        Stefan




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-05-08 15:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-08  7:25 Question regarding flymake and the mode line Fredrik Salomonsson
2020-05-08 15:33 ` Stefan Monnier

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.