Discussion:
[PATCH] nnimap: enable additional expunge options (v3)
Nikolaus Rath
2015-07-04 03:28:32 UTC
Permalink
If the IMAP server supports the UID EXPUNGE command, the nnimap backend
currently always expunges deleted articles.

If the IMAP server does not support this command, articles are either
not expunged at all (nnimap-expunge is nil), or ALL articles that are
currently flagged as deleted will be expunged when any one article is
deleted in Gnus.

This patch introduces three new settings for nnimap-expunge:

* If nnimap-expunge is 'never, deleted articles are marked with the
IMAP \\Delete flag but not automatically expunged.

* If nnimap-expunge is 'immediately, deleted articles are immediately
expunged (this requires the server to support the UID EXPUNGE
command).

* If nnimap-expunge is 'on-exit, deleted articles are flagged, and all
flagged articles are expunged when the group is closed.

Note that none of these behaviors is available with the current settings
(nil / non-nil).

The 'on-exit setting is mostly useful as a safe-guard: as long as the
group is not closed, article deletions are reversal (either by using a
different IMAP client, or by exiting Gnus without updating the summary
buffer).

The 'never setting is not (yet) very useful because Gnus does not
distinguish between deleted articles and regular articles in the summary
buffer. However, this will be addressed by a separate patch.

Changes in v2:

* Made first line of docstring a complete sentence.

Changes in v3:

* Correctly handle multiple active nnimap backends.

Thanks for considering,
-Nikolaus
--
GPG encrypted emails preferred. Key id: 0xD113FCAC3C4E599F
Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F

»Time flies like an arrow, fruit flies like a Banana.«
Loading...