I have a screenrc file but I am finding some conflicts when I run emacs inside screen. For e.g, moving across buffers in emacs, Ctrl-right arrow/left arrow, instead of moving back and forth sends some characters into the buffers such as 5C, 5D etc. This problem exists even when I invoke screen without any screenrc file. But at least the other conflicts were not there. But I would be very grateful if someone could tell me how to fix this ?
Since I have my own bindings in my screenrc file and I want to continue using it, so I was thinking that I will keep my screenrc file but when I want to start emacs in a new screen, I will not use my screenrc. Is there any way to while invoking screen to not to use screenrc ? Till now I have been managing by renaming my screenrc file to something else when starting emacs.
Is there any way in which emacs itself can work as screen, as in I am using screen so that my emacs session does not terminate whenever the remote ssh session goes down. I found some documentation regarding emacs client and emacs server but could not understand much. I would appreciate if someone could tell how to save sessions inside emacs and restore them so that I dont need to use screen for emacs if its possible, as in one should be able to restore the emacs process again.
|
|
|||||
|
migrated from stackoverflow.com Jul 11 '11 at 8:33
|
I only have input on your question #3. As of emacs 23, emacs has a daemon mode which for me has obviated the need to run emacs inside screen. On my first login after a boot, I start Multiple clients can coexist happily. I routinely run an X client on my workstation screen at work, an X client through ssh login from home, and a terminal client on my phone. All talking to the same emacs process, with all my buffers and other state intact. And should my ssh connection on my phone die, I can just continue where I left off after logging in again. I don't know enough about keybindings in screen to help you with your first two questions. |
|||
|
|
1) This has to do with the way in which Emacs interpets escape sequences sent by the terminal. This is fun stuff! You should configure your input-decode-map, e.g., by defining the following function in your .emacs file:
(Note that the This function is magically called by Emacs running inside screen. 2) You can invoke screen with its
Note that this file could be empty. 3) Managing sessions in emacs can sometimes be tedious. Off the shelf, Emacs provides desktop save mode which I personally don't use, but I've read mixed reports on it. You might want to give it a try. A good overview over alternative approaches can be found on the Emacs wiki. An alternative to session management in the first place is to run Emacs as a server and connect to it with http://www.gnu.org/software/libtool/manual/emacs/Emacs-Server.html#Emacs-Server |
|||
|
|
|
Another way to have part of 3) is to use tramp: with tramp you can use the Emacs running on your computer to edit a file on your server. Just open This can also be used for other "remote" use for example
tramp will reopen the ssh connection when needed, and you can even use tramp to run program on the remote host (VCS stuff for example). |
|||
|
|