* [PATCH 1/1] Add a function for applying an arbitrary number of tags to the highlighted message thread while in notmuch-search-mode. Intended to restore the original functionality of notmuch-search-remove-tag and notmuch-search-add-tag prior to 2beaefa2.
@ 2012-03-07 22:39 Tim Bielawa
2012-03-07 22:49 ` [PATCH] Function to apply many tags in notmuch-search-mode Tim Bielawa
2012-03-07 23:09 ` [PATCH 1/1] Add a function Tim Bielawa
0 siblings, 2 replies; 3+ messages in thread
From: Tim Bielawa @ 2012-03-07 22:39 UTC (permalink / raw)
To: notmuch
---
emacs/notmuch.el | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index 99e0c93..b731c7c 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -663,6 +663,15 @@ added or removed for all threads in the region from BEG to END."
(interactive)
(notmuch-search-tag "-"))
+(defun notmuch-search-tag-and-advance (&rest tags)
+ "Apply a tag or set of tags to the current thread.
+
+Shortcut to simplify applying tags in search mode. Targeted for
+use in key-bound functions. Advances to the next thread after
+applying the tags."
+ (mapc 'notmuch-search-tag-thread tags)
+ (notmuch-search-next-thread))
+
(defun notmuch-search-archive-thread ()
"Archive the currently selected thread (remove its \"inbox\" tag).
--
1.7.4.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] Function to apply many tags in notmuch-search-mode
2012-03-07 22:39 [PATCH 1/1] Add a function for applying an arbitrary number of tags to the highlighted message thread while in notmuch-search-mode. Intended to restore the original functionality of notmuch-search-remove-tag and notmuch-search-add-tag prior to 2beaefa2 Tim Bielawa
@ 2012-03-07 22:49 ` Tim Bielawa
2012-03-07 23:09 ` [PATCH 1/1] Add a function Tim Bielawa
1 sibling, 0 replies; 3+ messages in thread
From: Tim Bielawa @ 2012-03-07 22:49 UTC (permalink / raw)
To: notmuch
Add a function for applying an arbitrary number of tags to the
highlighted message thread while in notmuch-search-mode. Intended to
restore the original functionality of notmuch-search-remove-tag and
notmuch-search-add-tag prior to 2beaefa2.
---
emacs/notmuch.el | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index 99e0c93..b731c7c 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -663,6 +663,15 @@ added or removed for all threads in the region from BEG to END."
(interactive)
(notmuch-search-tag "-"))
+(defun notmuch-search-tag-and-advance (&rest tags)
+ "Apply a tag or set of tags to the current thread.
+
+Shortcut to simplify applying tags in search mode. Targeted for
+use in key-bound functions. Advances to the next thread after
+applying the tags."
+ (mapc 'notmuch-search-tag-thread tags)
+ (notmuch-search-next-thread))
+
(defun notmuch-search-archive-thread ()
"Archive the currently selected thread (remove its \"inbox\" tag).
--
1.7.4.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] Add a function....
2012-03-07 22:39 [PATCH 1/1] Add a function for applying an arbitrary number of tags to the highlighted message thread while in notmuch-search-mode. Intended to restore the original functionality of notmuch-search-remove-tag and notmuch-search-add-tag prior to 2beaefa2 Tim Bielawa
2012-03-07 22:49 ` [PATCH] Function to apply many tags in notmuch-search-mode Tim Bielawa
@ 2012-03-07 23:09 ` Tim Bielawa
1 sibling, 0 replies; 3+ messages in thread
From: Tim Bielawa @ 2012-03-07 23:09 UTC (permalink / raw)
To: notmuch
[-- Attachment #1: Type: text/plain, Size: 1467 bytes --]
Sorry about the subject spam in that first message
Backstory: When I switched to a newer 0.12 build the function I was
using at the time stopped letting me tag messages while in search
mode. notmuch-search-remove-tag had been changed to take 0
arguments. Old function:
> (defun notmuch-search-delete ()
> "Remove 'unread' tag"
> (interactive)
> (notmuch-search-remove-tag "unread")
> (forward-line))
>
> (define-key notmuch-search-mode-map "u" 'notmuch-search-delete)
I don't typically go into threads to mark them unread. But that
kind of functionality is all I could find on the updated emacstips, lots
of "notmuch-show-*" functions. [0]
This patch tries to remedy that by introducing a function,
notmuch-search-tag-and-advance which allows you to apply a number of
tags at once to the current thread under the point --
non-interactively. It follows the form of the
notmuch-search-archive-thread function.
This github gist [1] is a .el file that I load with notmuch. It includes
the new defun in full and demonstrates how to use it in a custom
function mapped to a key.
If this patch is accepted I would be happy to hash-out something to add
to the emacs tips docs.
[0] http://notmuchmail.org/emacstips/#index6h2
[1] https://gist.github.com/1996899
--
Tim Bielawa, Software Engineer/Scribe
Production Control Team (RDU)
919.332.6411 Cell | IRC: tbielawa
1BA0 4FAB 4C13 FBA0 A036 4958 AD05 E75E 0333 AE37
[-- Attachment #2: Type: application/pgp-signature, Size: 162 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-03-07 23:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-07 22:39 [PATCH 1/1] Add a function for applying an arbitrary number of tags to the highlighted message thread while in notmuch-search-mode. Intended to restore the original functionality of notmuch-search-remove-tag and notmuch-search-add-tag prior to 2beaefa2 Tim Bielawa
2012-03-07 22:49 ` [PATCH] Function to apply many tags in notmuch-search-mode Tim Bielawa
2012-03-07 23:09 ` [PATCH 1/1] Add a function Tim Bielawa
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).