Gnus development mailing list
 help / color / mirror / Atom feed
From: Bob Newell <bobnewell@bobnewell.net>
To: ding@gnus.org
Subject: Re: Can't process mark all articles in summary
Date: Fri, 05 Jul 2019 16:33:41 -1000	[thread overview]
Message-ID: <87r2733n96.fsf@bobnewell.net> (raw)
In-Reply-To: <87pnmqompy.fsf@bobnewell.net> (Bob Newell's message of "Wed, 03 Jul 2019 11:02:49 -1000")

Aloha,

Figured it out but the fix doesn't seem to be easy.

Turns out nothing to do with IMAP, everything to do with my use of
gnus-summary-prepare-hook, in which I call a function that compacts the
lines in the summary buffer.

The docs (in gnus-sum.el) call this "A hook called after the summary
buffer has been generated.  If you want to modify the summary buffer,
you can use this hook."

So I did. But the problem is that gnus-newsgroup-data has already been
computed (from within functions called earlier by gnus-summary-prepare),
and that data structure saves buffer locations for members of
threads. Unfortunately modifying the summary lines in my 'hooked'
function invalidates the location of some of those saved buffer locations.

To make a long story (not all that) short, I did a lot of tracing and
found that gnus at times, but not always, positions to the wrong place
in the summary buffer after doing things like setting the process mark
(among other actions). Interestingly, the correct article number is
pushed onto the 'processable' list, but the wrong article might get
visually marked because of the wrong mark location, and sometimes this
just causes gnus to stop marking (if you're doing a series, like trying
to mark the whole buffer).

The solution would be to regenerate gnus-newsgroup-data AFTER calling
the gnus-summary-prepare-hook. But I can't see how to easily do that.

Is this truly a bug? I'd humbly suggest that it is, at least based on
the docstring for gnus-summary-prepare-hook, which invites you to monkey
with the summary buffer.

-- 
Bob Newell
Honolulu, Hawai`i
* Via Gnus/BBDB/Org/Emacs/Linux *



      parent reply	other threads:[~2019-07-06  2:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-03 21:02 Bob Newell
2019-07-03 22:32 ` Bob Newell
2019-07-05  7:04   ` Christian Lynbech
2019-07-05 18:57     ` Bob Newell
2019-07-04 13:15 ` Lars Ingebrigtsen
2019-07-04 19:26   ` Bob Newell
2019-07-04 22:31     ` Bob Newell
2019-07-06  2:33 ` Bob Newell [this message]

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=87r2733n96.fsf@bobnewell.net \
    --to=bobnewell@bobnewell.net \
    --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).