From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Xah Newsgroups: gmane.emacs.help Subject: Re: How to get rid of *GNU Emacs* buffer on start-up? Date: Tue, 16 Sep 2008 13:57:59 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1221601430 17977 80.91.229.12 (16 Sep 2008 21:43:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 16 Sep 2008 21:43:50 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Sep 16 23:44:45 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 1KfiJ2-00059m-0e for geh-help-gnu-emacs@m.gmane.org; Tue, 16 Sep 2008 23:41:56 +0200 Original-Received: from localhost ([127.0.0.1]:60630 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KfiI0-0000fd-Dw for geh-help-gnu-emacs@m.gmane.org; Tue, 16 Sep 2008 17:40:52 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!r15g2000prh.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 94 Original-NNTP-Posting-Host: 24.6.185.159 Original-X-Trace: posting.google.com 1221598679 1202 127.0.0.1 (16 Sep 2008 20:57:59 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Tue, 16 Sep 2008 20:57:59 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: r15g2000prh.googlegroups.com; posting-host=24.6.185.159; posting-account=bRPKjQoAAACxZsR8_VPXCX27T2YcsyMA User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_4_11; en) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.22, gzip(gfe), gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:162373 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor 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:57716 Archived-At: On Sep 16, 1:44 am, Charles Sebold wrote: > On 16 Sep 2008, Davin Pearson wrote: > > > Every time I start Emacs I have to bury to *GNU Emacs buffer. This > > is a little bit annoying having to do this. If I can't kill this > > buffer, then I would at least prefer the default-directory of that > > buffer to be "~/" so that I can easily load a file that I want to > > edit. The following code is what I have written to accomplish that > > task but sadly it doesn't appear to work. > > 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. I wrote some detail about it here: http://xahlee.org/emacs/modernization.html I think emacs should get rid of the lisp scratch buffer completely. Instead, have Ctrl+n for New File, that creates a new buffer named =E2=80=9Cuntitled=E2=80=9D and default to text mode. The default mode can b= e customized to set to lisp mode for those who wishes of course. following is a excerpt -------------------------- Q: I find the =E2=80=9C*scratch*=E2=80=9D buffer useful... A: Just about anything, once it is exposed to human animals, a significant number will find it useful. This is a matter of habit and conditioning and applies to all aspects of human habit or behavior, as you'll find people in cultures into things you couldn't dream of. (such as body modification as flattening their breasts, widening a hole in lower lips... to lesser degree tattoo, muscle bulking... or sexual preferences and fetishes such as shit-eating... , or food intake habits (eating/drinking/diet habits) ...) Suppose you have random features in a software, and give this software to a large number of people to use for few decades. Chances are, every feature will be useful to a good sized number of people. People, in a sense, adapt their work habits to the features. The issue about emacs's =E2=80=9C*scratch*=E2=80=9D =E2=80=9Cbuffer=E2=80= =9D is that: * It is not useful by 99% of letter writers. If they wanted a scratch pad, they can open a new document and not save it. This way is familiar to all software users. * The =E2=80=9C*scratch*=E2=80=9D =E2=80=9Cbuffer=E2=80=9D is primarily= designed for elisp programers. (it defaults to lisp mode) Majority of people who use emacs are not lisp coders. For lisp coders, they can easily customize their emacs to have a =E2=80=9C*scratch*=E2=80=9D =E2=80=9Cbuffer=E2=80=9D. * The =E2=80=9C*scratch*=E2=80=9D =E2=80=9Cbuffer=E2=80=9D is a intrusi= ve idiosyncrasy. It is persistent, cannot be closed (it regenerates). It is foreign to all programers. This idiosyncrasy is the first thing presented to users, and it persists. --------------------------------------------- I have made a implementation of my suggestion solution. It will be incorporated into my ergonomic keybinding in the next version. Here's the basics: (global-set-key (kbd "C-n") 'new-empty-buffer) ; Open New File (defun new-empty-buffer () "Opens a new empty buffer." (interactive) (let ((buf (generate-new-buffer "untitled"))) (switch-to-buffer buf) (funcall (and initial-major-mode)) (setq buffer-offer-save t))) ;; note: emacs won't offer to save a buffer that's ;; not associated with a file, ;; even if buffer-modified-p is true. ;; One work around is to define your own my-kill-buffer function ;; that wraps around kill-buffer, and check on the buffer modification ;; status to offer save ;; This custome kill buffer is close-current-buffer. For the command close-current-buffer, see: http://xahlee.org/emacs/modern_operations.el Xah =E2=88=91 http://xahlee.org/ =E2=98=84