unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Katsumi Yamaoka <yamaoka@jpl.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: rms@gnu.org, ding@gnus.org, emacs-devel@gnu.org
Subject: Re: window-system and batch mode
Date: Thu, 01 Nov 2007 10:44:07 +0900	[thread overview]
Message-ID: <b4mlk9id9js.fsf@jpl.org> (raw)
In-Reply-To: jwvr6jbjdbt.fsf-monnier+emacs@gnu.org

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

\f
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	other threads:[~2007-11-01  1:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-30  2:35 window-system and batch mode Katsumi Yamaoka
2007-10-30  8:22 ` Richard Stallman
2007-10-31 19:26   ` Stefan Monnier
2007-11-01  1:44     ` Katsumi Yamaoka [this message]
2007-10-30 18:56 ` Stefan Monnier
2007-10-31  7:47   ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b4mlk9id9js.fsf@jpl.org \
    --to=yamaoka@jpl.org \
    --cc=ding@gnus.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=rms@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).