Gnus development mailing list
 help / color / mirror / Atom feed
* Settings for using the agent as a cache
@ 2003-01-08 11:13 Niklas Morberg
  2003-01-08 13:13 ` Simon Josefsson
  0 siblings, 1 reply; 16+ messages in thread
From: Niklas Morberg @ 2003-01-08 11:13 UTC (permalink / raw)


I only use gnus for email. The problem I have is that
IMAP-space is expensive. But I still want to keep old
mail. I want to keep the newest articles on the IMAP
server (as per my group expiration settings), but have a
complete archive of all articles on my local disk.

The comments regarding the new implementation of the agent
seem very positive, so I decided to give it a shot.

I have the following settings:

 gnus-agent t
 gnus-agent-consider-all-articles t
 gnus-agent-mark-unread-after-downloaded nil

but something is missing. First of all, I want all messages
to be entered into the cache always. The info file says (in
Agent Caveats):

"If I read an article while plugged, do they get entered into the Agent?"
     *No*.

but nothing about how to solve it. Is this possible? Will
this be enough to eliminate the need to press `J s' in the
Group buffer all the time?

What should I do to never expire my cached articles? Are
the default settings fine, given that I never run the
`gnus-agent-expire' command?

Niklas




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

* Re: Settings for using the agent as a cache
  2003-01-08 11:13 Settings for using the agent as a cache Niklas Morberg
@ 2003-01-08 13:13 ` Simon Josefsson
  2003-01-08 13:22   ` Niklas Morberg
  0 siblings, 1 reply; 16+ messages in thread
From: Simon Josefsson @ 2003-01-08 13:13 UTC (permalink / raw)
  Cc: ding

Niklas Morberg <niklas.morberg@axis.com> writes:

> I only use gnus for email. The problem I have is that
> IMAP-space is expensive. But I still want to keep old
> mail. I want to keep the newest articles on the IMAP
> server (as per my group expiration settings), but have a
> complete archive of all articles on my local disk.
>
> The comments regarding the new implementation of the agent
> seem very positive, so I decided to give it a shot.
>
> I have the following settings:
>
>  gnus-agent t
>  gnus-agent-consider-all-articles t
>  gnus-agent-mark-unread-after-downloaded nil
>
> but something is missing. First of all, I want all messages
> to be entered into the cache always. The info file says (in
> Agent Caveats):
>
> "If I read an article while plugged, do they get entered into the Agent?"
>      *No*.
>
> but nothing about how to solve it. Is this possible? Will
> this be enough to eliminate the need to press `J s' in the
> Group buffer all the time?

I use the following

 '(gnus-cache-enter-articles (quote (ticked dormant unread read)))
 '(gnus-cache-remove-articles nil)
 '(gnus-cacheable-groups "^nnimap\\|^nntp")

which enters all articles I read into the cache and never removes
them.  I wish the cache and the agent directories were merged for the
article data though, but for now this works for me.

> What should I do to never expire my cached articles? Are
> the default settings fine, given that I never run the
> `gnus-agent-expire' command?

Frobbing g-c-remove-articles controls this, I think.




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

* Re: Settings for using the agent as a cache
  2003-01-08 13:13 ` Simon Josefsson
@ 2003-01-08 13:22   ` Niklas Morberg
  2003-01-08 15:55     ` kgreiner
  0 siblings, 1 reply; 16+ messages in thread
From: Niklas Morberg @ 2003-01-08 13:22 UTC (permalink / raw)


Simon Josefsson <jas@extundo.com> writes:

> I use the following
>
>  '(gnus-cache-enter-articles (quote (ticked dormant unread read)))
>  '(gnus-cache-remove-articles nil)
>  '(gnus-cacheable-groups "^nnimap\\|^nntp")
>
> which enters all articles I read into the cache and never
> removes them. I wish the cache and the agent directories
> were merged for the article data though, but for now this
> works for me.

So I end up with using both the cache _and_ the agent? I was
hoping I could do without the cache and only use the agent.

Or maybe I should not use the agent at all and only the
cache?

Niklas




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

* Re: Settings for using the agent as a cache
  2003-01-08 13:22   ` Niklas Morberg
@ 2003-01-08 15:55     ` kgreiner
  2003-01-08 21:12       ` Simon Josefsson
  2003-01-09  8:11       ` Niklas Morberg
  0 siblings, 2 replies; 16+ messages in thread
From: kgreiner @ 2003-01-08 15:55 UTC (permalink / raw)


Niklas Morberg <niklas.morberg@axis.com> writes:

> Simon Josefsson <jas@extundo.com> writes:
>
>> I use the following
>>
>>  '(gnus-cache-enter-articles (quote (ticked dormant unread read)))
>>  '(gnus-cache-remove-articles nil)
>>  '(gnus-cacheable-groups "^nnimap\\|^nntp")
>>
>> which enters all articles I read into the cache and never
>> removes them. I wish the cache and the agent directories
>> were merged for the article data though, but for now this
>> works for me.
>
> So I end up with using both the cache _and_ the agent? I was
> hoping I could do without the cache and only use the agent.
>
> Or maybe I should not use the agent at all and only the
> cache?
>

Kai added the function gnus-agent-fetch-selected-article to fetch
articles as they are read.  All you need to do is add it to your
gnus-select-article-hook.

Kevin



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

* Re: Settings for using the agent as a cache
  2003-01-08 15:55     ` kgreiner
@ 2003-01-08 21:12       ` Simon Josefsson
  2003-01-08 21:52         ` David S Goldberg
  2003-01-09  8:11       ` Niklas Morberg
  1 sibling, 1 reply; 16+ messages in thread
From: Simon Josefsson @ 2003-01-08 21:12 UTC (permalink / raw)
  Cc: ding

kgreiner@xpediantsolutions.com writes:

> Niklas Morberg <niklas.morberg@axis.com> writes:
>
>> Simon Josefsson <jas@extundo.com> writes:
>>
>>> I use the following
>>>
>>>  '(gnus-cache-enter-articles (quote (ticked dormant unread read)))
>>>  '(gnus-cache-remove-articles nil)
>>>  '(gnus-cacheable-groups "^nnimap\\|^nntp")
>>>
>>> which enters all articles I read into the cache and never
>>> removes them. I wish the cache and the agent directories
>>> were merged for the article data though, but for now this
>>> works for me.
>>
>> So I end up with using both the cache _and_ the agent? I was
>> hoping I could do without the cache and only use the agent.
>>
>> Or maybe I should not use the agent at all and only the
>> cache?
>>
>
> Kai added the function gnus-agent-fetch-selected-article to fetch
> articles as they are read.  All you need to do is add it to your
> gnus-select-article-hook.

Nice!  It seem to have some disadvantages though:

1) the summary buffer is re-generated after selecting articles, which
   is rather slow.

2) the re-generation seem to break threading for some articles
   (articles that was indented are back at column 0 thread-wise).

Otherwise it seems to work fine.




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

* Re: Settings for using the agent as a cache
  2003-01-08 21:12       ` Simon Josefsson
@ 2003-01-08 21:52         ` David S Goldberg
  0 siblings, 0 replies; 16+ messages in thread
From: David S Goldberg @ 2003-01-08 21:52 UTC (permalink / raw)


>>>>> On Wed, 08 Jan 2003 22:12:15 +0100, Simon Josefsson
>>>>> <jas@extundo.com> said: 
> Nice!  It seem to have some disadvantages though:

> 1) the summary buffer is re-generated after selecting articles, which
>    is rather slow.

> 2) the re-generation seem to break threading for some articles
>    (articles that was indented are back at column 0 thread-wise).

> Otherwise it seems to work fine.

#2 should be fixed in the latest snapshot.  At least, it is for me;
see the thread about that function messing up article order.

I haven't noticed any slowness as a result of it.

-- 
Dave Goldberg
david.goldberg6@verizon.net





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

* Re: Settings for using the agent as a cache
  2003-01-08 15:55     ` kgreiner
  2003-01-08 21:12       ` Simon Josefsson
@ 2003-01-09  8:11       ` Niklas Morberg
  2003-01-10  3:49         ` Simon Josefsson
  2003-01-15 15:22         ` Niklas Morberg
  1 sibling, 2 replies; 16+ messages in thread
From: Niklas Morberg @ 2003-01-09  8:11 UTC (permalink / raw)


kgreiner@xpediantsolutions.com writes:

> Kai added the function gnus-agent-fetch-selected-article
> to fetch articles as they are read. All you need to do is
> add it to your gnus-select-article-hook.

Excellent. Maybe this information should be added to the
documentation? Perhaps to the Choosing Variables node or to
the Agent Caveats node (or maybe both)?

I'm still confused on whether I should use the agent or the
cache, though. I'll stick with the agent for now and see how
it pans out.

Niklas




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

* Re: Settings for using the agent as a cache
  2003-01-09  8:11       ` Niklas Morberg
