Gnus development mailing list
 help / color / mirror / Atom feed
* Re: Using cache to read IMAP mail offline, with proper deletion of Spam
@ 2009-07-14  6:14 白い熊
  2009-07-15 16:18 ` Ted Zlatanov
  0 siblings, 1 reply; 11+ messages in thread
From: 白い熊 @ 2009-07-14  6:14 UTC (permalink / raw)
  To: ding

Ted Zlatanov <tzz@lifelogs.com> writes:

> If you're interested in debugging further, I can try to help you.
> What's your ELisp experience?

Thank you, I am interested. I'm a learning beginner in Elisp, but I've
hacked together some programs, based on remaking old sources, so some
experience.

ShiroiKuma



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

* Re: Using cache to read IMAP mail offline, with proper deletion of Spam
  2009-07-14  6:14 Using cache to read IMAP mail offline, with proper deletion of Spam 白い熊
@ 2009-07-15 16:18 ` Ted Zlatanov
  2009-07-16  8:20   ` 白い熊
  0 siblings, 1 reply; 11+ messages in thread
From: Ted Zlatanov @ 2009-07-15 16:18 UTC (permalink / raw)
  To: ding; +Cc: Katsumi Yamaoka, Reiner Steib

On Tue, 14 Jul 2009 10:14:05 +0400 白い熊 <ding_gnus.org@sumou.com> wrote: 

白> Ted Zlatanov <tzz@lifelogs.com> writes:
>> If you're interested in debugging further, I can try to help you.
>> What's your ELisp experience?

白> Thank you, I am interested. I'm a learning beginner in Elisp, but I've
白> hacked together some programs, based on remaking old sources, so some
白> experience.

All right.  I think, after looking at your original description, that
the Gnus cache (gnus-cache.el) is preventing the deletion.  I need you
to remove the article from the cache (`M-*' is the default binding)
before the first deletion and after the first deletion in two separate
tests.  That way we can find if the cache is holding on to the article
or just interfering with the deletion.

Also, as a baseline, I need you to confirm that setting the gnus-cache
variable to 'passive or nil prevents the problem from ocurring.

Katsumi Yamaoka and Reiner Steib have worked on the gnus-cache in the
past and may be able to help us debug this.

Thanks
Ted




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

* Re: Using cache to read IMAP mail offline, with proper deletion of Spam
  2009-07-15 16:18 ` Ted Zlatanov
@ 2009-07-16  8:20   ` 白い熊
  2009-07-17  9:32     ` 白い熊
  0 siblings, 1 reply; 11+ messages in thread
From: 白い熊 @ 2009-07-16  8:20 UTC (permalink / raw)
  To: ding; +Cc: Katsumi Yamaoka, Reiner Steib

---------- Original Message -----------
From: Ted Zlatanov <tzz@lifelogs.com>
Sent: Wed, 15 Jul 2009 11:18:05 -0500

> All right.  I think, after looking at your original description, that
> the Gnus cache (gnus-cache.el) is preventing the deletion.  I need you
> to remove the article from the cache (`M-*' is the default binding)
> before the first deletion and after the first deletion in two separate
> tests.  That way we can find if the cache is holding on to the article
> or just interfering with the deletion.

Great:

removing from cache before deletion - no effect, the problem persists;
removing from cache after deletion - the mail is deleted from IMAP server, problem disappears;

> Also, as a baseline, I need you to confirm that setting the gnus-cache
> variable to 'passive or nil prevents the problem from ocurring.

