unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: Damien Cassou <damien@cassou.me>, notmuch@notmuchmail.org
Subject: Re: [PATCH] Fix notmuch-mua.el notmuch-mua-mail
Date: Wed, 01 Jun 2022 06:49:26 -0300	[thread overview]
Message-ID: <875ylk1zo9.fsf@tethera.net> (raw)
In-Reply-To: <87zgj8zs3k.fsf@cassou.me>


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"

  reply	other threads:[~2022-06-01  9:49 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
2022-06-01  9:49   ` David Bremner [this message]
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=875ylk1zo9.fsf@tethera.net \
    --to=david@tethera.net \
    --cc=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).