Gnus development mailing list
 help / color / mirror / Atom feed
* Re: IMAP Questions
       [not found]     ` <iluhfb6yg3q.fsf@badis.pdc.kth.se>
@ 2000-06-06 20:02       ` Johan Parin
  2000-06-07  0:16         ` Simon Josefsson
  0 siblings, 1 reply; 5+ messages in thread
From: Johan Parin @ 2000-06-06 20:02 UTC (permalink / raw)
  Cc: Ding Mailing List

The following message is a courtesy copy of an article
that has been posted to gnu.emacs.gnus as well.


"Simon" == Simon Josefsson <jas@pdc.kth.se> writes:

  Simon> Johan Parin <Johan.Parin@uab.ericsson.se> writes:
  >> (gnus-demon-add-handler 'gnus-demon-scan-mail 2 nil)
  >> 
  >> However, this does not work. I did some debugging and I can see
  >> that nnml-request-scan is called. New mail is not fetched
  >> however. I'll probably do some more debugging when I come home
  >> tonight, but any suggestions are welcome.

  Simon> This sound as a generic problem, not related to imap.

You're right. Tried it at home, where I'm using pop, and it's the same 
problem. I hope I'm not misunderstanding something - I mean
gnus-demon-scan-mail _is_ supposed to fetch new mail, right?

Anyway, I did some more debugging and what happens is that when
nnmail-get-new-mail is called from the demon, nnmail-fetched-sources
is nil. This means that the 'when fetching-sources' form where the
mail is actually fetched will not be run. 

When I hit g in the group buffer, on the other hand
nnmail-fetched-sources is bound in the first let binding of
gnus-group-get-new-news, which means that mail is fetched.

Not quite sure how this is supposed to work, but at the moment it
doesn't. 


- Johan
-- 
Johan Parin <Johan.Parin@abc.se>
"Lisp is a programmable programming language" - John Foderaro




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

* Re: IMAP Questions
  2000-06-06 20:02       ` IMAP Questions Johan Parin
@ 2000-06-07  0:16         ` Simon Josefsson
  2000-06-07 18:35           ` Mail Fetching (was: Re: IMAP Questions) Johan Parin
  0 siblings, 1 reply; 5+ messages in thread
From: Simon Josefsson @ 2000-06-07  0:16 UTC (permalink / raw)
  Cc: Ding Mailing List

Johan Parin <Johan.Parin@abc.se> writes:

