1 Return-Path: <amdragon@mit.edu>
\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 1C65B431FAF
\r
6 for <notmuch@notmuchmail.org>; Sat, 12 Oct 2013 20:32:13 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\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 3wApmZG55vIv for <notmuch@notmuchmail.org>;
\r
16 Sat, 12 Oct 2013 20:32:05 -0700 (PDT)
\r
17 Received: from dmz-mailsec-scanner-7.mit.edu (dmz-mailsec-scanner-7.mit.edu
\r
19 by olra.theworths.org (Postfix) with ESMTP id EFBA6431FAE
\r
20 for <notmuch@notmuchmail.org>; Sat, 12 Oct 2013 20:32:04 -0700 (PDT)
\r
21 X-AuditID: 12074424-b7f528e0000009aa-be-525a143496f0
\r
22 Received: from mailhub-auth-4.mit.edu ( [18.7.62.39])
\r
23 by dmz-mailsec-scanner-7.mit.edu (Symantec Messaging Gateway) with SMTP
\r
24 id 85.B8.02474.4341A525; Sat, 12 Oct 2013 23:32:04 -0400 (EDT)
\r
25 Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11])
\r
26 by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id r9D3W2nb031840;
\r
27 Sat, 12 Oct 2013 23:32:03 -0400
\r
28 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])
\r
29 (authenticated bits=0)
\r
30 (User authenticated as amdragon@ATHENA.MIT.EDU)
\r
31 by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id r9D3W0OD011029
\r
32 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT);
\r
33 Sat, 12 Oct 2013 23:32:02 -0400
\r
34 Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.80)
\r
35 (envelope-from <amdragon@mit.edu>)
\r
36 id 1VVCPP-00062X-GG; Sat, 12 Oct 2013 23:31:59 -0400
\r
37 Date: Sat, 12 Oct 2013 23:31:58 -0400
\r
38 From: Austin Clements <amdragon@MIT.EDU>
\r
39 To: Mark Walters <markwalters1009@gmail.com>
\r
40 Subject: Re: [PATCH 1/2] emacs: show: use interactive instead of
\r
42 Message-ID: <20131013033157.GE10539@mit.edu>
\r
43 References: <1381348886-5673-1-git-send-email-markwalters1009@gmail.com>
\r
44 <1381348886-5673-2-git-send-email-markwalters1009@gmail.com>
\r
46 Content-Type: text/plain; charset=us-ascii
\r
47 Content-Disposition: inline
\r
48 In-Reply-To: <1381348886-5673-2-git-send-email-markwalters1009@gmail.com>
\r
49 User-Agent: Mutt/1.5.21 (2010-09-15)
\r
50 X-Brightmail-Tracker:
\r
51 H4sIAAAAAAAAA+NgFmpileLIzCtJLcpLzFFi42IRYrdT1zURiQoy+NjAZ7F6Lo/F9ZszmR2Y
\r
52 PHbOusvu8WzVLeYApigum5TUnMyy1CJ9uwSujPub2lgKGmUqlr7pYmlgnCvWxcjJISFgIvHg
\r
53 215WCFtM4sK99WxdjFwcQgL7GCUW37rCApIQEtjIKHF2TjVE4jSTxPRtHUwQzhJGiVPb2phB
\r
54 qlgEVCWmrDvECGKzCWhIbNu/HMwWEdCRuH1oATuIzSwgLfHtdzMTiC0sECpx9cdaoHUcHLxA
\r
55 NZ1PaiFmtjNKnLtyGewkXgFBiZMzn7BA9GpJ3Pj3kgmkHmTO8n8cIGFOAU+JDU3HwcaLCqhI
\r
56 TDm5jW0Co9AsJN2zkHTPQuhewMi8ilE2JbdKNzcxM6c4NVm3ODkxLy+1SNdcLzezRC81pXQT
\r
57 IzioXVR2MDYfUjrEKMDBqMTDK3EpMkiINbGsuDL3EKMkB5OSKG8XX1SQEF9SfkplRmJxRnxR
\r
58 aU5q8SFGCQ5mJRHeTnOgct6UxMqq1KJ8mJQ0B4uSOO8tDvsgIYH0xJLU7NTUgtQimKwMB4eS
\r
59 BO8dIaChgkWp6akVaZk5JQhpJg5OkOE8QMPbhYFqeIsLEnOLM9Mh8qcYFaXEeW+DNAuAJDJK
\r
60 8+B6YUnnFaM40CvCvCtA2nmACQuu+xXQYCagwT/fRoAMLklESEk1MDJl/3x3juutas/Ntkn5
\r
61 Jr0PRF+bGa5OfJ+ptVtF55+I0/dXLSkTj6a9uMP3wM408ZdqzvRdy5WlhFcxzT7fs9mi4q6s
\r
62 /xyl2p9i2StSAuQWdPz6/UnnhIqjT+7uEt/TPN/rPy2dJ5Lb617JZr+cv/hjQtI07oVy2cWa
\r
63 Fe8PrfgUJNNZ1mpWpsRSnJFoqMVcVJwIAKCVv2cVAwAA
\r
64 Cc: notmuch@notmuchmail.org
\r
65 X-BeenThere: notmuch@notmuchmail.org
\r
66 X-Mailman-Version: 2.1.13
\r
68 List-Id: "Use and development of the notmuch mail system."
\r
69 <notmuch.notmuchmail.org>
\r
70 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
71 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
72 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
73 List-Post: <mailto:notmuch@notmuchmail.org>
\r
74 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
75 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
76 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
77 X-List-Received-Date: Sun, 13 Oct 2013 03:32:13 -0000
\r
79 Code looks good. Two minor comments below.
\r
81 Quoth Mark Walters on Oct 09 at 9:01 pm:
\r
82 > Currently notmuch-show looks at the prefix-arg directly via
\r
83 > current-prefix-arg. This changes it to use the interactive
\r
86 > emacs/notmuch-show.el | 12 +++++++-----
\r
87 > emacs/notmuch.el | 5 +++--
\r
88 > 2 files changed, 10 insertions(+), 7 deletions(-)
\r
90 > diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
\r
91 > index 5d7e24b..15f9ce6 100644
\r
92 > --- a/emacs/notmuch-show.el
\r
93 > +++ b/emacs/notmuch-show.el
\r
94 > @@ -1080,15 +1080,17 @@ buttons for a corresponding notmuch search."
\r
95 > (make-text-button (first link) (second link)
\r
96 > :type 'notmuch-button-type
\r
97 > 'action `(lambda (arg)
\r
98 > - (notmuch-show ,(third link)))
\r
99 > + (notmuch-show ,(third link) current-prefix-arg))
\r
101 Hmm. Does this work? Can you activate the button with C-u RET?
\r
104 > 'help-echo "Mouse-1, RET: search for this message"
\r
105 > 'face goto-address-mail-face)))))
\r
108 > -(defun notmuch-show (thread-id &optional parent-buffer query-context buffer-name)
\r
109 > +(defun notmuch-show (thread-id &optional elide-toggle parent-buffer query-context buffer-name)
\r
110 > "Run \"notmuch show\" with the given thread ID and display results.
\r
112 > +The optional ELIDE-TOGGLE inverts the default elide behaviour.
\r
114 "ELIDE-TOGGLE, if non-nil, inverts the default elide behavior."?
\r
117 > The optional PARENT-BUFFER is the notmuch-search buffer from
\r
118 > which this notmuch-show command was executed, (so that the
\r
119 > next thread from that buffer can be show when done with this
\r
120 > @@ -1102,7 +1104,7 @@ The optional BUFFER-NAME provides the name of the buffer in
\r
121 > which the message thread is shown. If it is nil (which occurs
\r
122 > when the command is called interactively) the argument to the
\r
123 > function is used."
\r
124 > - (interactive "sNotmuch show: ")
\r
125 > + (interactive "sNotmuch show: \nP")
\r
126 > (let ((buffer-name (generate-new-buffer-name
\r
128 > (concat "*notmuch-" thread-id "*")))))
\r
129 > @@ -1112,9 +1114,9 @@ function is used."
\r
130 > (setq notmuch-show-process-crypto notmuch-crypto-process-mime)
\r
131 > ;; Set the default value for
\r
132 > ;; `notmuch-show-elide-non-matching-messages' in this buffer. If
\r
133 > - ;; there is a prefix argument, invert the default.
\r
134 > + ;; elide-toggle is set, invert the default.
\r
135 > (setq notmuch-show-elide-non-matching-messages notmuch-show-only-matching-messages)
\r
136 > - (if current-prefix-arg
\r
137 > + (if elide-toggle
\r
138 > (setq notmuch-show-elide-non-matching-messages (not notmuch-show-elide-non-matching-messages)))
\r
140 > (setq notmuch-show-thread-id thread-id
\r
141 > diff --git a/emacs/notmuch.el b/emacs/notmuch.el
\r
142 > index 0ff248b..7124d0a 100644
\r
143 > --- a/emacs/notmuch.el
\r
144 > +++ b/emacs/notmuch.el
\r
145 > @@ -486,13 +486,14 @@ If BARE is set then do not prefix with \"thread:\""
\r
146 > "Return a list of authors for the current region"
\r
147 > (notmuch-search-properties-in-region :subject beg end))
\r
149 > -(defun notmuch-search-show-thread ()
\r
150 > +(defun notmuch-search-show-thread (&optional elide-toggle)
\r
151 > "Display the currently selected thread."
\r
153 > + (interactive "P")
\r
154 > (let ((thread-id (notmuch-search-find-thread-id))
\r
155 > (subject (notmuch-search-find-subject)))
\r
156 > (if (> (length thread-id) 0)
\r
157 > (notmuch-show thread-id
\r
160 > notmuch-search-query-string
\r
161 > ;; Name the buffer based on the subject.
\r