[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Disable VC when Emacs is noninteractive -batch
From: |
Richard Stallman |
Subject: |
Re: [PATCH] Disable VC when Emacs is noninteractive -batch |
Date: |
Mon, 06 Aug 2007 12:33:52 -0400 |
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-<system>..." 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))
- [PATCH] Disable VC when Emacs is noninteractive -batch, Michael Olson, 2007/08/05
- Re: [PATCH] Disable VC when Emacs is noninteractive -batch, Michael Olson, 2007/08/06
- Re: [PATCH] Disable VC when Emacs is noninteractive -batch, Jason Rumney, 2007/08/06
- Re: [PATCH] Disable VC when Emacs is noninteractive -batch, Richard Stallman, 2007/08/07
- Re: [PATCH] Disable VC when Emacs is noninteractive -batch, David Kastrup, 2007/08/07
- Re: [PATCH] Disable VC when Emacs is noninteractive -batch, Richard Stallman, 2007/08/07
- Re: [PATCH] Disable VC when Emacs is noninteractive -batch, David Kastrup, 2007/08/07