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

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

Re: Emacs 22.3 ignores setq default-directory


From: Peter Dyballa
Subject: Re: Emacs 22.3 ignores setq default-directory
Date: Tue, 30 Jun 2009 00:48:47 +0200


Am 29.06.2009 um 23:54 schrieb Markus Heller:

I've just reduced my _emacs to only one line:

(setq default-directory "h:/")

so including the slash at the end.  I guess I do not set/read CDPATH,
and yet C-x C-f doesn;t bring me to h:/.


OK, what's left, is that this variable is buffer-local. There exists a global value (you've set it), and any buffer you create after your init file has been read can have a default-directory value derived from HOME or the working directory from which GNU Emacs launched. And this local value overrides the global one (therefore it's possible that in Bavaria you find so many folks that can't speak German, only Bavarian).

My recommendation: create a batch file which first changes working directory to H:\ and then launch the real GNU Emacs executable from within this batch file and working directory! Then it's very likely that the buffers with have set H:\ as default-directory.

--
Greetings

  Pete

When in doubt, use brute force.
                                – Ken Thompson





reply via email to

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