Gnus development mailing list
 help / color / mirror / Atom feed
* How to ask the IMAP server if new mail has arrived
@ 1999-11-08 14:49 Denys Duchier
  1999-11-08 16:50 ` Simon Josefsson
  1999-11-09  0:01 ` David Maslen
  0 siblings, 2 replies; 6+ messages in thread
From: Denys Duchier @ 1999-11-08 14:49 UTC (permalink / raw)
  Cc: Simon Josefsson

On to puzzle number 2.

Can someone come up with a handy function that asks the IMAP server if
any new mail has arrived, and returns the appropriate boolean.  Then I
could just use that to e.g. redefine display-time-file-nonempty-p to
get the desired Mail warning in the mode line.

Thanks,

-- 
Dr. Denys Duchier			Denys.Duchier@ps.uni-sb.de
Forschungsbereich Programmiersysteme	(Programming Systems Lab)
Universitaet des Saarlandes, Geb. 45	http://www.ps.uni-sb.de/~duchier
Postfach 15 11 50			Phone: +49 681 302 5618
66041 Saarbruecken, Germany		Fax:   +49 681 302 5615


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

* Re: How to ask the IMAP server if new mail has arrived
  1999-11-08 14:49 How to ask the IMAP server if new mail has arrived Denys Duchier
@ 1999-11-08 16:50 ` Simon Josefsson
  1999-11-08 17:28   ` Simon Josefsson
  1999-11-09  0:01 ` David Maslen
  1 sibling, 1 reply; 6+ messages in thread
From: Simon Josefsson @ 1999-11-08 16:50 UTC (permalink / raw)
  Cc: ding

Denys Duchier <Denys.Duchier@ps.uni-sb.de> writes:

> Can someone come up with a handy function that asks the IMAP server if
> any new mail has arrived, and returns the appropriate boolean.  Then I
> could just use that to e.g. redefine display-time-file-nonempty-p to
> get the desired Mail warning in the mode line.

Define "new mail has arrived". In IMAP, all mailboxes can receive
mail, so a proper check would be as time consuming as pressing `g'.

OTOH I guess this would work if you receive mail in "INBOX" on a
nnimap server with a empty virtual server name. It wouldn't re-open a
closed server though.

(defun jas-unseen-mail-in-inbox-p
  (let ((buf (nnimap-get-server-buffer "")))
    (and (imap-opened buf) 
	 (> (imap-mailbox-status "INBOX" 'unseen buf)))))


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

* Re: How to ask the IMAP server if new mail has arrived
  1999-11-08 16:50 ` Simon Josefsson
@ 1999-11-08 17:28   ` Simon Josefsson
  0 siblings, 0 replies; 6+ messages in thread
From: Simon Josefsson @ 1999-11-08 17:28 UTC (permalink / raw)
  Cc: ding

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

> (defun jas-unseen-mail-in-inbox-p
>   (let ((buf (nnimap-get-server-buffer "")))
>     (and (imap-opened buf) 
> 	 (> (imap-mailbox-status "INBOX" 'unseen buf)))))

Um, I forgot a `0' for the `>' comparison to work..

(defun jas-unseen-mail-in-inbox-p
  (let ((buf (nnimap-get-server-buffer "")))
    (and (imap-opened buf) 
	 (> (imap-mailbox-status "INBOX" 'unseen buf) 0))))


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

* Re: How to ask the IMAP server if new mail has arrived
  1999-11-08 14:49 How to ask the IMAP server if new mail has arrived Denys Duchier
  1999-11-08 16:50 ` Simon Josefsson
@ 1999-11-09  0:01 ` David Maslen
  1999-11-09 11:22   ` Kai Großjohann
  1 sibling, 1 reply; 6+ messages in thread
From: David Maslen @ 1999-11-09  0:01 UTC (permalink / raw)
  Cc: ding

Really appreciate the trailblazing your going through in converting to
IMAP. I fully intend to follow, but I'm happy to learn by seeing what
happens to you first.

There are probably others, and with the discussion about incorporating
imap documentation, are you taking any notes about converting from
nnfolders to imap? Worthwhile I think.


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

* Re: How to ask the IMAP server if new mail has arrived
  1999-11-09  0:01 ` David Maslen
@ 1999-11-09 11:22   ` Kai Großjohann
  1999-11-09 13:36     ` Yair Friedman (Jerusalem)
  0 siblings, 1 reply; 6+ messages in thread
From: Kai Großjohann @ 1999-11-09 11:22 UTC (permalink / raw)


David Maslen <david.maslen@iname.com> writes:

> There are probably others, and with the discussion about incorporating
> imap documentation, are you taking any notes about converting from
> nnfolders to imap? Worthwhile I think.

I have (partly) converted to IMAP a while ago.  I do the following:

(1) `G m' to create the new nnimap group.
(2) `G e' to edit the select method from (nnimap "") to "nnimap:".  (I
    think this happens automatically in the newest nnimap.)
(3) Use `B c' to copy all articles from nnml group to nnimap group.
(4) Check that articles arrived in nnimap group.
(5) Delete nnml group if check was successful.

It's quite a few keys to press but I didn't try to make it more automatic.

kai
-- 
This gubblick contains many nonsklarkish English flutzpahs,
but the overall pluggandisp can be glorked from context. -- David Moser


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

* Re: How to ask the IMAP server if new mail has arrived
  1999-11-09 11:22   ` Kai Großjohann
@ 1999-11-09 13:36     ` Yair Friedman (Jerusalem)
  0 siblings, 0 replies; 6+ messages in thread
From: Yair Friedman (Jerusalem) @ 1999-11-09 13:36 UTC (permalink / raw)


Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:

> I have (partly) converted to IMAP a while ago.  I do the following:
> 
> (1) `G m' to create the new nnimap group.
> (2) `G e' to edit the select method from (nnimap "") to "nnimap:".  (I
>     think this happens automatically in the newest nnimap.)

This helped improving the nnimap groups update speed a lot!!!

Thank you Kai.


> (3) Use `B c' to copy all articles from nnml group to nnimap group.
> (4) Check that articles arrived in nnimap group.
> (5) Delete nnml group if check was successful.
> 
--
Yair Friedman.



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

end of thread, other threads:[~1999-11-09 13:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-11-08 14:49 How to ask the IMAP server if new mail has arrived Denys Duchier
1999-11-08 16:50 ` Simon Josefsson
1999-11-08 17:28   ` Simon Josefsson
1999-11-09  0:01 ` David Maslen
1999-11-09 11:22   ` Kai Großjohann
1999-11-09 13:36     ` Yair Friedman (Jerusalem)

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