From: David Edmondson <dme@dme.org>
To: Jani Nikula <jani@nikula.org>, notmuch@notmuchmail.org
Subject: Re: [PATCH] emacs: call "notmuch tag" only once when archiving a thread
Date: Wed, 04 Jan 2012 14:13:05 +0000 [thread overview]
Message-ID: <cunzke34kum.fsf@hotblack-desiato.hh.sledj.net> (raw)
In-Reply-To: <1325615346-8302-1-git-send-email-jani@nikula.org>
[-- Attachment #1: Type: text/plain, Size: 1289 bytes --]
This seems like a good idea.
On Tue, 3 Jan 2012 20:29:06 +0200, Jani Nikula <jani@nikula.org> wrote:
> On the downside, IIRC Xapian does not perform very well if the query
> (in this case a lot of message-ids OR'd together) is very big. It is
> unknown to me at which point this approach would become slower than
> the original one by one tagging approach, if ever.
Unless this limit is quite small (<1000), I'd be inclined not to worry
about it.
> Also, this introduces a limitation to the number of messages that can
> be archived at the same time (through ARG_MAX limiting the command
> line). At least on Linux this seems more like a theoretical limitation
> than a real one.
What's the failure mode when this does happen?
> + (let ((message-ids))
No need for both sets of brackets:
(let (message-ids)
is sufficient.
> + (loop do
> + (let* ((current-tags (notmuch-show-get-tags))
> + (new-tags (notmuch-show-del-tags-worker current-tags toremove)))
> + (unless (equal current-tags new-tags)
> + (add-to-list 'message-ids (notmuch-show-get-message-id))))
> + until (not (notmuch-show-goto-message-next)))
`loop' has the ability to accumulate results, which would probably be
cleaner than `add-to-list'. See 'Accumulation Clauses' in the emacs cl
info.
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
next prev parent reply other threads:[~2012-01-04 14:13 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-03 18:29 [PATCH] emacs: call "notmuch tag" only once when archiving a thread Jani Nikula
2012-01-04 14:13 ` David Edmondson [this message]
2012-01-04 14:35 ` Tomi Ollila
2012-01-05 20:10 ` Aaron Ecay
2012-01-05 20:32 ` Jani Nikula
2012-01-05 20:38 ` Jameson Graef Rollins
2012-01-05 20:58 ` Jani Nikula
2012-01-06 21:31 ` Tomi Ollila
2012-01-09 0:56 ` Aaron Ecay
2012-01-09 1:12 ` Austin Clements
2012-01-09 8:15 ` David Edmondson
2012-01-09 8:41 ` Jani Nikula
2012-01-09 10:38 ` Tomi Ollila
2012-01-09 10:46 ` David Edmondson
2012-01-09 11:31 ` Mark Walters
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=cunzke34kum.fsf@hotblack-desiato.hh.sledj.net \
--to=dme@dme.org \
--cc=jani@nikula.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).