I am using emacs to edit Latex. My work flow is to open the latex file, open a new buffer in a separate window via
C-x 2. Then moving the context into the new windowbuffer via
C-x o, I type
M x shell to open a terminal.
This is all fine but I then need to type in the changing of directories to get to the Latex file, and I do this frequently. So I would like to know if there is a quick way to open the shell in the current directory of the Latex file?
default-directory? I triedM x default-directory' which did not work.
default-directoryis a variable, so use
C-h v default-directoryto see the value of the default directory in the shell buffer that you opened up.
C source code'. Its value is "~/Documents/Latex/UCF/STA4102/2/" Local in buffer 2.tex; global value is nil Automatically becomes permanently buffer-local when set. This variable is safe as a file local variable if its value satisfies the predicatestringp'. Documentation: Name of default directory of current buffer. Should end with slash. To interactively change the default directory, use command `cd'.