From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: no-spam@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Proposal: emacs -Q option Date: 05 Feb 2004 02:42:44 +0100 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1075941889 23730 80.91.224.253 (5 Feb 2004 00:44:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 5 Feb 2004 00:44:49 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Thu Feb 05 01:44:40 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AoXdI-0001O9-00 for ; Thu, 05 Feb 2004 01:44:40 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1AoXdI-0007OO-00 for ; Thu, 05 Feb 2004 01:44:40 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AoXcl-0007v6-MQ for emacs-devel@quimby.gnus.org; Wed, 04 Feb 2004 19:44:07 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AoXcM-0007id-EW for emacs-devel@gnu.org; Wed, 04 Feb 2004 19:43:42 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AoXbc-00073M-CB for emacs-devel@gnu.org; Wed, 04 Feb 2004 19:43:27 -0500 Original-Received: from [195.41.46.235] (helo=pfepa.post.tele.dk) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AoXbb-00072M-RB for emacs-devel@gnu.org; Wed, 04 Feb 2004 19:42:55 -0500 Original-Received: from kfs-l.imdomain.dk.cua.dk (0x503e2644.bynxx3.adsl-dhcp.tele.dk [80.62.38.68]) by pfepa.post.tele.dk (Postfix) with SMTP id D166847FE42 for ; Thu, 5 Feb 2004 01:42:48 +0100 (CET) Original-To: emacs-devel@gnu.org Original-Lines: 135 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:19720 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:19720 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 http://www.cua.dk