emacs-devel
[Top][All Lists]
Advanced

[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: Wed, 1 Aug 2007 10:05:55 -0700

> > Maybe we should have
> > initial-visitor just evaluated.  Then one can set it to (find-file
> > "~/") or (display-splash-screen) or (switch-to-buffer "*scratch*").
>
> Yes, then it would be easier to customize and precisely distinguish
> different meanings of string values:
>
> (defcustom startup-function nil
>   "Function to call after starting Emacs."
>   :type '(choice
>           (const :tag "Splash screen" nil)
>           (list :tag "Directory"
>               (const :value dired)
>               (directory :tag "Directory name" :value "~/"))
>           (list :tag "File"
>               (const :value find-file)
>               (file :tag "File name" :value "~/new.txt"))
>           (list :tag "Buffer"
>               (const :value switch-to-buffer)
>               (string :tag "Buffer name" :value "*scratch*")))
>   :version "23.1"
>   :group 'initialization)
>
> And to eval one of the predefined non-nil funcalls:
>
> (dired "~/")
> (find-file "~/new.txt")
> (switch-to-buffer "*scratch*")

I wouldn't strongly argue against having a value that is evaled, but I don't
really see that as needed. And users, especially newbies, might get into
more trouble if we do that.

I don't think it would be "easier to customize" - I think the opposite. A
user would need to provide both the destination string and the action
function to apply to it. That could be confusing - for little or no gain
(for the user).

Why not just make sure that the value is a literal string of the right kind,
and provide only for `dired', `find-file', and `switch-to-buffer' as the
actions? Is there a real need to go beyond that to evaluation and arbitrary
actions?

If there is a _user_ need (benefit) for an evaled expression, then let's
hear it, but if this proposal is just because we seem to be having
difficulty finding a good way to implement file, directory, and buffer
values, then that's wrong. Let's not burden the user if we can avoid it.







reply via email to

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