Hi,
Thanks to David Bremner's patience, I've managed to produce the code
needed to perform the repeat last tagging functionality I was hoping
for. It is based on the following function (my very first elisp
function):
```
(defun inwit/notmuch-tree-repeat-tag ()
"Repeat the last tagging operation"
(interactive)
(notmuch-tree-tag
(split-string-and-unquote (car notmuch-read-tag-changes-history))))
```
I've then bound that function to `.`, which is convenient since I use
Evil and that's the standard for "repeat the last operation":
```
(evil-define-key 'nil
notmuch-tree-mode-map (kbd ".") 'inwit/notmuch-tree-repeat-tag)
```
Anyway, I share this here in case others might find it useful. And with
the code I share my wonder about notmuch, emacs and floss in general.
And my gratitude! :)
On Wed Jul 14, 2021 at 10:41 AM CEST, inwit wrote:
> Hi,
>
> While using notmuch in emacs (which I love, thank you so much!!) I was
> wondering if there's a way to repeat the last tagging operation for a
> different message or thread.
>
> My usecase is that, in tree-mode, sometimes I need to tag several emails
> from different threads, and it would come very handy if, after the first
> tag change, I could use a shortcut (I'd choose '.', as in vim/evil)
> which would apply the same tag change to other emails. Does this make
> sense? I know I could perform a search for all the emails that I need
> to tag and tag them all at the same time, but the criteria to select
> them is usually not obvious. Another option would be to be able to mark
> emails, then tag them (I've seen the emacs-region thing, but it's not
> the same).
>
> Thanks in advance. And cheers again for the good work!
>
> Regards,
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org