emacs-devel
[Top][All Lists]
Advanced

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

RE: A wish, a plea


From: Drew Adams
Subject: RE: A wish, a plea
Date: Fri, 22 Jun 2007 10:12:14 -0700

>     Personally, I usually start Emacs with Dired. That too might be a
>     possibility: start in `~/'. That gives users flexibility in
>     terms of opening existing files or new ones, and they can see
>     what files are available. Another possibility is to have an
>     explicit option for the startup directory
>     (default `~/'). Just a thought.
>
> That might be a good idea.  The only drawback would be when
> the home dir is so large that this is very slow.
>
> I find it a pain in the neck to start the file dialogs of many GUI apps
> because they insist on reading my whole homedir before letting me
> specify a file.  Bad design!

Good point. But what about the `visit-on-startup' option suggestion? It
would _default_ to `~/', but you could specify anything. It wouldn't need to
be a directory, but could be an existing file or even a new file. The
definition could be something like this:

(defcustom visit-on-startup "~/"
  "File or directory to visit when Emacs is started."
  :type 'file :group 'emacs)

The :type is not (file :must-match t) here, so if you used the name of a
non-existent file, then the behavior would be similar to the "*unnamed*",
"new", or "Document 1" startup buffer of some text editors (create a new
file buffer at the specified location), which some others have suggested
using. As always, `auto-mode-alist' would determine the mode to use.

We could either try to require an absolute file name or else default the
location to some reasonable directory (e.g. ~/), to define
`default-directory'. I'm not sure how we could _require_ an absolute value,
however. Today, the `default-directory' seems to default to the location of
`runemacs', at least on Windows (~/ seems preferable to that location, to
me).

As an alternative, the :type could be a choice between what is shown above
and simply showing the splash screen (no startup file or directory), as some
people suggested. That way, a user could get any of the behaviors that
people have discussed so far in this thread. For example, a value of nil or
perhaps the symbol `splash-screen' could mean to use only the splash screen.
For example:

(defcustom visit-on-startup "~/"
  "File or directory to visit when Emacs is started."
  :type '(choice (const :tag "Splash screen only" nil)
                 (file  :tag "Visit file or directory" :value "~/"))
  :group 'emacs)

I'd vote for the default value being `~/', but deciding on the default value
is a different issue than deciding to let users customize the startup
behavior.






reply via email to

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