From 29cc19fc5eec7f9ddc7d56c475112e2ff7acb6a4 Mon Sep 17 00:00:00 2001 From: jao Date: Wed, 12 Jan 2022 18:28:26 +0000 Subject: jao-notmuch: new command to undo tagging --- lib/net/jao-notmuch.el | 5 +++++ notmuch.org | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/net/jao-notmuch.el b/lib/net/jao-notmuch.el index 4714367..ebb348a 100644 --- a/lib/net/jao-notmuch.el +++ b/lib/net/jao-notmuch.el @@ -411,6 +411,11 @@ '("-unread" "-new" "+spam")))) (jao-notmuch-tree--tag-and-next tags nil nil))) +(defun jao-notmuch-tree-reset-tags () + (interactive) + (let ((tags (plist-get (notmuch-tree-get-message-properties) :orig-tags))) + (jao-notmuch-tree--tag tags nil nil))) + ;;;; Results formatters diff --git a/notmuch.org b/notmuch.org index 705f499..dd8d0d9 100644 --- a/notmuch.org +++ b/notmuch.org @@ -481,7 +481,8 @@ ("=" . jao-notmuch-tree-toggle-message) ("RET" . jao-notmuch-tree-show-or-scroll) ("SPC" . jao-notmuch-tree-scroll-or-next) - ("M-g" . jao-notmuch-browse-url)))) + ("M-g" . jao-notmuch-browse-url) + ("M-u" . jao-notmuch-tree-reset-tags)))) #+end_src * org mode Stolen and adapted from [[https://gist.github.com/fedxa/fac592424473f1b70ea489cc64e08911][Fedor Bezrukov]]. -- cgit v1.2.3