From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Fredrik Salomonsson Newsgroups: gmane.emacs.help Subject: Question regarding flymake and the mode line Date: Fri, 8 May 2020 00:25:40 -0700 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="103756"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 08 16:17:14 2020 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jX3oQ-000QtY-Ko for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 08 May 2020 16:17:14 +0200 Original-Received: from localhost ([::1]:45418 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jX3oP-0003rK-M9 for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 08 May 2020 10:17:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33772) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jWxOM-0007xC-5G for help-gnu-emacs@gnu.org; Fri, 08 May 2020 03:25:54 -0400 Original-Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:51836) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jWxOL-00048f-7d for help-gnu-emacs@gnu.org; Fri, 08 May 2020 03:25:53 -0400 Original-Received: by mail-wm1-x334.google.com with SMTP id x4so9158909wmj.1 for ; Fri, 08 May 2020 00:25:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=d0oKHSaGQTqhC8vuTMB+StPgxzytjBvxR7F8iAgyaeY=; b=rx6FreBQ4WKH7vhrAZL39+DgfJ+0JBe5jRXyLaO58GifZ0+ylq3dEAooe97yBOFdW0 Z6rNmBu/xInPhFUu9/B98qZ2bkp/HNB3VrROud1H3tWDEOR+EeXK3pAn0sxHC871kZJQ RSVGoYYobwEaGZruRIHKIqfk46o8DAeIaUeN8YPUxZ0g76Zx3KWO+0Nfne/QSO52yRHp uaNFSri98ii4bTPjhYhbu80LgK9vDjd6A2pMO2+/fsoYOaDUho7rkrwdv+Tbh+ffNPWI vgQCx8OwS045qqu01c5mUtWxzkAg77Wp7/Y0CRsZY+8xQf41cP1AZKliBxLcH9mTh1Il oQbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=d0oKHSaGQTqhC8vuTMB+StPgxzytjBvxR7F8iAgyaeY=; b=Ta12R7IVpT4OA9bJdRfWsa08L4A3sb0wtYSmO5/KLbUZs2tXccKnVIHSoC1cA6lmQA 8aBLTeyF9WuoqMDEgp1f/WaFxYKH+Mljy8hQKnJy+rv/3eXY+MK5KP5d6Q2DN0bL3HAn laDsf+lcaLeN964wWAeGVCq+NsqNnMP6SeRL5MFDhqr9XvQXmu2Xml1cAfquBJWBdrNT QzPCn9Yj1KNRw50cmEniqq4Zb5w1csjV0FjmhrNvvy03inkisSGZyQjrnn3jjMSEycho 0vBuYzkGNURUPZ+wGWZdRvXM5C+ywC9/QMRan3S36smeJou/XjeHdQsK3yJlKKWXirmW CRMw== X-Gm-Message-State: AGi0PuYLsDM+9GAo9XBOvnYfipoOkOXIi7+Y/Gp22NmkTzkO1pad8fw1 MOcymBFHXVC/UNKBER9/H/UuaKy9MyeFHvAu27HVVI04 X-Google-Smtp-Source: APiQypJKUk0LsLWGJnaNNzgCqQEnVHcVWYsRNrSm7NlQDVAQuXfio9Qnx3IZ7546MiBTK6EGFaRoVvYu0gDGosu1a7M= X-Received: by 2002:a7b:c5c7:: with SMTP id n7mr4265788wmk.18.1588922751082; Fri, 08 May 2020 00:25:51 -0700 (PDT) Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=plattfot@gmail.com; helo=mail-wm1-x334.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Mailman-Approved-At: Fri, 08 May 2020 10:16:45 -0400 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:123047 Archived-At: 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