Re: [PATCH v4 08/16] reorganize indexing of multipart/signed and multipart/encrypted
[notmuch-archives.git] / 68 / 914bf736ce0cce322c740be1bedba329fd9696
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 CAE59429E25\r
6         for <notmuch@notmuchmail.org>; Mon, 23 May 2011 08:29:47 -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 Xu5YgacyxH18 for <notmuch@notmuchmail.org>;\r
17         Mon, 23 May 2011 08:29:47 -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 40338431FB6\r
22         for <notmuch@notmuchmail.org>; Mon, 23 May 2011 08:29:47 -0700 (PDT)\r
23 Received: by fxm8 with SMTP id 8so4335597fxm.26\r
24         for <notmuch@notmuchmail.org>; Mon, 23 May 2011 08:29:45 -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=mn/UCAlrRmeq0ow4hsKnw1kF6gjUy/fIFuKwpHuVL2A=;\r
29         b=EgFSsZvYpgYrMTjPV9z5XoxKFm+AQA3/gWtM5vZbTgNU8ChcAKdyrrImU0KfUaz/fX\r
30         KshLAAZ4naRpQborMvFH5yotIo/G7SDlRDdNXqfZQNd8bq1L4EOzPiGMq7QKGMBuBRXw\r
31         9zKTQzGW6YL6Hh5b44ibyZbFmjepUiBnCtwX4=\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=jk86nTwElELcmyFCT/aTk/TTSG80UUzqzG4+03ZdokWZsNA9sGy73PP0Wsm4FOwI85\r
35         pSZRIXVS00VPFzY8uqx22EeDEdHhp+JGamQDLkSxOxGXONZBG1BQywmOipQeyB44rXed\r
36         AC1J2DPQX+OW3VJ3N6pksOqOt7lGDXgrzGm7c=\r
37 Received: by 10.223.14.139 with SMTP id g11mr2544421faa.103.1306164585668;\r
38         Mon, 23 May 2011 08:29:45 -0700 (PDT)\r
39 Received: from localhost ([91.144.186.21])\r
40         by mx.google.com with ESMTPS id f14sm2395995fai.41.2011.05.23.08.29.44\r
41         (version=TLSv1/SSLv3 cipher=OTHER);\r
42         Mon, 23 May 2011 08:29:44 -0700 (PDT)\r
43 From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>\r
44 To: notmuch@notmuchmail.org\r
45 Subject: [PATCH] Save and restore point explicitly in\r
46         `notmuch-wash-toggle-invisible-action'.\r
47 Date: Mon, 23 May 2011 19:29:46 +0400\r
48 Message-Id: <1306164587-20326-1-git-send-email-dmitry.kurochkin@gmail.com>\r
49 X-Mailer: git-send-email 1.7.5.1\r
50 In-Reply-To: <1306090675-26982-1-git-send-email-dmitry.kurochkin@gmail.com>\r
51 References: <1306090675-26982-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: Mon, 23 May 2011 15:29:48 -0000\r
65 \r
66 Before the change, save-excursion was used to save the point.\r
67 But the restored position is affected by buffer modifications,\r
68 which results in jumping cursor.  The patch saves and restores\r
69 point explicitly by using a variable instead of save-excursion.\r
70 ---\r
71  emacs/notmuch-wash.el |   13 +++++++------\r
72  1 files changed, 7 insertions(+), 6 deletions(-)\r
73 \r
74 diff --git a/emacs/notmuch-wash.el b/emacs/notmuch-wash.el\r
75 index 863459e..b6d791f 100644\r
76 --- a/emacs/notmuch-wash.el\r
77 +++ b/emacs/notmuch-wash.el\r
78 @@ -82,13 +82,14 @@ collapse the remaining lines into a button.")\r
79    (let* ((new-start (button-start cite-button))\r
80          (overlay (button-get cite-button 'overlay))\r
81          (button-label (notmuch-wash-button-label overlay))\r
82 +        (old-point (point))\r
83          (inhibit-read-only t))\r
84 -    (save-excursion\r
85 -      (goto-char new-start)\r
86 -      (insert button-label)\r
87 -      (let ((old-end (button-end cite-button)))\r
88 -       (move-overlay cite-button new-start (point))\r
89 -       (delete-region (point) old-end))))\r
90 +    (goto-char new-start)\r
91 +    (insert button-label)\r
92 +    (let ((old-end (button-end cite-button)))\r
93 +      (move-overlay cite-button new-start (point))\r
94 +      (delete-region (point) old-end))\r
95 +    (goto-char old-point))\r
96    (force-window-update)\r
97    (redisplay t))\r
98  \r
99 -- \r
100 1.7.5.1\r
101 \r