From: Mark Walters Date: Sat, 14 Apr 2012 19:21:38 +0000 (+0100) Subject: [PATCH 0/3] emacs: allow show to colour based on tags and flags X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=639ea208048011ae37f31cb78393d42bb1d9d379;p=notmuch-archives.git [PATCH 0/3] emacs: allow show to colour based on tags and flags --- diff --git a/29/988b9beaf37aa137e1ad94ce119d2152a9a913 b/29/988b9beaf37aa137e1ad94ce119d2152a9a913 new file mode 100644 index 000000000..7dddfe246 --- /dev/null +++ b/29/988b9beaf37aa137e1ad94ce119d2152a9a913 @@ -0,0 +1,88 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id BAB05431FAF + for ; Sat, 14 Apr 2012 12:21:39 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0.201 +X-Spam-Level: +X-Spam-Status: No, score=0.201 tagged_above=-999 required=5 + tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, + FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001, + RCVD_IN_DNSWL_LOW=-0.7] 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 FrjgYtvnlKtl for ; + Sat, 14 Apr 2012 12:21:39 -0700 (PDT) +Received: from mail-wg0-f45.google.com (mail-wg0-f45.google.com + [74.125.82.45]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client + certificate requested) by olra.theworths.org (Postfix) with ESMTPS id + 02BF4431FAE for ; Sat, 14 Apr 2012 12:21:38 -0700 + (PDT) +Received: by wgbdt14 with SMTP id dt14so3342563wgb.2 + for ; Sat, 14 Apr 2012 12:21:37 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; + h=from:to:cc:subject:date:message-id:x-mailer; + bh=sMKGU8UpV2xfb8NOm7cpB03IydXvhv8dX/6KhN2c9Ok=; + b=v/s6+tLmgv1quCD0eGyfUOq8f+C+pCaXMiRdqOGJwRLmpzoAvVu6NhGGs7EhKWSe0Z + BS3RLxKdlagt+BoSRlnrDrGLIinlxQw2PZgkeyepjEUIdmEPrs78ObPiBaHFgM1aYYZR + 1kv/I190+3FtFPbeGp5Cb/1pX99L3QA7lZXZD9J1RL+FyYc22y8yfNYOf6d4BjQZjUxh + DvNndoLsjRBMtriYtUZBI3z6E1NEgG5CDnpfKC3mDlYs7zmPMYdFyWhjX6GJjzaJUFO9 + OfChnN2bUt7MwCVy/QAp6O8EA5RC+ZH5by+cS5HCAKrPlzag+J73YJNLh14ldp+G7dH4 + a4FQ== +Received: by 10.180.78.40 with SMTP id y8mr5931055wiw.15.1334431297492; + Sat, 14 Apr 2012 12:21:37 -0700 (PDT) +Received: from localhost (94-192-233-223.zone6.bethere.co.uk. + [94.192.233.223]) by mx.google.com with ESMTPS id + k6sm6609027wiy.7.2012.04.14.12.21.36 (version=TLSv1/SSLv3 cipher=OTHER); Sat, + 14 Apr 2012 12:21:36 -0700 (PDT) +From: Mark Walters +To: notmuch@notmuchmail.org +Subject: [PATCH 0/3] emacs: allow show to colour based on tags and flags +Date: Sat, 14 Apr 2012 20:21:38 +0100 +Message-Id: <1334431301-27303-1-git-send-email-markwalters1009@gmail.com> +X-Mailer: git-send-email 1.7.9.1 +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, 14 Apr 2012 19:21:39 -0000 + +These three patches allow emacs to colour the headerline in show mode +according to the messages tags and flags (ie match or excluded). + +The first two are David Edmondson's patch +id:"1325006003-27152-1-git-send-email-dme@dme.org" rebased to master +and split into one which is trivial code movement and one which adds +the show colouring functionality. + +The first two give a very similar result to notmuch-search-line-faces +and just allow colouring based on tags (not flags). The final one adds +the colouring by flag: it does this by passing to the line colouring +code a list of tags prefixed by "tag:" and flags prefixed by "flag:" + +The final patch could be folded into the second, and this would somewhat reduce the diff. + +Mark Walters (3): + emacs: Move colour line from search to lib + emacs: Add `notmuch-show-line-faces' and apply it. + emacs: allow notmuch-show-line-faces to use flags for colouring + + emacs/notmuch-lib.el | 18 ++++++++++++++++++ + emacs/notmuch-show.el | 44 ++++++++++++++++++++++++++++++++++++++++---- + emacs/notmuch.el | 15 +-------------- + 3 files changed, 59 insertions(+), 18 deletions(-) + +-- +1.7.9.1 +