Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / 45 / 01907635886bff8d09ec34ceabeec7472dcac9
1 Return-Path: <markwalters1009@gmail.com>\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 1DA0B431FBC\r
6         for <notmuch@notmuchmail.org>; Thu, 22 May 2014 00:51:46 -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.201\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0.201 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001,\r
14         RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
15 Received: from olra.theworths.org ([127.0.0.1])\r
16         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
17         with ESMTP id 6b04CxIYJIHu for <notmuch@notmuchmail.org>;\r
18         Thu, 22 May 2014 00:51:38 -0700 (PDT)\r
19 Received: from mail-wg0-f45.google.com (mail-wg0-f45.google.com\r
20  [74.125.82.45])        (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
21  certificate requested) by olra.theworths.org (Postfix) with ESMTPS id\r
22  4B337431FAE    for <notmuch@notmuchmail.org>; Thu, 22 May 2014 00:51:38 -0700\r
23  (PDT)\r
24 Received: by mail-wg0-f45.google.com with SMTP id m15so2967105wgh.4\r
25         for <notmuch@notmuchmail.org>; Thu, 22 May 2014 00:51:34 -0700 (PDT)\r
26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
27         h=from:to:subject:in-reply-to:references:user-agent:date:message-id\r
28         :mime-version:content-type;\r
29         bh=eOh2QxE6OSv/EmYS0G0LK77qfwtjKIIi/NaEzlNt2aU=;\r
30         b=veXQlvz47RzYa8PUSYiYALOj6Zq3StXG5v1wfBRKs6P+PD/9tNNqbyiuya7kSX0pbY\r
31         BEcEE7wspHfabTTmHpl4tzW4f7rHDUA0Ni3y+A1O6d5HtQniaG+Vu89pLK9SWriDHq7y\r
32         e5bc5UMYthaq2vPSLFk8VzzqsKN54rOmKhL8/i+m9fcuUHBnhy9TtTUFklXTBGorcvLw\r
33         ZpK2uAx3JfLZNp6RFwi29mHE5bH/AHqI62Nf1iBHsQuJ3XCSE/NExG1arfdSD0/xsxjq\r
34         Gl1lv/xdJBH+J526n2mxJoeegrs5yrfPlEARXCb3NPjSt/THcHKLFAX6uJfJXU/1lXI+\r
35         Gz9Q==\r
36 X-Received: by 10.194.58.79 with SMTP id o15mr1163280wjq.62.1400745094766;\r
37         Thu, 22 May 2014 00:51:34 -0700 (PDT)\r
38 Received: from localhost (5751dfa2.skybroadband.com. [87.81.223.162])\r
39         by mx.google.com with ESMTPSA id dz5sm6530796wib.22.2014.05.22.00.51.33\r
40         for <multiple recipients>\r
41         (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
42         Thu, 22 May 2014 00:51:33 -0700 (PDT)\r
43 From: Mark Walters <markwalters1009@gmail.com>\r
44 To: David Edmondson <dme@dme.org>, notmuch@notmuchmail.org\r
45 Subject: Re: [PATCH v1] emacs: Add `notmuch-show-toggle-citation-visibility',\r
46         bound to '>'\r
47 In-Reply-To: <1400601369-17005-1-git-send-email-dme@dme.org>\r
48 References: <1400601369-17005-1-git-send-email-dme@dme.org>\r
49 User-Agent: Notmuch/0.15.2+615~g78e3a93 (http://notmuchmail.org) Emacs/23.4.1\r
50         (x86_64-pc-linux-gnu)\r
51 Date: Thu, 22 May 2014 08:51:32 +0100\r
52 Message-ID: <87zjia6ykb.fsf@qmul.ac.uk>\r
53 MIME-Version: 1.0\r
54 Content-Type: text/plain; charset=us-ascii\r
55 X-BeenThere: notmuch@notmuchmail.org\r
56 X-Mailman-Version: 2.1.13\r
57 Precedence: list\r
58 List-Id: "Use and development of the notmuch mail system."\r
59         <notmuch.notmuchmail.org>\r
60 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
61         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
62 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
63 List-Post: <mailto:notmuch@notmuchmail.org>\r
64 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
65 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
66         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
67 X-List-Received-Date: Thu, 22 May 2014 07:51:46 -0000\r
68 \r
69 On Tue, 20 May 2014, David Edmondson <dme@dme.org> wrote:\r
70 > Add a function and key-binding to toggle the collapsing of citations\r
71 > within the current message.\r
72 \r
73 Hi \r
74 \r
75 I like the idea. It seems a little odd to want to toggle the citations\r
76 closing some and opening others. I wonder whether the following action\r
77 would be more intuitive.\r
78 \r
79 If any citation is closed then open all citations. Otherwise close all\r
80 citations.\r
81 \r
82 Alternatively, we could mirror things like M-RET and have ">" always opens\r
83 citations and PREFIX ">" always closes all citations.\r
84 \r
85 What do you think?\r
86 \r
87 Best wishes\r
88 \r
89 Mark\r
90 \r
91 > ---\r
92 >  emacs/notmuch-show.el | 17 +++++++++++++++++\r
93 >  1 file changed, 17 insertions(+)\r
94 >\r
95 > diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
96 > index 10fc872..e4b56c7 100644\r
97 > --- a/emacs/notmuch-show.el\r
98 > +++ b/emacs/notmuch-show.el\r
99 > @@ -1036,6 +1036,22 @@ useful for quoting in replies)."\r
100 >            "Content is not indented."))\r
101 >    (notmuch-show-refresh-view))\r
102 >  \r
103 > +(defun notmuch-show-toggle-citation-visibility ()\r
104 > +  "Toggle the visibility of the citations in the current message."\r
105 > +  (interactive)\r
106 > +  (let ((beg (notmuch-show-message-top))\r
107 > +     (end (notmuch-show-message-bottom))\r
108 > +     button)\r
109 > +    (save-excursion\r
110 > +      (goto-char beg)\r
111 > +      (while (and (setq button (next-button (point)))\r
112 > +               (< (goto-char (button-start button))\r
113 > +                  end))\r
114 > +     (let ((overlay (button-get button 'overlay)))\r
115 > +       (when (and overlay\r
116 > +                  (string= (overlay-get overlay 'type) "citation"))\r
117 > +         (push-button (point))))))))\r
118 > +\r
119 >  (defun notmuch-show-insert-tree (tree depth)\r
120 >    "Insert the message tree TREE at depth DEPTH in the current thread."\r
121 >    (let ((msg (car tree))\r
122 > @@ -1311,6 +1327,7 @@ reset based on the original query."\r
123 >       (define-key map "!" 'notmuch-show-toggle-elide-non-matching)\r
124 >       (define-key map "$" 'notmuch-show-toggle-process-crypto)\r
125 >       (define-key map "<" 'notmuch-show-toggle-thread-indentation)\r
126 > +     (define-key map ">" 'notmuch-show-toggle-citation-visibility)\r
127 >       (define-key map "t" 'toggle-truncate-lines)\r
128 >       (define-key map "." 'notmuch-show-part-map)\r
129 >       map)\r
130 > -- \r
131 > 2.0.0.rc0\r
132 >\r
133 > _______________________________________________\r
134 > notmuch mailing list\r
135 > notmuch@notmuchmail.org\r
136 > http://notmuchmail.org/mailman/listinfo/notmuch\r