Gnus development mailing list
 help / color / mirror / Atom feed
* Accessing all incoming mails, checking for network connection, changes in message status
@ 2010-07-23 14:07 manuel carro
  2010-07-26 21:13 ` Ted Zlatanov
  0 siblings, 1 reply; 5+ messages in thread
From: manuel carro @ 2010-07-23 14:07 UTC (permalink / raw)
  To: ding


Dear GNUSers,

I have been using GNUS for some months now and there are some things I
would like to know how to do.

[1] 

I process a lot of mail and right now I have a series of split rules
which divert the mail into some 260 different groups.  However, when I
read mail (I download it to my laptop using IMAP, then do all processing
on the laptop) I am more or less forced to go through all the groups
with active messages and process them.  I used to have a virtual groups
which gathered all active messages, but in the end I had to go to the
group the message was in to read and answer it so that the answer was
stored in the group where the original message was stroed (I set up the
GCC: field so that mails go to the group where I am when I answer).

Wat I would like is to know how to do is:

(a) Set up Gnus variables / options (or what additional functions I
could add) so that incoming mail goes to a single group, and from there
I can respool it to other groups according to a set of spooling /
splitting rules.  I think that the best setup would be to be suggested a
group to respool which I could then edit in the command line, but this
can probably be made with other pieces from the GNUs code.

(b) It would be great if, after respooling, I could almost automatically
(or with minor effort) switch to the group where the message was
respooled (to, e.g., answer from there) and when quitting the group,
appear again in the group where all the messages are stored.


[2]

I work offline often (for example, I am writing this message while in a
plane) and I use SMTP from within GNUS.  I have a function which
switches from queing to non-queieng messages and vice-versa, and takes
care of sending the stored messages when selecting the non-queuing
state.  But I have to remember to make that switch.  Is there any way to
cleanly check that there is connection?  I would like to do something
like:

(defun my-gnus-mail-send-message ()
    (store-message)
    (if (connection-ok smtpmail-default-smtp-server)
        (send-all-mails)
    )
)


Also, unrelated with the above, I am intermittently experiencing small
problems with mails changing status - i.e., unread mails which move to
the "O[ld]" state or to the "r[ead]" state, and old / already read
messages which appear again as new.  Does any of you exeperience
something similar.  Does that happen to any of you?  I usually run the
version in git.

Cheers and thank you!
-- 
+------------------------------------------------------------------------------+
|  Manuel Carro --- Facultad de Informática -- U. Politécnica de Madrid (UPM)  |
|       Campus de Montegancedo --- E-28660 Boadilla del Monte --- Spain        |
|                Phone: +34-913363747 --- FAX: +34-913363669                   |



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

* Re: Accessing all incoming mails, checking for network connection, changes in message status
  2010-07-23 14:07 Accessing all incoming mails, checking for network connection, changes in message status manuel carro
@ 2010-07-26 21:13 ` Ted Zlatanov
  2010-07-27 12:47   ` Manuel Carro
  0 siblings, 1 reply; 5+ messages in thread
From: Ted Zlatanov @ 2010-07-26 21:13 UTC (permalink / raw)
  To: ding

On Fri, 23 Jul 2010 15:07:32 +0100 manuel carro <mcarro@fi.upm.es> wrote: 

mc> Dear GNUSers,

mc> I have been using GNUS for some months now and there are some things I
mc> would like to know how to do.

mc> [1] 

mc> I process a lot of mail and right now I have a series of split rules
mc> which divert the mail into some 260 different groups.  However, when I
mc> read mail (I download it to my laptop using IMAP, then do all processing
mc> on the laptop) I am more or less forced to go through all the groups
mc> with active messages and process them.  I used to have a virtual groups
mc> which gathered all active messages, but in the end I had to go to the
mc> group the message was in to read and answer it so that the answer was
mc> stored in the group where the original message was stroed (I set up the
mc> GCC: field so that mails go to the group where I am when I answer).

mc> Wat I would like is to know how to do is:

mc> (a) Set up Gnus variables / options (or what additional functions I
mc> could add) so that incoming mail goes to a single group, and from there
mc> I can respool it to other groups according to a set of spooling /
mc> splitting rules.  I think that the best setup would be to be suggested a
mc> group to respool which I could then edit in the command line, but this
mc> can probably be made with other pieces from the GNUs code.

mc> (b) It would be great if, after respooling, I could almost automatically
mc> (or with minor effort) switch to the group where the message was
mc> respooled (to, e.g., answer from there) and when quitting the group,
mc> appear again in the group where all the messages are stored.

Virtual groups should do this.  Otherwise you're reinventing the same
functionality.  So if the only problem is that the GCC field is wrong,
let's fix that.  Or is there another reason why virtual groups are not
what you want?

mc> [2]

mc> I work offline often (for example, I am writing this message while in a
mc> plane) and I use SMTP from within GNUS.  I have a function which
mc> switches from queing to non-queieng messages and vice-versa, and takes
mc> care of sending the stored messages when selecting the non-queuing
mc> state.  But I have to remember to make that switch.  Is there any way to
mc> cleanly check that there is connection?  I would like to do something
mc> like:

mc> (defun my-gnus-mail-send-message ()
mc>     (store-message)
mc>     (if (connection-ok smtpmail-default-smtp-server)
mc>         (send-all-mails)
mc>     )
mc> )

I don't think that's available like that right now.  But the Gnus Agent
is supposed to help with connected/disconnected transitions; have you
looked at it?

I would perfonally set up a local SMTP server that will queue my mails
until the network connection is up again.  But that's probably too much
for most users.

mc> Also, unrelated with the above, I am intermittently experiencing small
mc> problems with mails changing status - i.e., unread mails which move to
mc> the "O[ld]" state or to the "r[ead]" state, and old / already read
mc> messages which appear again as new.  Does any of you exeperience
mc> something similar.  Does that happen to any of you?  I usually run the
mc> version in git.

This indicates article marks are inconsistent.  Is this over IMAP or
another protocol?  Could the server be modifying article numbers behind
Gnus' back?

Ted




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

* Re: Accessing all incoming mails, checking for network connection, changes in message status
  2010-07-26 21:13 ` Ted Zlatanov
