Gnus development mailing list
 help / color / mirror / Atom feed
From: Ted Zlatanov <tzz@lifelogs.com>
Cc: ding@gnus.org
Subject: Re: Move messages while offline using registry?
Date: Fri, 07 Feb 2003 21:09:11 -0500	[thread overview]
Message-ID: <m3d6m35xrs.fsf@heechee.beld.net> (raw)
In-Reply-To: <m33cmz7ld7.fsf@heechee.beld.net> (Ted Zlatanov's message of "Fri, 07 Feb 2003 17:54:12 -0500")

On Fri, 07 Feb 2003, tzz@lifelogs.com wrote:
> Shouldn't be too hard.  Insert (in the global registry that's still
> to come) something like this associated with the message ID:
> 
> '('queued-move-when-connected group-name)
> 
> then on startup, Gnus can scan the registry and (if connected) do
> the move.

I was thinking more about this, and it seems to me like a Gnus action
handler would be a nice thing.

Consider the current situation: there are hundreds of functions, a
dozen per backend, that follow a naming convention - for instance,
nnimap-request-newgroups which corresponds to the 'request-newsgroups
action.  What if, instead of running those functions directly, user
requests put actions (for instance, 'request-newsgroups) on a queue,
and then Gnus could process those actions off the queue as they come
in?  Each backend would have its own action handler, and a central
routing function would send each action from the main queue to the
appropriate action handler in the respective backend.

This, of course, applies only to non-interactive actions, such as
"move article" or "set mark."

To create complex behavior for a message - for instance, "move to
group X and set mark to Y" simple actions can be queued as a group.

A big advantage is that the queue can be traced backwards, providing a
limited sort of undo.  Of course, a deleted message can't be
recovered, but an article move or erroneous spam processing of a ham
article could be retraced backwards.  That would be a good thing, I
think.

Another advantage is that offline work becomes simply a matter of
saving up the event queue until Gnus is online again.

Maybe asynchronous events can be implemented in this event queue, so a
user can read one article while another is being moved or copied.  I
don't know how well Emacs can handle this, but asynchronous events
could be limited to only a few "safe" combinations.

Things like the message registry, spam/ham processing, and any code
that needs to know the *past* of an article, not just its current
state, would be much simpler this way.

It seems to me that this is a significant amount of work, and maybe it
doesn't make sense to change Gnus in such a fundamental way (either
because the gains are not worth the effort, or because it's too much
work altogether).  What do you think?

Ted




  reply	other threads:[~2003-02-08  2:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-07 21:50 Kai Großjohann
2003-02-07 22:54 ` Ted Zlatanov
2003-02-08  2:09   ` Ted Zlatanov [this message]
2003-02-08 15:22 ` Frank Schmitt
2003-02-08 15:45   ` Simon Josefsson
2003-02-08 18:06     ` Frank Schmitt
2003-02-09 14:53   ` Kai Großjohann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3d6m35xrs.fsf@heechee.beld.net \
    --to=tzz@lifelogs.com \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).