unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Proposal: emacs -Q option
@ 2004-02-05  1:42 Kim F. Storm
  2004-02-05  1:26 ` Miles Bader
                   ` (3 more replies)
  0 siblings, 4 replies; 31+ messages in thread
From: Kim F. Storm @ 2004-02-05  1:42 UTC (permalink / raw)



When I work on debugging redisplay related problems in emacs (I seem
to be doing that quite a lot), I usually need to start emacs with as
few display elements (like tool-bars, menu-bar, scroll-bars, etc) as
possible, as well as not loading any of the various init files, i.e.
like this:

        emacs -q --no-site-file --no-splash 
              --eval '(blink-cursor-mode -1)' 
              --eval '(tool-bar-mode -1)'
              --eval '(scroll-bar-mode -1)'
              --eval '(tooltip-mode -1)'
              --eval '(setq visible-bell t)'

(the last line is because the audible bell drives me crazy).

I propose to add a -Q option which is equivalent to this, i.e.

        emacs -Q

does the same thing as the above call.

Objections anyone?



Here is a patch:

--- startup.el	2004-02-05 02:27:51.000000000 +0100
***************
*** 73,78 ****
--- 73,83 ----
  ;; -no-splash                 Don't display a splash screen on startup.
  ;; --no-splash
  ;; -------------------------
+ ;; -Q                        Quick startup.  Do not load any of user's init
+ ;;			     file, "default.el", or "site-start".  Disable
+ ;;			     the tool-bar, menu-bar, scroll-bars, tool-tips,
+ ;;			     the spash screen, and the blinking cursor.
+ ;; -------------------------
  ;; -u USER                   Load USER's init file instead of the init
  ;; -user USER                file belonging to the user starting Emacs.
  ;; --user USER
***************
*** 359,364 ****
--- 364,371 ----
  		 string)
    :group 'auto-save)
  
+ (defvar emacs-quick-startup nil)
+ 
  (defvar init-file-debug nil)
  
  (defvar init-file-had-error nil)
