From: David Bremner <david@tethera.net>
To: Jinwoo Lee <jinwoo68@gmail.com>, notmuch@notmuchmail.org
Subject: [PATCH] emacs: escape % in header line format
Date: Thu, 22 Jan 2015 08:18:09 +0100 [thread overview]
Message-ID: <1421911089-31509-1-git-send-email-david@tethera.net> (raw)
In-Reply-To: <yq65ppa735xc.fsf@jinwoo-macbookair.roam.corp.google.com>
We set header-line-format to the message subject, but if the subject
contains percents, the next character is interpreted as a formatting
control, which is not desired.
---
Ironically you have to apply this patch to read it's subject properly
;). There is whitespace change here because the original line was way
too long.
emacs/notmuch-show.el | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 9f6fe07..4258d43 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -1198,7 +1198,11 @@ function is used."
(notmuch-show-mapc (lambda () (notmuch-show-set-prop :orig-tags (notmuch-show-get-tags))))
;; Set the header line to the subject of the first message.
- (setq header-line-format (notmuch-sanitize (notmuch-show-strip-re (notmuch-show-get-subject))))
+ (setq header-line-format
+ (replace-string "%" "%%"
+ (notmuch-sanitize
+ (notmuch-show-strip-re
+ (notmuch-show-get-subject)))))
(run-hooks 'notmuch-show-hook))))
--
2.1.4
next prev parent reply other threads:[~2015-01-22 7:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-22 2:28 Percent symbol is not shown in the global subject line in the Emacs notmuch-show buffer Jinwoo Lee
2015-01-22 7:18 ` David Bremner [this message]
2015-01-22 8:15 ` [PATCH] emacs: escape % in header line format Jinwoo Lee
2015-01-22 8:37 ` David Bremner
2015-01-22 17:49 ` Jinwoo Lee
2015-01-22 19:42 ` David Bremner
2015-01-24 8:44 ` 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=1421911089-31509-1-git-send-email-david@tethera.net \
--to=david@tethera.net \
--cc=jinwoo68@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).