From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Disable VC when Emacs is noninteractive -batch Date: Mon, 06 Aug 2007 12:33:52 -0400 Message-ID: References: <87lkcpkbzc.fsf@hariken.mwolson.org> <200708052206.l75M63Hx012575@oogie-boogie.ics.uci.edu> <877io99yoh.fsf@uwakimon.sk.tsukuba.ac.jp> Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1186418028 5844 80.91.229.12 (6 Aug 2007 16:33:48 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 6 Aug 2007 16:33:48 +0000 (UTC) Cc: dann@ics.uci.edu, mwolson@gnu.org, emacs-devel@gnu.org To: "Stephen J. Turnbull" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 06 18:33: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 1II5WK-0007Yh-LO for ged-emacs-devel@m.gmane.org; Mon, 06 Aug 2007 18:33:40 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1II5WE-0006gv-Ij for ged-emacs-devel@m.gmane.org; Mon, 06 Aug 2007 12:33:22 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1II5UA-0005t0-1u for emacs-devel@gnu.org; Mon, 06 Aug 2007 12:31:14 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1II5U8-0005sF-2I for emacs-devel@gnu.org; Mon, 06 Aug 2007 12:31:13 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1II5U7-0005sB-VN for emacs-devel@gnu.org; Mon, 06 Aug 2007 12:31:11 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1II5U5-0006NQ-1t for emacs-devel@gnu.org; Mon, 06 Aug 2007 12:31:11 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1II5Wi-0006MD-2Z; Mon, 06 Aug 2007 12:33:52 -0400 In-reply-to: <877io99yoh.fsf@uwakimon.sk.tsukuba.ac.jp> (stephen@xemacs.org) X-Detected-Kernel: Linux 2.6, seldom 2.4 (older, 4) 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:76095 Archived-At: IMO, if VC's hooks are active in batch mode, that's a bug. I don't see why. You don't want programs that are *implicitly* sensitive to environment state active in batch mode. I don't follow at all. If "environment state" means the file system, we certainly don't expect commands that operate on files to be insensitive to that. (I'm sure there are good reasons for using VC noninteractively, although I personally don't use it in batch mode. But such programs should call VC functions explicitly.) VC only does anything when you call VC functions explicitly. Unless it has a bug. > That is not the only reason. I want vc disabled when in -batch mode > because it is (1) useless there, (2) delays compilation, and (3) > displays many "loading vc-..." messages that clutter the > compilation output. It would be harmless and easy to turn off VC for batch mode compilation. We just have to change the commands that do this compilation: *** bytecomp.el 26 Jul 2007 12:57:26 -0400 2.204 --- bytecomp.el 06 Aug 2007 11:47:18 -0400 *************** *** 4124,4130 **** (defvar command-line-args-left) ;Avoid 'free variable' warning (if (not noninteractive) (error "`batch-byte-compile' is to be used only with -batch")) ! (let ((error nil)) (while command-line-args-left (if (file-directory-p (expand-file-name (car command-line-args-left))) ;; Directory as argument. --- 4124,4131 ---- (defvar command-line-args-left) ;Avoid 'free variable' warning (if (not noninteractive) (error "`batch-byte-compile' is to be used only with -batch")) ! (let ((error nil) ! (vc-handled-backends nil)) (while command-line-args-left (if (file-directory-p (expand-file-name (car command-line-args-left))) ;; Directory as argument. *************** *** 4192,4198 **** (or command-line-args-left (setq command-line-args-left '("."))) (while command-line-args-left ! (byte-recompile-directory (car command-line-args-left) arg) (setq command-line-args-left (cdr command-line-args-left))) (kill-emacs 0)) --- 4193,4200 ---- (or command-line-args-left (setq command-line-args-left '("."))) (while command-line-args-left ! (let ((vc-handled-backends nil)) ! (byte-recompile-directory (car command-line-args-left) arg)) (setq command-line-args-left (cdr command-line-args-left))) (kill-emacs 0))