diff options
| author | David Bremner <david@tethera.net> | 2015-01-22 09:37:32 +0100 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2015-01-24 09:38:46 +0100 |
| commit | cc3d25dd341c7ac687d4df085bbffeab995cdef4 (patch) | |
| tree | 8c93f3fba3062f6cf0457ef319cd1808a77ba792 | |
| parent | ce9f559b8642e0cc2eaffbf9dea9b3cbd46ee30d (diff) | |
emacs: escape % in header line format
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.
| -rw-r--r-- | emacs/notmuch-show.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index 9f6fe077..87b48813 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)))) |
