[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to get rid of *GNU Emacs* buffer on start-up?

From: Kevin Rodgers
Subject: Re: How to get rid of *GNU Emacs* buffer on start-up?
Date: Fri, 19 Sep 2008 20:35:08 -0600
User-agent: Thunderbird (Macintosh/20080707)

Xah Lee wrote:
I don't agree that emacs does provide a user-level function for
creating a new buffer. The 2 practical methods to create a new buffer,
by find-file or switch-to-buffer, are both not designed to create a
new buffer for temp use, and each has serious problems in my opinion.

• There is no easy, intuitive way to create multiple scratch buffers.
(it is done by using the switch-to-buffer command (C-x b) and give
name that is not one of existing buffers.)

• Emacs does not provide a user level function to create a new
buffer.  It has “Open file...” (a wrapper to the find-file command),
which immediately prompt user for a full file path. This is annoying.
Modern apps's New File command actually just create a new untitled
file without prompting, and only when user save it it prompt a file
name.  If user closes it, it prompts for saving.

In summary: the problem with find-file is that it promps user to enter
a file name upfront. The problem with switch-to-buffer is that it
doesn't promp to save when user closes it. In both, the functions are
simply not designed for creating a new temp buffer.

Wow, if you had put 1% of the effort into coding that you put into this
thread, you could have come up with something like this:

(defun switch-to-new-buffer ()
  "Switch to a new *scratch* buffer."
  (switch-to-buffer (generate-new-buffer "*scratch*"))
  (setq switch-to-new-buffer t))

If it's such a huge problem for 99% of users, you could propose to the maintainers that it be added to files.el

Kevin Rodgers
Denver, Colorado, USA

reply via email to

[Prev in Thread] Current Thread [Next in Thread]