From c1deacfdd12c11fd9983982581d1066a13c76fbe Mon Sep 17 00:00:00 2001 From: Tomi Ollila Date: Thu, 23 Aug 2012 09:38:26 +0300 Subject: [PATCH] Re: [PATCH] notmuch-show: add notmuch-show-mark-read-tags option --- b9/7a2db8dacac1347dd97e4776a9ebb27edb2ebd | 111 ++++++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 b9/7a2db8dacac1347dd97e4776a9ebb27edb2ebd diff --git a/b9/7a2db8dacac1347dd97e4776a9ebb27edb2ebd b/b9/7a2db8dacac1347dd97e4776a9ebb27edb2ebd new file mode 100644 index 000000000..7a3c50c80 --- /dev/null +++ b/b9/7a2db8dacac1347dd97e4776a9ebb27edb2ebd @@ -0,0 +1,111 @@ +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 A8235431FBD + for ; Wed, 22 Aug 2012 23:38:21 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + 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 18BOGjHCBpxz for ; + Wed, 22 Aug 2012 23:38:17 -0700 (PDT) +Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) + by olra.theworths.org (Postfix) with ESMTP id A0778431FAE + for ; Wed, 22 Aug 2012 23:38:17 -0700 (PDT) +Received: by guru.guru-group.fi (Postfix, from userid 501) + id B2015100386; Thu, 23 Aug 2012 09:38:26 +0300 (EEST) +From: Tomi Ollila +To: Michal Nazarewicz , notmuch@notmuchmail.org +Subject: Re: [PATCH] notmuch-show: add notmuch-show-mark-read-tags option +In-Reply-To: + <416b1203c83ea56c8e915a056465d9e202329f45.1345554683.git.mina86@mina86.com> +References: + <416b1203c83ea56c8e915a056465d9e202329f45.1345554683.git.mina86@mina86.com> +User-Agent: Notmuch/0.14+8~gd6b499d (http://notmuchmail.org) Emacs/23.1.1 + (x86_64-redhat-linux-gnu) +X-Face: HhBM'cA~ +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +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: Thu, 23 Aug 2012 06:38:21 -0000 + +On Tue, Aug 21 2012, Michal Nazarewicz wrote: + +> From: Michal Nazarewicz +> +> The `notmuch-show-mark-read-tags' lists tags that are to be applied when +> message is read. By default, the only value is "-unread" which will remove +> the unread tag. Among other uses, this variable can be used to stop +> notmuch-show from modifying tags when message is shown (by setting the +> variable to an empty list). +> --- + +LGTM. + +Tomi + + +> +> I've sent this patch a while back but I think it got lost somehow so +> resending. +> +> emacs/notmuch-show.el | 12 ++++++++++-- +> 1 files changed, 10 insertions(+), 2 deletions(-) +> +> diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el +> index 82b5399..c9fd867 100644 +> --- a/emacs/notmuch-show.el +> +++ b/emacs/notmuch-show.el +> @@ -183,6 +183,13 @@ provided with an MLA argument nor `completing-read' input." +> notmuch-show-stash-mlarchive-link-alist)) +> :group 'notmuch-show) +> +> +(defcustom notmuch-show-mark-read-tags '("-unread") +> + "List of tags to apply when message is read, ie. shown in notmuch-show +> +buffer." +> + :type '(repeat string) +> + :group 'notmuch-show) +> + +> + +> (defmacro with-current-notmuch-show-message (&rest body) +> "Evaluate body with current buffer set to the text of current message" +> `(save-excursion +> @@ -1383,8 +1390,9 @@ current thread." +> (notmuch-show-get-prop :headers-visible)) +> +> (defun notmuch-show-mark-read () +> - "Mark the current message as read." +> - (notmuch-show-tag-message "-unread")) +> + "Apply `notmuch-show-mark-read-tags' to the message." +> + (when notmuch-show-mark-read-tags +> + (apply 'notmuch-show-tag-message notmuch-show-mark-read-tags))) +> +> ;; Functions for getting attributes of several messages in the current +> ;; thread. +> -- +> 1.7.7.3 +> +> _______________________________________________ +> notmuch mailing list +> notmuch@notmuchmail.org +> http://notmuchmail.org/mailman/listinfo/notmuch -- 2.26.2