***************
*** 777,782 ****
--- 784,795 ----
  		(setq argval nil
                        argi orig-argi)))))
  	(cond
+ 	 ((equal argi "-Q")
+ 	  (setq init-file-user nil
+ 		site-run-file nil
+ 		visible-bell t
+ 		emacs-quick-startup t)
+ 	  (push '(vertical-scroll-bars . nil) initial-frame-alist))
  	 ((member argi '("-q" "-no-init-file"))
  	  (setq init-file-user nil))
  	 ((member argi '("-u" "-user"))
***************
*** 808,825 ****
--- 821,841 ----
  
    ;; If frame was created with a menu bar, set menu-bar-mode on.
    (unless (or noninteractive
+ 	      emacs-quick-startup
                (and (memq window-system '(x w32))
                     (<= (frame-parameter nil 'menu-bar-lines) 0)))
      (menu-bar-mode 1))
  
    ;; If frame was created with a tool bar, switch tool-bar-mode on.
    (unless (or noninteractive
+ 	      emacs-quick-startup
                (not (display-graphic-p))
                (<= (frame-parameter nil 'tool-bar-lines) 0))
      (tool-bar-mode 1))
  
    ;; Can't do this init in defcustom because window-system isn't set.
    (unless (or noninteractive
+ 	      emacs-quick-startup
                (eq system-type 'ms-dos)
                (not (memq window-system '(x w32))))
      (setq-default blink-cursor t)
***************
*** 841,846 ****
--- 857,863 ----
        (normal-erase-is-backspace-mode 1)))
  
    (unless (or noninteractive
+ 	      emacs-quick-startup
                (not (display-graphic-p))
                (not (fboundp 'x-show-tip)))
      (setq-default tooltip-mode t)
***************
*** 1744,1754 ****
                 (list-buffers)))))
  
    ;; Maybe display a startup screen.
!   (when (and (not inhibit-startup-message) (not noninteractive)
  	     ;; Don't display startup screen if init file
  	     ;; has started some sort of server.
! 	     (not (and (fboundp 'process-list)
! 		       (process-list))))
      ;; Display a startup screen, after some preparations.
  
      ;; If there are no switches to process, we might as well
--- 1761,1773 ----
                 (list-buffers)))))
  
    ;; Maybe display a startup screen.
!   (unless (or inhibit-startup-message
! 	      noninteractive
! 	      emacs-quick-startup
  	     ;; Don't display startup screen if init file
  	     ;; has started some sort of server.
! 	     (and (fboundp 'process-list)
! 		  (process-list)))
      ;; Display a startup screen, after some preparations.
  
      ;; If there are no switches to process, we might as well



-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

^ permalink raw reply	[flat|nested] 31+ messages in thread
* Re: Proposal: emacs -Q option
@ 2004-02-05  8:42 Bill Wohler
  0 siblings, 0 replies; 31+ messages in thread
From: Bill Wohler @ 2004-02-05  8:42 UTC (permalink / raw)
  Cc: emacs-devel, Kim F. Storm

Eli Zaretskii <eliz@elta.co.il> writes:

>> From: no-spam@cua.dk (Kim F. Storm)
>> Date: 05 Feb 2004 02:42:44 +0100
>> 
>>         emacs -q --no-site-file --no-splash 
>>               --eval '(blink-cursor-mode -1)' 
>>               --eval '(tool-bar-mode -1)'
>>               --eval '(scroll-bar-mode -1)'
>>               --eval '(tooltip-mode -1)'
>>               --eval '(setq visible-bell t)'
>> 
>> (the last line is because the audible bell drives me crazy).
>> 
>> I propose to add a -Q option which is equivalent to this, i.e.
>> 
>>         emacs -Q
>> 
>> does the same thing as the above call.
>
> IMHO, using -Q for "-q --no-site-file" is fine, but adding all the
> other turn-offs makes this switch too heavily loaded.  Why does it
> make sense to combine  "-q --no-site-file", which basically means
> ``defeat all local deviations from the defaults'' with the rest,
> which disable fancy features?  And what does visible-bell setting
> have to do with turning off features?
>
> I'd say let's make two options, one for "-q --no-site-file", the other
> for --no-splash and the --eval options mentioned above, excluding the
> visible-bell one.

I agree with Eli, and I'll add a couple of comments.

I'd exclude blink-cursor-mode from -Q since that is a personal
preference as well. (Personally, I *hate* visible-bell--I just turn down
the volume on the bell. I *hate* a blinking cursor as well, but I'll
save my breath on that battle. There are obviously good reasons why the
default is to blink, and I'll bet accessibility is one of them.)

I'd lump the tool-bar-mode, scroll-bar-mode, tooltip-mode into a --nogui
option, since that is essentially what you're doing. To that list, it
would make sense to turn off menu-bar-mode as well. The use of the
--nogui option might make sense as a default with the -nw option.

-- 
Bill Wohler <wohler@newt.com>  http://www.newt.com/wohler/  GnuPG ID:610BD9AD
Maintainer of comp.mail.mh FAQ and MH-E. Vote Libertarian!
If you're passed on the right, you're in the wrong lane.

^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2004-02-10  9:46 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-05  1:42 Proposal: emacs -Q option Kim F. Storm
2004-02-05  1:26 ` Miles Bader
2004-02-05  6:23 ` Eli Zaretskii
2004-02-05  8:33   ` Alan Mackenzie
2004-02-05  9:43     ` Kai Grossjohann
2004-02-05 11:53     ` Jan D.
2004-02-05 12:41   ` Kim F. Storm
2004-02-05 12:09     ` Andreas Schwab
2004-02-05 15:08       ` Kim F. Storm
2004-02-05 14:57   ` Stefan Monnier
2004-02-05  7:28 ` Juri Linkov
2004-02-09 10:46   ` Juri Linkov
2004-02-05  7:29 ` Juri Linkov
2004-02-05 19:14   ` Eli Zaretskii
2004-02-05 19:53     ` Stefan Monnier
2004-02-07  7:54     ` Juri Linkov
2004-02-07 23:16       ` Stefan Monnier
2004-02-08  0:20         ` Steven Tamm
2004-02-08  7:19         ` Juri Linkov
2004-02-08 16:56           ` Stefan Monnier
2004-02-09  7:59             ` Juri Linkov
2004-02-09  8:29               ` Miles Bader
2004-02-09  9:04                 ` Juri Linkov
2004-02-09  9:22                   ` Miles Bader
2004-02-10  9:46               ` Richard Stallman
2004-02-09  9:38           ` Richard Stallman
2004-02-08 15:21       ` Richard Stallman
2004-02-06 13:42   ` Richard Stallman
2004-02-08  7:12     ` Juri Linkov
2004-02-09  9:38       ` Richard Stallman
  -- strict thread matches above, loose matches on Subject: below --
2004-02-05  8:42 Bill Wohler

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