all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Aaron Meurer <asmeurer@gmail.com>
To: Xah Lee <xahlee@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Emacs: Problems of the Scratch Buffer
Date: Wed, 18 Apr 2012 13:33:47 -0600	[thread overview]
Message-ID: <CAKgW=6Kr942G77G6ovNm6D2PrV8+JetPt4uL7mZZKpdsqU99Sw@mail.gmail.com> (raw)
In-Reply-To: <aca08ae8-12d7-4bf3-97aa-ff97df91884d@iu9g2000pbc.googlegroups.com>

On Wed, Apr 18, 2012 at 6:00 AM, Xah Lee <xahlee@gmail.com> wrote:
> 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.

I think this is the whole point.

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

I agree.  The scratch buffer seems to be made so you could easily type
and execute lisp code interactively.  But even if you just want to run
one lisp command, you can type it literally anywhere and type C-x C-e
(the disadvantage is you won't get syntax highlighting or completion
if you are not in lisp-mode).  IMHO, *scratch* should default to
text-mode.

>  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 for this plan.

One thing, though.  I do like how opening emacs with no files gives
you the scratch buffer.  I just think it should default to text mode.

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

Well you'd need a normal keybinding too, assumedly one that's C-x
C-something.  C-n moves down a line, and I don't think that's going to
change any time soon.

Aaron Meurer



  parent reply	other threads:[~2012-04-18 19:33 UTC|newest]

Thread overview: 82+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAKgW=6Kr942G77G6ovNm6D2PrV8+JetPt4uL7mZZKpdsqU99Sw@mail.gmail.com' \
    --to=asmeurer@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=xahlee@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.