Re: [PATCH] Obey message-cite-reply-position from Emacs' message.el

Subject: Re: [PATCH] Obey message-cite-reply-position from Emacs' message.el

Date: Thu, 13 Nov 2025 22:25:00 -0600

To: David Bremner, Pengji Zhang, notmuch@notmuchmail.org

Cc:

From: Kristoffer Balintona


Hello,

I sincerely apologize for the delay in an updated patch.

On Sat, Mar 01 2025, David Bremner wrote:

> Kristoffer Balintona <krisbalintona@gmail.com> writes:
>
>> On Thu, Oct 17 2024, David Bremner wrote:
>>
>> Thank you for letting me know about Notmuch's test suite. I've attached
>> two patches. 001 implements the code for the feature, and 002 includes
>> the tests for each of the three possible values of
>> message-cite-reply-position: above, traditional, and below.
>>
>
> thanks for writing some tests.
>
>>
>> Please let me know if any modifications are in order.
>
> Your patches don't seem to have commit messages. You can
> use git-format-patch to include them. See also
>
>    https://notmuchmail.org/contributing/#index5h2
>
> for hints about appropriate commit messages.

Sorry about that. I've attached proper patches this time around, with
hopefully informative and idiomatic commit messages.

>> +      (when (or (eq message-cite-reply-position 'above)
>> +                (and message-cite-style
>> +                     (eq (eval (cadr
>
> Is it possible to avoid the eval here? I am nervous about the
> security implications (side effects e.g.) of using eval.

Good point. My updated patches avoid eval now. I've tried to add a
comment that explains this since it looks strange otherwise.

An additional note on this updated patch: taking a look at
message-yank-original and message--yank-original-internal, it looks like
if message-cite-style specifies a value for message-cite-reply-position,
it'll use that instead. Therefore, I've made message-cite-style take
precedence over message-cite-reply-position.

A final concern: I do not know when these message.el options were added
nor which Emacs version notmuch.el supports up to. As such, I don't know
if this breaks backwards compatibility with (very) old Emacs versions.

What do you think? Are any other changes in order? Is there
documentation that should be updated?

-- 
Kind regards,
Kristoffer
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: