From: Jinwoo Lee <jinwoo68@gmail.com>
To: David Bremner <david@tethera.net>, notmuch@notmuchmail.org
Subject: Re: [PATCH] emacs: escape % in header line format
Date: Thu, 22 Jan 2015 00:15:50 -0800 [thread overview]
Message-ID: <yq657fwfcjt5.fsf@jinwoo-macbookair.roam.corp.google.com> (raw)
In-Reply-To: <1421911089-31509-1-git-send-email-david@tethera.net>
Thanks, David. But I don't think it's the correct fix. REPLACE-STRING
seems to replace a string in a buffer, not a string given as a param.
And it's for interactive use only.
-jinwoo
On Wed, Jan 21, 2015 at 11:18 PM, David Bremner <david@tethera.net> wrote:
> 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 8:15 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 ` [PATCH] emacs: escape % in header line format David Bremner
2015-01-22 8:15 ` Jinwoo Lee [this message]
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=yq657fwfcjt5.fsf@jinwoo-macbookair.roam.corp.google.com \
--to=jinwoo68@gmail.com \
--cc=david@tethera.net \
--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).