unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* Infinite loop in emacs interface
@ 2012-01-17 17:17 Rodney Lorrimar
  2012-01-17 17:37 ` Aaron Ecay
  0 siblings, 1 reply; 6+ messages in thread
From: Rodney Lorrimar @ 2012-01-17 17:17 UTC (permalink / raw)
  To: notmuch

[-- Attachment #1: Type: text/plain, Size: 507 bytes --]

Hi,

Emacs notmuch is a really excellent mail program.

But today I got an infinite loop in emacs 24.0.92.1 with notmuch (0.11
and master). It only happens when viewing a certain thread.

There seem to be 2 problems:

1. the n and p keys (notmuch-show-{next,previous}-open-message) can't
   get past the second message in the thread.

2. when using the 'a' key (notmuch-show-archive-thread), it will loop,
   probably because it can't get past the second message.

The thread is attached.

Cheers,

Rodney


[-- Attachment #2: loop-thread.gz --]
[-- Type: application/octet-stream, Size: 6912 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Infinite loop in emacs interface
  2012-01-17 17:17 Infinite loop in emacs interface Rodney Lorrimar
@ 2012-01-17 17:37 ` Aaron Ecay
  2012-01-17 18:35   ` Rodney Lorrimar
  2012-01-17 22:44   ` Rodney Lorrimar
  0 siblings, 2 replies; 6+ messages in thread
From: Aaron Ecay @ 2012-01-17 17:37 UTC (permalink / raw)
  To: Rodney Lorrimar, notmuch

Rodney,

After converting the mbox file to Maildir and adding it to my mailstore,
I cannot reproduce the loop.  (The versions of notmuch and emacs I used
are close to the ones you have, but not an exact match, so it may be
something subtle about those versions.  I can investigate
more carefully if it seems like this is the case.)

If you do:
M-x set-variable RET debug-on-quit RET t RET
then trigger the loop and press C-g, you should get a buffer showing a
backtrace of the lisp stack.  What does that say?

Thanks,

