From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 2311E431FB6 for ; Sat, 28 Jan 2012 03:17:22 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -1.098 X-Spam-Level: X-Spam-Status: No, score=-1.098 tagged_above=-999 required=5 tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001, NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id a-ox61ipEUHP for ; Sat, 28 Jan 2012 03:17:21 -0800 (PST) Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 880EC431FAE for ; Sat, 28 Jan 2012 03:17:21 -0800 (PST) Received: from smtp.qmul.ac.uk ([138.37.6.40]) by mail2.qmul.ac.uk with esmtp (Exim 4.71) (envelope-from ) id 1Rr6HY-0002ui-3e; Sat, 28 Jan 2012 11:17:20 +0000 Received: from 94-192-233-223.zone6.bethere.co.uk ([94.192.233.223] helo=localhost) by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69) (envelope-from ) id 1Rr6HX-0001gZ-Rw; Sat, 28 Jan 2012 11:17:19 +0000 From: Mark Walters To: David Edmondson Subject: Re: [PATCH] emacs: add default value to notmuch-search-line-faces In-Reply-To: <871uqk6q60.fsf@qmul.ac.uk> References: <1327605679-15213-1-git-send-email-jani@nikula.org> <87y5st4ewt.fsf@qmul.ac.uk> <871uqk6q60.fsf@qmul.ac.uk> User-Agent: Notmuch/0.11+107~g185f859 (http://notmuchmail.org) Emacs/23.2.1 (i486-pc-linux-gnu) Date: Sat, 28 Jan 2012 11:18:23 +0000 Message-ID: <87y5ss5b40.fsf@qmul.ac.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Sender-Host-Address: 94.192.233.223 X-QM-SPAM-Info: Sender has good ham record. :) X-QM-Body-MD5: 3c3f0c11cb0b50a4d2574c9d85ccdbb8 (of first 20000 bytes) X-SpamAssassin-Score: -1.8 X-SpamAssassin-SpamBar: - X-SpamAssassin-Report: The QM spam filters have analysed this message to determine if it is spam. We require at least 5.0 points to mark a message as spam. This message scored -1.8 points. Summary of the scoring: * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, * medium trust * [138.37.6.40 listed in list.dnswl.org] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (markwalters1009[at]gmail.com) * -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay * domain * 0.5 AWL AWL: From: address is in the auto white-list X-QM-Scan-Virus: ClamAV says the message is clean Cc: Notmuch Mail X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Jan 2012 11:17:22 -0000 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