[Top][All Lists]

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

Re: Default directory in startup buffer

From: Mario Lassnig
Subject: Re: Default directory in startup buffer
Date: Fri, 21 Jan 2011 09:16:12 +0100
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-GB; rv: Gecko/20101207 Thunderbird/3.1.7

On 1/21/11 8:53 AM, Jarmo Hurri wrote:


I am installing GNU Emacs on a bunch of Windows machines for a group of
students in order for them to be able to run R via ESS. So the students
will just start Emacs and run R in it. I just installed the newest
version of GNU Emacs from

The problem is that the startup screen does not obey
default-directory. Putting the following line in site-startup.el

(setq default-directory "~/")

does change the default directory in buffer "*scratch*", but not in
buffer "*GNU Emacs*" I know about the variables inhibit-startup-screen
and inhibit-splash-screen, but I also know these have been intentionally
designed not to work in site-start.el. (Which I find a bit weird even
after reading the justification.)

The only workaround I was able to invent was to kill the startup buffer
in site-start.el

(kill-buffer "*GNU Emacs*")

so now my students' first introduction to GNU Emacs is a completely
empty "*scratch*" buffer and the message

*GNU Emacs*: no such buffer

(I also tried to change the buffer at site-start.el, but this does not
work.) I think there should be a better way around this.

Note that it is _not_ feasible to make the students edit personal
.emacs-files or something like that. Emacs is just a tool here, and it
should not distract from the main theme (programming and statistics).

[ As a related note, I found it surprising that I had to include the
   (setq default-directory "~/")
   in site-start.el in order to get a reasonable default directory even
   in buffer "*scratch*". Should that kind of behaviour be the default in
   Emacs? ]

How about this for a clean slate,
starting out with a clean scratch-buffer.

(setq inhibit-startup-echo-area-message t)
(setq inhibit-startup-screen t)
(setq initial-scratch-message nil)
(kill-buffer "*Messages*")

oh, and the scratch buffer does not have a directory, because it's not associated with a file.

reply via email to

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