Re: [PATCH] Fix notmuch-mua.el notmuch-mua-mail

Subject: Re: [PATCH] Fix notmuch-mua.el notmuch-mua-mail

Date: Wed, 01 Jun 2022 06:49:26 -0300

To: Damien Cassou, notmuch@notmuchmail.org

Cc:

From: David Bremner


If possible, please use git-send-email, as it makes applying the patches
easier.

Damien Cassou <damien@cassou.me> writes:

> 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.

It's a minor issue, but...

Our conventions for commit messages are different than emacs [1], we don't
list filenames in the commit message but we do usually list the
"subsystem" in the subject [2]

> ---
>  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))))

I think the cursor positioning behaviour should be documented in the
function docstring. 

[1]: It might be a personal issue, but the emacs commit message style
really annoys me.

[2]: https://notmuchmail.org/contributing/ "Write meaningful commit messages"
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: