Friday, 15 January 2010

Emacs elisp configuration file doesn't recognize default-directory -



Emacs elisp configuration file doesn't recognize default-directory -

i have emacs configuration file under ~/.emacs 1 declaration:

(setq default-directory "/var/www/")

what want c-x c-f , go straight apache directory. tried using c-x c-f , current directory home.

the file gets loaded, because used this: (shell) , shell gets opened. knows error is? want set start-up directory in htdocs.

default-directory not seem think. c-h v default-directory

default-directory variable defined in `buffer.c'. value "/" local in buffer stackoverflow.com/questions/14914353; global value nil automatically becomes buffer-local when set in fashion. variable safe file local variable if value satisfies predicate `stringp'. documentation: name of default directory of current buffer. should end slash. interactively alter default directory, utilize command `cd'.

it's buffer-local (i.e. buffer specific) variable, meaning value different depending on buffer active. when think you've set "/var/www", visiting file in directory.

if want open file "/var/www", need create own command binds "/var/www" default-directory.

emacs elisp

No comments:

Post a Comment