From: Pengji Zhang <me@pengjiz.com>
To: Kristoffer Balintona <krisbalintona@gmail.com>, notmuch@notmuchmail.org
Subject: Re: Obey message-cite-reply-position from Emacs' message.el
Date: Thu, 17 Oct 2024 18:31:41 +0800 [thread overview]
Message-ID: <87ttdbrpf6.fsf@pengjiz.com> (raw)
In-Reply-To: <CANVbq5mfLqByVa1aO=pLyd+4Lj_ppoBO7ZmoR0Feu7pZ-Rt7vg@mail.gmail.com>
Kristoffer Balintona <krisbalintona@gmail.com> writes:
> Hello,
Hello!
> The current behavior of notmuch accords with the user values of below
> and traditional but not above.
>
> The notmuch function responsible for the position of the signature
> (or, rather, the position of the citations) is notmuch-mua-reply. I
> have attached a patch that adds a brief snippet which obeys
> message-cite-reply-position when its value is above.
This indeed seems reasonable. Thank you! I am not a maintainer, but here
are some comments of mine.
> diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el
> index bf62b656..1d1a1591 100644
> --- a/emacs/notmuch-mua.el
> +++ b/emacs/notmuch-mua.el
> @@ -295,6 +295,20 @@ Typically this is added to `notmuch-mua-send-hook'."
> (when message-signature-insert-empty-line
> (forward-line -1))
> (goto-char (point-max))))
> + ;; If `message-cite-reply-position' is `above', e.g., for Gmail-like
> + ;; email replies, then before inserting the citation, put the point
> + ;; after the signature and insert a newline for spacing. Also respects
> + ;; if `message-cite-reply-position' is set via `message-cite-style'.
> + (when (or (equal message-cite-reply-position 'above)
Nit: I think it is slightly better to use 'eq' instead of 'equal' here.
> + (and message-cite-style
> + (eq (eval (cadr
> + (assoc 'message-cite-reply-position
Likewise, here we may use 'assq'.
> + (if (symbolp message-cite-style)
> + (eval message-cite-style)
Here I think it is better to use 'symbol-value' instead of 'eval'.
> + message-cite-style))))
> + 'above)))
> + (goto-char (point-max))
> + (insert "\n"))
> (let ((from (plist-get original-headers :From))
> (date (plist-get original-headers :Date))
> (start (point)))
Regards,
Pengji
next prev parent reply other threads:[~2024-10-17 10:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-13 7:54 Obey message-cite-reply-position from Emacs' message.el Kristoffer Balintona
2024-10-17 10:31 ` Pengji Zhang [this message]
2024-10-17 11:34 ` David Bremner
2024-11-05 5:58 ` Kristoffer Balintona
2024-11-05 5:45 ` Kristoffer Balintona
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=87ttdbrpf6.fsf@pengjiz.com \
--to=me@pengjiz.com \
--cc=krisbalintona@gmail.com \
--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).