Preventing automatic change of default-directory

后端 未结 3 850
执笔经年
执笔经年 2021-01-01 19:55

As per the Emacs docs, every time you open a file, Emacs changes default-directory to the directory containing that file.

Then, if the cursor is in th

3条回答
  •  悲哀的现实
    2021-01-01 20:21

    Another variant is to bind default-directory to the necessary directory in directory-local variables, e.g. in the .dir-locals.el file in one of your parent directories to something like:

    ((nil . ((default-directory . "~/.emacs.d/"))))
    

提交回复
热议问题