Gnus development mailing list
 help / color / mirror / Atom feed
* diret imap and agentised imap in sync
@ 2002-09-03 13:49 Alexander Kotelnikov
  2002-09-03 15:44 ` Kai Großjohann
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Alexander Kotelnikov @ 2002-09-03 13:49 UTC (permalink / raw)


Hi. There is one more problem.

At work I read mail from local imap server, and at home via
gnus-agent. The trouble is that if I had read a message at home than
at work it appears to be marked as 'read', but *not* visa versa. Mail I
read at work appears to be 'new' when I come home and fetch it with
emacs -batch -l ~/.gnus.el -f gnus-agent-batch-fetch

BTW my gnus info docs says about two ways of batch fetching:
in "Batching Agents":
#!/bin/sh
emacs -batch -l ~/.emacs -f gnus-agent-batch >/dev/null
and in "Agent Commands":
$ emacs -batch -l ~/.gnus.el -f gnus-agent-batch-fetch
They could be not equivalent, I think.

-- 
Alexander Kotelnikov
Saint-Petersburg, Russia



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

* Re: diret imap and agentised imap in sync
  2002-09-03 13:49 diret imap and agentised imap in sync Alexander Kotelnikov
@ 2002-09-03 15:44 ` Kai Großjohann
  2002-09-03 18:32   ` Alexander Kotelnikov
  2002-09-03 16:22 ` Simon Josefsson
  2002-09-03 20:28 ` Kai Großjohann
  2 siblings, 1 reply; 8+ messages in thread
From: Kai Großjohann @ 2002-09-03 15:44 UTC (permalink / raw)
  Cc: ding

Alexander Kotelnikov <sacha@giotto.sj.ru> writes:

> At work I read mail from local imap server, and at home via
> gnus-agent. The trouble is that if I had read a message at home than
> at work it appears to be marked as 'read', but *not* visa versa. Mail I
> read at work appears to be 'new' when I come home and fetch it with
> emacs -batch -l ~/.gnus.el -f gnus-agent-batch-fetch

Maybe you leave your Emacs and Gnus at work running?  Does it help to
hit `s' in the Group buffer before you go home?

kai
-- 
A large number of young women don't trust men with beards.  (BFBS Radio)



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

* Re: diret imap and agentised imap in sync
  2002-09-03 13:49 diret imap and agentised imap in sync Alexander Kotelnikov
  2002-09-03 15:44 ` Kai Großjohann
@ 2002-09-03 16:22 ` Simon Josefsson
  2002-09-03 18:30   ` Alexander Kotelnikov
  2002-09-03 20:28 ` Kai Großjohann
  2 siblings, 1 reply; 8+ messages in thread
From: Simon Josefsson @ 2002-09-03 16:22 UTC (permalink / raw)
  Cc: ding

Alexander Kotelnikov <sacha@giotto.sj.ru> writes:

> At work I read mail from local imap server, and at home via
> gnus-agent. The trouble is that if I had read a message at home than
> at work it appears to be marked as 'read', but *not* visa versa. Mail I
> read at work appears to be 'new' when I come home and fetch it with
> emacs -batch -l ~/.gnus.el -f gnus-agent-batch-fetch

Do you use the agent at work (i.e. read IMAP mail unplugged)?  Then
you must remember to plug back in to synchronize the flags.  If that's
not it, it is probably a bug, the gnus at home should pick up the
flags from the server.

> BTW my gnus info docs says about two ways of batch fetching:
> in "Batching Agents":
> #!/bin/sh
> emacs -batch -l ~/.emacs -f gnus-agent-batch >/dev/null
> and in "Agent Commands":
> $ emacs -batch -l ~/.gnus.el -f gnus-agent-batch-fetch
> They could be not equivalent, I think.

The current manual uses only the first variant.  It didn't have any
docstring though, fixed.




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

* Re: diret imap and agentised imap in sync
  2002-09-03 16:22 ` Simon Josefsson
@ 2002-09-03 18:30   ` Alexander Kotelnikov
  0 siblings, 0 replies; 8+ messages in thread
From: Alexander Kotelnikov @ 2002-09-03 18:30 UTC (permalink / raw)


>>>>> On Tue, 03 Sep 2002 18:22:32 +0200
>>>>> "SJ" == Simon Josefsson <jas@extundo.com> wrote:
SJ> 
SJ> Alexander Kotelnikov <sacha@giotto.sj.ru> writes:
>> At work I read mail from local imap server, and at home via
>> gnus-agent. The trouble is that if I had read a message at home than
>> at work it appears to be marked as 'read', but *not* visa versa. Mail I
>> read at work appears to be 'new' when I come home and fetch it with
>> emacs -batch -l ~/.gnus.el -f gnus-agent-batch-fetch
SJ> 
SJ> Do you use the agent at work (i.e. read IMAP mail unplugged)?  Then
SJ> you must remember to plug back in to synchronize the flags.  If that's
SJ> not it, it is probably a bug, the gnus at home should pick up the
SJ> flags from the server.

No, I use agent only at home, from where I have dialup connection.

-- 
Alexander Kotelnikov
Saint-Petersburg, Russia



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

* Re: diret imap and agentised imap in sync
  2002-09-03 15:44 ` Kai Großjohann
@ 2002-09-03 18:32   ` Alexander Kotelnikov
  0 siblings, 0 replies; 8+ messages in thread
From: Alexander Kotelnikov @ 2002-09-03 18:32 UTC (permalink / raw)