>   >> (gnus-demon-add-handler 'gnus-demon-scan-mail 2 nil)
...
> You're right. Tried it at home, where I'm using pop, and it's the same 
> problem. I hope I'm not misunderstanding something - I mean
> gnus-demon-scan-mail _is_ supposed to fetch new mail, right?

Perhaps `gnus-demon-scan-news' is what you want?  By the look of the
code, `g-d-s-mail' only scan (ie perform splitting), and `g-d-s-news'
does the same but also update the group buffer.

> Anyway, I did some more debugging and what happens is that when
> nnmail-get-new-mail is called from the demon, nnmail-fetched-sources
> is nil. This means that the 'when fetching-sources' form where the
> mail is actually fetched will not be run. 

This might work.

2000-06-07  Simon Josefsson  <jas@pdc.kth.se>

	* gnus-demon.el (gnus-demon-scan-mail): Bind
	nnmail-fetched-sources.

Index: gnus-demon.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/gnus-demon.el,v
retrieving revision 5.9
diff -w -u -u -w -r5.9 gnus-demon.el
--- gnus-demon.el	1999/12/04 02:29:32	5.9
+++ gnus-demon.el	2000/06/06 00:16:18
@@ -272,6 +272,9 @@
 (defun gnus-demon-scan-mail ()
   (save-window-excursion
     (let ((servers gnus-opened-servers)
+          ;; Binding this variable will inhibit multiple fetchings
+          ;; of the same mail source.
+          (nnmail-fetched-sources (list t))
 	  server)
       (while (setq server (car (pop servers)))
 	(and (gnus-check-backend-function 'request-scan (car server))



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

* Mail Fetching (was: Re: IMAP Questions)
  2000-06-07  0:16         ` Simon Josefsson
@ 2000-06-07 18:35           ` Johan Parin
  2000-06-07 21:38             ` Kai Großjohann
  2000-06-08  9:14             ` Simon Josefsson
  0 siblings, 2 replies; 5+ messages in thread
From: Johan Parin @ 2000-06-07 18:35 UTC (permalink / raw)
  Cc: Ding Mailing List


Simon Josefsson writes:

  Simon> Johan Parin <Johan.Parin@abc.se> writes:
  >> >> (gnus-demon-add-handler 'gnus-demon-scan-mail 2 nil)
  Simon> ...
  >> You're right. Tried it at home, where I'm using pop, and it's the same 
  >> problem. I hope I'm not misunderstanding something - I mean
  >> gnus-demon-scan-mail _is_ supposed to fetch new mail, right?

  Simon> Perhaps `gnus-demon-scan-news' is what you want?  By the look
  Simon> of the code, `g-d-s-mail' only scan (ie perform splitting),
  Simon> and `g-d-s-news' does the same but also update the group
  Simon> buffer.

g-d-s-news does the job alright but it's not what I want - I just want 
to fetch new mail, not news. I don't understand what it means to only
perform splitting - what mail is split if no new mail is fetched?

  >> Anyway, I did some more debugging and what happens is that when
  >> nnmail-get-new-mail is called from the demon,
  >> nnmail-fetched-sources is nil. This means that the 'when
  >> fetching-sources' form where the mail is actually fetched will
  >> not be run.

  Simon> This might work.

  <patch snipped>

Well, yes this fetches new mail, but the group buffer and overview
files are not updated, so I can't see it. To actually see the mail I
still have to press `g'. This is the same problem as with M-g when
using topics. Mail is fetched but not seen.

Of course I can use group levels instead of M-g to fetch just
mail. But I still think this is a bug - or am I missing something? To
get backrround mail fetching work I could write a special version of
g-d-s-news which only fetches mail, I guess. Still don't know what
g-d-s-mail is for as it is though.

After these problems are solved though, remains getting the summary
buffers to be updated *incrementally*. I.e. I want the new message to
appear sorted in place (usually last) when it arrives if the summary
buffer for that group is present. This is something other MUAs do -
pretty standard. Is this possible (I think not), or is this not the
Gnus way - should I use VM if I want this? :-(


Johan
-- 
Johan Parin <Johan.Parin@abc.se>
"Lisp is a programmable programming language" - John Foderaro




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

* Re: Mail Fetching (was: Re: IMAP Questions)
  2000-06-07 18:35           ` Mail Fetching (was: Re: IMAP Questions) Johan Parin
@ 2000-06-07 21:38             ` Kai Großjohann
  2000-06-08  9:14             ` Simon Josefsson
  1 sibling, 0 replies; 5+ messages in thread
From: Kai Großjohann @ 2000-06-07 21:38 UTC (permalink / raw)
  Cc: Simon Josefsson, Ding Mailing List

Johan Parin <Johan.Parin@abc.se> writes:

> After these problems are solved though, remains getting the summary
> buffers to be updated *incrementally*. I.e. I want the new message to
> appear sorted in place (usually last) when it arrives if the summary
> buffer for that group is present. This is something other MUAs do -
> pretty standard. Is this possible (I think not), or is this not the
> Gnus way - should I use VM if I want this? :-(

As Lars likes to say, there is no builtin functionality in Gnus for
doing this.  But you're not the first one who would like to have
this.  Hm.  It shouldn't be too hard.  After all, it is possible to
jump to an article given its number, and that might be used.  (Though
I think that doesn't sort the article right.  Hm.)

kai
-- 
I like BOTH kinds of music.



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

* Re: Mail Fetching (was: Re: IMAP Questions)
  2000-06-07 18:35           ` Mail Fetching (was: Re: IMAP Questions) Johan Parin
  2000-06-07 21:38             ` Kai Großjohann
@ 2000-06-08  9:14             ` Simon Josefsson
  1 sibling, 0 replies; 5+ messages in thread
From: Simon Josefsson @ 2000-06-08  9:14 UTC (permalink / raw)
  Cc: Ding Mailing List

Johan Parin <Johan.Parin@abc.se> writes:

> g-d-s-news does the job alright but it's not what I want - I just want 
> to fetch new mail, not news. I don't understand what it means to only
> perform splitting - what mail is split if no new mail is fetched?

Mail is split into your nnml groups, it's just that the group buffer
isn't updated.

> Well, yes this fetches new mail, but the group buffer and overview
> files are not updated, so I can't see it. To actually see the mail I
> still have to press `g'.

Yes, this would be consistent with the code, at least. :-)

I don't really know what g-d-s-mail and g-d-s-mail should do (and the
documentation isn't helpful), so I think I'll leave it up to someone
who knows.  They look very different, so there is probably a reason.



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

end of thread, other threads:[~2000-06-08  9:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <tn71z2ihahj.fsf@uab.ericsson.se>
     [not found] ` <iluln0qy2lk.fsf@badis.pdc.kth.se>
     [not found]   ` <tn766ro6zxa.fsf@uab.ericsson.se>
     [not found]     ` <iluhfb6yg3q.fsf@badis.pdc.kth.se>
2000-06-06 20:02       ` IMAP Questions Johan Parin
2000-06-07  0:16         ` Simon Josefsson
2000-06-07 18:35           ` Mail Fetching (was: Re: IMAP Questions) Johan Parin
2000-06-07 21:38             ` Kai Großjohann
2000-06-08  9:14             ` Simon Josefsson

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