unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Jose A Ortega Ruiz <jao@gnu.org>
To: Alexander Adolf <alexander.adolf@condition-alpha.com>,
	Matt Armstrong <matt@rfc20.org>,
	Notmuch Mail <notmuch@notmuchmail.org>
Subject: Re: notmuch.el and replying to multiple emails at once
Date: Tue, 08 Nov 2022 18:09:21 +0000	[thread overview]
Message-ID: <87o7thgvxq.fsf@mail.jao.io> (raw)
In-Reply-To: <92326b6c8463cf91cee04cfe49155273@condition-alpha.com>

On Tue, Nov 08 2022, Alexander Adolf wrote:

> Matt Armstrong <matt@rfc20.org> writes:
>
>> A feature I miss from Gnus is being able to reply to multiple emails at
>> once.  Has anyone else found to be a missing feature?
>
> I have, and support your request.
>
> But not only to reply, but more generally to act on (tag, reply,
> forward) multiple emails.
>
> Of course I can select multiple _contiguous_ lines in a search result
> list, or tree view, and do something with these messages
> (`notmuch-search-tag` being an obvious example). But not when my
> selection is (or would be) non-contiguous.
>
>> I wonder if it would be easy to add to notmuch's Emacs MUA.
>> [...]
>> Problem is, I can't think of an unobtrusive way to add this to notmuch
>> without adding a lot of machinery.
>
> Perhaps the problem can be split into smaller pieces?
>
> I think one piece could be to enable the user to select multiple regions
> (think e.g. zones.el [1]), which could be a problem entirely separate
> from notmuch.el?
>
> [1] https://www.emacswiki.org/emacs/Zones
>
> The second piece could be to extend notmuch.el to make use of multiple
> regions, and implement more functions that act on such regions. Since
> there doesn't seem to be a "standard way" of doing non-contiguous
> regions in Emacs, one third-party "multi-region package" (e.g. zones.el)
> would need to be picked, and notmuch.el made to detect it's availability
> and make use of it.

In notmuch-tree at least, this can be implemented, i think, in a much
simpler way.  There (and i guess in any other search list), every line
in the buffer represents a message, and there is already a record (as
text properties) describing the message (its id, subject, tags,
filename, even indentation level in my outline extension).  It'd be
pretty easy to add a new "marked" flag to those properties, that could
be added by a simple key shortcut in the same way Gnus does (adding on
top of that addition of contiguous messages in a region is again
trivial).  It's also not much more complicated to add things like
"select all messages in this thread".  With that selection mechanism in
place, one could at any moment ask for the list of marked messages and
their properties, which contain all the information needed to perform
operations such as replies or tagging (the latter being much easier to
implement; the part about multiple replies needs a bit more work, but
possibly one could re-use whatever functions gnus is already providing
to compose the reply buffer--notmuch already uses some of those
facilities).

Would make for a neat weekend project for someone with a bit of time in
her hands :)

Cheers,
jao
-- 
To kill time is not murder, it's suicide. -William James (1842-1910)

  reply	other threads:[~2022-11-08 18:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-07 17:15 notmuch.el and replying to multiple emails at once Matt Armstrong
2022-11-08 17:36 ` Alexander Adolf
2022-11-08 18:09   ` Jose A Ortega Ruiz [this message]
2022-11-09 16:18     ` Dan Čermák

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=87o7thgvxq.fsf@mail.jao.io \
    --to=jao@gnu.org \
    --cc=alexander.adolf@condition-alpha.com \
    --cc=matt@rfc20.org \
    --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).