* [PATCH] notmuch-show: add notmuch-show-mark-read-tags option
@ 2012-08-21 13:13 Michal Nazarewicz
2012-08-23 6:38 ` Tomi Ollila
2012-08-29 22:11 ` David Bremner
0 siblings, 2 replies; 3+ messages in thread
From: Michal Nazarewicz @ 2012-08-21 13:13 UTC (permalink / raw)
To: notmuch
From: Michal Nazarewicz <mina86@mina86.com>
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).
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] notmuch-show: add notmuch-show-mark-read-tags option
2012-08-21 13:13 [PATCH] notmuch-show: add notmuch-show-mark-read-tags option Michal Nazarewicz
@ 2012-08-23 6:38 ` Tomi Ollila
2012-08-29 22:11 ` David Bremner
1 sibling, 0 replies; 3+ messages in thread
From: Tomi Ollila @ 2012-08-23 6:38 UTC (permalink / raw)
To: Michal Nazarewicz, notmuch
On Tue, Aug 21 2012, Michal Nazarewicz wrote:
> From: Michal Nazarewicz <mina86@mina86.com>
>
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] notmuch-show: add notmuch-show-mark-read-tags option
2012-08-21 13:13 [PATCH] notmuch-show: add notmuch-show-mark-read-tags option Michal Nazarewicz
2012-08-23 6:38 ` Tomi Ollila
@ 2012-08-29 22:11 ` David Bremner
1 sibling, 0 replies; 3+ messages in thread
From: David Bremner @ 2012-08-29 22:11 UTC (permalink / raw)
To: Michal Nazarewicz, notmuch
Michal Nazarewicz <mpn@google.com> writes:
> From: Michal Nazarewicz <mina86@mina86.com>
>
> 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).
Pushed,
d
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-08-29 22:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-21 13:13 [PATCH] notmuch-show: add notmuch-show-mark-read-tags option Michal Nazarewicz
2012-08-23 6:38 ` Tomi Ollila
2012-08-29 22:11 ` David Bremner
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).