From: "inwit" <inwit@sindominio.net>
To: <notmuch@notmuchmail.org>
Subject: Re: Repeat last tagging
Date: Thu, 20 Jan 2022 17:36:49 +0100 [thread overview]
Message-ID: <CHANCK9RS33Y.3PDBZ18N23KVP@bisio> (raw)
In-Reply-To: <CCSQ9HR3M748.2IRNNTHYR4A2M@bisio>
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,
prev parent reply other threads:[~2022-01-20 16:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-14 8:41 Repeat last tagging inwit
2021-07-14 9:25 ` Tomi Ollila
2021-07-14 13:01 ` inwit
[not found] ` <87sg0gvo1r.fsf@wobbit.home.cworth.org>
2021-07-15 8:08 ` inwit
2022-01-20 16:36 ` inwit [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CHANCK9RS33Y.3PDBZ18N23KVP@bisio \
--to=inwit@sindominio.net \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).