I'm trying to use tmux inside emacs for a long time.
I want to use it to attach to remote (long living) session.
Attaching to sessions works fine but I have some problems in my daily
workflow
because find-file
does not work properly inside a tmux session.
To reproduce my problem:
M-x term
pwd
if you now do find-file (C-c C-j
to enter line-mode, than C-x C-f
) it
will start
at your current location. Change your directory using cd
, than redo
find-file
,
everything should look like expected.
Now create a tmux session inside your term
tmux new -s test
pwd ;; your current location (1)
find-file
should start from (1)
now cd
to another directory, do find-file
and it will still starts at (1)
The reason for that is, that the variable default-directory
is not
changed, when
changing the directory inside a tmux session.
Does anybody has an idea how to fix this?
default-directory
, too. Maybe one of my workarounds will work for you: emacs.stackexchange.com/questions/44759/… Let me know and I can type up a formal answer.