Re: [PATCH v4 13/16] add indexopts to notmuch python bindings.
[notmuch-archives.git] / 63 / 030be6bc88aef91fc7d33b9450f5bf9f4044f1
1 Return-Path: <cworth@cworth.org>\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 EAB75431FD0\r
6         for <notmuch@notmuchmail.org>; Tue, 24 May 2011 13:21:04 -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.01\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0.01 tagged_above=-999 required=5\r
12         tests=[T_MIME_NO_TEXT=0.01] 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 HlcFbURjH9YE for <notmuch@notmuchmail.org>;\r
16         Tue, 24 May 2011 13:21:04 -0700 (PDT)\r
17 Received: from arlo.cworth.org (arlo.cworth.org [50.43.72.2])\r
18         by olra.theworths.org (Postfix) with ESMTP id 7E559431FB6\r
19         for <notmuch@notmuchmail.org>; Tue, 24 May 2011 13:21:04 -0700 (PDT)\r
20 Received: from yoom.home.cworth.org (localhost [127.0.0.1])\r
21         by arlo.cworth.org (Postfix) with ESMTP id D3F2129A057;\r
22         Tue, 24 May 2011 13:21:02 -0700 (PDT)\r
23 Received: by yoom.home.cworth.org (Postfix, from userid 1000)\r
24         id C5CFA25417E; Tue, 24 May 2011 13:21:02 -0700 (PDT)\r
25 From: Carl Worth <cworth@cworth.org>\r
26 To: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>, notmuch@notmuchmail.org\r
27 Subject: Re: [PATCH] Save and restore point explicitly in\r
28         `notmuch-wash-toggle-invisible-action'.\r
29 In-Reply-To: <1306164587-20326-1-git-send-email-dmitry.kurochkin@gmail.com>\r
30 References: <1306090675-26982-1-git-send-email-dmitry.kurochkin@gmail.com>\r
31         <1306164587-20326-1-git-send-email-dmitry.kurochkin@gmail.com>\r
32 User-Agent: Notmuch/0.5 (http://notmuchmail.org) Emacs/23.3.1\r
33         (i486-pc-linux-gnu)\r
34 Date: Tue, 24 May 2011 13:20:56 -0700\r
35 Message-ID: <87oc2rlujb.fsf@yoom.home.cworth.org>\r
36 MIME-Version: 1.0\r
37 Content-Type: multipart/signed; boundary="=-=-=";\r
38         micalg=pgp-sha1; protocol="application/pgp-signature"\r
39 X-BeenThere: notmuch@notmuchmail.org\r
40 X-Mailman-Version: 2.1.13\r
41 Precedence: list\r
42 List-Id: "Use and development of the notmuch mail system."\r
43         <notmuch.notmuchmail.org>\r
44 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
45         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
46 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
47 List-Post: <mailto:notmuch@notmuchmail.org>\r
48 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
49 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
50         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
51 X-List-Received-Date: Tue, 24 May 2011 20:21:05 -0000\r
52 \r
53 --=-=-=\r
54 Content-Transfer-Encoding: quoted-printable\r
55 \r
56 On Mon, 23 May 2011 19:29:46 +0400, Dmitry Kurochkin <dmitry.kurochkin@gmai=\r
57 l.com> wrote:\r
58 > Before the change, save-excursion was used to save the point.\r
59 > But the restored position is affected by buffer modifications,\r
60 > which results in jumping cursor.  The patch saves and restores\r
61 > point explicitly by using a variable instead of save-excursion.\r
62 \r
63 Dmitry,\r
64 \r
65 Thanks so much for the improvement to the button text! This will be a\r
66 nice thing to add.\r
67 \r
68 But this patch confuses me. I can understand how a buffer-position\r
69 variable can cause the cursor to jump. That's usually the kind of thing\r
70 that can be fixed by switching from an integer position to a marker\r
71 instead, (since markers are updated when the corresponding text is\r
72 updated).\r
73 \r
74 But in this case, I don't see how:\r
75 \r
76         (let ((old-point (point)))\r
77                 ... code here ...\r
78           (goto-char old-point))\r
79 \r
80 is distinct from:\r
81 \r
82         (save-excursion\r
83                 ... code here ...\r
84          )\r
85 \r
86 except that save-excursion actually does the right thing in the case of\r
87 abnormal exit (throw or error).\r
88 \r
89 Can you help me understand what I'm missing here?\r
90 \r
91 =2DCarl\r
92 \r
93 =2D-=20\r
94 carl.d.worth@intel.com\r
95 \r
96 --=-=-=\r
97 Content-Type: application/pgp-signature\r
98 \r
99 -----BEGIN PGP SIGNATURE-----\r
100 Version: GnuPG v1.4.11 (GNU/Linux)\r
101 \r
102 iEYEARECAAYFAk3cEygACgkQ6JDdNq8qSWj8TgCeMoM/HKfFJ2NLPgWLX0N6dkjm\r
103 VToAniiwtXp/ONZ0jxZCxJbFcg1JxReA\r
104 =M/Pt\r
105 -----END PGP SIGNATURE-----\r
106 --=-=-=--\r