views:

225

answers:

5

Is it possible instead of loading /bin/bash, for my terminal to load emacs or emacsclient when I open it up, with a session for eshell? And is it feasible to ssh->screen from an emacs session without running into problems?

I want to do this purely to learn about emacs being as I like it so much.

No hate text, etc please :)

+1  A: 

You can set your shell to /usr/bin/emacs (or wherever it is) to make it your default shell. It will probably act weird though since Emacs is not a shell. It's an editor. Programs expect your shell to behave in a certain fashion and Emacs won't work that way.

You can do an M-xtermret to get a terminal from which you can connect to a remote machine and start a screen. I don't know about the quality of the emulation though. No harm trying.

Neither of these look useful to me and the former is definitely a trouble maker.

Noufal Ibrahim
I generally meant eshell and not really /usr/bin/emacs -- thanks
basf
"It's an editor." - Emacs is, and I'm sure any hardcore user of it will agree ... whatever we want it to be.
amphetamachine
Point taken amphetamachine. :)
Noufal Ibrahim
+3  A: 
emacs -f eshell

EDIT: If you don't want to start a new emacs you can use emacsclient.

emacsclient -e '(eshell)'

Make sure you have started the server the best way to do it is to add (server-start) in your . emacs

mathk
That spawns a separate instance of Emacs. It would be nice to do this using `--batch` (similar to the way dunnet is invoked) but I can't seem to do it.
Noufal Ibrahim
Aside from NTEmacs (where it's not available) `emacs --daemon` is surely the preferable way to start the server (supported in 23.1+). Even better, `emacsclient --alternate-editor=""` starts emacs in daemon mode and connects to it, if no server was running, so you can simply use that as your standard emacs command.
phils
A: 

echo /usr/bin/emacs >> /etc/shells

chsh -s /usr/bin/emacs

Manas
A: 

Just tried running screen from within Emacs (in a shell buffer), but I get the following:


angelv@vaso:~$ screen -D -R
Clear screen capability required.
angelv@vaso:~$ 

so I guess that's not possible. In any case, I don't see why you'd want this (and I use daily screen + emacs).

Angel de Vicente
A: 

Yes you can. I did for a few months once. A few things act funny most can be tamed. It was a great laugh to see coworkers react when they saw me log in to emacs.

jsl4tv