Re: [feature request] emacs: use `notmuch insert` for FCC
[notmuch-archives.git] / 4b / f6edeccc9f3aa8bcb6ea0c7e5ba28988a87791
1 Return-Path: <jrollins@finestructure.net>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id D6F95431FDB\r
6         for <notmuch@notmuchmail.org>; Sat, 14 Apr 2012 19:17:55 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -2.3\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id C6ct-c-wVRPx for <notmuch@notmuchmail.org>;\r
16         Sat, 14 Apr 2012 19:17:55 -0700 (PDT)\r
17 Received: from outgoing-mail.its.caltech.edu (outgoing-mail.its.caltech.edu\r
18         [131.215.239.19])\r
19         by olra.theworths.org (Postfix) with ESMTP id 2E828431FAE\r
20         for <notmuch@notmuchmail.org>; Sat, 14 Apr 2012 19:17:55 -0700 (PDT)\r
21 Received: from fire-doxen.imss.caltech.edu (localhost [127.0.0.1])\r
22         by fire-doxen-postvirus (Postfix) with ESMTP id D6AC232801E\r
23         for <notmuch@notmuchmail.org>; Sat, 14 Apr 2012 19:17:54 -0700 (PDT)\r
24 X-Spam-Scanned: at Caltech-IMSS on fire-doxen by amavisd-new\r
25 Received: from finestructure.net (unknown [76.89.193.65])\r
26         (Authenticated sender: jrollins)\r
27         by fire-doxen-submit (Postfix) with ESMTP id 0994C328007\r
28         for <notmuch@notmuchmail.org>; Sat, 14 Apr 2012 19:17:53 -0700 (PDT)\r
29 Received: by finestructure.net (Postfix, from userid 1000)\r
30         id 96D5E45D; Sat, 14 Apr 2012 19:17:52 -0700 (PDT)\r
31 From: Jameson Graef Rollins <jrollins@finestructure.net>\r
32 To: Notmuch Mail <notmuch@notmuchmail.org>\r
33 Subject: [PATCH v2] emacs: do not modify subject in search or show\r
34 Date: Sat, 14 Apr 2012 19:17:52 -0700\r
35 Message-Id: <1334456272-10376-1-git-send-email-jrollins@finestructure.net>\r
36 X-Mailer: git-send-email 1.7.9.5\r
37 In-Reply-To: <1334448507-16877-1-git-send-email-jrollins@finestructure.net>\r
38 References: <1334448507-16877-1-git-send-email-jrollins@finestructure.net>\r
39 X-BeenThere: notmuch@notmuchmail.org\r
40 X-Mailman-Version: 2.1.13\r
41 Precedence: list\r
42 List-Id: "Use and development of the notmuch mail system."\r
43         <notmuch.notmuchmail.org>\r
44 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
45         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
46 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
47 List-Post: <mailto:notmuch@notmuchmail.org>\r
48 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
49 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
50         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
51 X-List-Received-Date: Sun, 15 Apr 2012 02:17:56 -0000\r
52 \r
53 A previous patch [0] replaced blank subject lines with '[No Subject]'\r
54 in search and show mode.  Apparently this was needed to circumvent\r
55 some bug in the printing code, but there was no need for it search or\r
56 show, and it is definitely not desirable, so we undo it here (a revert\r
57 is no longer feasible).  We should not be modifying strings in the\r
58 original message without good reason, or without a clear indication\r
59 that we are doing so, neither of which apply in this case.  For\r
60 further discussion see [0].\r
61 \r
62 [0] id:"1327918561-16245-3-git-send-email-dme@dme.org"\r
63 ---\r
64 Sorry, there was a small bug in the previous version (notmuch-print.el\r
65 was mistakenly modified).\r
66 \r
67  emacs/notmuch-show.el |    5 +----\r
68  emacs/notmuch.el      |    5 ++---\r
69  2 files changed, 3 insertions(+), 7 deletions(-)\r
70 \r
71 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
72 index 30b26d1..1e55099 100644\r
73 --- a/emacs/notmuch-show.el\r
74 +++ b/emacs/notmuch-show.el\r
75 @@ -1075,7 +1075,7 @@ function is used."\r
76        (run-hooks 'notmuch-show-hook))\r
77  \r
78      ;; Set the header line to the subject of the first message.\r
79 -    (setq header-line-format (notmuch-show-strip-re (notmuch-show-get-pretty-subject)))))\r
80 +    (setq header-line-format (notmuch-show-strip-re (notmuch-show-get-subject)))))\r
81  \r
82  (defun notmuch-show-capture-state ()\r
83    "Capture the state of the current buffer.\r
84 @@ -1375,9 +1375,6 @@ current thread."\r
85  (defun notmuch-show-get-depth ()\r
86    (notmuch-show-get-prop :depth))\r
87  \r
88 -(defun notmuch-show-get-pretty-subject ()\r
89 -  (notmuch-prettify-subject (notmuch-show-get-subject)))\r
90 -\r
91  (defun notmuch-show-set-tags (tags)\r
92    "Set the tags of the current message."\r
93    (notmuch-show-set-prop :tags tags)\r
94 diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
95 index ba833e6..326645d 100644\r
96 --- a/emacs/notmuch.el\r
97 +++ b/emacs/notmuch.el\r
98 @@ -507,7 +507,7 @@ Complete list of currently available key bindings:\r
99    "Display the currently selected thread."\r
100    (interactive)\r
101    (let ((thread-id (notmuch-search-find-thread-id))\r
102 -       (subject (notmuch-prettify-subject (notmuch-search-find-subject))))\r
103 +       (subject (notmuch-search-find-subject)))\r
104      (if (> (length thread-id) 0)\r
105         (notmuch-show thread-id\r
106                       (current-buffer)\r
107 @@ -877,8 +877,7 @@ non-authors is found, assume that all of the authors match."\r
108                       ;; We currently just throw away excluded matches.\r
109                       (unless (eq (aref count 1) ?0)\r
110                         (let ((beg (point)))\r
111 -                         (notmuch-search-show-result date count authors\r
112 -                                                     (notmuch-prettify-subject subject) tags)\r
113 +                         (notmuch-search-show-result date count authors subject tags)\r
114                           (notmuch-search-color-line beg (point) tag-list)\r
115                           (put-text-property beg (point) 'notmuch-search-thread-id thread-id)\r
116                           (put-text-property beg (point) 'notmuch-search-authors authors)\r
117 -- \r
118 1.7.9.5\r
119 \r