From: Jani Nikula <jani@nikula.org>
To: notmuch@notmuchmail.org
Subject: [PATCH 2/2] emacs: sanitize subject in replies
Date: Tue, 26 Sep 2017 21:26:08 +0300 [thread overview]
Message-ID: <20170926182608.30115-3-jani@nikula.org> (raw)
In-Reply-To: <20170926182608.30115-1-jani@nikula.org>
Commit a7964c86d125 ("emacs: Sanitize authors and subjects in search
and show") added sanitization of header information for display. Do
the same for reply subjects.
This fixes the long-standing annoying artefact of certain versions of
mailman using tab as folding whitespace, leading to tabs in reply
subjects.
---
emacs/notmuch-mua.el | 2 +-
test/T310-emacs.sh | 1 -
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el
index fd64b362b542..7a341ebf0588 100644
--- a/emacs/notmuch-mua.el
+++ b/emacs/notmuch-mua.el
@@ -218,7 +218,7 @@ mutiple parts get a header."
else
collect pair)))
(notmuch-mua-mail (plist-get reply-headers :To)
- (plist-get reply-headers :Subject)
+ (notmuch-sanitize (plist-get reply-headers :Subject))
(notmuch-headers-plist-to-alist reply-headers)
nil (notmuch-mua-get-switch-function))))
diff --git a/test/T310-emacs.sh b/test/T310-emacs.sh
index 2ef566bac490..4456bc659158 100755
--- a/test/T310-emacs.sh
+++ b/test/T310-emacs.sh
@@ -402,7 +402,6 @@ EOF
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "Reply within emacs to a message with TAB in subject"
-test_subtest_known_broken
test_emacs '(let ((message-hidden-headers ''()))
(notmuch-search "id:1258471718-6781-1-git-send-email-dottedmag@dottedmag.net")
(notmuch-test-wait)
--
2.11.0
next prev parent reply other threads:[~2017-09-26 18:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-26 18:26 emacs: reply subject sanitization Jani Nikula
2017-09-26 18:26 ` [PATCH 1/2] test: add emacs reply test for subjects with TAB Jani Nikula
2017-09-26 18:26 ` Jani Nikula [this message]
2017-09-26 20:56 ` emacs: reply subject sanitization David Edmondson
2017-09-27 11:20 ` David Bremner
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=20170926182608.30115-3-jani@nikula.org \
--to=jani@nikula.org \
--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).