unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Re: Gnus: caching message headers?
@ 2020-09-10  8:38 Ozhap
  2020-09-10  9:00 ` Gregory Heytings via Users list for the GNU Emacs text editor
  0 siblings, 1 reply; 28+ messages in thread
From: Ozhap @ 2020-09-10  8:38 UTC (permalink / raw)
  To: ghe; +Cc: help-gnu-emacs

> Is there a way to tell gnus-agent to create only a cache of headers,
> that is, to not store a local copy of the emails that have been read?

I don't think it does. From info '(gnus)Agent Caveats':

> “If I read an article while plugged, do they get entered into the Agent?”
> 
>      *No*.  If you want this behavior, add
>      ‘gnus-agent-fetch-selected-article’ to ‘gnus-select-article-hook’.

--
Ozhap



^ permalink raw reply	[flat|nested] 28+ messages in thread
* Re: Gnus: caching message headers?
@ 2020-10-08  3:28 Ozhap
  0 siblings, 0 replies; 28+ messages in thread
From: Ozhap @ 2020-10-08  3:28 UTC (permalink / raw)
  To: enometh; +Cc: help-gnu-emacs

Ozhap wrote:

>> But probably there should be a new hook. Or of course, reverting it and
>> rewriting the manual instead.
>
> An easier way would be to use gnus-agent-store-article instead of
> gnus-agent-fetch-articles (which is designed for many messages) in
> gnus-agent-fetch-selected-article. Please open a bug report so that we
> can fix it there.

That should read: Check for stored article as in
gnus-agent-store-article in -agent-fetch-selected-article, before
fetching. Well, the previous code (or a new hook) seems better :|



^ permalink raw reply	[flat|nested] 28+ messages in thread
* Re: Gnus: caching message headers?
@ 2020-10-08  1:59 Ozhap
  0 siblings, 0 replies; 28+ messages in thread
From: Ozhap @ 2020-10-08  1:59 UTC (permalink / raw)
  To: enometh; +Cc: help-gnu-emacs

> But probably there should be a new hook. Or of course, reverting it and
> rewriting the manual instead.

An easier way would be to use gnus-agent-store-article instead of
gnus-agent-fetch-articles (which is designed for many messages) in
gnus-agent-fetch-selected-article. Please open a bug report so that we
can fix it there.

(A related problem seems to be the download-mark not being updated in
the previous arrangement)

--
Ozhap



^ permalink raw reply	[flat|nested] 28+ messages in thread
* Re: Gnus: caching message headers?
@ 2020-10-07 11:39 Ozhap
  0 siblings, 0 replies; 28+ messages in thread
From: Ozhap @ 2020-10-07 11:39 UTC (permalink / raw)
  To: enometh; +Cc: help-gnu-emacs

> However the overhead of calling gnus-agent-fetch-selected-article is too
> much

Whoops! Omitting the relevant xkcd :) I should learn to curb my
enthusiasm...

Perhaps you could try advising gnus-request-article to call
gnus-agent-store-article after, when it has a non-nil 3rd argument (it
doesn't seem to be used with it anywhere else).

But probably there should be a new hook. Or of course, reverting it and
rewriting the manual instead.

--
Ozhap



^ permalink raw reply	[flat|nested] 28+ messages in thread
* Re: Gnus: caching message headers?
@ 2020-09-10 23:41 Ozhap
  2020-09-11 22:59 ` Eric Abrahamsen
  0 siblings, 1 reply; 28+ messages in thread
From: Ozhap @ 2020-09-10 23:41 UTC (permalink / raw)
  To: wgreenhouse; +Cc: help-gnu-emacs

>> “If I read an article while plugged, do they get entered into the 
>> Agent?”
>>
>> *No*.  If you want this behavior, add 
>> ‘gnus-agent-fetch-selected-article’ to ‘gnus-select-article-hook’.

