summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2022-01-12 18:28:26 +0000
committerjao <jao@gnu.org>2022-01-12 18:28:26 +0000
commit29cc19fc5eec7f9ddc7d56c475112e2ff7acb6a4 (patch)
tree9212a89d6c8de9211fd977d359f2b86af8ca4cff
parentca6005f8f8dbf7b67f2953320e56b092d3cb797e (diff)
downloadelibs-29cc19fc5eec7f9ddc7d56c475112e2ff7acb6a4.tar.gz
elibs-29cc19fc5eec7f9ddc7d56c475112e2ff7acb6a4.tar.bz2
jao-notmuch: new command to undo tagging
-rw-r--r--lib/net/jao-notmuch.el5
-rw-r--r--notmuch.org3
2 files changed, 7 insertions, 1 deletions
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]].