Indeed, setting (setq gnus-use-cache 'passive) the problem no longer persists, as of course the items don't enter the 
cache.

So, at least temporarily as a fix, before it's debugged, this means redefining the `E' key in gnus group summary mode 
to first issue the operation associated with E and then remove the item from the cache. I can do this, but with intense 
effort, so if you can propose easily the .emacs code for this temp solution now, it'd be great.

In the meantime, I'm ready to work on debugging it, so that the workaround isn't necessary.

Later,

ShiroiKuma



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

* Re: Using cache to read IMAP mail offline, with proper deletion of Spam
  2009-07-16  8:20   ` 白い熊
@ 2009-07-17  9:32     ` 白い熊
  0 siblings, 0 replies; 11+ messages in thread
From: 白い熊 @ 2009-07-17  9:32 UTC (permalink / raw)
  To: ding

"白い熊" <ding_gnus.org@sumou.com> writes:

> So, at least temporarily as a fix, before it's debugged, this means redefining the `E' key in gnus group summary mode 
> to first issue the operation associated with E and then remove the item from the cache. I can do this, but with intense 

(defun gnus-imap-cache-delete ()
       (interactive)
       (gnus-summary-mark-as-expirable -1)
       (gnus-cache-remove-article)
)
(add-hook 'gnus-summary-mode-hook
	  (lambda ()
	  	   (local-set-key (kbd "E") 'gnus-imap-cache-delete)
	  )
)

白い熊



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

* Re: Using cache to read IMAP mail offline, with proper deletion of Spam
@ 2009-07-22 12:49 白い熊
  0 siblings, 0 replies; 11+ messages in thread
From: 白い熊 @ 2009-07-22 12:49 UTC (permalink / raw)
  To: ding

"白い熊" <ding_gnus.org@sumou.com> writes:
> So, at least temporarily as a fix, before it's debugged, this means redefining the `E' key in gnus group summary mode> to first issue the operation associated with E and then remove the item from the cache. I can do this, but with intense 
>
>(defun gnus-imap-cache-delete ()
>       (interactive)
>       (gnus-summary-mark-as-expirable -1)
>       (gnus-cache-remove-article)
>)
>(add-hook 'gnus-summary-mode-hook
>	  (lambda ()
>	  	   (local-set-key (kbd "E") 'gnus-imap-cache-delete)
>	  )
>)

Better:

(defun gnus-imap-cache-delete ()
       (interactive)
       (save-excursion
	 (gnus-summary-mark-as-expirable -1)
       )
       (gnus-cache-remove-article)
)
(add-hook 'gnus-summary-mode-hook
	  (lambda ()
	  	   (local-set-key (kbd "E") 'gnus-imap-cache-delete)
	  )
)

白い熊



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

* Re: Using cache to read IMAP mail offline, with proper deletion of Spam
  2009-07-11 20:07       ` 白い熊
@ 2009-07-13 19:22         ` Ted Zlatanov
  0 siblings, 0 replies; 11+ messages in thread
From: Ted Zlatanov @ 2009-07-13 19:22 UTC (permalink / raw)
  To: ding

On Sun, 12 Jul 2009 00:07:00 +0400 白い熊 <ding_gnus.org@sumou.com> wrote: 

白> Ted Zlatanov <tzz@lifelogs.com> writes:
U> Surely there has to be a better way.
>> 
>> I'm afraid I don't know your problem well enough to help you find a
>> better way.  Have you tried turning the agent off?  Your original e-mail
>> didn't mention that.

白> I tried disabling agent with (setq gnus-agent nil). It has had no effect
白> on the behavior. All the mails that I delete, I have to then redisplay
白> and mark unread for them to disappear.

If you're interested in debugging further, I can try to help you.
What's your ELisp experience?

Ted




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

* Re: Using cache to read IMAP mail offline, with proper deletion of Spam
  2009-07-09 16:09     ` Ted Zlatanov
@ 2009-07-11 20:07       ` 白い熊
  2009-07-13 19:22         ` Ted Zlatanov
  0 siblings, 1 reply; 11+ messages in thread
From: 白い熊 @ 2009-07-11 20:07 UTC (permalink / raw)
  To: ding

Ted Zlatanov <tzz@lifelogs.com> writes:

> U> Surely there has to be a better way.
>
> I'm afraid I don't know your problem well enough to help you find a
> better way.  Have you tried turning the agent off?  Your original e-mail
> didn't mention that.

I tried disabling agent with (setq gnus-agent nil). It has had no effect
on the behavior. All the mails that I delete, I have to then redisplay
and mark unread for them to disappear.

ShiroiKuma



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

* Re: Using cache to read IMAP mail offline, with proper deletion of Spam
  2009-07-09  8:58   ` Unknown
@ 2009-07-09 16:09     ` Ted Zlatanov
  2009-07-11 20:07       ` 白い熊
  0 siblings, 1 reply; 11+ messages in thread
From: Ted Zlatanov @ 2009-07-09 16:09 UTC (permalink / raw)
  To: ding

On Thu, 9 Jul 2009 10:58:38 +0200 Unknown <unknown@unknown.invalid> wrote: 

U> ---------- Original Message -----------
U> From: Ted Zlatanov <tzz@lifelogs.com>
U> Sent: Wed, 08 Jul 2009 14:01:09 -0500

>> If you have the ability to run a local IMAP server, you could
>> synchronize it with the remote IMAP server.  Several people here have
>> posted success stories using this technique.

U> Thanks for the hint, I'll inspect this way...

U> But I'm thinking, surely there must be an easier way to purge deleted
U> email on an IMAP server in gnus, than having to setup a local IMAP
U> server, which also isn't practical when accessing from a number of
U> machines etc.

U> I keep searching, but so far I've only found a way to do it my way,
U> via dual delete via unreading the messages.

U> Surely there has to be a better way.

I'm afraid I don't know your problem well enough to help you find a
better way.  Have you tried turning the agent off?  Your original e-mail
didn't mention that.

Ted




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

* Re: Using cache to read IMAP mail offline, with proper deletion of Spam
  2009-07-08 19:01 ` Ted Zlatanov
@ 2009-07-09  8:58   ` Unknown
  2009-07-09 16:09     ` Ted Zlatanov
  0 siblings, 1 reply; 11+ messages in thread
From: Unknown @ 2009-07-09  8:58 UTC (permalink / raw)
  To: ding

---------- Original Message -----------
From: Ted Zlatanov <tzz@lifelogs.com>
Sent: Wed, 08 Jul 2009 14:01:09 -0500

> If you have the ability to run a local IMAP server, you could
> synchronize it with the remote IMAP server.  Several people here have
> posted success stories using this technique.

Thanks for the hint, I'll inspect this way...

But I'm thinking, surely there must be an easier way to purge deleted email on an IMAP server in gnus, than having to
setup a local IMAP server, which also isn't practical when accessing from a number of machines etc.

I keep searching, but so far I've only found a way to do it my way, via dual delete via unreading the messages.

Surely there has to be a better way.

ShiroiKuma



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

* Re: Using cache to read IMAP mail offline, with proper deletion of Spam
  2009-06-23  9:17 ding_gnus.org
@ 2009-07-08 19:01 ` Ted Zlatanov
  2009-07-09  8:58   ` Unknown
  0 siblings, 1 reply; 11+ messages in thread
From: Ted Zlatanov @ 2009-07-08 19:01 UTC (permalink / raw)
  To: ding

On Tue, 23 Jun 2009 13:17:42 +0400 ding_gnus.org@sumou.com wrote: 

dgo> 1. Use Gnus to access my mail via IMAP.
dgo> 2. Store every read message in the cache, so that when I'm offline I can
dgo> reread it.
dgo> 3. Purge all deleted messages properly.
...
dgo> How I can I set it, so that when mails are marked as expirable with `E'
dgo> and then expundeg with `B M-C-E' they don't stick around and have to be
dgo> opened and un-read, but are deleted? Does anyone know?

If you have the ability to run a local IMAP server, you could
synchronize it with the remote IMAP server.  Several people here have
posted success stories using this technique.

Ted




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

* Using cache to read IMAP mail offline, with proper deletion of Spam
@ 2009-06-23  9:17 ding_gnus.org
  2009-07-08 19:01 ` Ted Zlatanov
  0 siblings, 1 reply; 11+ messages in thread
From: ding_gnus.org @ 2009-06-23  9:17 UTC (permalink / raw)
  To: ding

Hello:

I've been searching and experimenting very hard, however not with 100%
results, perhaps someone can help me.

What I want to do:

1. Use Gnus to access my mail via IMAP.
2. Store every read message in the cache, so that when I'm offline I can
reread it.
3. Purge all deleted messages properly.

It's the third part that I cannot get to work properly, requiring
cumbersome deletion.

I have the following .emacs settings, relevant to the above points:

(setq gnus-select-method '(nnimap "SERVER.ADDRESS"
				  (nnimap-address "SERVER.ADDRESS")
				  )
      )
(setq gnus-use-cache t)
(setq gnus-cache-enter-articles '(read ticked dormant))
(setq gnus-cache-remove-articles '(unread))

The above sets the cache, so that emails that I read when online get
downloaded and don't have to be redownloaded the next time I access
mail, allowing for offline reading when not online.

The ones that are for instance read, and seen as spam, are then marked
unread, and should exit the cache because of the last line above.

What this results in.

To delete files also from the server, so that they are not kept
in the cache and stick around forever, I have to follow the
following steps:
1. Read the emails.
2. Mark them as expirable with `E'.
3. Delete all expired items with `B M-C-E'.
4. Exit the Summary Buffer to the Group Buffer with `q'.
5. Enter the mailbox again.
6. Display all the mails with `/ o' to display also the read
    emails, this will display also the expired/deleted items,
    which have still been kept in the cache.
7. Read each of the emails and mark it unread with `M-u'.
8. Exit the Summary Buffer to the Group Buffer with `q' again.
9. Update the Group Buffer with `g'.
This then, and only this, deletes the expired/deleted emails and remove them
from the local cache. The items will be deleted from the IMAP
server and locally, thus disappear everywhere.

It's an uncomfortable hack, but I've found no better way so
far to be able to utilize the cache, so big mails don't have
to be redownloaded upon every reconnect.

How I can I set it, so that when mails are marked as expirable with `E'
and then expundeg with `B M-C-E' they don't stick around and have to be
opened and un-read, but are deleted? Does anyone know?

Thank you.

ShiroiKuma



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

end of thread, other threads:[~2009-07-22 12:49 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-14  6:14 Using cache to read IMAP mail offline, with proper deletion of Spam 白い熊
2009-07-15 16:18 ` Ted Zlatanov
2009-07-16  8:20   ` 白い熊
2009-07-17  9:32     ` 白い熊
  -- strict thread matches above, loose matches on Subject: below --
2009-07-22 12:49 白い熊
2009-06-23  9:17 ding_gnus.org
2009-07-08 19:01 ` Ted Zlatanov
2009-07-09  8:58   ` Unknown
2009-07-09 16:09     ` Ted Zlatanov
2009-07-11 20:07       ` 白い熊
2009-07-13 19:22         ` Ted Zlatanov

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