Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / 7c / 1409bf80b81b57360ea3c5094d8426e804a905
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 78BBE431FDB\r
6         for <notmuch@notmuchmail.org>; Sat, 14 Apr 2012 17:08:43 -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 UPa3gD7V7mrv for <notmuch@notmuchmail.org>;\r
16         Sat, 14 Apr 2012 17:08:32 -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 176DA431FAE\r
20         for <notmuch@notmuchmail.org>; Sat, 14 Apr 2012 17:08:32 -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 B3078328032\r
23         for <notmuch@notmuchmail.org>; Sat, 14 Apr 2012 17:08:29 -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 BC8C132802A\r
28         for <notmuch@notmuchmail.org>; Sat, 14 Apr 2012 17:08:27 -0700 (PDT)\r
29 Received: by finestructure.net (Postfix, from userid 1000)\r
30         id 4E81F45D; Sat, 14 Apr 2012 17:08:27 -0700 (PDT)\r
31 From: Jameson Graef Rollins <jrollins@finestructure.net>\r
32 To: Notmuch Mail <notmuch@notmuchmail.org>\r
33 Subject: [PATCH] emacs: do not modify subject in search or show\r
34 Date: Sat, 14 Apr 2012 17:08:27 -0700\r
35 Message-Id: <1334448507-16877-1-git-send-email-jrollins@finestructure.net>\r
36 X-Mailer: git-send-email 1.7.9.5\r
37 X-BeenThere: notmuch@notmuchmail.org\r
38 X-Mailman-Version: 2.1.13\r
39 Precedence: list\r
40 List-Id: "Use and development of the notmuch mail system."\r
41         <notmuch.notmuchmail.org>\r
42 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
43         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
44 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
45 List-Post: <mailto:notmuch@notmuchmail.org>\r
46 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
47 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
48         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
49 X-List-Received-Date: Sun, 15 Apr 2012 00:08:43 -0000\r
50 \r
51 A previous patch [0] replaced blank subject lines with '[No Subject]'\r
52 in search and show mode.  Apparently this was needed to circumvent\r
53 some bug in the printing code, but there was no need for it search or\r
54 show, and it is definitely not desirable, so we undo it here (a revert\r
55 is no longer feasible).  We should not be modifying strings in the\r
56 original message without good reason, or without a clear indication\r
57 that we are doing so, neither of which apply in this case.  For\r
58 further discussion see [0].\r
59 \r
60 [0] id:"1327918561-16245-3-git-send-email-dme@dme.org"\r
61 ---\r
62  emacs/notmuch-print.el |    4 ++--\r
63  emacs/notmuch-show.el  |    5 +----\r
64  emacs/notmuch.el       |    5 ++---\r
65  3 files changed, 5 insertions(+), 9 deletions(-)\r
66 \r
67 diff --git a/emacs/notmuch-print.el b/emacs/notmuch-print.el\r
68 index 6653d97..81b2ef0 100644\r
69 --- a/emacs/notmuch-print.el\r
70 +++ b/emacs/notmuch-print.el\r
71 @@ -60,7 +60,7 @@ Optional OUTPUT allows passing a list of flags to muttprint."\r
72  \r
73  (defun notmuch-print-ps-print (msg)\r
74    "Print a message buffer using the ps-print package."\r
75 -  (let ((subject (notmuch-prettify-subject\r
76 +  (let ((subject (notmuch-print-prettify-subject\r
77                   (plist-get (notmuch-show-get-prop :headers msg) :Subject))))\r
78      (rename-buffer subject t)\r
79      (ps-print-buffer)))\r
80 @@ -68,7 +68,7 @@ Optional OUTPUT allows passing a list of flags to muttprint."\r
81  (defun notmuch-print-ps-print/evince (msg)\r
82    "Preview a message buffer using ps-print and evince."\r
83    (let ((ps-file (make-temp-file "notmuch"))\r
84 -       (subject (notmuch-prettify-subject\r
85 +       (subject (notmuch-print-prettify-subject\r
86                   (plist-get (notmuch-show-get-prop :headers msg) :Subject))))\r
87      (rename-buffer subject t)\r
88      (ps-print-buffer ps-file)\r
89 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
90 index 30b26d1..1e55099 100644\r
91 --- a/emacs/notmuch-show.el\r
92 +++ b/emacs/notmuch-show.el\r
93 @@ -1075,7 +1075,7 @@ function is used."\r
94        (run-hooks 'notmuch-show-hook))\r
95  \r
96      ;; Set the header line to the subject of the first message.\r
97 -    (setq header-line-format (notmuch-show-strip-re (notmuch-show-get-pretty-subject)))))\r
98 +    (setq header-line-format (notmuch-show-strip-re (notmuch-show-get-subject)))))\r
99  \r
100  (defun notmuch-show-capture-state ()\r
101    "Capture the state of the current buffer.\r
102 @@ -1375,9 +1375,6 @@ current thread."\r
103  (defun notmuch-show-get-depth ()\r
104    (notmuch-show-get-prop :depth))\r
105  \r
106 -(defun notmuch-show-get-pretty-subject ()\r
107 -  (notmuch-prettify-subject (notmuch-show-get-subject)))\r
108 -\r
109  (defun notmuch-show-set-tags (tags)\r
110    "Set the tags of the current message."\r
111    (notmuch-show-set-prop :tags tags)\r
112 diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
113 index ba833e6..326645d 100644\r
114 --- a/emacs/notmuch.el\r
115 +++ b/emacs/notmuch.el\r
116 @@ -507,7 +507,7 @@ Complete list of currently available key bindings:\r
117    "Display the currently selected thread."\r
118    (interactive)\r
119    (let ((thread-id (notmuch-search-find-thread-id))\r
120 -       (subject (notmuch-prettify-subject (notmuch-search-find-subject))))\r
121 +       (subject (notmuch-search-find-subject)))\r
122      (if (> (length thread-id) 0)\r
123         (notmuch-show thread-id\r
124                       (current-buffer)\r
125 @@ -877,8 +877,7 @@ non-authors is found, assume that all of the authors match."\r
126                       ;; We currently just throw away excluded matches.\r
127                       (unless (eq (aref count 1) ?0)\r
128                         (let ((beg (point)))\r
129 -                         (notmuch-search-show-result date count authors\r
130 -                                                     (notmuch-prettify-subject subject) tags)\r
131 +                         (notmuch-search-show-result date count authors subject tags)\r
132                           (notmuch-search-color-line beg (point) tag-list)\r
133                           (put-text-property beg (point) 'notmuch-search-thread-id thread-id)\r
134                           (put-text-property beg (point) 'notmuch-search-authors authors)\r
135 -- \r
136 1.7.9.5\r
137 \r