[notmuch] [PATCH] Make notmuch-show 'X' (and 'x') commands remove inbox (and unread) tags

Carl Worth cworth at cworth.org
Wed Nov 18 16:25:34 PST 2009

On Wed, 18 Nov 2009 09:45:01 -0800, Keith Packard <keithp at keithp.com> wrote:
> On Wed, 18 Nov 2009 02:19:26 -0800, Carl Worth <cworth at cworth.org> wrote:
> You can use kill-buffer directly (C-X k); adding a new special binding
> for that command seems unnecessary to me.

Well, that's "Control, X, K, Enter", so quite a bit harder than just
'x'. :-)

But fine, I could move my convenience for "kill buffer" to just 'k'.

I think I'd like to see a better mapping for "archive and kill buffer"
to a key other than 'x'. Any ideas?

> My mail flow doesn't involve moving directly from one message to the
> next; I go back to the index after reviewing each one; there isn't a way
> to mark a buffer as read/archived and *not* view another message

OK, that's definitely different than me.

Let me at least explain a couple of parts of my flow, (not intended to
try to convince you to use it---just to explain):

1. Before I go into "read a bunch of messages with spacebar" mode I
   first arrange for filtered search results that I know I want to read
   all together. Most frequently this involves bringing up the inbox,
   and then hitting 't' for filter-to-tag and choosing a tag of mail
   that's all interesting, (like the "to-me" tag that gets applied
   automatically[*] to all mail addressed to me individually).

2. When I archive a thread with 'a', I'm not necessarily always planning
   to read the next message (just because notmuch is presenting it to
   me). And if not, I'll just press 'x' right away.

   a. An important point here is that that "undesired" presentation of a
      message results in no state changes. In far too many other email
      programs I've used, deleting one message causes another one to be
      displayed and *that* message gets immediately marked "unread"
      forcing me to read it immediately or risk losing it. Not nice.

   b. Sometimes, even if I wasn't really planning in advance to read the
      mail, just having it appear does encourage me to read it, (but
      with no risk if I choose not to---unlike the broken mailer I
      described above). So here's one way that notmuch encourages me to
      mow through my pending mail quickly.

3. There's one entirely different mode I use. The above is for a
   collection of "mostly interesting" messages where I want to at least
   see them all. The other mode is "mostly uninteresting" messages where
   I can take care of most everything from the search view, (and maybe
   just pop into one or two messages). Here your, 'archive and exit' key
   might be useful, but my 'exit without archiving' works fine too. The
   reason is that after I look at the one or two interesting messages,
   the next thing I'll do is to archive away all the messages from the
   search view. Of course, for this I need an "archive all" binding that
   doesn't exist yet. And I also really need to fix the Xapian bug so
   that archiving 100 threads doesn't take *forever* like it does

Anyway, thanks for letting me ramble a bit about how I deal with mail.


[*] I'm currently getting "automatic" tags via a script (which I've
named notmuch-poll) that calls "notmuch new" and then calls a bunch of
"notmuch tag" commands not unlike the following:

	notmuch tag +notmuch to:notmuchmail.org and not tag:notmuch

More information about the notmuch mailing list