Re: [PATCH v2] emacs: add function to toggle display of all multipart/alternative...
[notmuch-archives.git] / b0 / 28881abf7bbf8f00831658e540af423e862be7
1 Return-Path: <dmitry.kurochkin@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 0C08E429E39\r
6         for <notmuch@notmuchmail.org>; Wed, 25 May 2011 15:10:12 -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.799\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
14 Received: from olra.theworths.org ([127.0.0.1])\r
15         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
16         with ESMTP id ikmgtYs9RBL1 for <notmuch@notmuchmail.org>;\r
17         Wed, 25 May 2011 15:10:11 -0700 (PDT)\r
18 Received: from mail-fx0-f53.google.com (mail-fx0-f53.google.com\r
19         [209.85.161.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id 00A82429E30\r
22         for <notmuch@notmuchmail.org>; Wed, 25 May 2011 15:10:09 -0700 (PDT)\r
23 Received: by mail-fx0-f53.google.com with SMTP id 8so217139fxm.26\r
24         for <notmuch@notmuchmail.org>; Wed, 25 May 2011 15:10:09 -0700 (PDT)\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
26         h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer\r
27         :in-reply-to:references;\r
28         bh=FqhzAKogFFU6ftr6lupG4T8taoHtP2CSiIUsDgmRmis=;\r
29         b=JLwlVhggmS69yNE5AftHj9X5qtFtFp9vvVtvtSgiE4tBQLF3ueCMvTu6DGgdla+Qn2\r
30         O2Fj0njRATmjAc1YNUzTJVAsYiEK2ZGL6HcpFetnZ6LUidkK4WmsUUFmaV6W+mRpcIZi\r
31         pCoYHckHY/IBxGdH2Ka9cfw/jNM63lvS3iyRg=\r
32 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;\r
33         h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;\r
34         b=BUmzjpNq0mUMJEwpsCMed2z9DEFwhPZP1L3vDmviJ2v3tzWYZU29sBnoegk4/ysJSm\r
35         xhChYxWDHSRjnLsKxfV7CKmf9i3Y/Ce9VPsm1t6swOBsPuYYR0u03M7fzPV2IunsNzfr\r
36         9MBA9GO1KtE1+jUxLkXhDAACU/0PHfOUm5bic=\r
37 Received: by 10.223.127.210 with SMTP id h18mr110563fas.77.1306361409665;\r
38         Wed, 25 May 2011 15:10:09 -0700 (PDT)\r
39 Received: from localhost ([91.144.186.21])\r
40         by mx.google.com with ESMTPS id r10sm31643fah.26.2011.05.25.15.10.08\r
41         (version=TLSv1/SSLv3 cipher=OTHER);\r
42         Wed, 25 May 2011 15:10:09 -0700 (PDT)\r
43 From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>\r
44 To: notmuch@notmuchmail.org\r
45 Subject: [PATCH 1/5] Pass message to the `notmuch-show-insert-text/plain-hook'\r
46         hook.\r
47 Date: Thu, 26 May 2011 02:10:12 +0400\r
48 Message-Id: <1306361416-5019-2-git-send-email-dmitry.kurochkin@gmail.com>\r
49 X-Mailer: git-send-email 1.7.5.1\r
50 In-Reply-To: <1306361416-5019-1-git-send-email-dmitry.kurochkin@gmail.com>\r
51 References: <1306361416-5019-1-git-send-email-dmitry.kurochkin@gmail.com>\r
52 X-BeenThere: notmuch@notmuchmail.org\r
53 X-Mailman-Version: 2.1.13\r
54 Precedence: list\r
55 List-Id: "Use and development of the notmuch mail system."\r
56         <notmuch.notmuchmail.org>\r
57 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
58         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
59 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
60 List-Post: <mailto:notmuch@notmuchmail.org>\r
61 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
62 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
63         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
64 X-List-Received-Date: Wed, 25 May 2011 22:10:12 -0000\r
65 \r
66 Before the change, the `notmuch-show-insert-text/plain-hook' was\r
67 given only the `depth' argument.  The patch adds another one -\r
68 the message.  Currently, the new message argument is not used by\r
69 any on the hooks.  But it will be used later to get access to\r
70 message invisibility specs when wash buttons are inserted.\r
71 ---\r
72  emacs/notmuch-show.el |    2 +-\r
73  emacs/notmuch-wash.el |   10 +++++-----\r
74  2 files changed, 6 insertions(+), 6 deletions(-)\r
75 \r
76 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
77 index bd348e1..786debf 100644\r
78 --- a/emacs/notmuch-show.el\r
79 +++ b/emacs/notmuch-show.el\r
80 @@ -531,7 +531,7 @@ current buffer, if possible."\r
81      (save-excursion\r
82        (save-restriction\r
83         (narrow-to-region start (point-max))\r
84 -       (run-hook-with-args 'notmuch-show-insert-text/plain-hook depth))))\r
85 +       (run-hook-with-args 'notmuch-show-insert-text/plain-hook msg depth))))\r
86    t)\r
87  \r
88  (defun notmuch-show-insert-part-text/x-vcalendar (msg part content-type nth depth declared-type)\r
89 diff --git a/emacs/notmuch-wash.el b/emacs/notmuch-wash.el\r
90 index 115c3bb..7d87e85 100644\r
91 --- a/emacs/notmuch-wash.el\r
92 +++ b/emacs/notmuch-wash.el\r
93 @@ -147,7 +147,7 @@ insert before the button, probably for indentation."\r
94                      'overlay overlay\r
95                      :type button-type))))\r
96  \r
97 -(defun notmuch-wash-excerpt-citations (depth)\r
98 +(defun notmuch-wash-excerpt-citations (msg depth)\r
99    "Excerpt citations and up to one signature."\r
100    (goto-char (point-min))\r
101    (beginning-of-line)\r
102 @@ -185,7 +185,7 @@ insert before the button, probably for indentation."\r
103  \r
104  ;;\r
105  \r
106 -(defun notmuch-wash-elide-blank-lines (depth)\r
107 +(defun notmuch-wash-elide-blank-lines (msg depth)\r
108    "Elide leading, trailing and successive blank lines."\r
109  \r
110    ;; Algorithm derived from `article-strip-multiple-blank-lines' in\r
111 @@ -213,7 +213,7 @@ insert before the button, probably for indentation."\r
112  \r
113  ;;\r
114  \r
115 -(defun notmuch-wash-tidy-citations (depth)\r
116 +(defun notmuch-wash-tidy-citations (msg depth)\r
117    "Improve the display of cited regions of a message.\r
118  \r
119  Perform several transformations on the message body:\r
120 @@ -244,7 +244,7 @@ Perform several transformations on the message body:\r
121  \r
122  ;;\r
123  \r
124 -(defun notmuch-wash-wrap-long-lines (depth)\r
125 +(defun notmuch-wash-wrap-long-lines (msg depth)\r
126    "Wrap any long lines in the message to the width of the window.\r
127  \r
128  When doing so, maintaining citation leaders in the wrapped text."\r
129 @@ -263,7 +263,7 @@ When doing so, maintaining citation leaders in the wrapped text."\r
130  \r
131  (defvar diff-file-header-re) ; From `diff-mode.el'.\r
132  \r
133 -(defun notmuch-wash-convert-inline-patch-to-part (depth)\r
134 +(defun notmuch-wash-convert-inline-patch-to-part (msg depth)\r
135    "Convert an inline patch into a fake 'text/x-diff' attachment.\r
136  \r
137  Given that this function guesses whether a buffer includes a\r
138 -- \r
139 1.7.5.1\r
140 \r