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?