> That Info page could be more explicit that `gnus-agent-cache' means that
> articles *will* be added to the agent as they are read.

That's how it stands now, but in info '(gnus)Agent as Cache' it says:

"..Gnus normally only downloads *headers* once, and stores them in the
Agent"

"Articles are *not* cached in the Agent by default though (that would
potentially consume lots of disk space), but if you have *already
downloaded an article into the Agent*, Gnus will not download the
article from the server again but use the locally stored copy instead."

I did some digging, and this behaviour was changed due to bug#8502 where
Lars concludes (erroneously, on the face of it):

> Let's see...  caching...  so if you're online (in an agentised group)
> and select an article, you want the article to be saved in the Agent
> directory?  That sounds eminently reasonable, and I thought that was
> supposed to happen, but I can't find any code for doing that...  hm...
> Nope.

Ref:
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=8502

--
Ozhap



^ permalink raw reply	[flat|nested] 28+ messages in thread
* Gnus: caching message headers?
@ 2020-09-07 15:23 Gregory Heytings via Users list for the GNU Emacs text editor
  2020-09-07 16:26 ` Eric Abrahamsen
  0 siblings, 1 reply; 28+ messages in thread
From: Gregory Heytings via Users list for the GNU Emacs text editor @ 2020-09-07 15:23 UTC (permalink / raw)
  To: help-gnu-emacs


Hi list,

I'm trying to configure Gnus to access my email through IMAP.

I'm too accustomed to traditional MUAs to switch to the "Gnus way" in one 
step, so I have:

(setq gnus-permanently-visible-groups ".*")
(setq gnus-parameters
    '((".*"
       (gnus-show-threads nil)
       (gnus-use-scoring nil)
       (gnus-article-sort-functions '(gnus-article-sort-by-number))
       (display . all))))

I would like to have, in the *Summary*, a complete list of the emails 
contained in a folder when I hit RET on its label.  Each time I do this 
however, Gnus asks me how many articles I want to retrieve, and issues a 
"UID FETCH 1:N (UID RFC822.SIZE BODYSTRUCTURE BODY.PEEK[HEADER.FIELDS 
(...)])" IMAP command, which can take quite some time to complete when N 
is large.

Is there a way to convince Gnus to cache the result of that command 
(without caching all emails), and to issue a command only for the new 
UIDs?  Caching the result of that command should not eat too much disk 
space.

I apologize in advance if that question is naïve, or if I missed some part 
of the manual.

Gregory


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

end of thread, other threads:[~2020-10-08  3:28 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-10  8:38 Gnus: caching message headers? Ozhap
2020-09-10  9:00 ` Gregory Heytings via Users list for the GNU Emacs text editor
2020-09-10  9:34   ` Ozhap
2020-09-10  9:45     ` Ozhap
2020-09-10 13:16   ` wgreenhouse
  -- strict thread matches above, loose matches on Subject: below --
2020-10-08  3:28 Ozhap
2020-10-08  1:59 Ozhap
2020-10-07 11:39 Ozhap
2020-09-10 23:41 Ozhap
2020-09-11 22:59 ` Eric Abrahamsen
2020-09-12 23:08   ` Ozhap
2020-09-12 23:29     ` Eric Abrahamsen
2020-10-04  9:12       ` Madhu
2020-09-07 15:23 Gregory Heytings via Users list for the GNU Emacs text editor
2020-09-07 16:26 ` Eric Abrahamsen
2020-09-07 17:10   ` Gregory Heytings via Users list for the GNU Emacs text editor
2020-09-07 17:37     ` Eric Abrahamsen
2020-09-07 17:49       ` wgreenhouse
2020-09-08 13:19         ` Eric S Fraga
2020-09-08 13:37         ` Gregory Heytings via Users list for the GNU Emacs text editor
2020-09-08 14:34           ` Stefan Monnier
2020-09-08 17:29             ` Eric Abrahamsen
2020-09-08 21:52             ` Gregory Heytings via Users list for the GNU Emacs text editor
2020-09-08 22:33               ` Stefan Monnier
2020-09-08 16:12           ` wgreenhouse
2020-09-08 20:39             ` Gregory Heytings via Users list for the GNU Emacs text editor
2020-09-07 17:50       ` Gregory Heytings via Users list for the GNU Emacs text editor
2020-09-07 17:53         ` Eric Abrahamsen

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).