[PATCH 4/4] Update NEWS for user.other_name
[notmuch-archives.git] / e4 / bd12475daec33b40c12796e9ddd68d366d26a3
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 BB6AC431FD4\r
6         for <notmuch@notmuchmail.org>; Tue, 18 Dec 2012 11:28:22 -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.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 slx5W8P4Pn3o for <notmuch@notmuchmail.org>;\r
18         Tue, 18 Dec 2012 11:28:21 -0800 (PST)\r
19 Received: from mail-we0-f179.google.com (mail-we0-f179.google.com\r
20         [74.125.82.179]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
21         (No client certificate requested)\r
22         by olra.theworths.org (Postfix) with ESMTPS id 01CC9431FC4\r
23         for <notmuch@notmuchmail.org>; Tue, 18 Dec 2012 11:28:17 -0800 (PST)\r
24 Received: by mail-we0-f179.google.com with SMTP id r6so522141wey.10\r
25         for <notmuch@notmuchmail.org>; Tue, 18 Dec 2012 11:28:16 -0800 (PST)\r
26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
27         h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to\r
28         :references; bh=K9IB+DnX3shaOIDNyrgy5fzvQtHkwls4BNa9BnOt20U=;\r
29         b=yxWhsB3if2H2HSxlu151QKeSAmcDRtLcFl1xjAwUppCzWxeL42oO1MObXN3Y2GvRE4\r
30         L+biNi269meJEhgz0hBdxJOwkUiAZtuyZFP+4q2q0t8fGO3QyVFnCWWJyB2hgYerPoGZ\r
31         kykJozq6YEYmqW3k+Xyqj9hwt+z3Ut7AFLswejj4NN3s/yR0jtZvURcBHqVTpqY0K0gK\r
32         PcoRRDMcg2fLF6i3V2KPPZZ12uPG46q0gJJ0kh99AjixFtGsqR2BrKZAJhT9+vHE9NO0\r
33         Xzcul86y/CZ5AiFWegN7qtLERcxdQR9ZWkeX2tjgwF5oYTBsI6rS3SK76KXivr7Ts7bI\r
34         QoAw==\r
35 X-Received: by 10.180.75.208 with SMTP id e16mr7043582wiw.3.1355858896786;\r
36         Tue, 18 Dec 2012 11:28:16 -0800 (PST)\r
37 Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31])\r
38         by mx.google.com with ESMTPS id dw4sm4131325wib.1.2012.12.18.11.28.15\r
39         (version=TLSv1/SSLv3 cipher=OTHER);\r
40         Tue, 18 Dec 2012 11:28:16 -0800 (PST)\r
41 From: Mark Walters <markwalters1009@gmail.com>\r
42 To: notmuch@notmuchmail.org\r
43 Subject: [PATCH v5 3/4] emacs: show: add invisibility button action\r
44 Date: Tue, 18 Dec 2012 19:27:59 +0000\r
45 Message-Id: <1355858880-16329-4-git-send-email-markwalters1009@gmail.com>\r
46 X-Mailer: git-send-email 1.7.9.1\r
47 In-Reply-To: <1355858880-16329-1-git-send-email-markwalters1009@gmail.com>\r
48 References: <1355858880-16329-1-git-send-email-markwalters1009@gmail.com>\r
49 X-BeenThere: notmuch@notmuchmail.org\r
50 X-Mailman-Version: 2.1.13\r
51 Precedence: list\r
52 List-Id: "Use and development of the notmuch mail system."\r
53         <notmuch.notmuchmail.org>\r
54 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
55         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
56 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
57 List-Post: <mailto:notmuch@notmuchmail.org>\r
58 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
59 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
60         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
61 X-List-Received-Date: Tue, 18 Dec 2012 19:28:23 -0000\r
62 \r
63 This adds a button action to show hidden parts. In this version "RET"\r
64 toggles the visibility of any part which puts content in the buffer\r
65 (as opposed to attachments such as application/pdf).\r
66 \r
67 The button is used to hide parts when appropriate (eg text/html in\r
68 multipart/alternative).\r
69 ---\r
70  emacs/notmuch-show.el |   31 +++++++++++++++++++++++++++++--\r
71  1 files changed, 29 insertions(+), 2 deletions(-)\r
72 \r
73 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
74 index dc86b43..f9366d0 100644\r
75 --- a/emacs/notmuch-show.el\r
76 +++ b/emacs/notmuch-show.el\r
77 @@ -554,6 +554,25 @@ message at DEPTH in the current thread."\r
78      (let ((handle (mm-make-handle (current-buffer) (list content-type))))\r
79        (mm-pipe-part handle))))\r
80  \r
81 +;; This is taken from notmuch-wash: maybe it should be unified?\r
82 +(defun notmuch-show-toggle-part-invisibility (&optional button)\r
83 +  (interactive)\r
84 +  (let* ((button (or button (button-at (point))))\r
85 +        (overlay (button-get button 'overlay)))\r
86 +    (when overlay\r
87 +      (let* ((show (overlay-get overlay 'invisible))\r
88 +            (new-start (button-start button))\r
89 +            (button-label (button-get button :base-label))\r
90 +            (old-point (point))\r
91 +            (inhibit-read-only t))\r
92 +       (overlay-put overlay 'invisible (not show))\r
93 +       (goto-char new-start)\r
94 +       (insert "[ " button-label (if show " ]" " (hidden) ]"))\r
95 +       (let ((old-end (button-end button)))\r
96 +         (move-overlay button new-start (point))\r
97 +         (delete-region (point) old-end))\r
98 +       (goto-char (min old-point (1- (button-end button))))))))\r
99 +\r
100  (defun notmuch-show-multipart/*-to-list (part)\r
101    (mapcar (lambda (inner-part) (plist-get inner-part :content-type))\r
102           (plist-get part :content)))\r
103 @@ -847,7 +866,12 @@ message at DEPTH in the current thread."\r
104      ;; also need to check that the button is a genuine part button not\r
105      ;; a notmuch-wash button.\r
106      (when (and button (/= part-beg end) (button-get button :base-label))\r
107 -       (button-put button 'overlay (make-overlay part-beg end)))))\r
108 +      (button-put button 'overlay (make-overlay part-beg end))\r
109 +      ;; We toggle the button for hidden parts as that gets the\r
110 +      ;; button label right.\r
111 +      (save-excursion\r
112 +       (when hide\r
113 +         (notmuch-show-toggle-part-invisibility button))))))\r
114  \r
115  (defun notmuch-show-insert-bodypart (msg part depth &optional hide)\r
116    "Insert the body part PART at depth DEPTH in the current thread.\r
117 @@ -1953,7 +1977,10 @@ the user (see `notmuch-show-stash-mlarchive-link-alist')."\r
118  \r
119  (defun notmuch-show-part-button-default (&optional button)\r
120    (interactive)\r
121 -  (notmuch-show-part-button-internal button notmuch-show-part-button-default-action))\r
122 +  (let ((button (or button (button-at (point)))))\r
123 +    (if (button-get button 'overlay)\r
124 +       (notmuch-show-toggle-part-invisibility button)\r
125 +      (notmuch-show-part-button-internal button notmuch-show-part-button-default-action))))\r
126  \r
127  (defun notmuch-show-part-button-save (&optional button)\r
128    (interactive)\r
129 -- \r
130 1.7.9.1\r
131 \r