Gnus development mailing list
 help / color / mirror / Atom feed
* continue automatically despite y/n prompt?
@ 2001-06-21 16:55 Bill White
  2001-06-21 18:35 ` William M. Perry
  0 siblings, 1 reply; 3+ messages in thread
From: Bill White @ 2001-06-21 16:55 UTC (permalink / raw)


When I'm out of the office for the day I like to do this:

   (gnus-demon-add-handler 'gnus-demon-scan-mail 5 1)

which automatically retrieves email from various pop accounts, which
are set up like this:

(setq mail-sources 
      '((pop :server "someserver0"
	     :user "me0"
             :dontexpunge nil)
	(pop :server "someserver1"
	     :user "me1"
             :dontexpunge nil)
	(pop :server "someserver2"
	     :user "me2"
             :dontexpunge nil)
))


The problem is that some pop servers are unavailable at times.  

When a server is not available and a download is attempted, an error
is displayed in the minibuffer with a y/n prompt - something like
"Server is unavailable. Do you want to continue (y/n)?"  If I'm not
around to respond, gnus will wait for the keypress until I come in the
next morning and type `y'.  Meanwhile, while gnus is waiting, no mail
is downloaded.

How can I make gnus continue regardless of such errors?

Thanks -

bw
-- 
Bill White . billw@wolfram.com . http://members.wri.com/billw
"No ma'am, we're musicians."


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

* Re: continue automatically despite y/n prompt?
  2001-06-21 16:55 continue automatically despite y/n prompt? Bill White
@ 2001-06-21 18:35 ` William M. Perry
  2001-06-22 13:19   ` Bill White
  0 siblings, 1 reply; 3+ messages in thread
From: William M. Perry @ 2001-06-21 18:35 UTC (permalink / raw)
  Cc: ding

Bill White <billw@wolfram.com> writes:

> When I'm out of the office for the day I like to do this:
> 
>    (gnus-demon-add-handler 'gnus-demon-scan-mail 5 1)
> 
> which automatically retrieves email from various pop accounts, which
> are set up like this:

What about something like:

(defun ignore-prompts-scan-mail ()
  (let ((orig-ynp (symbol-function 'y-or-n-p)))
    (unwind-protect
	(progn
	  (fset 'y-or-n-p (lambda (&rest args) t))
	  (gnus-demon-scan-mail))
      (fset 'y-or-n-p orig-ynp))))

And use that as your handler?

-bp
-- 
Ceterum censeo vi esse delendam


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

* Re: continue automatically despite y/n prompt?
  2001-06-21 18:35 ` William M. Perry
@ 2001-06-22 13:19   ` Bill White
  0 siblings, 0 replies; 3+ messages in thread
From: Bill White @ 2001-06-22 13:19 UTC (permalink / raw)
  Cc: ding

On Thu Jun 21 2001 at 13:35, wmperry@gnu.org (William M. Perry) said:

    > Bill White <billw@wolfram.com> writes:
    > 
>> When I'm out of the office for the day I like to do this:
>> 
>>    (gnus-demon-add-handler 'gnus-demon-scan-mail 5 1)
>> 
>> which automatically retrieves email from various pop accounts,
>> which are set up like this:
    > 
    > What about something like:
    > 
    > (defun ignore-prompts-scan-mail ()
    >   (let ((orig-ynp (symbol-function 'y-or-n-p)))
    >     (unwind-protect
    > 	(progn
    > 	  (fset 'y-or-n-p (lambda (&rest args) t))
    > 	  (gnus-demon-scan-mail))
    >       (fset 'y-or-n-p orig-ynp))))
    > 
    > And use that as your handler?

Well that looks cool - I'll give it a try over the weekend.

Thanks!

bw
-- 
Bill White                                               Office: 5E-Z15
Documentation Programmer                      Phone: 217-398-0700 x 234
Wolfram Research		                      Fax: 217-398-0747
http://members.wri.com/billw           nunc scripsi totum da mihi potum


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

end of thread, other threads:[~2001-06-22 13:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-21 16:55 continue automatically despite y/n prompt? Bill White
2001-06-21 18:35 ` William M. Perry
2001-06-22 13:19   ` Bill White

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