[PATCH v2] 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 +1700)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:46:25 +0000 (09:46 -0800)
4b/f6edeccc9f3aa8bcb6ea0c7e5ba28988a87791 [new file with mode: 0644]

diff --git a/4b/f6edeccc9f3aa8bcb6ea0c7e5ba28988a87791 b/4b/f6edeccc9f3aa8bcb6ea0c7e5ba28988a87791
new file mode 100644 (file)
index 0000000..bef32a1
--- /dev/null
@@ -0,0 +1,119 @@
+Return-Path: <jrollins@finestructure.net>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id D6F95431FDB\r
+       for <notmuch@notmuchmail.org>; Sat, 14 Apr 2012 19:17:55 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -2.3\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id C6ct-c-wVRPx for <notmuch@notmuchmail.org>;\r
+       Sat, 14 Apr 2012 19:17:55 -0700 (PDT)\r
+Received: from outgoing-mail.its.caltech.edu (outgoing-mail.its.caltech.edu\r
+       [131.215.239.19])\r
+       by olra.theworths.org (Postfix) with ESMTP id 2E828431FAE\r
+       for <notmuch@notmuchmail.org>; Sat, 14 Apr 2012 19:17:55 -0700 (PDT)\r
+Received: from fire-doxen.imss.caltech.edu (localhost [127.0.0.1])\r
+       by fire-doxen-postvirus (Postfix) with ESMTP id D6AC232801E\r
+       for <notmuch@notmuchmail.org>; Sat, 14 Apr 2012 19:17:54 -0700 (PDT)\r
+X-Spam-Scanned: at Caltech-IMSS on fire-doxen by amavisd-new\r
+Received: from finestructure.net (unknown [76.89.193.65])\r
+       (Authenticated sender: jrollins)\r
+       by fire-doxen-submit (Postfix) with ESMTP id 0994C328007\r
+       for <notmuch@notmuchmail.org>; Sat, 14 Apr 2012 19:17:53 -0700 (PDT)\r
+Received: by finestructure.net (Postfix, from userid 1000)\r
+       id 96D5E45D; Sat, 14 Apr 2012 19:17:52 -0700 (PDT)\r
+From: Jameson Graef Rollins <jrollins@finestructure.net>\r
+To: Notmuch Mail <notmuch@notmuchmail.org>\r
+Subject: [PATCH v2] emacs: do not modify subject in search or show\r
+Date: Sat, 14 Apr 2012 19:17:52 -0700\r
+Message-Id: <1334456272-10376-1-git-send-email-jrollins@finestructure.net>\r
+X-Mailer: git-send-email 1.7.9.5\r
+In-Reply-To: <1334448507-16877-1-git-send-email-jrollins@finestructure.net>\r
+References: <1334448507-16877-1-git-send-email-jrollins@finestructure.net>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sun, 15 Apr 2012 02:17:56 -0000\r
+\r
+A previous patch [0] replaced blank subject lines with '[No Subject]'\r
+in search and show mode.  Apparently this was needed to circumvent\r
+some bug in the printing code, but there was no need for it search or\r
+show, and it is definitely not desirable, so we undo it here (a revert\r
+is no longer feasible).  We should not be modifying strings in the\r
+original message without good reason, or without a clear indication\r
+that we are doing so, neither of which apply in this case.  For\r
+further discussion see [0].\r
+\r
+[0] id:"1327918561-16245-3-git-send-email-dme@dme.org"\r
+---\r
+Sorry, there was a small bug in the previous version (notmuch-print.el\r
+was mistakenly modified).\r
+\r
+ emacs/notmuch-show.el |    5 +----\r
+ emacs/notmuch.el      |    5 ++---\r
+ 2 files changed, 3 insertions(+), 7 deletions(-)\r
+\r
+diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
+index 30b26d1..1e55099 100644\r
+--- a/emacs/notmuch-show.el\r
++++ b/emacs/notmuch-show.el\r
+@@ -1075,7 +1075,7 @@ function is used."\r
+       (run-hooks 'notmuch-show-hook))\r
\r
+     ;; Set the header line to the subject of the first message.\r
+-    (setq header-line-format (notmuch-show-strip-re (notmuch-show-get-pretty-subject)))))\r
++    (setq header-line-format (notmuch-show-strip-re (notmuch-show-get-subject)))))\r
\r
+ (defun notmuch-show-capture-state ()\r
+   "Capture the state of the current buffer.\r
+@@ -1375,9 +1375,6 @@ current thread."\r
+ (defun notmuch-show-get-depth ()\r
+   (notmuch-show-get-prop :depth))\r
\r
+-(defun notmuch-show-get-pretty-subject ()\r
+-  (notmuch-prettify-subject (notmuch-show-get-subject)))\r
+-\r
+ (defun notmuch-show-set-tags (tags)\r
+   "Set the tags of the current message."\r
+   (notmuch-show-set-prop :tags tags)\r
+diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
+index ba833e6..326645d 100644\r
+--- a/emacs/notmuch.el\r
++++ b/emacs/notmuch.el\r
+@@ -507,7 +507,7 @@ Complete list of currently available key bindings:\r
+   "Display the currently selected thread."\r
+   (interactive)\r
+   (let ((thread-id (notmuch-search-find-thread-id))\r
+-      (subject (notmuch-prettify-subject (notmuch-search-find-subject))))\r
++      (subject (notmuch-search-find-subject)))\r
+     (if (> (length thread-id) 0)\r
+       (notmuch-show thread-id\r
+                     (current-buffer)\r
+@@ -877,8 +877,7 @@ non-authors is found, assume that all of the authors match."\r
+                     ;; We currently just throw away excluded matches.\r
+                     (unless (eq (aref count 1) ?0)\r
+                       (let ((beg (point)))\r
+-                        (notmuch-search-show-result date count authors\r
+-                                                    (notmuch-prettify-subject subject) tags)\r
++                        (notmuch-search-show-result date count authors subject tags)\r
+                         (notmuch-search-color-line beg (point) tag-list)\r
+                         (put-text-property beg (point) 'notmuch-search-thread-id thread-id)\r
+                         (put-text-property beg (point) 'notmuch-search-authors authors)\r
+-- \r
+1.7.9.5\r
+\r