[Top][All Lists]

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

RE: Scratch buffer annoyance

From: Drew Adams
Subject: RE: Scratch buffer annoyance
Date: Tue, 31 Jul 2007 22:14:09 -0700

> >>> That variable name is misleading because the value is not a buffer.
> >>> Please change the variable name to one that fits the meaning.
> >>
> >> I don't see a better name.  Maybe, `initial-display-buffer' or
> >> `initial-current-buffer'?
> > `initial-buffer-name'
> Since it's not a name, that's probably not the best choice either.
> How 'bout initial-buffer-content?  initial-buffer-target?
> initial-buffer-specification?

This is the craziest thread. Much ado about nothing.

Everyone seems to be tip-toeing around using a string that names a buffer as
a possible value. Why? Having a :tag that describes the value as `Buffer' is
not a problem - it is just a tag. Customize controls the type, enforcing a
string value.

It will be obvious to users that the value is a buffer name, not a buffer.
If there is any doubt, then the doc string is the place to point that out.
If a user can provide a file name, then why not a buffer name? I don't get

Something like this is what we should use (change the option name, if you

(defcustom visit-on-startup nil
  "What Emacs visits when it starts up.
A non-nil value is a string naming a directory, file, or buffer to visit.
If nil, then the splash screen is displayed."
  :type '(choice
          (directory :tag "Directory"      :value "~/")
          (file      :tag "File"           :value "~/new.txt")
          (string    :tag "Buffer"         :value "*scratch*")
          (const     :tag "Splash Screen"  nil))
  :group 'startup-display)

The value is a string or nil. If you choose `Buffer', then you can enter any
string (without completion). If the string names a buffer that exists at
startup, such as *scratch* or *Messages*, then that buffer is visited (in
the proper mode). If the string names a nonexistent buffer, then that buffer
is created and visited.

What am I missing? Why is this thread so Byzantine?

reply via email to

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