From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Giorgos Keramidas Newsgroups: gmane.emacs.help Subject: Re: How to get rid of *GNU Emacs* buffer on start-up? Date: Wed, 17 Sep 2008 04:22:01 +0300 Organization: SunSITE.dk - Supporting Open source Message-ID: <873ajzwoqu.fsf@kobe.laptop> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1221633727 26426 80.91.229.12 (17 Sep 2008 06:42:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 17 Sep 2008 06:42:07 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Sep 17 08:43:03 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Kfqkc-0001QD-Vl for geh-help-gnu-emacs@m.gmane.org; Wed, 17 Sep 2008 08:42:59 +0200 Original-Received: from localhost ([127.0.0.1]:57025 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kfqjb-0000sn-TM for geh-help-gnu-emacs@m.gmane.org; Wed, 17 Sep 2008 02:41:55 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!goblin1!goblin2!goblin.stu.neva.ru!newsfeed.bahnhof.se!newsfeed101.telia.com!nf02.dk.telia.net!news.tele.dk!feed118.news.tele.dk!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) Cancel-Lock: sha1:yuCdob/Uc0xcNQQ3LQ9HtBlj3ZA= Original-Lines: 94 Original-NNTP-Posting-Host: 77.49.50.215 Original-X-Trace: news.sunsite.dk DXC=7P\BJ=kU1l:jd^7_dR6Ih5YSB=nbEKnk; V`^KZl[Dm9<L^Mj7bH?lJH1Tkj<=X:ZN7JBf740E List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:57719 Archived-At: On Tue, 16 Sep 2008 13:57:59 -0700 (PDT), Xah wrote: > On Sep 16, 1:44 am, Charles Sebold wrote: >> In addition to everything else that's been said, I've noticed that >> hitting "q" deletes the buffer and sends me to the good old *scratch* >> buffer, too. I just got used to doing that. > > I think the existance of the lisp scratch buffer is one of the major > usability problem of emacs that prevents emacs from being widely > adopted by most text editing audience. Hi Xah, For what it's worth, I think I would appreciate an option that makes the current behavior of the *scratch* buffer tunable, i.e. by an option like: (defvar scratch-buffer-uses-fundamental-mode nil "Non-nil makes the *scratch* buffer use `fundamental-mode'. Emacs recreates the *scratch* buffer in `lisp-interaction-mode'. If you are not really interested to use `lisp-interaction-mode', but you would prefer to start all scratch buffers in `fundamental-mode', to start editing text instead of typing Lisp expressions, set the `scratch-buffer-uses-fundamental-mode' variable to a non-nil value.") > I wrote some detail about it here: > http://xahlee.org/emacs/modernization.html But I don't like the `personal attack' style that this text uses, and I don't really agree with *all* the proposed `modernization' features. If you were to split that document into smaller `features' and one of them was a proposal to add an option for the default mode of *scratch* buffers, and a good description of how you would suggest that we add a prompt for *scratch* buffers that are modified, I would be more than willing to help you with the testing and integration of any patches to the main Emacs source tree. My own idea about *scratch* buffers that do not fire up only in the current `lisp-interaction-mode' state is something like: * Add an option that may be set to a non-nil value to make *scratch* buffers use `fundamental-mode', or even better, an option that defines _which_ mode a *startup* buffer should use. Two possible variations of this option would be: ;;; Boolean option ;; A boolean option that makes *scratch* buffers fire up in ;; `fundamental-mode' by default. The option would be set to `nil' ;; by default, but it should be easy to tweak the option once and ;; keep it set forever. (defcustom scratch-buffer-uses-fundamental-mode nil "Non-nil makes the *scratch* buffer use `fundamental-mode'. Emacs recreates the *scratch* buffer in `lisp-interaction-mode'. If you are not really interested to use `lisp-interaction-mode', but you would prefer to start all scratch buffers in `fundamental-mode', to start editing text instead of typing Lisp expressions, set the `scratch-buffer-uses-fundamental-mode' variable to a non-nil value." :type 'boolean :group 'editing-basics :group 'convenience) ;;; A list of choices. ;; Still set to the default `lisp-interaction-mode' (defcustom scratch-buffer-startup-mode 'lisp-interaction-mode "The default mode to use for *scratch* buffers. If the value is `lisp' start in lisp-interaction-mode. If the value is `text' start in text-mode. If the value is `fundamental' start in whatever mode has been configured as the default `fundamental-mode'. If the value is a function, use that function to set-up the startup mode of *scratch* buffers." :type '(choice (const :tag "Lisp interaction mode" 'lisp) (const :tag "Text mode" 'text) (const :tag "Fundamental mode" 'fundamental) (function :tag "Custom mode")) :group 'editing-basics :group 'convenience) * Add the scratch buffer to the list of buffers that trigger a prompt if they are modified and the user types `C-x C-c' to leave Emacs. Right now one can open _one_ scratch buffer only. Emacs uses `buffer-modified-p' as the only criterion, but this doesn't work for scratch buffers now. It should probably be an option too, or even a function that checks `scratch-buffer-startup-mode' and decides. I haven't thought too much about this yet, so I am not sure if it sounds like a sensible thing to do.