Re: notmuch-emacs bug report -- infinite looping trying to select next message
authorRodney Lorrimar <dev@rodney.id.au>
Thu, 16 Feb 2012 12:39:01 +0000 (13:39 +0100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:44:36 +0000 (09:44 -0800)
a9/899b87405b68a8bc0d3ab6df4ad06c3364d289 [new file with mode: 0644]

diff --git a/a9/899b87405b68a8bc0d3ab6df4ad06c3364d289 b/a9/899b87405b68a8bc0d3ab6df4ad06c3364d289
new file mode 100644 (file)
index 0000000..a3ea518
--- /dev/null
@@ -0,0 +1,118 @@
+Return-Path: <rodney@rodney.id.au>\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 53DED429E48\r
+       for <notmuch@notmuchmail.org>; Thu, 16 Feb 2012 04:38:57 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.208\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.208 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_NJABL_PROXY=0.208] 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 hCvLdPqVrnCX for <notmuch@notmuchmail.org>;\r
+       Thu, 16 Feb 2012 04:38:53 -0800 (PST)\r
+Received: from rodney.id.au (rodney.id.au [178.79.159.183])\r
+       (using TLSv1 with cipher AES256-SHA (256/256 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 890C9429E42\r
+       for <notmuch@notmuchmail.org>; Thu, 16 Feb 2012 04:38:53 -0800 (PST)\r
+Received: from 239.16-200-80.adsl-dyn.isp.belgacom.be ([80.200.16.239]\r
+       helo=boekje.home)\r
+       by rodney.id.au with esmtpsa (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:16)\r
+       (Exim 4.77) (envelope-from <rodney@rodney.id.au>)\r
+       id 1Ry0br-0003Rz-9s; Thu, 16 Feb 2012 12:38:51 +0000\r
+From: Rodney Lorrimar <dev@rodney.id.au>\r
+To: Michael Hudson-Doyle <michael.hudson@canonical.com>,\r
+       notmuch@notmuchmail.org\r
+Subject: Re: notmuch-emacs bug report -- infinite looping trying to select\r
+       next message\r
+In-Reply-To: <87ty2tjcx5.fsf@canonical.com>\r
+References: <877gzql7e3.fsf@canonical.com> <87zkcllpkv.fsf@boekje.home>\r
+       <87ty2tjcx5.fsf@canonical.com>\r
+User-Agent: Notmuch/0.11.1 (http://notmuchmail.org) Emacs/24.0.93.1\r
+       (x86_64-pc-linux-gnu)\r
+Date: Thu, 16 Feb 2012 13:39:01 +0100\r
+Message-ID: <87ipj7kl5m.fsf@boekje.home>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain\r
+X-SA-Exim-Connect-IP: 80.200.16.239\r
+X-SA-Exim-Mail-From: rodney@rodney.id.au\r
+X-SA-Exim-Scanned: No (on rodney.id.au); SAEximRunCond expanded to false\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: Thu, 16 Feb 2012 12:38:57 -0000\r
+\r
+Hi Michael,\r
+\r
+On Wed, 15 Feb 2012 10:57:42 +1300, Michael Hudson-Doyle <michael.hudson@canonical.com> wrote:\r
+> Thanks for the reply!\r
+> \r
+> On Tue, 14 Feb 2012 10:41:20 +0100, Rodney Lorrimar <dev@rodney.id.au> wrote:\r
+> > Hi Michael,\r
+> > \r
+> > On Tue, 14 Feb 2012 11:01:56 +1300, Michael Hudson-Doyle <michael.hudson@canonical.com> wrote:\r
+> > > The attached gzipped mbox appears to trip up the emacs interface.  The\r
+> > > problem seems to come from the message with id\r
+> > > CAGNsrLCWv6=36q+q+5Hc_SzgdZ2ergeKkapT7T3xXvim=2cK+A@mail.gmail.com.\r
+> > > \r
+> > > If you load up the thread in emacs, you get a message:\r
+> > > \r
+> > > mm-extern-cache-contents: Couldn't find access type\r
+> > \r
+> > If you put (require 'gnus-art) into your .emacs and eval it, does the\r
+> > problem go away?\r
+> \r
+> No.\r
+\r
+Oh well.\r
+\r
+I loaded up the thread in notmuch and also got an infinite loop.\r
+\r
+> > > Then attempting to advance past the last display message (or pressing A,\r
+> > > or a few other things I expect gets emacs to loop indefinitely.\r
+> > > toggle-debug-on-quit gets me this backtrace:\r
+> > \r
+> > I believe the actual bug is in gnus but I don't really like the loop on\r
+> > error behaviour of notmuch. I would like to try and fix it but haven't\r
+> > found the time.\r
+> \r
+> As far as I can tell, gnus isn't involved here.  I may be wrong, of\r
+> course!\r
+\r
+After setting a breakpoint in mm-extern-cache-contents I'm inclined to\r
+agree, but I'm not really sure.\r
+\r
+The following hack to 0.11 works around the problem. I think the experts\r
+here would be able to come up with something better.\r
+\r
+Cheers,\r
+\r
+Rodney\r
+\r
+diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
+index 82d11c9..48c15d2 100644\r
+--- a/emacs/notmuch-show.el\r
++++ b/emacs/notmuch-show.el\r
+@@ -327,7 +327,8 @@ current buffer, if possible."\r
+     (with-temp-buffer\r
+       (let ((handle (mm-make-handle (current-buffer) (list content-type))))\r
+    (if (and (mm-inlinable-p handle)\r
+-        (mm-inlined-p handle))\r
++        (mm-inlined-p handle)\r
++        (cdr (mm-handle-type handle)))\r
+        (let ((content (notmuch-show-get-bodypart-content msg part nth)))\r
+          (insert content)\r
+          (set-buffer display-buffer)\r