>>>>> On Tue, 03 Sep 2002 17:44:29 +0200
>>>>> "KG" == Kai Großjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> wrote:
KG> 
KG> Alexander Kotelnikov <sacha@giotto.sj.ru> writes:
>> At work I read mail from local imap server, and at home via
>> gnus-agent. The trouble is that if I had read a message at home than
>> at work it appears to be marked as 'read', but *not* visa versa. Mail I
>> read at work appears to be 'new' when I come home and fetch it with
>> emacs -batch -l ~/.gnus.el -f gnus-agent-batch-fetch
KG> 
KG> Maybe you leave your Emacs and Gnus at work running?  Does it help to
KG> hit `s' in the Group buffer before you go home?

Sure I leave them working. For months :). 's' does not seems to
help. Explicit exit do hot help also.

-- 
Alexander Kotelnikov
Saint-Petersburg, Russia



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

* Re: diret imap and agentised imap in sync
  2002-09-03 13:49 diret imap and agentised imap in sync Alexander Kotelnikov
  2002-09-03 15:44 ` Kai Großjohann
  2002-09-03 16:22 ` Simon Josefsson
@ 2002-09-03 20:28 ` Kai Großjohann
  2002-09-04 18:11   ` Alexander Kotelnikov
  2 siblings, 1 reply; 8+ messages in thread
From: Kai Großjohann @ 2002-09-03 20:28 UTC (permalink / raw)
  Cc: ding

Alexander Kotelnikov <sacha@giotto.sj.ru> writes:

> At work I read mail from local imap server, and at home via
> gnus-agent. The trouble is that if I had read a message at home than
> at work it appears to be marked as 'read', but *not* visa versa. Mail I
> read at work appears to be 'new' when I come home and fetch it with
> emacs -batch -l ~/.gnus.el -f gnus-agent-batch-fetch

What happens when you connect from home directly, without the Agent?
What happens when you use the Agent from a regular Emacs, without
"-batch"?

kai
-- 
A large number of young women don't trust men with beards.  (BFBS Radio)



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

* Re: diret imap and agentised imap in sync
  2002-09-03 20:28 ` Kai Großjohann
@ 2002-09-04 18:11   ` Alexander Kotelnikov
  2002-09-04 19:16     ` Kai Großjohann
  0 siblings, 1 reply; 8+ messages in thread
From: Alexander Kotelnikov @ 2002-09-04 18:11 UTC (permalink / raw)


>>>>> On Tue, 03 Sep 2002 22:28:39 +0200
>>>>> "KG" == Kai Großjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> wrote:
KG> 
KG> Alexander Kotelnikov <sacha@giotto.sj.ru> writes:
>> At work I read mail from local imap server, and at home via
>> gnus-agent. The trouble is that if I had read a message at home than
>> at work it appears to be marked as 'read', but *not* visa versa. Mail I
>> read at work appears to be 'new' when I come home and fetch it with
>> emacs -batch -l ~/.gnus.el -f gnus-agent-batch-fetch
KG> 
KG> What happens when you connect from home directly, without the Agent?
KG> What happens when you use the Agent from a regular Emacs, without
KG> "-batch"?

It seems it works better if I 
1. Set gnus plugged ('J j')
2. Check groups ('g')
3. Fetch groups ('J s')
3. unplug gnus and read news

But it is much more comfortable to keep gnus always unplugged and
fetch articles with external program.

-- 
Alexander Kotelnikov
Saint-Petersburg, Russia



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

* Re: diret imap and agentised imap in sync
  2002-09-04 18:11   ` Alexander Kotelnikov
@ 2002-09-04 19:16     ` Kai Großjohann
  0 siblings, 0 replies; 8+ messages in thread
From: Kai Großjohann @ 2002-09-04 19:16 UTC (permalink / raw)
  Cc: ding

Alexander Kotelnikov <sacha@giotto.sj.ru> writes:

> It seems it works better if I 
> 1. Set gnus plugged ('J j')
> 2. Check groups ('g')
> 3. Fetch groups ('J s')
> 3. unplug gnus and read news
>
> But it is much more comfortable to keep gnus always unplugged and
> fetch articles with external program.

Aha!  Now it rings a bell with me.  Ages ago I wrote the following
(now probably quite outdated) function to fetch news/mail for me:

(defun kai-gnus-agent-do ()
  (let ((gnus-verbose 5))
    (message "Kai: fetching Agent session.")
    (flet ((y-or-n-p (prompt) t)
           (yes-or-no-p (prompt) t))
      (gnus-agent-batch))
    ;(gnus-agent-fetch-session)
    (message "Kai: starting Gnus")
    (gnus)
    (message "Kai: sending drafts")
    (gnus-group-send-drafts)
    (message "Kai: synchronizing flags")
    (gnus-agent-synchronize)
    (message "Kai: fetching agent stuff")
    (gnus-agent-batch)
    (message "Kai: exiting Gnus")
    (gnus-group-exit)
    (save-buffers-kill-emacs t)))

I called this function from "emacs -batch" (I think).  (Now I don't
use it anymore.)  It seems that I'm doing what you discovered is
necessary.  Maybe the gnus-agent-batch function should be augmented to
do what the above does.

kai
-- 
A large number of young women don't trust men with beards.  (BFBS Radio)



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

end of thread, other threads:[~2002-09-04 19:16 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-03 13:49 diret imap and agentised imap in sync Alexander Kotelnikov
2002-09-03 15:44 ` Kai Großjohann
2002-09-03 18:32   ` Alexander Kotelnikov
2002-09-03 16:22 ` Simon Josefsson
2002-09-03 18:30   ` Alexander Kotelnikov
2002-09-03 20:28 ` Kai Großjohann
2002-09-04 18:11   ` Alexander Kotelnikov
2002-09-04 19:16     ` Kai Großjohann

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