all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Fredrik Salomonsson <plattfot@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Question regarding flymake and the mode line
Date: Fri, 8 May 2020 00:25:40 -0700	[thread overview]
Message-ID: <CABZcOARfdXrGZvgB3Lc9fOS8YExRTen9q-TXhF33w9gymH8XSA@mail.gmail.com> (raw)

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


             reply	other threads:[~2020-05-08  7:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-08  7:25 Fredrik Salomonsson [this message]
2020-05-08 15:33 ` Question regarding flymake and the mode line Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CABZcOARfdXrGZvgB3Lc9fOS8YExRTen9q-TXhF33w9gymH8XSA@mail.gmail.com \
    --to=plattfot@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.