From: Ted Zlatanov <tzz@lifelogs.com>
To: ding@gnus.org
Subject: entering group hangs, `gnus-summary-hide-all-threads' loops forever
Date: Mon, 16 May 2011 11:45:10 -0500 [thread overview]
Message-ID: <87mxim8ui1.fsf@lifelogs.com> (raw)
RET on a nnmaildir group hangs forever. This is due to
`gnus-summary-hide-all-threads'.
This happens in only one group. With the following modification, I can
see that it's doing millions of iterations in the loop, and there are
only a few articles in the group I'm entering.
(defun gnus-summary-hide-all-threads (&optional predicate)
"Hide all thread subtrees.
If PREDICATE is supplied, threads that satisfy this predicate
will not be hidden."
(interactive)
(save-excursion
(goto-char (point-min))
(let ((end nil)
(count 0))
(while (not end)
(incf count)
(when (zerop (mod count 1000))
(message "Hiding all threads... %d" count))
(when (or (not predicate)
(gnus-map-articles
predicate (gnus-summary-article-children)))
(gnus-summary-hide-thread))
(setq end (not (zerop (gnus-summary-next-thread 1 t)))))))
(gnus-summary-position-point))
Here's the backtrace with `toggle-debug-on-quit':
Debugger entered--Lisp error: (quit)
gnus-summary-go-to-next-thread(nil)
gnus-summary-next-thread(1 t)
(zerop (gnus-summary-next-thread 1 t))
(not (zerop (gnus-summary-next-thread 1 t)))
(setq end (not (zerop (gnus-summary-next-thread 1 t))))
(while (not end) (incf count) (when (zerop (mod count 100)) (message "Hiding all threads... %d" count)) (when (or (not predicate) (gnus-map-articles predicate (gnus-summary-article-children))) (gnus-summary-hide-thread)) (setq end (not (zerop (gnus-summary-next-thread 1 t)))))
(let ((end nil) (count 0)) (while (not end) (incf count) (when (zerop (mod count 100)) (message "Hiding all threads... %d" count)) (when (or (not predicate) (gnus-map-articles predicate (gnus-summary-article-children))) (gnus-summary-hide-thread)) (setq end (not (zerop (gnus-summary-next-thread 1 t))))))
(save-excursion (goto-char (point-min)) (let ((end nil) (count 0)) (while (not end) (incf count) (when (zerop (mod count 100)) (message "Hiding all threads... %d" count)) (when (or (not predicate) (gnus-map-articles predicate (gnus-summary-article-children))) (gnus-summary-hide-thread)) (setq end (not (zerop (gnus-summary-next-thread 1 t)))))))
gnus-summary-hide-all-threads(nil)
gnus-summary-maybe-hide-threads()
gnus-summary-read-group-1("it" nil t nil nil nil)
gnus-summary-read-group("it" nil t nil nil nil nil)
gnus-group-read-group(nil t)
gnus-group-select-group(nil)
gnus-topic-select-group(nil)
call-interactively(gnus-topic-select-group nil nil)
I won't touch this group to preserve the bug. But the whole
(not (zerop (next-thread))) logic is hard to understand, especially
since `gnus-summary-next-thread' does differential updates and is pretty
complicated. So I need help to figure out where it's hanging.
Ted
next reply other threads:[~2011-05-16 16:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-16 16:45 Ted Zlatanov [this message]
2011-05-30 18:46 ` Lars Magne Ingebrigtsen
2011-05-31 9:37 ` Ted Zlatanov
2011-05-31 18:50 ` Lars Magne Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mxim8ui1.fsf@lifelogs.com \
--to=tzz@lifelogs.com \
--cc=ding@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 NNTP newsgroup(s).