unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Jinwoo Lee <jinwoo68@gmail.com>
To: David Bremner <david@tethera.net>,
	David Bremner <david@tethera.net>,
	notmuch@notmuchmail.org
Subject: Re: [PATCH] emacs: escape % in header line format
Date: Thu, 22 Jan 2015 09:49:05 -0800	[thread overview]
Message-ID: <yq65wq4eaepa.fsf@jinwoo-macbookair.roam.corp.google.com> (raw)
In-Reply-To: <1421915852-13963-1-git-send-email-david@tethera.net>

Yup.  It works!  Thanks for the quick fix.  Is this going to be merged
to HEAD soon?

-jinwoo

On Thu, Jan 22, 2015 at 12:37 AM, 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.
> ---
>
> You're correct of course. I have no idea how my testing convinced me
> the previous version worked.
>
> 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..87b4881 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-regexp-in-string "%" "%%"
> +			    (notmuch-sanitize
> +			     (notmuch-show-strip-re
> +			      (notmuch-show-get-subject)))))
>  
>        (run-hooks 'notmuch-show-hook))))
>  
> -- 
> 2.1.4

  reply	other threads:[~2015-01-22 17:49 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
2015-01-22  8:37     ` David Bremner
2015-01-22 17:49       ` Jinwoo Lee [this message]
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=yq65wq4eaepa.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).