Gnus development mailing list
 help / color / mirror / Atom feed
* Make gnus-agent-batch non-interactive at all?
@ 2008-07-04 11:03 anhnmncb
  2008-07-05  0:57 ` Miles Bader
  0 siblings, 1 reply; 5+ messages in thread
From: anhnmncb @ 2008-07-04 11:03 UTC (permalink / raw)
  To: ding

Hi, list,
I encounter an annoying problem with gnus-agent-batch. My script is:
    -----------------------------
    #!/bin/sh
    emacs -batch -l ~/.emacs -f -l ~/.gnus.el gnus-agent-batch >/dev/null 2>&
    -----------------------------

Sometimes when my networking is bad, it can't reach severs, in this
case, this script should ask me: 
    -----------------------------
    Mail source (pop :server pop.sina.com :user anhnmncb :port pop3
    :password ********) error (stringp).  Continue? (yes or no) 
     -----------------------------
and wait for my answer, because it's a non-interactive script, I can't
type yes at all, so this script will be hung on, how to let
gnus-agent-batch always assume the yes answer, so it will go on always?

Any hints will be appreciated!

-- 
Regards,

  anhnmncb
 gpg key: 44A31344




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

* Re: Make gnus-agent-batch non-interactive at all?
  2008-07-04 11:03 Make gnus-agent-batch non-interactive at all? anhnmncb
@ 2008-07-05  0:57 ` Miles Bader
  2008-07-05  1:18   ` anhnmncb
  0 siblings, 1 reply; 5+ messages in thread
From: Miles Bader @ 2008-07-05  0:57 UTC (permalink / raw)
  To: anhnmncb; +Cc: ding

anhnmncb <anhnmncb@sina.com> writes:
> and wait for my answer, because it's a non-interactive script, I can't
> type yes at all, so this script will be hung on, how to let
> gnus-agent-batch always assume the yes answer, so it will go on always?

Hmmm...maybe:   --eval '(defun yes-or-no-p (p) t)'

-Miles

-- 
`Suppose Korea goes to the World Cup final against Japan and wins,' Moon said.
`All the past could be forgiven.'   [NYT]



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

* Re: Make gnus-agent-batch non-interactive at all?
  2008-07-05  0:57 ` Miles Bader
@ 2008-07-05  1:18   ` anhnmncb
  2008-07-05  1:29     ` Miles Bader
  0 siblings, 1 reply; 5+ messages in thread
From: anhnmncb @ 2008-07-05  1:18 UTC (permalink / raw)
  To: ding

Miles Bader <miles@gnu.org> writes:

> anhnmncb <anhnmncb@sina.com> writes:
>> and wait for my answer, because it's a non-interactive script, I can't
>> type yes at all, so this script will be hung on, how to let
>> gnus-agent-batch always assume the yes answer, so it will go on always?
>
> Hmmm...maybe:   --eval '(defun yes-or-no-p (p) t)'

I added (defun yes-or-no-p (p) t) to init-gnus.el, but don't know how to
test it (My networking is damn good now..). So I disconnect my
net then run the script, after some minutes, I got this log:
           Unable to open server nntp+news.gmane.org, go offline? (y or n)
So I think it donesn't work, right?

-- 
Regards,

  anhnmncb
 gpg key: 44A31344




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

* Re: Make gnus-agent-batch non-interactive at all?
  2008-07-05  1:18   ` anhnmncb
@ 2008-07-05  1:29     ` Miles Bader
  2008-07-05  1:33       ` anhnmncb
  0 siblings, 1 reply; 5+ messages in thread
From: Miles Bader @ 2008-07-05  1:29 UTC (permalink / raw)
  To: anhnmncb; +Cc: ding

anhnmncb <anhnmncb@sina.com> writes:
>> Hmmm...maybe:   --eval '(defun yes-or-no-p (p) t)'
>
> I added (defun yes-or-no-p (p) t) to init-gnus.el, but don't know how to
> test it (My networking is damn good now..). So I disconnect my
> net then run the script, after some minutes, I got this log:
>            Unable to open server nntp+news.gmane.org, go offline? (y or n)
> So I think it donesn't work, right?

That's not yes-or-no-p, that's y-or-n-p :-)

So perhaps:  --eval '(defun yes-or-no-p (p) t)' --eval '(defun y-or-n-p (p) t)'

-Miles

-- 
Ocean, n. A body of water covering seven-tenths of a world designed for Man -
who has no gills.



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

* Re: Make gnus-agent-batch non-interactive at all?
  2008-07-05  1:29     ` Miles Bader
@ 2008-07-05  1:33       ` anhnmncb
  0 siblings, 0 replies; 5+ messages in thread
From: anhnmncb @ 2008-07-05  1:33 UTC (permalink / raw)
  To: ding

Miles Bader <miles@gnu.org> writes:

> anhnmncb <anhnmncb@sina.com> writes:
>>> Hmmm...maybe:   --eval '(defun yes-or-no-p (p) t)'
>>
>> I added (defun yes-or-no-p (p) t) to init-gnus.el, but don't know how to
>> test it (My networking is damn good now..). So I disconnect my
>> net then run the script, after some minutes, I got this log:
>>            Unable to open server nntp+news.gmane.org, go offline? (y or n)
>> So I think it donesn't work, right?
>
> That's not yes-or-no-p, that's y-or-n-p :-)
>
> So perhaps:  --eval '(defun yes-or-no-p (p) t)' --eval '(defun y-or-n-p (p) t)'

Exactly, Thank you!

-- 
Regards,

  anhnmncb
 gpg key: 44A31344




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

end of thread, other threads:[~2008-07-05  1:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-04 11:03 Make gnus-agent-batch non-interactive at all? anhnmncb
2008-07-05  0:57 ` Miles Bader
2008-07-05  1:18   ` anhnmncb
2008-07-05  1:29     ` Miles Bader
2008-07-05  1:33       ` anhnmncb

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