emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: window-system and batch mode


From: Katsumi Yamaoka
Subject: Re: window-system and batch mode
Date: Thu, 01 Nov 2007 10:44:07 +0900
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux)

>>>>> Stefan Monnier wrote:

>>     Recently Emacs sets `window-system' to t in the batch mode:
>>     emacs -batch -Q -eval '(message "%s" window-system)'
>>     t

>>     Shouldn't it be nil?

>> I think that is a bug, and it should be nil.
>> Would someone please DTRT then ack?

> Done,

Confirmed.  Thanks.

>>>>> Richard Stallman wrote:

> However, the right way to test for batch mode is `noninteractive'.
> That is documented in the Lisp Manual.

I see.  I verified Gnus uses `noninteractive' properly for
`gnus-batch-kill'.   Only `gnus-batch-kill' seems to be a non-
interactive feature that Gnus explicitly supports, so I don't
add something useful for the batch mode to other Gnus functions
for the moment.  FYI, my crontab entry is in the next page.

OTOH, the usages of `window-system' are not all necessarily
proper.  For instance, `mailcap-mime-data' inhibits some X
applications if Emacs runs in tty even if it runs in the local
X window system.  Gnus may assume that nil for `window-system'
means a user uses a teletype in a far place, though.


crontab -l
--8<---------------cut here---------------start------------->8---
15 6 * * * rm -f ~/#.newsrc-dribble# ~/.newsrc-dribble; emacs -batch\
 -u yamaoka -l gnus --eval '(let ((gnus-batch-mode t)) (gnus 1))'\
 -f gnus-group-quit
--8<---------------cut here---------------end--------------->8---

`-u yamaoka' is similar to `-l ~yamaoka/.emacs'.  Binding
`gnus-batch-mode' to t makes Gnus not make query when opening a
primary (nntp, in my case) server fails.  The argument `1'
passed to `gnus' means fetching only new mails (the group levels
of my mail groups are all `1').




reply via email to

[Prev in Thread] Current Thread [Next in Thread]