[PATCH 4/4] Update NEWS for user.other_name
[notmuch-archives.git] / 27 / ff35407f2fd316f0c242495540257774916749
1 Return-Path: <dme@dme.org>\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 54957431FBC\r
6         for <notmuch@notmuchmail.org>; Wed, 25 Jan 2012 05:08:41 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.7\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 ocop40-t8K+u for <notmuch@notmuchmail.org>;\r
16         Wed, 25 Jan 2012 05:08:39 -0800 (PST)\r
17 Received: from mail-we0-f181.google.com (mail-we0-f181.google.com\r
18         [74.125.82.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id 80762431FD5\r
21         for <notmuch@notmuchmail.org>; Wed, 25 Jan 2012 05:08:39 -0800 (PST)\r
22 Received: by werb10 with SMTP id b10so4395477wer.26\r
23         for <notmuch@notmuchmail.org>; Wed, 25 Jan 2012 05:08:38 -0800 (PST)\r
24 MIME-Version: 1.0\r
25 Received: by 10.216.139.87 with SMTP id b65mr4091377wej.59.1327496918289;\r
26         Wed, 25 Jan 2012 05:08:38 -0800 (PST)\r
27 Received: from hotblack-desiato.hh.sledj.net\r
28         (host81-149-164-25.in-addr.btopenworld.com. [81.149.164.25])\r
29         by mx.google.com with ESMTPS id bj10sm24252238wib.9.2012.01.25.05.08.35\r
30         (version=TLSv1/SSLv3 cipher=OTHER);\r
31         Wed, 25 Jan 2012 05:08:36 -0800 (PST)\r
32 Received: by hotblack-desiato.hh.sledj.net (Postfix, from userid 30000)\r
33         id 82BE69FF26; Wed, 25 Jan 2012 13:08:34 +0000 (GMT)\r
34 From: David Edmondson <dme@dme.org>\r
35 To: notmuch@notmuchmail.org\r
36 Subject: [PATCH 3/3] emacs: Prefer '[No Subject]' to blank subjects.\r
37 Date: Wed, 25 Jan 2012 13:08:33 +0000\r
38 Message-Id: <1327496913-4946-4-git-send-email-dme@dme.org>\r
39 X-Mailer: git-send-email 1.7.8.3\r
40 In-Reply-To: <1327496913-4946-1-git-send-email-dme@dme.org>\r
41 References: <1327496913-4946-1-git-send-email-dme@dme.org>\r
42 X-Gm-Message-State:\r
43  ALoCoQmf+/Ko0G7/somSliKRim0S8uBufr9L7NYKMFWNC6wVIZTGXFu7Q1ICbqd+yPtj7EwCbKfM\r
44 X-BeenThere: notmuch@notmuchmail.org\r
45 X-Mailman-Version: 2.1.13\r
46 Precedence: list\r
47 List-Id: "Use and development of the notmuch mail system."\r
48         <notmuch.notmuchmail.org>\r
49 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
50         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
51 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
52 List-Post: <mailto:notmuch@notmuchmail.org>\r
53 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
54 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
55         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
56 X-List-Received-Date: Wed, 25 Jan 2012 13:08:41 -0000\r
57 \r
58 ---\r
59  emacs/notmuch-lib.el   |    5 +++++\r
60  emacs/notmuch-print.el |    8 ++++++--\r
61  emacs/notmuch-show.el  |    5 ++++-\r
62  emacs/notmuch.el       |    5 +----\r
63  4 files changed, 16 insertions(+), 7 deletions(-)\r
64 \r
65 diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el\r
66 index 241fe8c..de33575 100644\r
67 --- a/emacs/notmuch-lib.el\r
68 +++ b/emacs/notmuch-lib.el\r
69 @@ -130,6 +130,11 @@ the user hasn't set this variable with the old or new value."\r
70    (interactive)\r
71    (kill-buffer (current-buffer)))\r
72  \r
73 +(defun notmuch-prettify-subject (subject)\r
74 +  (if (string-match "^[ \t]*$" subject)\r
75 +      (setq subject "[No Subject]"))\r
76 +  subject)\r
77 +\r
78  ;;\r
79  \r
80  (defun notmuch-common-do-stash (text)\r
81 diff --git a/emacs/notmuch-print.el b/emacs/notmuch-print.el\r
82 index 83eb525..51bb740 100644\r
83 --- a/emacs/notmuch-print.el\r
84 +++ b/emacs/notmuch-print.el\r
85 @@ -19,6 +19,8 @@\r
86  ;;\r
87  ;; Authors: David Edmondson <dme@dme.org>\r
88  \r
89 +(require 'notmuch-lib)\r
90 +\r
91  (defcustom notmuch-print-mechanism 'notmuch-print-lpr\r
92    "How should printing be done?"\r
93    :group 'notmuch\r
94 @@ -56,14 +58,16 @@ Optional OUTPUT allows passing a list of flags to muttprint."\r
95  \r
96  (defun notmuch-print-ps-print (msg)\r
97    "Print a message buffer using the ps-print package."\r
98 -  (let ((subject (plist-get (notmuch-show-get-prop :headers msg) :Subject)))\r
99 +  (let ((subject (notmuch-prettify-subject\r
100 +                 (plist-get (notmuch-show-get-prop :headers msg) :Subject))))\r
101      (rename-buffer subject t)\r
102      (ps-print-buffer)))\r
103  \r
104  (defun notmuch-print-ps-print/evince (msg)\r
105    "Preview a message buffer using ps-print and evince."\r
106    (let ((ps-file (make-temp-file "notmuch"))\r
107 -       (subject (plist-get (notmuch-show-get-prop :headers msg) :Subject)))\r
108 +       (subject (notmuch-prettify-subject\r
109 +                 (plist-get (notmuch-show-get-prop :headers msg) :Subject))))\r
110      (rename-buffer subject t)\r
111      (ps-print-buffer ps-file)\r
112      (notmuch-print-run-evince ps-file)))\r
113 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
114 index e6a5b31..c602b3e 100644\r
115 --- a/emacs/notmuch-show.el\r
116 +++ b/emacs/notmuch-show.el\r
117 @@ -985,7 +985,7 @@ buffer."\r
118        (notmuch-show-next-open-message))\r
119  \r
120      ;; Set the header line to the subject of the first open message.\r
121 -    (setq header-line-format (notmuch-show-strip-re (notmuch-show-get-subject)))\r
122 +    (setq header-line-format (notmuch-show-strip-re (notmuch-show-get-pretty-subject)))\r
123  \r
124      (notmuch-show-mark-read)))\r
125  \r
126 @@ -1216,6 +1216,9 @@ Some useful entries are:\r
127  (defun notmuch-show-get-depth ()\r
128    (notmuch-show-get-prop :depth))\r
129  \r
130 +(defun notmuch-show-get-pretty-subject ()\r
131 +  (notmuch-prettify-subject (notmuch-show-get-subject)))\r
132 +\r
133  (defun notmuch-show-set-tags (tags)\r
134    "Set the tags of the current message."\r
135    (notmuch-show-set-prop :tags tags)\r
136 diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
137 index 3f6b977..ce1e232 100644\r
138 --- a/emacs/notmuch.el\r
139 +++ b/emacs/notmuch.el\r
140 @@ -440,10 +440,7 @@ Complete list of currently available key bindings:\r
141    "Display the currently selected thread."\r
142    (interactive "P")\r
143    (let ((thread-id (notmuch-search-find-thread-id))\r
144 -       (subject (notmuch-search-find-subject)))\r
145 -\r
146 -    (if (string-match "^[ \t]*$" subject)\r
147 -       (setq subject "[No Subject]"))\r
148 +       (subject (notmuch-prettify-subject (notmuch-search-find-subject))))\r
149  \r
150      (if (> (length thread-id) 0)\r
151         (notmuch-show thread-id\r
152 -- \r
153 1.7.8.3\r
154 \r