notmuch-emacs bug report -- infinite looping trying to select next message

Rodney Lorrimar dev at rodney.id.au
Thu Feb 16 04:39:01 PST 2012


Hi Michael,

On Wed, 15 Feb 2012 10:57:42 +1300, Michael Hudson-Doyle <michael.hudson at canonical.com> wrote:
> Thanks for the reply!
> 
> On Tue, 14 Feb 2012 10:41:20 +0100, Rodney Lorrimar <dev at rodney.id.au> wrote:
> > Hi Michael,
> > 
> > On Tue, 14 Feb 2012 11:01:56 +1300, Michael Hudson-Doyle <michael.hudson at canonical.com> wrote:
> > > The attached gzipped mbox appears to trip up the emacs interface.  The
> > > problem seems to come from the message with id
> > > CAGNsrLCWv6=36q+q+5Hc_SzgdZ2ergeKkapT7T3xXvim=2cK+A at mail.gmail.com.
> > > 
> > > If you load up the thread in emacs, you get a message:
> > > 
> > > mm-extern-cache-contents: Couldn't find access type
> > 
> > If you put (require 'gnus-art) into your .emacs and eval it, does the
> > problem go away?
> 
> No.

Oh well.

I loaded up the thread in notmuch and also got an infinite loop.

> > > Then attempting to advance past the last display message (or pressing A,
> > > or a few other things I expect gets emacs to loop indefinitely.
> > > toggle-debug-on-quit gets me this backtrace:
> > 
> > I believe the actual bug is in gnus but I don't really like the loop on
> > error behaviour of notmuch. I would like to try and fix it but haven't
> > found the time.
> 
> As far as I can tell, gnus isn't involved here.  I may be wrong, of
> course!

After setting a breakpoint in mm-extern-cache-contents I'm inclined to
agree, but I'm not really sure.

The following hack to 0.11 works around the problem. I think the experts
here would be able to come up with something better.

Cheers,

Rodney

diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 82d11c9..48c15d2 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -327,7 +327,8 @@ current buffer, if possible."
     (with-temp-buffer
       (let ((handle (mm-make-handle (current-buffer) (list content-type))))
    (if (and (mm-inlinable-p handle)
-        (mm-inlined-p handle))
+        (mm-inlined-p handle)
+        (cdr (mm-handle-type handle)))
        (let ((content (notmuch-show-get-bodypart-content msg part nth)))
          (insert content)
          (set-buffer display-buffer)


More information about the notmuch mailing list