How to set default working directory in Emacs - troubleshooting

后端 未结 7 1613
终归单人心
终归单人心 2020-12-25 13:34

I know this has been posted many times, but the solutions are not working for me. I\'ve tried the following solutions from this post (Changing the default folder in Emacs):<

7条回答
  •  抹茶落季
    2020-12-25 14:26

    From what you write, it sounds like you are running windows. Have you verified that emacs is actually finding and loading .emacs from the directory C:\Users\Lucas? If it is, that means Windows understands your home directory is C:\Users\Lucas. You can check that by looking at the environment variable HOME. In emacs, try:

    (getenv "HOME")
    

    In your .emacs file, you could then put:

    (setq default-directory "~/")
    

提交回复
热议问题