[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

one solution to replacing articles



After writing down the idea below I decided it was too cludgy, but I'd
like to keep the idea for future reference if I change my mind. And
internet is a great distributed database so just mail it out and never
worry about not be able to find it again... :-)

---

Ok, here's an idea that would actually get us real replacing
capabilities as Gnus wants it. It's not incompatible with other MUAs,
no serious scaling problems, isn't unnecessarily slow and doesn't
store anything locally.

This will waste space, but that's the only problem I can see right
now. It's a cludge, and I don't really like cludges, so perhaps we can
modify Gnus instead, I don't know if that would be difficult.

`nnimap-request-replace-article' algorithm:
-------------------------------------------

Add a header to the article, looking like this (4711=UIDVALIDITY,
42=article number):

X-Gnus-replaced-article: mymailserver INBOX.ding 4711 42

Store that article in a folder INBOX.ding.replaced (or just
INBOX.gnus-internal?).

Add a mark to article 42 in INBOX.ding, say `gnus-replaced'.

`nnimap-request-article' algorithm:
-----------------------------------

If the article we're fetching has the `gnus-replaced' mark, issue a
IMAP search in INBOX.ding.replaced like:

SEARCH HEADER "X-Gnus-replaced-article:" "INBOX.ding 4711 42"

If this article exist, fetch it instead.

`nnimap-request-expire-article' algorithm:
------------------------------------------

If the article we're deleting has a `gnus-replaced' mark, delete the
modified copy too.