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