Re: Emacs: Crypto: How to get automatic encryption?
[notmuch-archives.git] / a9 / 90a7e5b4825446edc2036385fc9ca26cfb5623
1 Return-Path: <alex.boterolowry@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 C9BA5431FBC\r
6         for <notmuch@notmuchmail.org>; Wed, 25 Nov 2009 01:13:30 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 Received: from olra.theworths.org ([127.0.0.1])\r
9         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
10         with ESMTP id cNq2qSC24vEJ for <notmuch@notmuchmail.org>;\r
11         Wed, 25 Nov 2009 01:13:30 -0800 (PST)\r
12 Received: from mail-pz0-f197.google.com (mail-pz0-f197.google.com\r
13         [209.85.222.197])\r
14         by olra.theworths.org (Postfix) with ESMTP id 63482431FAE\r
15         for <notmuch@notmuchmail.org>; Wed, 25 Nov 2009 01:13:30 -0800 (PST)\r
16 Received: by pzk35 with SMTP id 35so5509871pzk.22\r
17         for <notmuch@notmuchmail.org>; Wed, 25 Nov 2009 01:13:29 -0800 (PST)\r
18 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
19         h=domainkey-signature:received:received:received:from:to:cc:subject\r
20         :date:message-id:x-mailer;\r
21         bh=yZemcT8bYLJUUcAjNWGBRdXgldYyL6r+qcUSx8BkJe0=;\r
22         b=E+WYkutOPqzJS5SQu3Ttr7qyHaFcqHemTkprY9VtX72vT63ITKQ1HAMxX6+58So8dF\r
23         gttZox8gIWK3rbqkxcZYcKtZ72kAYtgHnjJBS3o5TjPq9PIvYI1dh5kGvYi8Wt+KQ8o5\r
24         EO/z/upvODJDV67w/NT022ZvuRzaVdX4DnU28=\r
25 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;\r
26         h=from:to:cc:subject:date:message-id:x-mailer;\r
27         b=A6KJSB+piXc8MpFnKTN+uyrEtYcYbumIBmmIxbZAKFbQquP9KHqLURx+j0EaAsgi6t\r
28         Ij2POwcubQACFCD+hEf0bT4DUqoA7SDhqAiFAzmW8QjZgKURYEJrKMotKP2HpGm4ibgO\r
29         3Bc5a/b3CpiA6eAfw1Am9sMwfuNY96DUeOqhA=\r
30 Received: by 10.115.39.11 with SMTP id r11mr14926929waj.152.1259140409700;\r
31         Wed, 25 Nov 2009 01:13:29 -0800 (PST)\r
32 Received: from fortitudo (70-36-144-85.dsl.dynamic.sonic.net [70.36.144.85])\r
33         by mx.google.com with ESMTPS id 21sm3823901pxi.4.2009.11.25.01.13.28\r
34         (version=TLSv1/SSLv3 cipher=RC4-MD5);\r
35         Wed, 25 Nov 2009 01:13:29 -0800 (PST)\r
36 Received: from alexbl (uid 1001) (envelope-from alexbl@fortitudo) id 710b\r
37         by fortitudo (DragonFly Mail Agent) Wed, 25 Nov 2009 01:13:34 -0800\r
38 From: Alexander Botero-Lowry <alex.boterolowry@gmail.com>\r
39 To: notmuch@notmuchmail.org\r
40 Date: Wed, 25 Nov 2009 01:13:32 -0800\r
41 Message-Id: <1259140413-16278-1-git-send-email-alex.boterolowry@gmail.com>\r
42 X-Mailer: git-send-email 1.6.5.2\r
43 Subject: [notmuch] [PATCH 1/2] add functions to toggle the nearest backwards\r
44         button of a given type\r
45 X-BeenThere: notmuch@notmuchmail.org\r
46 X-Mailman-Version: 2.1.12\r
47 Precedence: list\r
48 List-Id: "Use and development of the notmuch mail system."\r
49         <notmuch.notmuchmail.org>\r
50 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
51         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
52 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
53 List-Post: <mailto:notmuch@notmuchmail.org>\r
54 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
55 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
56         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
57 X-List-Received-Date: Wed, 25 Nov 2009 09:13:31 -0000\r
58 \r
59 It was noted that though local expansion was nice, it was also pretty\r
60 nice to have an easy way to just open the headers without moving to the\r
61 header button. So this exposes a number of symbols which search backwards\r
62 in the buffer for the nearest button of the desire type and push it\r
63 ---\r
64  notmuch.el |   33 +++++++++++++++++++++++++++++++++\r
65  1 files changed, 33 insertions(+), 0 deletions(-)\r
66 \r
67 diff --git a/notmuch.el b/notmuch.el\r
68 index 551048a..1853762 100644\r
69 --- a/notmuch.el\r
70 +++ b/notmuch.el\r
71 @@ -771,6 +771,39 @@ thread from that buffer can be show when done with this one)."\r
72                    ))))\r
73        )))\r
74  \r
75 +(defun notmuch-toggle-hidden-section (section-button-type) \r
76 +  (save-excursion\r
77 +    (let ((btn (forward-button -1)))\r
78 +      (while btn\r
79 +        (if (button-has-type-p btn section-button-type)\r
80 +            (progn (push-button)\r
81 +                   (setq btn nil))\r
82 +          (condition-case err\r
83 +              (setq btn (forward-button -1))\r
84 +            (error (setq btn nil))))))\r
85 +    )\r
86 +)\r
87 +\r
88 +(defun notmuch-toggle-hidden-headers ()\r
89 +  (interactive)\r
90 +  (notmuch-toggle-hidden-section 'notmuch-button-headers-toggle-type)\r
91 +)\r
92 +\r
93 +(defun notmuch-toggle-hidden-body ()\r
94 +  (interactive)\r
95 +  (notmuch-toggle-hidden-section 'notmuch-button-body-toggle-type)\r
96 +)\r
97 +\r
98 +(defun notmuch-toggle-hidden-citation ()\r
99 +  (interactive)\r
100 +  (notmuch-toggle-hidden-section 'notmuch-button-citation-toggle-type)\r
101 +)\r
102 +\r
103 +(defun notmuch-toggle-hidden-signature ()\r
104 +  (interactive)\r
105 +  (notmuch-toggle-hidden-section 'notmuch-button-signature-toggle-type)\r
106 +)\r
107 +\r
108  (defvar notmuch-search-authors-width 40\r
109    "Number of columns to use to display authors in a notmuch-search buffer.")\r
110  \r
111 -- \r
112 1.6.5.2\r
113 \r