help-gnu-emacs
[Top][All Lists]
Advanced

[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: Xah
Subject: Re: How to get rid of *GNU Emacs* buffer on start-up?
Date: Thu, 25 Sep 2008 04:17:42 -0700 (PDT)
User-agent: G2/1.0

On Sep 25, 2:09 am, Andreas Politz <poli...@fh-trier.de> wrote:
> You have to admit that some people do like to argue withXah.
>
> OP:How do I do X ?XAH: Well, actually if emacs weren't so backwards, you 
> could do Y.
> SOMEONE: Wait a minute, actually X isn't such a bad thing.
>
> Next time I check the thread has 200 posts, half of them fromxah.

I don't think it's like that. It's more like this:

A emacs user: How do I do X ?

Tech geeker: [answer] but you should learn the emacs way, such as
*scratch*, and don't use HTML for email, and you shouldn't use GUI,
and you shouldn't use the mouse.

XAH: I disagree. Because xyz. [1 thousand words of detailed
explanations, reasons, patches]

Tech geeker 2: You shit.

Tech geeker 3: Why do you hijack the thread for your personal issue.

Tech geeker 4: You are wrong, period.

Tech geeker 5: No! 'nuff said.

Tech geeker 6: You are a moron.

Tech geeker 7: Do you know the basics of emacs?

Tech geeker 8: Emacs is not Microsoft!

Tech geeker 9: Why are you using curly quote in newsgroup post? Please
use ascii.

Tech geeker 10: Are you still trolling eh?

...

You can check back how this thread started. e.g.
http://groups.google.com/group/gnu.emacs.help/browse_frm/thread/bf2fae706a7424f0

The first message that mentions *scratch*, is this:

http://groups.google.com/group/gnu.emacs.help/msg/2c92e27286777f41

I quote:

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

Note the phrase GOOD OLD.

And my first response:
http://groups.google.com/group/gnu.emacs.help/msg/9b1ce96b9e39e47d

I quote in full:
---------------------------------------------------

On Sep 16, 1:44 am, Charles Sebold <cseb...@gmail.com> 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
“untitled” and default to text mode. The default mode can be
customized to set to lisp mode for those who wishes of course.

following is a excerpt
--------------------------

Q: I find the “*scratch*” 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 “*scratch*” “buffer” 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 “*scratch*” “buffer” 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 “*scratch*” “buffer”.

    * The “*scratch*” “buffer” is a intrusive 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
∑http://xahlee.org/

☄

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

  Xah
∑ http://xahlee.org/

reply via email to

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