Re: [PATCH] NEWS: initial NEWS for 0.22.1
[notmuch-archives.git] / 34 / 8ff2ac3d1a569651177003b3de593c1717bfc4
1 Return-Path: <jrollins@finestructure.net>\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 03C95431FB6\r
6         for <notmuch@notmuchmail.org>; Sun, 13 Nov 2011 11:15:35 -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: -2.3\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_MED=-2.3] 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 lsQONCU9hZh9 for <notmuch@notmuchmail.org>;\r
16         Sun, 13 Nov 2011 11:15:32 -0800 (PST)\r
17 Received: from outgoing-mail.its.caltech.edu (outgoing-mail.its.caltech.edu\r
18         [131.215.239.19])\r
19         by olra.theworths.org (Postfix) with ESMTP id B13B9429E21\r
20         for <notmuch@notmuchmail.org>; Sun, 13 Nov 2011 11:15:32 -0800 (PST)\r
21 Received: from fire-doxen.imss.caltech.edu (localhost [127.0.0.1])\r
22         by fire-doxen-postvirus (Postfix) with ESMTP id 786722E50D65\r
23         for <notmuch@notmuchmail.org>; Sun, 13 Nov 2011 11:15:30 -0800 (PST)\r
24 X-Spam-Scanned: at Caltech-IMSS on fire-doxen by amavisd-new\r
25 Received: from finestructure.net (cpe-76-174-136-149.socal.res.rr.com\r
26         [76.174.136.149]) (Authenticated sender: jrollins)\r
27         by fire-doxen-submit (Postfix) with ESMTP id A68A32E50D83\r
28         for <notmuch@notmuchmail.org>; Sun, 13 Nov 2011 11:15:28 -0800 (PST)\r
29 Received: by finestructure.net (Postfix, from userid 1000)\r
30         id 44F5D1AB9; Sun, 13 Nov 2011 11:15:28 -0800 (PST)\r
31 From: Jameson Graef Rollins <jrollins@finestructure.net>\r
32 To: Notmuch Mail <notmuch@notmuchmail.org>\r
33 Subject: [PATCH 2/2] emacs: add notmuch-show-worker function for specifying\r
34         crypto processing directly\r
35 Date: Sun, 13 Nov 2011 11:15:21 -0800\r
36 Message-Id: <1321211721-7608-3-git-send-email-jrollins@finestructure.net>\r
37 X-Mailer: git-send-email 1.7.7.1\r
38 In-Reply-To: <1321211721-7608-2-git-send-email-jrollins@finestructure.net>\r
39 References: <87ipmo69hi.fsf@zancas.localnet>\r
40         <1321211721-7608-1-git-send-email-jrollins@finestructure.net>\r
41         <1321211721-7608-2-git-send-email-jrollins@finestructure.net>\r
42 X-BeenThere: notmuch@notmuchmail.org\r
43 X-Mailman-Version: 2.1.13\r
44 Precedence: list\r
45 List-Id: "Use and development of the notmuch mail system."\r
46         <notmuch.notmuchmail.org>\r
47 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
48         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
49 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
50 List-Post: <mailto:notmuch@notmuchmail.org>\r
51 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
52 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
53         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
54 X-List-Received-Date: Sun, 13 Nov 2011 19:15:35 -0000\r
55 \r
56 The main reason to introduce this new unexposed function is to allow\r
57 the buffer redisplay crypto switch to behaving in a more expected way.\r
58 The prefix to notmuch-show-redisplay buffer now switches the crypto\r
59 processing of the current show buffer, as opposed to switching the\r
60 logic of the notmuch-crypto-process-mime customization variable.  This\r
61 behavior is more intuitive.\r
62 ---\r
63  emacs/notmuch-show.el |   20 ++++++++++++--------\r
64  1 files changed, 12 insertions(+), 8 deletions(-)\r
65 \r
66 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
67 index 95af32a..d5c95d8 100644\r
68 --- a/emacs/notmuch-show.el\r
69 +++ b/emacs/notmuch-show.el\r
70 @@ -830,13 +830,16 @@ The optional CRYPTO-SWITCH toggles the value of the\r
71  notmuch-crypto-process-mime customization variable for this show\r
72  buffer."\r
73    (interactive "sNotmuch show: ")\r
74 +  (let* ((process-crypto (if crypto-switch\r
75 +                            (not notmuch-crypto-process-mime)\r
76 +                          notmuch-crypto-process-mime)))\r
77 +    (notmuch-show-worker thread-id parent-buffer query-context buffer-name process-crypto)))\r
78 +\r
79 +(defun notmuch-show-worker (thread-id parent-buffer query-context buffer-name process-crypto)\r
80    (let* ((buffer-name (generate-new-buffer-name\r
81                        (or buffer-name\r
82                            (concat "*notmuch-" thread-id "*"))))\r
83          (buffer (get-buffer-create buffer-name))\r
84 -        (process-crypto (if crypto-switch\r
85 -                            (not notmuch-crypto-process-mime)\r
86 -                          notmuch-crypto-process-mime))\r
87          (inhibit-read-only t))\r
88      (switch-to-buffer buffer)\r
89      (notmuch-show-mode)\r
90 @@ -882,16 +885,17 @@ buffer."\r
91    "Refresh the current view (with crypto switch if prefix given).\r
92  \r
93  Kills the current buffer and reruns notmuch show with the same\r
94 -thread id.  If a prefix is given, the current thread is\r
95 -redisplayed with the crypto switch activated, which switch the\r
96 -logic of the notmuch-crypto-process-mime customization variable."\r
97 +thread id.  If a prefix is given, crypto processing is toggled."\r
98    (interactive "P")\r
99    (let ((thread-id notmuch-show-thread-id)\r
100         (parent-buffer notmuch-show-parent-buffer)\r
101         (query-context notmuch-show-query-context)\r
102 -       (buffer-name notmuch-show-buffer-name))\r
103 +       (buffer-name notmuch-show-buffer-name)\r
104 +       (process-crypto (if crypto-switch\r
105 +                           (not notmuch-show-process-crypto)\r
106 +                         notmuch-show-process-crypto)))\r
107      (notmuch-kill-this-buffer)\r
108 -    (notmuch-show thread-id parent-buffer query-context buffer-name crypto-switch)))\r
109 +    (notmuch-show-worker thread-id parent-buffer query-context buffer-name process-crypto)))\r
110  \r
111  (defvar notmuch-show-stash-map\r
112    (let ((map (make-sparse-keymap)))\r
113 -- \r
114 1.7.7.1\r
115 \r