-- 
Aaron Ecay

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Infinite loop in emacs interface
  2012-01-17 17:37 ` Aaron Ecay
@ 2012-01-17 18:35   ` Rodney Lorrimar
  2012-01-17 22:44   ` Rodney Lorrimar
  1 sibling, 0 replies; 6+ messages in thread
From: Rodney Lorrimar @ 2012-01-17 18:35 UTC (permalink / raw)
  To: Aaron Ecay, notmuch

On Tue, 17 Jan 2012 12:37:52 -0500, Aaron Ecay <aaronecay@gmail.com> wrote:
> After converting the mbox file to Maildir and adding it to my mailstore,
> I cannot reproduce the loop.  (The versions of notmuch and emacs I used
> are close to the ones you have, but not an exact match, so it may be
> something subtle about those versions.  I can investigate
> more carefully if it seems like this is the case.)

Hi Aaron,

That's a pity. I am using Julien Danjou's emacs-snapshot package for
debian and actually I only noticed the infinite loop on this thread
after restarting emacs some unknown time after the package was
upgraded. The package was upgraded from 20120105 to 20120111.

I haven't been using this snapshot of emacs for very long, so possibly
the problem might occur with other threads. To test this thread, I
copied it out of my maildirs with mutt, deleted the original messages,
ran "notmuch new", copied the mbox thread back into my maildirs, then
ran "notmuch new" again, and the problem was still there.


> If you do:
> M-x set-variable RET debug-on-quit RET t RET
> then trigger the loop and press C-g, you should get a buffer showing a
> backtrace of the lisp stack.  What does that say?

I copied 4 backtraces which appear below. I pressed the 'a' key when
viewing the thread, then C-g.

They were run with notmuch git commit efa5d6cb32. Since then I went back
to 0.11 because it seems like the reply function stopped working.


Cheers,

Rodney


Debugger entered--Lisp error: (quit)
  mapc((lambda (del-tag) (setq result-tags (delete del-tag result-tags))) ("inbox"))
  (let ((result-tags (copy-sequence current-tags))) (mapc (lambda (del-tag) (setq result-tags (delete del-tag result-tags))) del-tags) result-tags)
  notmuch-show-del-tags-worker(nil ("inbox"))
  (let* ((current-tags (notmuch-show-get-tags)) (new-tags (notmuch-show-del-tags-worker current-tags toremove))) (unless (equal current-tags new-tags) (apply (quote notmuch-tag) (notmuch-show-get-message-id) (mapcar (lambda (s) (concat "-" s)) toremove)) (notmuch-show-set-tags new-tags)))
  notmuch-show-remove-tag("inbox")
  (progn (notmuch-show-remove-tag "inbox") (not (not (notmuch-show-goto-message-next))))
  (while (progn (notmuch-show-remove-tag "inbox") (not (not (notmuch-show-goto-message-next)))))
  (catch (quote --cl-block-nil--) (while (progn (notmuch-show-remove-tag "inbox") (not (not (notmuch-show-goto-message-next))))) nil)
  (cl-block-wrapper (catch (quote --cl-block-nil--) (while (progn (notmuch-show-remove-tag "inbox") (not (not (notmuch-show-goto-message-next))))) nil))
  (block nil (while (progn (notmuch-show-remove-tag "inbox") (not (not (notmuch-show-goto-message-next))))) nil)
  (loop do (notmuch-show-remove-tag "inbox") until (not (notmuch-show-goto-message-next)))
  notmuch-show-archive-thread-internal(t)
  notmuch-show-archive-thread()
  call-interactively(notmuch-show-archive-thread nil nil)

Debugger entered--Lisp error: (quit)
  notmuch-show-move-to-message-top()
  (save-excursion (notmuch-show-move-to-message-top) (get-text-property (point) :notmuch-message-properties))
  notmuch-show-get-message-properties()
  (or props (notmuch-show-get-message-properties))
  (let ((props (or props (notmuch-show-get-message-properties)))) (plist-get props prop))
  notmuch-show-get-prop(:tags)
  notmuch-show-get-tags()
  (let* ((current-tags (notmuch-show-get-tags)) (new-tags (notmuch-show-del-tags-worker current-tags toremove))) (unless (equal current-tags new-tags) (apply (quote notmuch-tag) (notmuch-show-get-message-id) (mapcar (lambda (s) (concat "-" s)) toremove)) (notmuch-show-set-tags new-tags)))
  notmuch-show-remove-tag("inbox")
  (progn (notmuch-show-remove-tag "inbox") (not (not (notmuch-show-goto-message-next))))
  (while (progn (notmuch-show-remove-tag "inbox") (not (not (notmuch-show-goto-message-next)))))
  (catch (quote --cl-block-nil--) (while (progn (notmuch-show-remove-tag "inbox") (not (not (notmuch-show-goto-message-next))))) nil)
  (cl-block-wrapper (catch (quote --cl-block-nil--) (while (progn (notmuch-show-remove-tag "inbox") (not (not (notmuch-show-goto-message-next))))) nil))
  (block nil (while (progn (notmuch-show-remove-tag "inbox") (not (not (notmuch-show-goto-message-next))))) nil)
  (loop do (notmuch-show-remove-tag "inbox") until (not (notmuch-show-goto-message-next)))
  notmuch-show-archive-thread-internal(t)
  notmuch-show-archive-thread()
  call-interactively(notmuch-show-archive-thread nil nil)

Debugger entered--Lisp error: (quit)
  notmuch-show-move-to-message-top()
  (save-excursion (notmuch-show-move-to-message-top) (get-text-property (point) :notmuch-message-properties))
  notmuch-show-get-message-properties()
  (or props (notmuch-show-get-message-properties))
  (let ((props (or props (notmuch-show-get-message-properties)))) (plist-get props prop))
  notmuch-show-get-prop(:tags)
  notmuch-show-get-tags()
  (let* ((current-tags (notmuch-show-get-tags)) (new-tags (notmuch-show-del-tags-worker current-tags toremove))) (unless (equal current-tags new-tags) (apply (quote notmuch-tag) (notmuch-show-get-message-id) (mapcar (lambda (s) (concat "-" s)) toremove)) (notmuch-show-set-tags new-tags)))
  notmuch-show-remove-tag("inbox")
  (progn (notmuch-show-remove-tag "inbox") (not (not (notmuch-show-goto-message-next))))
  (while (progn (notmuch-show-remove-tag "inbox") (not (not (notmuch-show-goto-message-next)))))
  (catch (quote --cl-block-nil--) (while (progn (notmuch-show-remove-tag "inbox") (not (not (notmuch-show-goto-message-next))))) nil)
  (cl-block-wrapper (catch (quote --cl-block-nil--) (while (progn (notmuch-show-remove-tag "inbox") (not (not (notmuch-show-goto-message-next))))) nil))
  (block nil (while (progn (notmuch-show-remove-tag "inbox") (not (not (notmuch-show-goto-message-next))))) nil)
  (loop do (notmuch-show-remove-tag "inbox") until (not (notmuch-show-goto-message-next)))
  notmuch-show-archive-thread-internal(t)
  notmuch-show-archive-thread()
  call-interactively(notmuch-show-archive-thread nil nil)

Debugger entered--Lisp error: (quit)
  (while (not (setq r (get-text-property (point) :notmuch-message-extent))) (backward-char))
  (save-excursion (while (not (setq r (get-text-property (point) :notmuch-message-extent))) (backward-char)))
  (let (r) (save-excursion (while (not (setq r (get-text-property (point) :notmuch-message-extent))) (backward-char))) r)
  notmuch-show-message-extent()
  (cdr (notmuch-show-message-extent))
  notmuch-show-message-bottom()
  (goto-char (notmuch-show-message-bottom))
  notmuch-show-move-to-message-bottom()
  (let ((start (point))) (notmuch-show-move-to-message-bottom) (if (not (eobp)) t (goto-char start) nil))
  notmuch-show-goto-message-next()
  (not (notmuch-show-goto-message-next))
  (not (not (notmuch-show-goto-message-next)))
  (progn (notmuch-show-remove-tag "inbox") (not (not (notmuch-show-goto-message-next))))
  (while (progn (notmuch-show-remove-tag "inbox") (not (not (notmuch-show-goto-message-next)))))
  (catch (quote --cl-block-nil--) (while (progn (notmuch-show-remove-tag "inbox") (not (not (notmuch-show-goto-message-next))))) nil)
  (cl-block-wrapper (catch (quote --cl-block-nil--) (while (progn (notmuch-show-remove-tag "inbox") (not (not (notmuch-show-goto-message-next))))) nil))
  (block nil (while (progn (notmuch-show-remove-tag "inbox") (not (not (notmuch-show-goto-message-next))))) nil)
  (loop do (notmuch-show-remove-tag "inbox") until (not (notmuch-show-goto-message-next)))
  notmuch-show-archive-thread-internal(t)
  notmuch-show-archive-thread()
  call-interactively(notmuch-show-archive-thread nil nil)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Infinite loop in emacs interface
  2012-01-17 17:37 ` Aaron Ecay
  2012-01-17 18:35   ` Rodney Lorrimar
@ 2012-01-17 22:44   ` Rodney Lorrimar
  2012-01-23 14:26     ` Florian Friesdorf
  1 sibling, 1 reply; 6+ messages in thread
From: Rodney Lorrimar @ 2012-01-17 22:44 UTC (permalink / raw)
  To: Aaron Ecay, notmuch

Hi,

Actually, this is starting to look like a problem with gnus in the
latest emacs-snapshot.

I didn't notice before, but when I view the thread, I get this error:

Debugger entered--Lisp error: (void-variable gnus-inhibit-images)
  mm-shr((#<buffer  *temp*> ("text/html") nil nil nil nil nil nil))
  mm-inline-text-html((#<buffer  *temp*> ("text/html") nil nil nil nil nil nil))
  mm-display-inline((#<buffer  *temp*> ("text/html") nil nil nil nil nil nil))
  mm-display-part((#<buffer  *temp*> ("text/html") nil nil nil nil nil nil))
  notmuch-show-mm-display-part-inline(...snipped...)
  notmuch-search-show-thread(nil)
  call-interactively(notmuch-search-show-thread nil nil)

Someone seems to have come across it quite a while ago.

http://lists.gnu.org/archive/html/emacs-devel/2010-11/msg00625.html

This is quite strange because the previous emacs snapshot (20120105) was
working OK.

Running this code before viewing the thread seems to remove the error
and stop the infinite loop:

(defvar gnus-inhibit-images nil "*testing")
(set-variable 'gnus-inhibit-images nil)

But that's about the extent of my elisp knowledge. I'm not sure how to
actually fix the bug.


Cheers,

Rodney

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Infinite loop in emacs interface
  2012-01-17 22:44   ` Rodney Lorrimar
