unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: no-spam@cua.dk (Kim F. Storm)
Subject: Proposal: emacs -Q option
Date: 05 Feb 2004 02:42:44 +0100	[thread overview]
Message-ID: <m3fzdqjo8b.fsf@kfs-l.imdomain.dk> (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

             reply	other threads:[~2004-02-05  1:42 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-05  1:42 Kim F. Storm [this message]
2004-02-05  1:26 ` Proposal: emacs -Q option 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

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=m3fzdqjo8b.fsf@kfs-l.imdomain.dk \
    --to=no-spam@cua.dk \
    /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).