unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Mark Walters <markwalters1009@gmail.com>
To: David Edmondson <dme@dme.org>
Cc: Notmuch Mail <notmuch@notmuchmail.org>
Subject: Re: [PATCH] emacs: add default value to notmuch-search-line-faces
Date: Sat, 28 Jan 2012 11:18:23 +0000	[thread overview]
Message-ID: <87y5ss5b40.fsf@qmul.ac.uk> (raw)
In-Reply-To: <871uqk6q60.fsf@qmul.ac.uk>


I wondered whether the general view is that this following trivial
extension to David's notmuch-show-line-faces patch is too gross/hacky to
live? It passes a fake tag of "flag:match" to notmuch-color-line so that
the same customisation as for colouring lines based on tags can also
colour based on match. I find it useful when using the collapsed view
for example.

Best wishes

Mark


diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index c448ab2..00c1a2f 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -837,11 +837,14 @@ current buffer, if possible."
 	 content-start content-end
 	 headers-start headers-end
 	 body-start body-end
+	 tags-and-flags
 	 (headers-invis-spec (notmuch-show-make-symbol "header"))
 	 (message-invis-spec (notmuch-show-make-symbol "message"))
 	 (bare-subject (notmuch-show-strip-re (plist-get headers :Subject)))
 	 (tags (plist-get msg :tags)))
 
+    (if (plist-get msg :match)
+	(setq tags-and-flags (append tags '("flag:match"))))
     ;; Set `buffer-invisibility-spec' to `nil' (a list), otherwise
     ;; removing items from `buffer-invisibility-spec' (which is what
     ;; `notmuch-show-headers-visible' and
@@ -870,7 +873,7 @@ current buffer, if possible."
     (setq content-start (point-marker))
 
     ;; Colour the header line according to the tags of the message.
-    (notmuch-color-line message-start content-start tags notmuch-show-line-faces)
+    (notmuch-color-line message-start content-start tags-and-flags notmuch-show-line-faces)
 
     (plist-put msg :headers-invis-spec headers-invis-spec)
     (plist-put msg :message-invis-spec message-invis-spec)
-- 
1.7.2.3

  reply	other threads:[~2012-01-28 11:17 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-26 19:21 [PATCH] emacs: add default value to notmuch-search-line-faces Jani Nikula
2012-01-26 19:41 ` Austin Clements
2012-01-26 21:58   ` Jani Nikula
2012-01-31 13:12     ` Jani Nikula
2012-01-31 15:19       ` Austin Clements
2012-01-26 21:59   ` Jeremy Nickurak
2012-01-26 22:17     ` Austin Clements
2012-01-27 10:29 ` Mark Walters
2012-01-27 10:37   ` David Edmondson
2012-01-28 11:07     ` Mark Walters
2012-01-28 11:18       ` Mark Walters [this message]
2012-02-02 14:58 ` [PATCH v2] " Jani Nikula
2012-02-02 16:15   ` Tomi Ollila
2012-02-03  8:08   ` David Edmondson
2012-02-12 17:32   ` David Bremner

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

  List information: https://notmuchmail.org/

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

  git send-email \
    --in-reply-to=87y5ss5b40.fsf@qmul.ac.uk \
    --to=markwalters1009@gmail.com \
    --cc=dme@dme.org \
    --cc=notmuch@notmuchmail.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 public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).