@ 2012-01-23 14:26     ` Florian Friesdorf
  2012-01-23 14:38       ` Florian Friesdorf
  0 siblings, 1 reply; 6+ messages in thread
From: Florian Friesdorf @ 2012-01-23 14:26 UTC (permalink / raw)
  To: Rodney Lorrimar, Aaron Ecay, notmuch

On Tue, 17 Jan 2012 23:44:40 +0100, Rodney Lorrimar <dev@rodney.id.au> wrote:
> 
> Debugger entered--Lisp error: (void-variable gnus-inhibit-images)
>   mm-shr((#<buffer  *temp*> ("text/html") nil nil nil nil nil nil))
>   mm-inline-text-html((#<buffer  *temp*> ("text/html") nil nil nil nil nil nil))
>   mm-display-inline((#<buffer  *temp*> ("text/html") nil nil nil nil nil nil))
>   mm-display-part((#<buffer  *temp*> ("text/html") nil nil nil nil nil nil))
>   notmuch-show-mm-display-part-inline(...snipped...)
>   notmuch-search-show-thread(nil)
>   call-interactively(notmuch-search-show-thread nil nil)

With emacs from git master as of today
(1f48de2bbf78c87c1dee6425181b31be60d39c7c) and notmuch-0.11 you can
workaround it:

(require 'gnus-art)

With emacs pretest 24.0.92 there is a bug in gnus.

Fixes/workarounds are discussed in:
"[PATCH] emacs: Make the part content available to `mm-inline* checks"

-- 
Florian Friesdorf <flo@chaoflow.net>
  GPG FPR: 7A13 5EEE 1421 9FC2 108D  BAAF 38F8 99A3 0C45 F083
Jabber/XMPP: flo@chaoflow.net
IRC: chaoflow on freenode,ircnet,blafasel,OFTC

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Infinite loop in emacs interface
  2012-01-23 14:26     ` Florian Friesdorf
@ 2012-01-23 14:38       ` Florian Friesdorf
  0 siblings, 0 replies; 6+ messages in thread
From: Florian Friesdorf @ 2012-01-23 14:38 UTC (permalink / raw)
  To: Rodney Lorrimar, Aaron Ecay, notmuch

On Mon, 23 Jan 2012 15:26:20 +0100, Florian Friesdorf <flo@chaoflow.net> wrote:
> On Tue, 17 Jan 2012 23:44:40 +0100, Rodney Lorrimar <dev@rodney.id.au> wrote:
> > 
> > Debugger entered--Lisp error: (void-variable gnus-inhibit-images)
> >   mm-shr((#<buffer  *temp*> ("text/html") nil nil nil nil nil nil))
> >   mm-inline-text-html((#<buffer  *temp*> ("text/html") nil nil nil nil nil nil))
> >   mm-display-inline((#<buffer  *temp*> ("text/html") nil nil nil nil nil nil))
> >   mm-display-part((#<buffer  *temp*> ("text/html") nil nil nil nil nil nil))
> >   notmuch-show-mm-display-part-inline(...snipped...)
> >   notmuch-search-show-thread(nil)
> >   call-interactively(notmuch-search-show-thread nil nil)
> 
> With emacs from git master as of today
> (1f48de2bbf78c87c1dee6425181b31be60d39c7c) and notmuch-0.11 you can
> workaround it:
> 
> (require 'gnus-art)
> 
> With emacs pretest 24.0.92 there is a bug in gnus.
> 
> Fixes/workarounds are discussed in:
> "[PATCH] emacs: Make the part content available to `mm-inline* checks"

sorry, was discussed in:
[RFC][PATCH] emacs: Provide scaffolding so that the new `shr' HTML renderer can run.

-- 
Florian Friesdorf <flo@chaoflow.net>
  GPG FPR: 7A13 5EEE 1421 9FC2 108D  BAAF 38F8 99A3 0C45 F083
Jabber/XMPP: flo@chaoflow.net
IRC: chaoflow on freenode,ircnet,blafasel,OFTC

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-01-23 14:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-17 17:17 Infinite loop in emacs interface Rodney Lorrimar
2012-01-17 17:37 ` Aaron Ecay
2012-01-17 18:35   ` Rodney Lorrimar
2012-01-17 22:44   ` Rodney Lorrimar
2012-01-23 14:26     ` Florian Friesdorf
2012-01-23 14:38       ` Florian Friesdorf

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).