Re: [PATCH 1/1] Store and search for canonical Unicode text [WIP]
[notmuch-archives.git] / 20 / 29d1a8110c2d38adc3ad4d4a7b369faae2aff1
1 Return-Path: <tomi.ollila@iki.fi>\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 C7C73431FC4\r
6         for <notmuch@notmuchmail.org>; Tue, 25 Sep 2012 23:57:53 -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\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         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 7VTifYMgfKym for <notmuch@notmuchmail.org>;\r
16         Tue, 25 Sep 2012 23:57:52 -0700 (PDT)\r
17 Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
18         by olra.theworths.org (Postfix) with ESMTP id 73EDB431FAF\r
19         for <notmuch@notmuchmail.org>; Tue, 25 Sep 2012 23:57:52 -0700 (PDT)\r
20 Received: from guru.guru-group.fi (localhost [IPv6:::1])\r
21         by guru.guru-group.fi (Postfix) with ESMTP id 16DA010014A;\r
22         Wed, 26 Sep 2012 09:57:58 +0300 (EEST)\r
23 From: Tomi Ollila <tomi.ollila@iki.fi>\r
24 To: Aaron Ecay <aaronecay@gmail.com>, Robert Horn <rjhorn@alum.mit.edu>,\r
25         notmuch@notmuchmail.org\r
26 Subject: Re: bug related to ical\r
27 In-Reply-To: <87d319b899.fsf@gmail.com>\r
28 References: <m31ul3qo4w.fsf@quad.robs.office> <87d319b899.fsf@gmail.com>\r
29 User-Agent: Notmuch/0.13.2+177~g6720ee8 (http://notmuchmail.org) Emacs/24.2.1\r
30         (x86_64-unknown-linux-gnu)\r
31 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
32         $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
33         !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
34 Date: Wed, 26 Sep 2012 09:57:57 +0300\r
35 Message-ID: <m2r4ppfeyy.fsf@guru.guru-group.fi>\r
36 MIME-Version: 1.0\r
37 Content-Type: text/plain; charset=utf-8\r
38 Content-Transfer-Encoding: quoted-printable\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: Wed, 26 Sep 2012 06:57:53 -0000\r
52 \r
53 On Wed, Sep 26 2012, Aaron Ecay wrote:\r
54 \r
55 > The problem is in the =E2=80=98notmuch-show-insert-part-text/calendar=E2=\r
56 =80=99\r
57 > function.  The call to =E2=80=98icalendar--convert-ical-to-diary=E2=80=99=\r
58  does not\r
59 > create a buffer visiting the temp file, so the call to =E2=80=98set-buffe=\r
60 r=E2=80=99\r
61 > fails.  The following patch fixes the problem.\r
62 >\r
63 > The ical->diary conversion also doesn=E2=80=99t seem to work =E2=80=93 th=\r
64 e calendar\r
65 > attachment shows up as an empty part =E2=80=93 but I guess that=E2=80=99s=\r
66  a separate\r
67 > issue (and not addressed by the patch).\r
68 >\r
69 > I guess that part insertion handlers should be called inside a\r
70 > =E2=80=98condition-case=E2=80=99, so that an error inside of one can be r=\r
71 ecovered from,\r
72 > and doesn=E2=80=99t entirely derail the insertion of the messages in the =\r
73 buffer.\r
74 > (I actually made this patch because I was so annoyed that Olivier=E2=80=\r
75 =99s\r
76 > buggy test attachment made it impossible for me to read Tomi=E2=80=99s re=\r
77 ply.)\r
78 \r
79 My reply was:\r
80 \r
81 --8<----8<----8<----8<----8<----8<----8<----8<----8<--\r
82    Hi\r
83 \r
84    I am "top-posting" as the content is not from Olivier's mail\r
85    id:"87d31artti.fsf@inf-8657.int-evry.fr" but from my email\r
86    id:"m2ipb2tjl8.fsf@guru.guru-group.fi"...\r
87 \r
88    For some reason notmuch emacs client references to my email instead\r
89    of Olivier's when pressing 'V', any of the stash commands, reply or\r
90    so on. Maybe that has something to do accessing the ical content\r
91    (i.e. emacs client access the ical part from wrong message).\r
92 \r
93    Do others experience the same behaviour ?\r
94 \r
95    Tomi\r
96 --8<----8<----8<----8<----8<----8<----8<----8<----8<--\r
97 \r
98 When I hand-applied Aaron's patch and re-evaluated=20\r
99 (defun notmuch-show-insert-part-text/calendar ...) and reopened\r
100 this thread those things I mentioned above started to work OK :)\r
101 \r
102 Aaron: could you provide the patch in format suitable for git-am\r
103 so it could be easily applied (and hopefully quickly, provided\r
104 that we get reviewers to look at it immediately :)\r
105 \r
106 Tomi\r
107 \r
108 >\r
109 > ----- cut here -----\r
110 >\r
111 > diff --git i/emacs/notmuch-show.el w/emacs/notmuch-show.el\r
112 > index ce5ea6f..4c89d7e 100644\r
113 > --- i/emacs/notmuch-show.el\r
114 > +++ w/emacs/notmuch-show.el\r
115 > @@ -746,7 +746,7 @@ message at DEPTH in the current thread."\r
116 >             (icalendar--convert-ical-to-diary\r
117 >              (icalendar--read-element nil nil)\r
118 >              file t)\r
119 > -           (set-buffer (get-file-buffer file))\r
120 > +           (set-buffer (find-file-noselect file))\r
121 >             (setq result (buffer-substring (point-min) (point-max)))\r
122 >             (set-buffer-modified-p nil)\r
123 >             (kill-buffer (current-buffer))\r
124 >\r
125 > ----- cut here -----\r
126 >\r
127 > --=20\r
128 > Aaron Ecay\r
129 > _______________________________________________\r
130 > notmuch mailing list\r
131 > notmuch@notmuchmail.org\r
132 > http://notmuchmail.org/mailman/listinfo/notmuch\r