简体   繁体   中英

How to generate a *shell* buffer in emacs?

My lecturer does things without explaining, and i've been trying to figure out what shortcut he used to convert his emacs buffer from notes.md to shell , but i can't seem to do it. I've researched, and tried using Mx to do it, but that only allows me to type commands in the lower section of the frame, and doesn't convert my whole emacs window to a terminal.

Are there settings i need to change? Is there another shortcut i'm unaware of?

Thanks in advance

You can use (Mx shell) to start a shell within emacs. Note that this won't convert your emacs into a terminal, it is just another buffer, with a process running inside it.

As an alternative, you can start an emacs shell with (Mx eshell), the difference is that this shell is implemented in emacs itself, not running an external program.

You can also use (Mx term) to start terminal emulation. Note, however, that inside a terminal emulation buffer you cannot use some of the shortcuts (most are remapped to start with Cc instead of Cx).

If you want a shortcut for starting a shell, you can setup one in your .emacs file:

(global-set-key [f10] 'shell) ; pressing F10 starts a shell

Also, if your problem is that the shell buffer is only one half of the frame, you can expand it by pressing (Cx 1), that deletes all other windows. Look at this guide I've written some years ago, maybe it will help.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM