]> git.notmuchmail.org Git - notmuch/commitdiff
emacs: do not modify subject in search or show
authorJameson Graef Rollins <jrollins@finestructure.net>
Sun, 15 Apr 2012 02:17:52 +0000 (19:17 -0700)
committerDavid Bremner <bremner@debian.org>
Sun, 29 Apr 2012 02:30:59 +0000 (23:30 -0300)
A previous patch [0] replaced blank subject lines with '[No Subject]'
in search and show mode.  Apparently this was needed to circumvent
some bug in the printing code, but there was no need for it search or
show, and it is definitely not desirable, so we undo it here (a revert
is no longer feasible).  We should not be modifying strings in the
original message without good reason, or without a clear indication
that we are doing so, neither of which apply in this case.  For
further discussion see [0].

[0] id:"1327918561-16245-3-git-send-email-dme@dme.org"

emacs/notmuch-show.el
emacs/notmuch.el

index 30b26d1f998ed8d4b325114599b2d03b7ef39173..1e55099820cf76eb337486c7c84ac945ec86b3df 100644 (file)
@@ -1075,7 +1075,7 @@ function is used."
       (run-hooks 'notmuch-show-hook))
 
     ;; Set the header line to the subject of the first message.
-    (setq header-line-format (notmuch-show-strip-re (notmuch-show-get-pretty-subject)))))
+    (setq header-line-format (notmuch-show-strip-re (notmuch-show-get-subject)))))
 
 (defun notmuch-show-capture-state ()
   "Capture the state of the current buffer.
@@ -1375,9 +1375,6 @@ current thread."
 (defun notmuch-show-get-depth ()
   (notmuch-show-get-prop :depth))
 
-(defun notmuch-show-get-pretty-subject ()
-  (notmuch-prettify-subject (notmuch-show-get-subject)))
-
 (defun notmuch-show-set-tags (tags)
   "Set the tags of the current message."
   (notmuch-show-set-prop :tags tags)
index 736d00f366d7c0abd137c99368f593e68772f7b1..a6724fabc032263df85a05665a034a3ad2053763 100644 (file)
@@ -507,7 +507,7 @@ Complete list of currently available key bindings:
   "Display the currently selected thread."
   (interactive)
   (let ((thread-id (notmuch-search-find-thread-id))
-       (subject (notmuch-prettify-subject (notmuch-search-find-subject))))
+       (subject (notmuch-search-find-subject)))
     (if (> (length thread-id) 0)
        (notmuch-show thread-id
                      (current-buffer)
@@ -877,8 +877,7 @@ non-authors is found, assume that all of the authors match."
                      ;; We currently just throw away excluded matches.
                      (unless (eq (aref count 1) ?0)
                        (let ((beg (point)))
-                         (notmuch-search-show-result date count authors
-                                                     (notmuch-prettify-subject subject) tags)
+                         (notmuch-search-show-result date count authors subject tags)
                          (notmuch-search-color-line beg (point) tag-list)
                          (put-text-property beg (point) 'notmuch-search-thread-id thread-id)
                          (put-text-property beg (point) 'notmuch-search-authors authors)