To get eterm-color to work in SunOS, put the following in my .bashrc file:
##following to get eterm-color working in SunOS
I guess I’ve been doing this, but I never exported
TERMINFO. Didn’t know this was needed. Make sure the eterm-files are copied over (see top of post). Now everything should work, hopefully flawlessly. To summarize, copy eterm files into
~/.terminfo, and put the
TERMINFO stuff in
Now screen works in emacs. An issue that arised from this method is that when
screen is run inside emacs, I can’t execute
ess-remote anymore because I can’t press
M-x. In ansi-term,
C-x C-j : behave like emacs, cursor can go anywhere
C-x C-k : behave like a terminal (default) This is documented here and here. Press
C-x C-j and I can press
M-x again. However,
ess-remote still doesn’t work.
I guess when I use screen, I am forced to copy and paste code. If I really must use
screen with ESS, do the regular
M-x shell. After logging into the remote server, execute “TERM\=’vt100′” in the shell. Now, run screen -> R -> ess-remote. I can send code with keypresses now, but screen steals some of my emacs key bindings. To fix this, put the following,
in my remote
~/.screenrc file to switch the default command key from
C-o so it doesn’t conflict with my emacs key bindings (documented here).
More information on ansi term (like remaping
C-c) can be found here.
This was a long post. Summary:
- ansi-term in emacs behaves VERY much like a terminal. I can run vi, emacs, etc, inside of it. Emacs behavior is ‘term’ and ‘shell’.
- I can change things by editing the env variable, TERM.
- Change keybinding in the remote .screenrc file.
NEED TO DO: get ess-remote to work with ansi-term and screen in emacs!
UPDATE2: It seems the best way to do things so far is to use ansi-term -> ssh to remote server -> screen -> R, then go to line run (C-c C-j) and copy and paste code from there. To get screen commands to work (like detach, etc), need to go back to char run (C-c C-k). Remember, I now use C-o instead of C-a (defined in .screenrc); this only works on a regular terminal or in emacs with ansi-term, not using ‘shell’ in emacs with the hack I mentioned up there.