@ 2003-01-10  3:49         ` Simon Josefsson
  2003-01-10  4:18           ` kgreiner
  2003-01-15 15:22         ` Niklas Morberg
  1 sibling, 1 reply; 16+ messages in thread
From: Simon Josefsson @ 2003-01-10  3:49 UTC (permalink / raw)
  Cc: ding

Niklas Morberg <niklas.morberg@axis.com> writes:

> kgreiner@xpediantsolutions.com writes:
>
>> Kai added the function gnus-agent-fetch-selected-article
>> to fetch articles as they are read. All you need to do is
>> add it to your gnus-select-article-hook.
>
> Excellent. Maybe this information should be added to the
> documentation? Perhaps to the Choosing Variables node or to
> the Agent Caveats node (or maybe both)?

Definitely, I added it to both places.  IMHO this is the behaviour
most people with large disks expect from a MUA, and it should be very
easy to enable it.

> I'm still confused on whether I should use the agent or the
> cache, though. I'll stick with the agent for now and see how
> it pans out.

I've switched from the cache to agent with this hook as well.

I have noticed that '.' in summary buffers sometimes doesn't work
after this switch; it position itself on the last read article instead
of moving on to the next unread article.  Anyone else seen this?




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

* Re: Settings for using the agent as a cache
  2003-01-10  3:49         ` Simon Josefsson
@ 2003-01-10  4:18           ` kgreiner
  2003-01-13 16:14             ` Simon Josefsson
  0 siblings, 1 reply; 16+ messages in thread
From: kgreiner @ 2003-01-10  4:18 UTC (permalink / raw)


Simon Josefsson <jas@extundo.com> writes:

> Niklas Morberg <niklas.morberg@axis.com> writes:
>
>> kgreiner@xpediantsolutions.com writes:
>>
>>> Kai added the function gnus-agent-fetch-selected-article
>>> to fetch articles as they are read. All you need to do is
>>> add it to your gnus-select-article-hook.
>>
>> Excellent. Maybe this information should be added to the
>> documentation? Perhaps to the Choosing Variables node or to
>> the Agent Caveats node (or maybe both)?
>
> Definitely, I added it to both places.  IMHO this is the behaviour
> most people with large disks expect from a MUA, and it should be very
> easy to enable it.
>
>> I'm still confused on whether I should use the agent or the
>> cache, though. I'll stick with the agent for now and see how
>> it pans out.
>
> I've switched from the cache to agent with this hook as well.
>
> I have noticed that '.' in summary buffers sometimes doesn't work
> after this switch; it position itself on the last read article instead
> of moving on to the next unread article.  Anyone else seen this?

You need to get version 6.125 of gnus-agent.el.  The function
gnus-agent-fetch-selected-article was calling the wrong summary
function.  As a result, the offsets to the beginning of each article
were miscalculated.  Let me know if you are still seeing this problem.

Kevin



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

* Re: Settings for using the agent as a cache
  2003-01-10  4:18           ` kgreiner
@ 2003-01-13 16:14             ` Simon Josefsson
  0 siblings, 0 replies; 16+ messages in thread
From: Simon Josefsson @ 2003-01-13 16:14 UTC (permalink / raw)
  Cc: ding

kgreiner@xpediantsolutions.com writes:

>> I have noticed that '.' in summary buffers sometimes doesn't work
>> after this switch; it position itself on the last read article instead
>> of moving on to the next unread article.  Anyone else seen this?
>
> You need to get version 6.125 of gnus-agent.el.  The function
> gnus-agent-fetch-selected-article was calling the wrong summary
> function.  As a result, the offsets to the beginning of each article
> were miscalculated.  Let me know if you are still seeing this problem.

I just noticed that N did the wrong thing; before (cursor positioned
on the second article):

RA [  35: Kai Großjohann         ] Re: sieve-manage suggestions
R  [ 291: Reiner Steib           ] Re: [Patch] New interactive functions in deuglify.el
   [  28: Reiner Steib           ] Trival fix for (gnus)Window Layout
   [  54: François-David Collin  ] [REQ] Feature Request : gnus-fancy-posting-styles
   [  27: Reiner Steib           ] Re: [Patch] make.bat and make-x.bat

after (cursor still positioned on the second article):

RA [  35: Kai Großjohann         ] Re: sieve-manage suggestions
R  [  28: Reiner Steib           ] Trival fix for (gnus)Window Layout
R  [  28: Reiner Steib           ] Trival fix for (gnus)Window Layout
   [  54: François-David Collin  ] [REQ] Feature Request : gnus-fancy-posting-styles
   [  27: Reiner Steib           ] Re: [Patch] make.bat and make-x.bat

