From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: ding@gnus.org
Subject: Re: Does article prefetching work on IMAP?
Date: Wed, 04 Aug 2021 10:56:29 -0700 [thread overview]
Message-ID: <878s1h5c1e.fsf@ericabrahamsen.net> (raw)
In-Reply-To: <m28s1h7imh.fsf@codeisgreat.org>
Pankaj Jangid <pankaj@codeisgreat.org> writes:
> Pankaj Jangid <pankaj@codeisgreat.org> writes:
>
>> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>>
>>> Pankaj Jangid <pankaj@codeisgreat.org> writes:
>>>
>>>> Does article prefetching work with IMAP backend? If yes, then why it is
>>>> required to have an active internet connection when reading article?
>>>
>>> No, right now it only works with nntp. In the past I've looked into
>>> adding it for nnimap and it wouldn't be that hard, I just haven't gotten
>>> around to doing it.
>>
>> Thanks for the information.
>
> Eric, could you please point me to a place where this should be
> done? With some guidance, I should be able to do it.
You mean write the code? That would be very welcome!
Async/prefetching works by opening multiple connections to a single
server. Those connections are stored and tracked in
`nntp-connection-alist', for nntp, and `nnimap-connection-alist', for
nnimap. nnimap.el has the code to handle multiple connections, but that
functionality isn't currently used.
The problem is in gnus-async.el, which is hard-coded to only work with
nntp. I believe the only function that would need to be changed would be
`gnus-async-wait-for-article', which currently calls
`nntp-find-connection' and `nntp-accept-process-output': these calls
would have to be abstracted to work with any server.
Ideally we'd make *-find-connection a deffoo, and then add a
`gnus-server-find-connection' function to gnus-int.el. I'm not sure how
to handle getting rid of the `nntp-accept-process-output' call.
Finally, you'd have to add:
(deffoo nnimap-asynchronous-p ()
t)
to nnimap.el, in order to set the whole thing in motion.
I'm happy to help with further review or troubleshooting.
Thanks!
Eric
next prev parent reply other threads:[~2021-08-04 17:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-02 7:17 Pankaj Jangid
2021-08-03 17:28 ` Eric Abrahamsen
2021-08-03 17:55 ` Pankaj Jangid
2021-08-04 7:51 ` Pankaj Jangid
2021-08-04 17:56 ` Eric Abrahamsen [this message]
2021-08-05 6:09 ` Pankaj Jangid
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=878s1h5c1e.fsf@ericabrahamsen.net \
--to=eric@ericabrahamsen.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).