From: Mark Walters <markwalters1009@gmail.com>
To: Jani Nikula <jani@nikula.org>, notmuch@notmuchmail.org
Cc: Tomi Ollila <tomi.ollila@iki.fi>
Subject: Re: [PATCH v2] emacs: insert quotable parts in reply as they are displayed in show view
Date: Fri, 30 Aug 2013 17:49:34 +0100 [thread overview]
Message-ID: <87ppsvp1i9.fsf@qmul.ac.uk> (raw)
In-Reply-To: <1377791611-29506-1-git-send-email-jani@nikula.org>
> In reply, insert quotable parts using notmuch-show-insert-bodypart
> instead of calling notmuch-mm-display-part-inline directly to render
> the quoted parts as they are rendered in show view.
>
> The notable change is that replies to text/calendar parts quote the
> pretty printed output of icalendar-import-buffer rather than the ugly
> raw vcalendar.
I slightly worry that some text-properties or similar from notmuch-show
could make their way into the reply buffer: in particular it would be
very bad if any invisible character made it into the buffer. I don't
think this is actually a problem currently but just in case (and to
avoid future problems) how about the following on top of the parent
patch?
Best wishes
Mark
---
emacs/notmuch-mua.el | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el
index e7cc94e..9e4a232 100644
--- a/emacs/notmuch-mua.el
+++ b/emacs/notmuch-mua.el
@@ -134,9 +134,11 @@ list."
(narrow-to-region (point-min) (point))
;; We don't want hooks, such as notmuch-wash-*, to be run on the
;; quotable part.
- (let ((notmuch-show-insert-text/plain-hook nil))
- ;; Show the part but do not add buttons.
- (notmuch-show-insert-bodypart message part 0 'no-buttons))
+ (insert (with-temp-buffer
+ (let ((notmuch-show-insert-text/plain-hook nil))
+ ;; Show the part but do not add buttons.
+ (notmuch-show-insert-bodypart message part 0 'no-buttons))
+ (buffer-substring-no-properties (point-min) (point-max))))
(goto-char (point-max))))
;; There is a bug in emacs 23's message.el that results in a newline
--
1.7.9.1
next prev parent reply other threads:[~2013-09-01 7:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-27 19:50 [PATCH v2] emacs: insert quotable parts in reply as they are displayed in show view Jani Nikula
2013-08-27 20:14 ` Tomi Ollila
2013-08-29 15:53 ` Jani Nikula
2013-08-30 16:49 ` Mark Walters [this message]
2013-08-30 17:18 ` Austin Clements
2013-09-01 14:54 ` Mark Walters
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=87ppsvp1i9.fsf@qmul.ac.uk \
--to=markwalters1009@gmail.com \
--cc=jani@nikula.org \
--cc=notmuch@notmuchmail.org \
--cc=tomi.ollila@iki.fi \
/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).