Closed zcaudate closed 3 years ago
You need two instances of emacs (one in each pane) and one being a server (let's say the right one). When you click on something on the left pane, you have to bind a key such as to execute a command in the right one. For that, you just have to issue a emacsclient -e "some command"
. For example, emacsclient -e "find-file \"some-file.txt\""
is there an example of this anywhere? how does the left pane know that it's sending a message to the right one?
Not yet implemented. But the server is listening to requests from anywhere. If you open an emacs and start the server (server-start)
, then you can type on a terminal emacsclient -e "find-file \"some-file.txt\""
and your emacs will open the file as if you've typed the command inside emacs.
I tried it out. It works but I think when there's 2 windows, it alternates.
so say there are 3 windows open - 2 for documents, and one a navigation window, how would they all talk to each other so that
If the emacs server has two windows openend, I imagine an emacsclient command will open a file in the active window. If you want a different behavior, you would need to issue a command that tells emacs where to open the file.
Okay I see. Thanks.
I'd like to have something similar to the split setup that was shown in your reddit post.
Is there a way to have one terminal that has just a fixed treemacs directory setup and another as the target of the clicks? And how might one go about setting this up?