Re: bug related to ical
authorTomi Ollila <tomi.ollila@iki.fi>
Wed, 26 Sep 2012 06:57:57 +0000 (09:57 +0300)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:49:38 +0000 (09:49 -0800)
20/29d1a8110c2d38adc3ad4d4a7b369faae2aff1 [new file with mode: 0644]

diff --git a/20/29d1a8110c2d38adc3ad4d4a7b369faae2aff1 b/20/29d1a8110c2d38adc3ad4d4a7b369faae2aff1
new file mode 100644 (file)
index 0000000..ba76bcd
--- /dev/null
@@ -0,0 +1,132 @@
+Return-Path: <tomi.ollila@iki.fi>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id C7C73431FC4\r
+       for <notmuch@notmuchmail.org>; Tue, 25 Sep 2012 23:57:53 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+       autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id 7VTifYMgfKym for <notmuch@notmuchmail.org>;\r
+       Tue, 25 Sep 2012 23:57:52 -0700 (PDT)\r
+Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
+       by olra.theworths.org (Postfix) with ESMTP id 73EDB431FAF\r
+       for <notmuch@notmuchmail.org>; Tue, 25 Sep 2012 23:57:52 -0700 (PDT)\r
+Received: from guru.guru-group.fi (localhost [IPv6:::1])\r
+       by guru.guru-group.fi (Postfix) with ESMTP id 16DA010014A;\r
+       Wed, 26 Sep 2012 09:57:58 +0300 (EEST)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: Aaron Ecay <aaronecay@gmail.com>, Robert Horn <rjhorn@alum.mit.edu>,\r
+       notmuch@notmuchmail.org\r
+Subject: Re: bug related to ical\r
+In-Reply-To: <87d319b899.fsf@gmail.com>\r
+References: <m31ul3qo4w.fsf@quad.robs.office> <87d319b899.fsf@gmail.com>\r
+User-Agent: Notmuch/0.13.2+177~g6720ee8 (http://notmuchmail.org) Emacs/24.2.1\r
+       (x86_64-unknown-linux-gnu)\r
+X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
+       $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
+       !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
+Date: Wed, 26 Sep 2012 09:57:57 +0300\r
+Message-ID: <m2r4ppfeyy.fsf@guru.guru-group.fi>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=utf-8\r
+Content-Transfer-Encoding: quoted-printable\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Wed, 26 Sep 2012 06:57:53 -0000\r
+\r
+On Wed, Sep 26 2012, Aaron Ecay wrote:\r
+\r
+> The problem is in the =E2=80=98notmuch-show-insert-part-text/calendar=E2=\r
+=80=99\r
+> function.  The call to =E2=80=98icalendar--convert-ical-to-diary=E2=80=99=\r
+ does not\r
+> create a buffer visiting the temp file, so the call to =E2=80=98set-buffe=\r
+r=E2=80=99\r
+> fails.  The following patch fixes the problem.\r
+>\r
+> The ical->diary conversion also doesn=E2=80=99t seem to work =E2=80=93 th=\r
+e calendar\r
+> attachment shows up as an empty part =E2=80=93 but I guess that=E2=80=99s=\r
+ a separate\r
+> issue (and not addressed by the patch).\r
+>\r
+> I guess that part insertion handlers should be called inside a\r
+> =E2=80=98condition-case=E2=80=99, so that an error inside of one can be r=\r
+ecovered from,\r
+> and doesn=E2=80=99t entirely derail the insertion of the messages in the =\r
+buffer.\r
+> (I actually made this patch because I was so annoyed that Olivier=E2=80=\r
+=99s\r
+> buggy test attachment made it impossible for me to read Tomi=E2=80=99s re=\r
+ply.)\r
+\r
+My reply was:\r
+\r
+--8<----8<----8<----8<----8<----8<----8<----8<----8<--\r
+   Hi\r
+\r
+   I am "top-posting" as the content is not from Olivier's mail\r
+   id:"87d31artti.fsf@inf-8657.int-evry.fr" but from my email\r
+   id:"m2ipb2tjl8.fsf@guru.guru-group.fi"...\r
+\r
+   For some reason notmuch emacs client references to my email instead\r
+   of Olivier's when pressing 'V', any of the stash commands, reply or\r
+   so on. Maybe that has something to do accessing the ical content\r
+   (i.e. emacs client access the ical part from wrong message).\r
+\r
+   Do others experience the same behaviour ?\r
+\r
+   Tomi\r
+--8<----8<----8<----8<----8<----8<----8<----8<----8<--\r
+\r
+When I hand-applied Aaron's patch and re-evaluated=20\r
+(defun notmuch-show-insert-part-text/calendar ...) and reopened\r
+this thread those things I mentioned above started to work OK :)\r
+\r
+Aaron: could you provide the patch in format suitable for git-am\r
+so it could be easily applied (and hopefully quickly, provided\r
+that we get reviewers to look at it immediately :)\r
+\r
+Tomi\r
+\r
+>\r
+> ----- cut here -----\r
+>\r
+> diff --git i/emacs/notmuch-show.el w/emacs/notmuch-show.el\r
+> index ce5ea6f..4c89d7e 100644\r
+> --- i/emacs/notmuch-show.el\r
+> +++ w/emacs/notmuch-show.el\r
+> @@ -746,7 +746,7 @@ message at DEPTH in the current thread."\r
+>            (icalendar--convert-ical-to-diary\r
+>             (icalendar--read-element nil nil)\r
+>             file t)\r
+> -          (set-buffer (get-file-buffer file))\r
+> +          (set-buffer (find-file-noselect file))\r
+>            (setq result (buffer-substring (point-min) (point-max)))\r
+>            (set-buffer-modified-p nil)\r
+>            (kill-buffer (current-buffer))\r
+>\r
+> ----- cut here -----\r
+>\r
+> --=20\r
+> Aaron Ecay\r
+> _______________________________________________\r
+> notmuch mailing list\r
+> notmuch@notmuchmail.org\r
+> http://notmuchmail.org/mailman/listinfo/notmuch\r