[PATCH] RFC: all deleting all properties with a given key
[notmuch-archives.git] / 31 / d1b8563d46924abeaae310684274f65466aa94
1 Return-Path: <cworth@cworth.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 26A6442119B\r
6         for <notmuch@notmuchmail.org>; Fri,  1 Jul 2011 02:01:11 -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: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         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 xSr+wdsPuZLW for <notmuch@notmuchmail.org>;\r
16         Fri,  1 Jul 2011 02:01:10 -0700 (PDT)\r
17 Received: from arlo.cworth.org (arlo.cworth.org [50.43.72.2])\r
18         by olra.theworths.org (Postfix) with ESMTP id 2E1D4421192\r
19         for <notmuch@notmuchmail.org>; Fri,  1 Jul 2011 02:01:10 -0700 (PDT)\r
20 Received: from yoom.amr.corp.intel.com (localhost [127.0.0.1])\r
21         by arlo.cworth.org (Postfix) with ESMTP id 1692229A052;\r
22         Fri,  1 Jul 2011 02:01:09 -0700 (PDT)\r
23 From: Carl Worth <cworth@cworth.org>\r
24 To: notmuch@notmuchmail.org\r
25 Subject: [PATCH] emacs: Fix to unconditionally display subject changes in\r
26         collapsed thread view\r
27 Date: Fri,  1 Jul 2011 02:01:08 -0700\r
28 Message-Id: <1309510868-27954-1-git-send-email-cworth@cworth.org>\r
29 X-Mailer: git-send-email 1.7.5.4\r
30 X-BeenThere: notmuch@notmuchmail.org\r
31 X-Mailman-Version: 2.1.13\r
32 Precedence: list\r
33 List-Id: "Use and development of the notmuch mail system."\r
34         <notmuch.notmuchmail.org>\r
35 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
36         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
37 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
38 List-Post: <mailto:notmuch@notmuchmail.org>\r
39 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
40 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
41         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
42 X-List-Received-Date: Fri, 01 Jul 2011 09:01:11 -0000\r
43 \r
44 The feature to show subject changes in the collapsed thread view was\r
45 originally added (8ab433607) with an option\r
46 (notmuch-show-always-show-subject) to display the subject\r
47 for all messages, even when there was no change.\r
48 \r
49 The subsequent commit (4f04d273) changed the sense of the test (or to\r
50 and) and the name of the controlling variable\r
51 (notmuch-show-elide-same-subject).\r
52 \r
53 But this commit is broken in a few ways:\r
54 \r
55   1. The original definition of notmuch-show-always-show-subject was\r
56      left around\r
57 \r
58      But the variable isn't actually used in the code at all, so it\r
59      just adds clutter and confusion to the customization interface.\r
60 \r
61   2. The name and description of the controlling variable doesn't\r
62      match the implementation\r
63 \r
64      The name suggests that setting the variable to t will cause\r
65      repeated subjects to be elided, (suggesting that when it is nil\r
66      all subjects will be shown).\r
67 \r
68      However, when the variable is nil, no subjects are shown. So a\r
69      correct name for the variable in this sense would be\r
70      notmuch-show-subject-changes.\r
71 \r
72 Showing subject changes is a useful feature, and should be on by\r
73 default. (We don't want to bury generally useful features behind\r
74 customizations that users have to find).\r
75 \r
76 Rather than fixing the name of the variable and changing its default\r
77 value, here we remove the condition entirely, such that the feature is\r
78 enabled unconditionally.\r
79 \r
80 So both the currently-used variable and the stale definition of the\r
81 formerly-used are removed.\r
82 \r
83 Also, the one relevant test-suite result is updated, (showing the\r
84 intial subject of a collapsed thread, and no subject display for later\r
85 messages that do not change the subject).\r
86 ---\r
87  emacs/notmuch-show.el                              |   16 ++--------------\r
88  .../notmuch-show-thread-with-hidden-messages       |    1 +\r
89  2 files changed, 3 insertions(+), 14 deletions(-)\r
90 \r
91 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
92 index 6685717..f96743b 100644\r
93 --- a/emacs/notmuch-show.el\r
94 +++ b/emacs/notmuch-show.el\r
95 @@ -65,17 +65,6 @@ any given message."\r
96    :group 'notmuch\r
97    :type 'boolean)\r
98  \r
99 -(defcustom notmuch-show-elide-same-subject nil\r
100 -  "Do not show the subject of a collapsed message if it is the\r
101 -same as that of the previous message."\r
102 -  :group 'notmuch\r
103 -  :type 'boolean)\r
104 -\r
105 -(defcustom notmuch-show-always-show-subject t\r
106 -  "Should a collapsed message show the `Subject:' line?"\r
107 -  :group 'notmuch\r
108 -  :type 'boolean)\r
109 -\r
110  (defvar notmuch-show-markup-headers-hook '(notmuch-show-colour-headers)\r
111    "A list of functions called to decorate the headers listed in\r
112  `notmuch-message-headers'.")\r
113 @@ -727,9 +716,8 @@ current buffer, if possible."\r
114        ;; If the subject of this message is the same as that of the\r
115        ;; previous message, don't display it when this message is\r
116        ;; collapsed.\r
117 -      (when (and notmuch-show-elide-same-subject\r
118 -                (not (string= notmuch-show-previous-subject\r
119 -                              bare-subject)))\r
120 +      (when (not (string= notmuch-show-previous-subject\r
121 +                         bare-subject))\r
122         (forward-line 1))\r
123        (setq headers-start (point-marker)))\r
124      (setq headers-end (point-marker))\r
125 diff --git a/test/emacs.expected-output/notmuch-show-thread-with-hidden-messages b/test/emacs.expected-output/notmuch-show-thread-with-hidden-messages\r
126 index 5df6606..8a0660f 100644\r
127 --- a/test/emacs.expected-output/notmuch-show-thread-with-hidden-messages\r
128 +++ b/test/emacs.expected-output/notmuch-show-thread-with-hidden-messages\r
129 @@ -1,3 +1,4 @@\r
130  Jan Janak <jan@ryngle.com> (2009-11-17) (inbox unread)\r
131 +Subject: [notmuch] What a great idea!\r
132   Jan Janak <jan@ryngle.com> (2009-11-17) (inbox)\r
133   Carl Worth <cworth@cworth.org> (2009-11-18) (inbox unread)\r
134 -- \r
135 1.7.5.4\r
136 \r