Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Emacs... as your default shell?

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 :)

like image 874
basf Avatar asked Jun 24 '10 06:06

basf


People also ask

Is Emacs its own shell?

Emacs comes with its own shell (as in, like bash or zsh ) written in entirely in Emacs-Lisp. The shell, named Eshell, is a feature-rich replacement for your standard-fare shells like bash with the added bonus of working on any platform Emacs runs on.

Which shell to use in Emacs?

You can start an interactive shell in Emacs by typing M-x shell . By default, this will start the standard Windows shell cmd.exe . Emacs uses the SHELL environment variable to determine which program to use as the shell.

What is Emacs shell?

Eshell is a shell-like command interpreter implemented in Emacs Lisp. It invokes no external processes except for those requested by the user.

How do I run Emacs shell?

You can execute an external shell command from within Emacs using ` M-! ' ( 'shell-command' ). The output from the shell command is displayed in the minibuffer or in a separate buffer, depending on the output size.


2 Answers

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

like image 164
mathk Avatar answered Nov 15 '22 23:11

mathk


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.

like image 43
Noufal Ibrahim Avatar answered Nov 15 '22 22:11

Noufal Ibrahim