From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.devel,gmane.emacs.gnus.general Subject: Re: window-system and batch mode Date: Thu, 01 Nov 2007 10:44:07 +0900 Organization: Emacsen advocacy group Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1193881485 24797 80.91.229.12 (1 Nov 2007 01:44:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 1 Nov 2007 01:44:45 +0000 (UTC) Cc: rms@gnu.org, ding@gnus.org, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 01 02:44:45 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1InP6y-0000eG-RW for ged-emacs-devel@m.gmane.org; Thu, 01 Nov 2007 02:44:45 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1InP6o-0001Es-Nj for ged-emacs-devel@m.gmane.org; Wed, 31 Oct 2007 21:44:34 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1InP6j-0001BA-5b for emacs-devel@gnu.org; Wed, 31 Oct 2007 21:44:29 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1InP6g-00016j-Ji for emacs-devel@gnu.org; Wed, 31 Oct 2007 21:44:28 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1InP6g-00016X-1r for emacs-devel@gnu.org; Wed, 31 Oct 2007 21:44:26 -0400 Original-Received: from orlando.hostforweb.net ([216.246.45.90]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1InP6a-00040s-Mk; Wed, 31 Oct 2007 21:44:21 -0400 Original-Received: from [66.225.201.151] (port=54832 helo=mail.jpl.org) by orlando.hostforweb.net with esmtpa (Exim 4.68) (envelope-from ) id 1InP6U-0007XA-Py; Wed, 31 Oct 2007 20:44:15 -0500 X-Hashcash: 1:20:071101:monnier@iro.umontreal.ca::7EKd9BVsoJ4utArW:000000000000000000000000000000000000062cP X-Hashcash: 1:20:071101:rms@gnu.org::uNSvwWy7WvSbkiLT:0000002BKh X-Hashcash: 1:20:071101:ding@gnus.org::Dbf4C6d5sCgFVYBB:00002aJm X-Hashcash: 1:20:071101:emacs-devel@gnu.org::04bItPL+xzasvd+r:0000000000000000000000000000000000000000001yBa X-Face: #kKnN,xUnmKia.'[pp`; Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu; B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux) Cancel-Lock: sha1:JRCU6Sq3jDMmmJrWQs2qgEQZ8C8= X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - orlando.hostforweb.net X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - jpl.org X-Source: X-Source-Args: X-Source-Dir: X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:82274 gmane.emacs.gnus.general:65512 Archived-At: >>>>> 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').