I'm not 100 % sure it was this that happened, but at least N did not
go to the next article, and either one of the currently selected
article and the next article was replaced with the other.

C-x k the summary buffer and entering it again solves the problem.

This rarely happens so it is a bit hard to debug.




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

* Re: Settings for using the agent as a cache
  2003-01-09  8:11       ` Niklas Morberg
  2003-01-10  3:49         ` Simon Josefsson
@ 2003-01-15 15:22         ` Niklas Morberg
  2003-01-16 13:14           ` Kevin Greiner
  1 sibling, 1 reply; 16+ messages in thread
From: Niklas Morberg @ 2003-01-15 15:22 UTC (permalink / raw)


Niklas Morberg <niklas@axis.com> writes:

> I'm still confused on whether I should use the agent or
> the cache, though. I'll stick with the agent for now and
> see how it pans out.

Whoa. This did not work as I expected. Here's the situation:

1. I have a local archive (one month's worth) of the ding
   group in:

/home/niklas/News/agent/nnimap/mailserver.name.com/lists_ding

2. Checking the dir with ls reveals a lot of old articles.
   This is good. I don't want to keep the archive on the
   mailserver, so I change the group parameter `expiry-wait'
   from 31 to 7 and expire the group.

3. I expire the group with gnus-group-expire-articles

4. All articles older than 7 days are now removed from the
   nnimap server (this is good).

5. All articles older than 7 days are also removed from my
   local archive. This is not good, and definately not the
   result I expected.

Why did this happen? Is this the intended behaviour when
using the agent? I thought articles were only removed from
the agent when the gnus-agent-expire command was run.

Niklas




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

* Re: Settings for using the agent as a cache
  2003-01-15 15:22         ` Niklas Morberg
@ 2003-01-16 13:14           ` Kevin Greiner
  2003-01-16 13:44             ` Niklas Morberg
  0 siblings, 1 reply; 16+ messages in thread
From: Kevin Greiner @ 2003-01-16 13:14 UTC (permalink / raw)


Niklas Morberg <niklas.morberg@axis.com> writes:

> Niklas Morberg <niklas@axis.com> writes:
>
>> I'm still confused on whether I should use the agent or
>> the cache, though. I'll stick with the agent for now and
>> see how it pans out.
>
> Whoa. This did not work as I expected. Here's the situation:
>
> 1. I have a local archive (one month's worth) of the ding
>    group in:
>
> /home/niklas/News/agent/nnimap/mailserver.name.com/lists_ding
>
> 2. Checking the dir with ls reveals a lot of old articles.
>    This is good. I don't want to keep the archive on the
>    mailserver, so I change the group parameter `expiry-wait'
>    from 31 to 7 and expire the group.
>
> 3. I expire the group with gnus-group-expire-articles
>
> 4. All articles older than 7 days are now removed from the
>    nnimap server (this is good).
>
> 5. All articles older than 7 days are also removed from my
>    local archive. This is not good, and definately not the
>    result I expected.
>
> Why did this happen? Is this the intended behaviour when
> using the agent? I thought articles were only removed from
> the agent when the gnus-agent-expire command was run.

The function gnus-request-expire-articles contains a call to
gnus-agent-expire so it looks like expiring in a group will expire in
the agent.

Kevin




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

* Re: Settings for using the agent as a cache
  2003-01-16 13:14           ` Kevin Greiner
@ 2003-01-16 13:44             ` Niklas Morberg
  2003-01-17  7:54               ` Niklas Morberg
  0 siblings, 1 reply; 16+ messages in thread
From: Niklas Morberg @ 2003-01-16 13:44 UTC (permalink / raw)
  Cc: ding

Kevin Greiner <kgreiner@xpediantsolutions.com> writes:

> The function gnus-request-expire-articles contains a call
> to gnus-agent-expire so it looks like expiring in a group
> will expire in the agent.

Ah. Thanks for the info, Kevin. That was surprising (to me
at least). Guess I'll have to figure out how to use the
cache instead then...

Should <info://gnus/Agent+Expiry> be updated to make this
clear?

Niklas




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

* Re: Settings for using the agent as a cache
  2003-01-16 13:44             ` Niklas Morberg
@ 2003-01-17  7:54               ` Niklas Morberg
  2003-01-17 15:38                 ` Kevin Greiner
  2003-01-17 15:46                 ` Kevin Greiner
  0 siblings, 2 replies; 16+ messages in thread
From: Niklas Morberg @ 2003-01-17  7:54 UTC (permalink / raw)


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

Niklas Morberg <niklas@axis.com> writes:

> Should <info://gnus/Agent+Expiry> be updated to make this
> clear?

Here's one suggestion (and a typo fix in the IMAP part). I
still don't understand how I disable agent expiration though.
Should I set gnus-agent-expire-days to nil or maybe a really
large number?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: gnus-agent-expire doc update --]
[-- Type: text/x-patch, Size: 1145 bytes --]

cd h:/pgnus/texi/
diff -u -b "h:/pgnus/texi/gnus.texi.~6.395.~" "h:/pgnus/texi/gnus.texi"
--- h:/pgnus/texi/gnus.texi.~6.395.~	2003-01-17 08:44:29.000000000 +0100
+++ h:/pgnus/texi/gnus.texi	2003-01-17 08:49:35.000000000 +0100
@@ -17192,6 +17192,9 @@
 particularly fast or efficient, and it's not a particularly good idea to
 interrupt it (with @kbd{C-g} or anything else) once you've started it.
 
+Note that other functions, e.g. @code{gnus-request-expire-articles},
+might run @code{gnus-agent-expire} for you.
+
 @code{gnus-agent-expire-days} can also be a list of regexp/day pairs.
 The regexps will be matched against group names to allow differing
 expiry in different groups.
@@ -17220,7 +17223,7 @@
 @node Agent and IMAP
 @subsection Agent and IMAP
 
-The Agent work with any Gnus back end, including nnimap.  However,
+The Agent works with any Gnus back end, including nnimap.  However,
 since there are some conceptual differences between @sc{nntp} and
 @sc{imap}, this section (should) provide you with some information to
 make Gnus Agent work smoother as a @sc{imap} Disconnected Mode client.

Diff finished at Fri Jan 17 08:49:43

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

* Re: Settings for using the agent as a cache
  2003-01-17  7:54               ` Niklas Morberg
@ 2003-01-17 15:38                 ` Kevin Greiner
  2003-01-17 15:46                 ` Kevin Greiner
  1 sibling, 0 replies; 16+ messages in thread
From: Kevin Greiner @ 2003-01-17 15:38 UTC (permalink / raw)


Niklas Morberg <niklas.morberg@axis.com> writes:

> Niklas Morberg <niklas@axis.com> writes:
>
>> Should <info://gnus/Agent+Expiry> be updated to make this
>> clear?
>
> Here's one suggestion (and a typo fix in the IMAP part). I
> still don't understand how I disable agent expiration though.
> Should I set gnus-agent-expire-days to nil or maybe a really
> large number?

I use a really large number myself.

Kevin



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

* Re: Settings for using the agent as a cache
  2003-01-17  7:54               ` Niklas Morberg
  2003-01-17 15:38                 ` Kevin Greiner
@ 2003-01-17 15:46                 ` Kevin Greiner
  1 sibling, 0 replies; 16+ messages in thread
From: Kevin Greiner @ 2003-01-17 15:46 UTC (permalink / raw)


Niklas Morberg <niklas.morberg@axis.com> writes:

> Niklas Morberg <niklas@axis.com> writes:
>
>> Should <info://gnus/Agent+Expiry> be updated to make this
>> clear?
>
> Here's one suggestion (and a typo fix in the IMAP part). I
> still don't understand how I disable agent expiration though.
> Should I set gnus-agent-expire-days to nil or maybe a really
> large number?

Thanks for the patch.  I'll check it in shortly.

Kevin



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

end of thread, other threads:[~2003-01-17 15:46 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-08 11:13 Settings for using the agent as a cache Niklas Morberg
2003-01-08 13:13 ` Simon Josefsson
2003-01-08 13:22   ` Niklas Morberg
2003-01-08 15:55     ` kgreiner
2003-01-08 21:12       ` Simon Josefsson
2003-01-08 21:52         ` David S Goldberg
2003-01-09  8:11       ` Niklas Morberg
2003-01-10  3:49         ` Simon Josefsson
2003-01-10  4:18           ` kgreiner
2003-01-13 16:14             ` Simon Josefsson
2003-01-15 15:22         ` Niklas Morberg
2003-01-16 13:14           ` Kevin Greiner
2003-01-16 13:44             ` Niklas Morberg
2003-01-17  7:54               ` Niklas Morberg
2003-01-17 15:38                 ` Kevin Greiner
2003-01-17 15:46                 ` Kevin Greiner

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