unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: erik colson <eco@ecocode.net>, notmuch@notmuchmail.org
Subject: Re: marking multiple messages to tag
Date: Wed, 08 Jun 2022 08:41:58 -0300	[thread overview]
Message-ID: <87o7z31iwp.fsf@tethera.net> (raw)
In-Reply-To: <87h74wxmni.fsf@toolbox.mail-host-address-is-not-set>

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.


  reply	other threads:[~2022-06-08 11:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-07 20:07 marking multiple messages to tag erik colson
2022-06-08 11:41 ` David Bremner [this message]
2022-06-08 14:36   ` erik colson

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=87o7z31iwp.fsf@tethera.net \
    --to=david@tethera.net \
    --cc=eco@ecocode.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).