mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-24 20:08:10 +01:00
emacs: only strip "re:" in the beginning of subject
Fix notmuch-show-strip-re by matching "re:" only in the beginning of the input string.
This commit is contained in:
parent
627f7b27f9
commit
0ff57e75cf
2 changed files with 1 additions and 2 deletions
|
@ -819,7 +819,7 @@ message at DEPTH in the current thread."
|
||||||
(make-symbol (concat "notmuch-show-" type)))
|
(make-symbol (concat "notmuch-show-" type)))
|
||||||
|
|
||||||
(defun notmuch-show-strip-re (string)
|
(defun notmuch-show-strip-re (string)
|
||||||
(replace-regexp-in-string "\\([Rr]e: *\\)+" "" string))
|
(replace-regexp-in-string "^\\([Rr]e: *\\)+" "" string))
|
||||||
|
|
||||||
(defvar notmuch-show-previous-subject "")
|
(defvar notmuch-show-previous-subject "")
|
||||||
(make-variable-buffer-local 'notmuch-show-previous-subject)
|
(make-variable-buffer-local 'notmuch-show-previous-subject)
|
||||||
|
|
|
@ -33,7 +33,6 @@ output=$(test_emacs '(notmuch-show-strip-re "re:Re: re: Re: re:subject")')
|
||||||
test_expect_equal "$output" '"subject"'
|
test_expect_equal "$output" '"subject"'
|
||||||
|
|
||||||
test_begin_subtest "Bare subject #3"
|
test_begin_subtest "Bare subject #3"
|
||||||
test_subtest_known_broken
|
|
||||||
output=$(test_emacs '(notmuch-show-strip-re "the cure: fix the regexp")')
|
output=$(test_emacs '(notmuch-show-strip-re "the cure: fix the regexp")')
|
||||||
test_expect_equal "$output" '"the cure: fix the regexp"'
|
test_expect_equal "$output" '"the cure: fix the regexp"'
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue