From: Jameson Graef Rollins <jrollins@finestructure.net>
To: Robin Green <greenrd@greenrd.org>,
Notmuch Mail <notmuch@notmuchmail.org>
Subject: Re: Preventing the user shooting themself in the foot
Date: Wed, 29 Jun 2011 13:37:21 -0700 [thread overview]
Message-ID: <87fwmsxtku.fsf@servo.factory.finestructure.net> (raw)
In-Reply-To: <86iproe86u.fsf@greenrd.plus.com>
[-- Attachment #1: Type: text/plain, Size: 1941 bytes --]
On Wed, 29 Jun 2011 20:42:01 +0100, Robin Green <greenrd@greenrd.org> wrote:
> It's really dangerous to use the 'a' key in notmuch-mode in an inbox
> thread which has multiple unread replies! Yes, the other unread replies
> will still be tagged unread, but the user might not immediately be aware
> of them. It would be really useful to have an optional warning ("More
> unread messages in this thread, are you sure?") for this situation!
I think that's a bit extreme, but I agree that the default behavior of
the emacs key bindings are not good, particularly in regards to
archiving messages.
I should probably just send in all of my emacs UI tweaks as patches, but
here are a couple of functions/bindings I've added to my .emacs to make
the message processing more sane. The main new function is
notmuch-show-next-open-message-or-pop, which will jump to the next
message in the thread, or pop out of the thread if you're on the last
message. I then use this in my tag processing functions, such as
archiving and deleting.
hth.
jamie.
(defun notmuch-show-next-open-message-or-pop ()
"Show the next message or pop to parent search."
(interactive)
(let (r)
(while (and (setq r (notmuch-show-goto-message-next))
(not (notmuch-show-message-visible-p))))
(if r
(progn
(notmuch-show-mark-read)
(notmuch-show-message-adjust))
(let ((parent-buffer notmuch-show-parent-buffer))
(if parent-buffer
(progn
(kill-this-buffer)
(switch-to-buffer parent-buffer)
(forward-line 1)))))))
(define-key notmuch-show-mode-map "a"
(lambda ()
"Archive current message and advance."
(interactive)
(notmuch-show-remove-tag "inbox")
(notmuch-show-next-open-message-or-pop)))
(define-key notmuch-show-mode-map "d"
(lambda ()
"Delete current message and advance to next message."
(interactive)
(notmuch-show-add-tag "delete")
(notmuch-show-next-open-message-or-pop)))
[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]
next prev parent reply other threads:[~2011-06-29 20:37 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-29 19:42 Preventing the user shooting themself in the foot Robin Green
2011-06-29 20:37 ` Jameson Graef Rollins [this message]
2011-06-29 22:40 ` Carl Worth
2011-06-30 3:04 ` Brian May
2011-06-30 4:10 ` Jameson Graef Rollins
2011-06-30 5:40 ` Carl Worth
2011-06-30 7:45 ` Pieter Praet
2011-06-30 21:26 ` Michael Hudson-Doyle
2011-07-01 16:37 ` Jameson Graef Rollins
2011-07-01 17:17 ` Austin Clements
2011-07-01 17:11 ` Pieter Praet
2011-06-30 23:02 ` Stewart Smith
2011-06-30 6:29 ` Sebastian Spaeth
2011-07-04 20:09 ` Michal Sojka
2011-07-04 21:36 ` Dangerous space bar key (was: Preventing the user shooting themself in the foot) Matthieu Lemerre
2011-07-05 0:03 ` Jameson Graef Rollins
2011-07-05 20:23 ` Matthieu Lemerre
2011-07-06 13:25 ` Austin Clements
2011-07-07 18:49 ` Matthieu Lemerre
2011-07-07 20:40 ` Jameson Graef Rollins
2011-07-07 20:58 ` Austin Clements
2011-07-07 21:17 ` Jameson Graef Rollins
2011-07-09 17:09 ` Preventing the user shooting themself in the foot Neeum Zawan
2011-07-09 20:32 ` Daniel Schoepe
-- strict thread matches above, loose matches on Subject: below --
2011-06-29 23:53 Austin Clements
2011-06-30 7:50 ` Pieter Praet
2011-06-30 8:51 ` Pieter Praet
2011-07-01 1:28 ` Brian May
2011-07-01 21:44 ` Pieter Praet
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=87fwmsxtku.fsf@servo.factory.finestructure.net \
--to=jrollins@finestructure.net \
--cc=greenrd@greenrd.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).