unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* marking multiple messages to tag
@ 2022-06-07 20:07 erik colson
  2022-06-08 11:41 ` David Bremner
  0 siblings, 1 reply; 3+ messages in thread
From: erik colson @ 2022-06-07 20:07 UTC (permalink / raw)
  To: notmuch

Hi,

Coming from mu4e I am missing a feature to mark several messages in a
search before applying a tag them.  I know I can apply a tag to a region
of messages but in this case I would like to select messages while
skipping some messages.
Is this possible in notmuch/emacs ?

thx
-- 
erik colson

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: marking multiple messages to tag
  2022-06-07 20:07 marking multiple messages to tag erik colson
@ 2022-06-08 11:41 ` David Bremner
  2022-06-08 14:36   ` erik colson
  0 siblings, 1 reply; 3+ messages in thread
From: David Bremner @ 2022-06-08 11:41 UTC (permalink / raw)
  To: erik colson, notmuch

erik colson <eco@ecocode.net> writes:

> Coming from mu4e I am missing a feature to mark several messages in a
> search before applying a tag them.  I know I can apply a tag to a region
> of messages but in this case I would like to select messages while
> skipping some messages.
> Is this possible in notmuch/emacs ?

As a prototype try the following. This does assume that tagging
operations are fast enough not to be annoying interactively.

- customize notmuch-tagging-keys, add a key "m" to add tag "marked"
- customize notmuch-saved-searches, add a search "marked", for
   "tag:marked", with key "m".

- k m  to mark messages
- C-c j m  to bring up the list of marked messages
  - at this point you can unmark some by "k k m"
- finally * to apply "-marked +whatever"

The unpleasant part (IMHO) is having to specify "-marked" manually, but
that could be fixed by defining something like

(defun notmuch-tag-marked (tag-changes)
  "Add/remove tags from all messages currently tagged `marked'."
  (interactive
   (list (notmuch-read-tag-changes nil "Tag marked" "-marked ")))
  (notmuch-tag "tag:marked" (cons "-marked" tag-changes))
  (notmuch-refresh-all-buffers))

then define a key like

     (define-key global-map "\C-cm" #'notmuch-tag-marked)

I guess if people find this useful, we could add an appropriately
polished version. The main issue will me collisions with already
existing keybindings.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: marking multiple messages to tag
  2022-06-08 11:41 ` David Bremner
@ 2022-06-08 14:36   ` erik colson
  0 siblings, 0 replies; 3+ messages in thread
From: erik colson @ 2022-06-08 14:36 UTC (permalink / raw)
  To: David Bremner, notmuch

Hi David,

The idea of using a intermediate "marked" tag should work.  Albeit there
is a risk other messages are already marked and will therefor be tagged
too.  My idea would be to add an alert if the user is marking a first
message in the current selection _and_ there is already a message
(somewhere else) marked.
I think that should not be difficult to add your solution.  I'll try
this out maybe next weekend ;)

thanks !
-- 
erik colson

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-06-08 14:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-07 20:07 marking multiple messages to tag erik colson
2022-06-08 11:41 ` David Bremner
2022-06-08 14:36   ` erik colson

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).