unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Emacs: Problems of the Scratch Buffer
@ 2012-04-18 12:00 Xah Lee
  2012-04-18 12:31 ` Joe Corneli
                   ` (6 more replies)
  0 siblings, 7 replies; 82+ messages in thread
From: Xah Lee @ 2012-04-18 12:00 UTC (permalink / raw)
  To: help-gnu-emacs

for entertainment purpose only.

〈Emacs: Problems of the Scratch Buffer〉
http://xahlee.org/emacs/modernization_scratch_buffer.html

---------------------------------------------

Emacs: Problems of the Scratch Buffer
 By Xah Lee, 2008-09, …, 2012-04-18

Here are reasons that the scratch buffer is not useful to most people:

 1.It is not useful for 99% of emacs users. If people wanted a scratch
pad, they can open a new document and not save it. This way is
familiar to all software users.
 2.The “*scratch*” “buffer” is designed for emacs lisp programers. (it
defaults to lisp-interaction-mode.) 99% of emacs users are not lisp
coders.
 3.The “*scratch*” “buffer” is a INTRUSIVE IDIOSYNCRASY. New users are
not familiar what it is. It is the first thing presented to users, and
it persists.

Scratch Buffer is Inconvenient

Here are reasons that a alternative to “*scratch*” “buffer” is more
useful:

 1.There is no easy, intuitive way to create multiple scratch buffers.
(it is done by calling switch-to-buffer 【Ctrl+x b】 then give a name
that is not one of existing buffers.)
 2.When the scratch buffer is closed, emacs does not prompt user to
save it. This easily causes data loss.
 3.A scratch pad can be very useful not just for temporary elisp code
but for any scratch notes or programing in other languages. (For
example, well known programer Stevey Yegg in his popular blog article
Effective Emacs↗, considers creating new temp buffer as a top 10 tip
in emacs productivity.)
 4.Emacs does not provide a user level function to create a new
buffer. It has menu 〖File▸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 prompt only when user wants to
save it. If user closes it, it prompts for saving.

Proposed Fix: Adding a “new-buffer” Command

I propose that emacs should add a command “new-buffer” with menu
〖File▸New〗. Once called, it should create a empty buffer titled
{untitled, untitled<2>, untitled<3>, …}.

 1.Users can now create multiple temp buffers easily, by just calling
“new-buffer”. No more work-around using “switch-to-buffer” method.
 2.Data lose is prevented because closing any unsaved buffer will
prompt for save.
 3.For lisp coders, new buffer can default to a lisp mode. Other
programers can default it to python mode, ruby mode, etc.

 1.No more redundant and mysterious “*scratch*” concept.
 2.The menu command “New” is a widely adopted standard among apps
across Mac, Windows, Linux.
 3.A “new-buffer” command completely cover the functionality of
emacs's “*scratch*” buffer.
 4.The name “untitled” is conventional, widely understood.

Implementation

The above suggestion is implemented in ErgoEmacs Keybinding, where you
simply press 【Ctrl+n】 to create a new buffer.


^ permalink raw reply	[flat|nested] 82+ messages in thread

end of thread, other threads:[~2012-06-12 19:25 UTC | newest]

Thread overview: 82+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-18 12:00 Emacs: Problems of the Scratch Buffer Xah Lee
2012-04-18 12:31 ` Joe Corneli
2012-04-18 16:57 ` Steinar Bang
2012-04-18 17:33   ` Ludwig, Mark
2012-04-18 18:15     ` Juanma Barranquero
2012-04-18 18:16       ` Juanma Barranquero
2012-04-19 21:08     ` Steinar Bang
     [not found]   ` <mailman.169.1334770417.751.help-gnu-emacs@gnu.org>
2012-04-18 21:11     ` Chiron
2012-04-18 23:56       ` Ludwig, Mark
2012-04-19 10:34         ` Tassilo Horn
2012-04-18 17:01 ` Mark Skilbeck
2012-04-18 19:33 ` Aaron Meurer
2012-04-18 20:22   ` Deniz Dogan
2012-04-19  5:55     ` Kevin Rodgers
2012-04-19  5:58   ` Kevin Rodgers
2012-04-19 20:47 ` Bug Dout
2012-04-19 21:11   ` Chiron
2012-04-19 22:41     ` Ludwig, Mark
     [not found]     ` <mailman.260.1334875302.751.help-gnu-emacs@gnu.org>
2012-04-20  3:27       ` Pascal J. Bourguignon
2012-04-20  3:53         ` Aaron Meurer
2012-04-20 11:08     ` Fritz Wuehler
2012-04-20 11:48     ` Richard Riley
     [not found]     ` <mailman.304.1334922534.751.help-gnu-emacs@gnu.org>
