0

I am running a tmux session on a server where I do my development work (this is where I run emacs). I have two monitors - how do I use both of them with the same emacs session? If I join the same tmux session, the monitors just mirror each other. If I am not in the same tmux session (and by extension a different emacs session) I will have to reread from disk everytime a file gets updated, and there can be differences between the different working versions of files. Any thoughts on how to use both monitors here?

  • Not sure if I follow, but is this question about Emacs or tmux? You might want to look at emacsclient. – Dan Feb 25 '16 at 19:07
1

You can start two tmux sessions. In one you run an Emacs and start the "Emacs server" using M-x emacs-server RET. In the other you can run emacsclient -nw, this will create a second tty frame.

In fact, you can use emacsclient -nw to connect to a graphical Emacs, in case one in running on the machine.

  • Is there a way to do that in the same tmux session? Should I care if it is in the same tmux session? – Andrew Feb 25 '16 at 21:43
  • Of course, you can use the same tmux session on both monitors. Then you can start Emacs in one tmux window (or pane, I never remember the correct terminology) and emacsclient in another. – Lindydancer Feb 26 '16 at 6:06
  • when i attach to the same tmux session, it just mirrors the other monitor - is the some other command i should use? – Andrew Feb 28 '16 at 6:22
  • You have to run Emacs in one tmux window and emacsclient in another, and display then on the different monitors. – Lindydancer Feb 28 '16 at 8:05
  • sorry, still not following. the steps I was taking were 1. open terminal in left window, ssh and tmux attach 2. open terminal in right window ssh, and tmux attach. When I do that they are mirrrored, so I can't do separate things like only open emacs in one window and emacsclient in the other as the commands are mirrored – Andrew Feb 29 '16 at 18:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.