@ 2010-07-27 12:47   ` Manuel Carro
  2010-08-03 19:07     ` Ted Zlatanov
  0 siblings, 1 reply; 5+ messages in thread
From: Manuel Carro @ 2010-07-27 12:47 UTC (permalink / raw)
  To: Ted Zlatanov; +Cc: ding


Dear Ted,

First of all thanks for your answers and the time spent.

> Virtual groups should do this.  Otherwise you're reinventing the same
> functionality.  So if the only problem is that the GCC field is wrong,
> let's fix that.  Or is there another reason why virtual groups are not
> what you want?

I have a virtual group which puts together all mail, so that when I
enter the group I see all unread and ticked articles.  But these
articles have already been spooled to the corresponding groups.  What I
would like is to receive all mail in a single group (that is easy) and,
as I read the messages, respool them to other groups using a set of
rules and "B t" (basically the ones I have now).  It is the second part I did not
manage to find how to do, as it seems that at the moment I set up
splitting rules the mail start to be split.


> I don't think that's available like that right now.  But the Gnus Agent
> is supposed to help with connected/disconnected transitions; have you
> looked at it?

I haven't.  Thanks for the suggestion.


> I would perfonally set up a local SMTP server that will queue my mails
> until the network connection is up again.  But that's probably too
> much for most users.

I used to do that (with Postfix), but at some point I found myself using
at least three different setups (a laptop, a desktop machine, and a
vitual machine running on Mac OS X) so I decided no to set up three
different SMTP servers and use a configuration which basically runs in
user-space and which works unchanged.  I of course synchronize my
personal stuff (using unison).


> This indicates article marks are inconsistent.  Is this over IMAP or
> another protocol?  Could the server be modifying article numbers behind
> Gnus' back?

It is over IMAP, but use IMAP to copy the mail messages over to my
machine and I the processing is done locally after my mail has been
downloaded.  I do not think the article numbers are being modified,
then.