2012-04-21  3:53       ` Chiron
2012-04-21  8:16         ` Joost Kremers
2012-04-21 12:43           ` Chiron
2012-04-21 12:47             ` Jambunathan K
2012-04-21 14:10             ` Eli Zaretskii
     [not found]             ` <mailman.373.1335012467.751.help-gnu-emacs@gnu.org>
2012-04-21 14:42               ` Chiron
2012-04-21 14:49                 ` Joe Corneli
     [not found]                 ` <mailman.381.1335019797.751.help-gnu-emacs@gnu.org>
2012-04-21 15:04                   ` Chiron
     [not found]             ` <mailman.379.1335017454.751.help-gnu-emacs@gnu.org>
2012-04-21 14:46               ` Chiron
2012-04-21 15:34                 ` Eli Zaretskii
2012-04-21 16:15                 ` Dan Espen
2012-04-21 16:58                   ` Chiron
     [not found]                 ` <mailman.389.1335022448.751.help-gnu-emacs@gnu.org>
2012-04-21 16:32                   ` Chiron
2012-04-21 16:52                     ` Eli Zaretskii
     [not found]                     ` <mailman.396.1335027140.751.help-gnu-emacs@gnu.org>
2012-04-21 17:09                       ` Chiron
2012-04-21 17:36                     ` Dan Espen
2012-04-21 23:01                     ` Bastien
2012-04-23 11:52             ` Joost Kremers
2012-04-24  7:40               ` rusi
2012-04-24 11:35                 ` Richard Riley
2012-04-24 13:44                   ` ken
2012-04-25 10:39                     ` Thien-Thi Nguyen
2012-04-25 12:41                       ` ken
2012-04-25 21:51                       ` Jambunathan K
     [not found]                       ` <mailman.42.1335390728.855.help-gnu-emacs@gnu.org>
2012-04-26 17:25                         ` rusi
2012-04-26 17:48                           ` Bastien
     [not found]                     ` <mailman.619.1335350542.751.help-gnu-emacs@gnu.org>
2012-04-26 19:08                       ` Xah Lee
2012-04-24 14:33                 ` Dan Espen
2012-04-24 18:40                   ` PJ Weisberg
2012-04-21  8:36         ` Thien-Thi Nguyen
2012-04-21  9:48           ` Joe Corneli
     [not found]         ` <mailman.362.1334997514.751.help-gnu-emacs@gnu.org>
2012-04-21 12:35           ` Chiron
2012-04-21 13:31             ` Pascal J. Bourguignon
2012-04-21 15:01               ` Chiron
2012-04-21 14:07             ` Eli Zaretskii
     [not found]             ` <mailman.378.1335017298.751.help-gnu-emacs@gnu.org>
2012-04-21 14:52               ` Pascal J. Bourguignon
2012-04-21 15:15                 ` Jambunathan K
2012-04-21 16:03                   ` Jambunathan K
2012-04-21 14:59               ` Chiron
2012-04-21 15:35                 ` Eli Zaretskii
     [not found]                 ` <mailman.390.1335022565.751.help-gnu-emacs@gnu.org>
2012-04-21 16:47                   ` Chiron
2012-04-21 17:07             ` Thien-Thi Nguyen
     [not found]             ` <mailman.398.1335028190.751.help-gnu-emacs@gnu.org>
2012-04-21 17:14               ` Chiron
2012-04-21 17:47                 ` Juanma Barranquero
     [not found]                 ` <mailman.401.1335030473.751.help-gnu-emacs@gnu.org>
2012-04-21 18:03                   ` Chiron
2012-04-21 21:34             ` Jason Earl
2012-04-21 14:39         ` Stefan Monnier
2012-04-21 15:03           ` Chiron
2012-04-20 11:31 ` Martin
2012-04-21  3:14 ` Stefan Monnier
2012-04-21  3:25   ` Dan Espen
2012-04-21 14:38     ` Stefan Monnier
2012-04-21 16:08       ` Dan Espen
2012-04-21 16:50         ` Chiron
2012-04-21 17:30           ` Dan Espen
2012-04-21 22:13             ` Ludwig, Mark
2012-04-22 10:00           ` Petter Gustad
2012-04-22 10:27             ` Richard Riley
2012-06-12 19:25             ` Nikolai Alekseev
2012-06-12 19:24         ` Nikolai Alekseev

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).