From: Damien Cassou <damien@cassou.me>
To: notmuch@notmuchmail.org
Subject: Re: [PATCH] Fix notmuch-mua.el notmuch-mua-mail
Date: Mon, 23 May 2022 08:21:51 +0200 [thread overview]
Message-ID: <87zgj8zs3k.fsf@cassou.me> (raw)
In-Reply-To: <87fsl22geh.fsf@cassou.me>
[-- Attachment #1: Type: text/plain, Size: 311 bytes --]
Here is a new version of the patch that takes into account the fact that
notmuch-mua-mail can also be called interactively by notmuch and not
only through the mail-user-agent variable.
--
Damien Cassou
"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Change-where-to-move-point-at-the-end-of-notmuch-mua.patch --]
[-- Type: text/x-patch, Size: 1030 bytes --]
From 6106765b56464edc649d73916f97208b67ef5eb4 Mon Sep 17 00:00:00 2001
From: Damien Cassou <damien@cassou.me>
Date: Mon, 23 May 2022 08:17:27 +0200
Subject: [PATCH] Change where to move point at the end of `notmuch-mua-mail`
* emacs/notmuch-mua.el (notmuch-mua-mail): Move point to the position
that makes the most sense instead of always moving point to the TO.
This is useful when TO/SUBJECT are passed as argument.
---
emacs/notmuch-mua.el | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el
index 60801f4b..4ee252f2 100644
--- a/emacs/notmuch-mua.el
+++ b/emacs/notmuch-mua.el
@@ -420,7 +420,10 @@ (defun notmuch-mua-mail (&optional to subject other-headers _continue
(message-hide-headers)
(set-buffer-modified-p nil)
(notmuch-mua-maybe-set-window-dedicated)
- (message-goto-to))
+ (cond
+ ((and to subject) (message-goto-body))
+ (to (message-goto-subject))
+ (t (message-goto-to))))
(defvar notmuch-mua-sender-history nil)
--
2.36.0
[-- Attachment #3: Type: text/plain, Size: 0 bytes --]
next prev parent reply other threads:[~2022-05-23 6:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-22 7:08 [PATCH] Fix notmuch-mua.el notmuch-mua-mail Damien Cassou
2022-05-23 6:21 ` Damien Cassou [this message]
2022-06-01 9:49 ` David Bremner
2022-06-01 19:57 ` Damien Cassou
2022-06-02 11:12 ` David Bremner
2022-06-02 12:53 ` Damien Cassou
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=87zgj8zs3k.fsf@cassou.me \
--to=damien@cassou.me \
--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).