[slime-devel] does change-directory change *default-pathname-defaults*
Pascal J. Bourguignon
pjb at informatimago.com
Wed Oct 27 16:37:28 UTC 2010
Mirko Vukovic <mirko.vukovic at gmail.com> writes:
> On clisp 2.48+cygwin and slime of 2010-09-03, changing directory
> leaves *default-pathname-defaults* unchanged.
>
> Is that a feature or bug?
It's a feature.
EXT:CD changes the POSIX current working directory.
Setting *default-pathname-defaults* changes the default lisp pathname
defaults.
Changing them doesn't change the default-directory in emacs either.
Well, if you want to keep synchronized the POSIX current working
directory with *default-pathname-defaults*, you could use
com.informatimago.common-lisp.browser:cd instead of ext:cd.
http://www.informatimago.com/develop/lisp/com/informatimago/common-lisp/browser.lisp
It has a hook to let your update *default-pathname-defaults*.
I put:
(PUSH (FUNCTION EXT:CD)
COM.INFORMATIMAGO.COMMON-LISP.BROWSER:*CHANGE-DIRECTORY-HOOK*)
(CD (EXT:CD))
in my ~/.clisprc.lisp to initialize it.
And if you're using slime, you could also update default-directory in
emacs too from this hook.
Notice that swank has it's own current directory:
swank:set-default-directory swank:default-directory
which, in the case of clisp is hardwired to ext:cd,
but which doesn't update default-directory in emacs.
--
__Pascal Bourguignon__ http://www.informatimago.com/
More information about the slime-devel
mailing list