From: David Bremner <david@tethera.net>
To: joshua@joshuao.com, notmuch@notmuchmail.org
Cc: Joshua O'Connor <joshua@joshuao.com>
Subject: Re: [PATCH] emacs: add paramter to not quote original message in replies
Date: Thu, 02 Jun 2022 08:49:27 -0300 [thread overview]
Message-ID: <8735gnz3nc.fsf@tethera.net> (raw)
In-Reply-To: <20220529151040.616780-1-joshua@joshuao.com>
joshua@joshuao.com writes:
> From: Joshua O'Connor <joshua@joshuao.com>
>
> While the default reply function does nicely set the region to the
> quoted text to allow for easy an easy kill-region, at least one
> package, org-msg, interprets the incoming citation (or not) and
> operates on it. Adding this parameter makes it feasible for users of
> that library to write their own notmuch-show-reply-sender-esque
> function for this purpose.
Since this changes / extends the API, it should have a
test. test/T453-reply.sh has an example you can probably copy and modify
for your purposes. Feel free to use a different message from the
standard corpus.
> ---
> emacs/notmuch-mua.el | 12 +++++++-----
> 1 file changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el
> index 60801f4b..b37bab0d 100644
> --- a/emacs/notmuch-mua.el
> +++ b/emacs/notmuch-mua.el
> @@ -234,7 +234,7 @@ Typically this is added to `notmuch-mua-send-hook'."
>
> ;;; Mua reply
>
> -(defun notmuch-mua-reply (query-string &optional sender reply-all)
> +(defun notmuch-mua-reply (query-string &optional sender reply-all omit-original)
> (let ((args '("reply" "--format=sexp" "--format-version=5"))
> (process-crypto notmuch-show-process-crypto)
> reply
> @@ -280,6 +280,7 @@ Typically this is added to `notmuch-mua-send-hook'."
> (when notmuch-message-replied-tags
> (setq notmuch-message-queued-tag-changes
> (list (cons query-string notmuch-message-replied-tags))))
> + (unless omit-original
Please do a separate commit with the whitespace cleanup this
requires. Just following the automatic indentation of emacs is most
likely fine (and encouraged).
> ;; Insert the message body - but put it in front of the signature
> ;; if one is present, and after any other content
> ;; message*setup-hooks may have added to the message body already.
> @@ -327,7 +328,7 @@ Typically this is added to `notmuch-mua-send-hook'."
> (set-mark (point))
> (goto-char start)
> ;; Quote the original message according to the user's configured style.
> - (funcall notmuch-mua-cite-function)))
> + (funcall notmuch-mua-cite-function))))
> ;; Crypto processing based crypto content of the original message
> (when process-crypto
> (notmuch-mua-reply-crypto (plist-get original :body))))
> @@ -512,12 +513,13 @@ the From: address."
> (message-hide-headers)
> (set-buffer-modified-p nil))))
>
> -(defun notmuch-mua-new-reply (query-string &optional prompt-for-sender reply-all)
> +(defun notmuch-mua-new-reply (query-string &optional prompt-for-sender reply-all omit-original)
> "Compose a reply to the message identified by QUERY-STRING.
>
> If PROMPT-FOR-SENDER is non-nil, the user will be prompted for
> the From: address first. If REPLY-ALL is non-nil, the message
> -will be addressed to all recipients of the source message."
> +will be addressed to all recipients of the source message. If
> +OMIT-ORIGINAL is non-nil, the orignial message will not be quoted."
Please double check the spelling of your changes. There are several typos.
prev parent reply other threads:[~2022-06-02 11:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-29 15:10 [PATCH] emacs: add paramter to not quote original message in replies joshua
2022-05-30 11:58 ` Lele Gaifax
2022-06-02 11:49 ` David Bremner [this message]
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=8735gnz3nc.fsf@tethera.net \
--to=david@tethera.net \
--cc=joshua@joshuao.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).