Thanks again,
-- 
+------------------------------------------------------------------------------+
|  Manuel Carro --- Facultad de Informática -- U. Politécnica de Madrid (UPM)  |
|       Campus de Montegancedo --- E-28660 Boadilla del Monte --- Spain        |
|                Phone: +34-913363747 --- FAX: +34-913363669                   |



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

* Re: Accessing all incoming mails, checking for network connection, changes in message status
  2010-07-27 12:47   ` Manuel Carro
@ 2010-08-03 19:07     ` Ted Zlatanov
  2010-08-09 10:44       ` Manuel Carro
  0 siblings, 1 reply; 5+ messages in thread
From: Ted Zlatanov @ 2010-08-03 19:07 UTC (permalink / raw)
  To: ding

On Tue, 27 Jul 2010 14:47:05 +0200 Manuel Carro <mcarro@fi.upm.es> wrote: 

>> Virtual groups should do this.  Otherwise you're reinventing the same
>> functionality.  So if the only problem is that the GCC field is wrong,
>> let's fix that.  Or is there another reason why virtual groups are not
>> what you want?

MC> I have a virtual group which puts together all mail, so that when I
MC> enter the group I see all unread and ticked articles.  But these
MC> articles have already been spooled to the corresponding groups.  What I
MC> would like is to receive all mail in a single group (that is easy) and,
MC> as I read the messages, respool them to other groups using a set of
MC> rules and "B t" (basically the ones I have now).  It is the second part I did not
MC> manage to find how to do, as it seems that at the moment I set up
MC> splitting rules the mail start to be split.

Yeah, splitting rules are not meant to be optional.  But they can call
ELisp!  So make a function that normally returns the "main" group, but
make it operate differently (returning nil) when invoked interactively.

(defvar pass-through nil)
(defun my-special-splitter ()
  (if pass-through
      nil
    "main group name here"))

Now you just have to a) insert this function in your split rules before
anything else, and b) advise or override `B t' inside a lambda that sets
pass-through to t before the call and sets it back to nil afterwards.

Look in the splitting rules section of the manual for more details.
It's not too bad.

>> This indicates article marks are inconsistent.  Is this over IMAP or
>> another protocol?  Could the server be modifying article numbers behind
>> Gnus' back?

MC> It is over IMAP, but use IMAP to copy the mail messages over to my
MC> machine and I the processing is done locally after my mail has been
MC> downloaded.  I do not think the article numbers are being modified,
MC> then.

OK.  I'm not sure what's going on then.

Ted




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

* Re: Accessing all incoming mails, checking for network connection, changes in message status
  2010-08-03 19:07     ` Ted Zlatanov
@ 2010-08-09 10:44       ` Manuel Carro
  0 siblings, 0 replies; 5+ messages in thread
From: Manuel Carro @ 2010-08-09 10:44 UTC (permalink / raw)
  To: Ted Zlatanov; +Cc: ding


> Yeah, splitting rules are not meant to be optional.  But they can call
> ELisp!

Ah, right.  Will try what you suggest.

> MC> It is over IMAP, but use IMAP to copy the mail messages over to my
> MC> machine and I the processing is done locally after my mail has been
> MC> downloaded.  I do not think the article numbers are being modified,
> MC> then.
> 
> OK.  I'm not sure what's going on then.

:-(   Thanks for your help, anyway.

-- 
+------------------------------------------------------------------------------+
|  Manuel Carro --- Facultad de Informática -- U. Politécnica de Madrid (UPM)  |
|       Campus de Montegancedo --- E-28660 Boadilla del Monte --- Spain        |
|                Phone: +34-913363747 --- FAX: +34-913363669                   |



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

end of thread, other threads:[~2010-08-09 10:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-23 14:07 Accessing all incoming mails, checking for network connection, changes in message status manuel carro
2010-07-26 21:13 ` Ted Zlatanov
2010-07-27 12:47   ` Manuel Carro
2010-08-03 19:07     ` Ted Zlatanov
2010-08-09 10:44       ` Manuel Carro

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