Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id D6F95431FDB for ; Sat, 14 Apr 2012 19:17:55 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -2.3 X-Spam-Level: X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id C6ct-c-wVRPx for ; Sat, 14 Apr 2012 19:17:55 -0700 (PDT) Received: from outgoing-mail.its.caltech.edu (outgoing-mail.its.caltech.edu [131.215.239.19]) by olra.theworths.org (Postfix) with ESMTP id 2E828431FAE for ; Sat, 14 Apr 2012 19:17:55 -0700 (PDT) Received: from fire-doxen.imss.caltech.edu (localhost [127.0.0.1]) by fire-doxen-postvirus (Postfix) with ESMTP id D6AC232801E for ; Sat, 14 Apr 2012 19:17:54 -0700 (PDT) X-Spam-Scanned: at Caltech-IMSS on fire-doxen by amavisd-new Received: from finestructure.net (unknown [76.89.193.65]) (Authenticated sender: jrollins) by fire-doxen-submit (Postfix) with ESMTP id 0994C328007 for ; Sat, 14 Apr 2012 19:17:53 -0700 (PDT) Received: by finestructure.net (Postfix, from userid 1000) id 96D5E45D; Sat, 14 Apr 2012 19:17:52 -0700 (PDT) From: Jameson Graef Rollins To: Notmuch Mail Subject: [PATCH v2] emacs: do not modify subject in search or show Date: Sat, 14 Apr 2012 19:17:52 -0700 Message-Id: <1334456272-10376-1-git-send-email-jrollins@finestructure.net> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1334448507-16877-1-git-send-email-jrollins@finestructure.net> References: <1334448507-16877-1-git-send-email-jrollins@finestructure.net> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Apr 2012 02:17:56 -0000 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" --- Sorry, there was a small bug in the previous version (notmuch-print.el was mistakenly modified). emacs/notmuch-show.el | 5 +---- emacs/notmuch.el | 5 ++--- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index 30b26d1..1e55099 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -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) diff --git a/emacs/notmuch.el b/emacs/notmuch.el index ba833e6..326645d 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -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) -- 1.7.9.5