diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2023-07-14 15:25:03 -0700 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2023-07-14 15:25:18 -0700 |
commit | 3250a2386d3111a4ec51b37f42218c90b69ed341 (patch) | |
tree | 32ac6edd81e791d2c3338c1f11e67f40b0cbe007 /public/emacs-shells.html | |
parent | 8c99fadac68cb05b4aaa08cab7a55c7fbfe5e364 (diff) | |
parent | c045654a862bc1119fa4e7584fff9d2a965192ea (diff) |
make: Add the btrfs-rec email
This isn't quite verbatim checking in the email as I did in
btrfs-progs-ng.git, I fussed with it a bit to get my blog engine to do
sane things with it.
Diffstat (limited to 'public/emacs-shells.html')
-rw-r--r-- | public/emacs-shells.html | 53 |
1 files changed, 42 insertions, 11 deletions
diff --git a/public/emacs-shells.html b/public/emacs-shells.html index 172eb91..87060ff 100644 --- a/public/emacs-shells.html +++ b/public/emacs-shells.html @@ -9,20 +9,37 @@ <body> <header><a href="/">Luke Shumaker</a> » <a href=/blog>blog</a> » emacs-shells</header> <article> -<h1 id="a-summary-of-emacs-bundled-shell-and-terminal-modes">A summary of Emacs’ bundled shell and terminal modes</h1> -<p>This is based on a post on <a href="http://www.reddit.com/r/emacs/comments/1bzl8b/how_can_i_get_a_dumbersimpler_shell_in_emacs/c9blzyb">reddit</a>, published on 2013-04-09.</p> -<p>Emacs comes bundled with a few different shell and terminal modes. It can be hard to keep them straight. What’s the difference between <code>M-x term</code> and <code>M-x ansi-term</code>?</p> -<p>Here’s a good breakdown of the different bundled shells and terminals for Emacs, from dumbest to most Emacs-y.</p> +<h1 id="a-summary-of-emacs-bundled-shell-and-terminal-modes">A summary +of Emacs’ bundled shell and terminal modes</h1> +<p>This is based on a post on <a +href="http://www.reddit.com/r/emacs/comments/1bzl8b/how_can_i_get_a_dumbersimpler_shell_in_emacs/c9blzyb">reddit</a>, +published on 2013-04-09.</p> +<p>Emacs comes bundled with a few different shell and terminal modes. It +can be hard to keep them straight. What’s the difference between +<code>M-x term</code> and <code>M-x ansi-term</code>?</p> +<p>Here’s a good breakdown of the different bundled shells and terminals +for Emacs, from dumbest to most Emacs-y.</p> <h2 id="term-mode">term-mode</h2> -<p>Your VT100-esque terminal emulator; it does what most terminal programs do. Ncurses-things work OK, but dumping large amounts of text can be slow. By default it asks you which shell to run, defaulting to the environmental variable <code>$SHELL</code> (<code>/bin/bash</code> for me). There are two modes of operation:</p> +<p>Your VT100-esque terminal emulator; it does what most terminal +programs do. Ncurses-things work OK, but dumping large amounts of text +can be slow. By default it asks you which shell to run, defaulting to +the environmental variable <code>$SHELL</code> (<code>/bin/bash</code> +for me). There are two modes of operation:</p> <ul> -<li>char mode: Keys are sent immediately to the shell (including keys that are normally Emacs keystrokes), with the following exceptions: +<li>char mode: Keys are sent immediately to the shell (including keys +that are normally Emacs keystrokes), with the following exceptions: <ul> -<li><code>(term-escape-char) (term-escape-char)</code> sends <code>(term-escape-char)</code> to the shell (see above for what the default value is).</li> -<li><code>(term-escape-char) <anything-else></code> is like doing equates to <code>C-x <anything-else></code> in normal Emacs.</li> +<li><code>(term-escape-char) (term-escape-char)</code> sends +<code>(term-escape-char)</code> to the shell (see above for what the +default value is).</li> +<li><code>(term-escape-char) <anything-else></code> is like doing +equates to <code>C-x <anything-else></code> in normal +Emacs.</li> <li><code>(term-escape-char) C-j</code> switches to line mode.</li> </ul></li> -<li>line mode: Editing is done like in a normal Emacs buffer, <code><enter></code> sends the current line to the shell. This is useful for working with a program’s output. +<li>line mode: Editing is done like in a normal Emacs buffer, +<code><enter></code> sends the current line to the shell. This is +useful for working with a program’s output. <ul> <li><code>C-c C-k</code> switches to char mode.</li> </ul></li> @@ -36,10 +53,24 @@ M-x term</code></pre> ; The default 'term-escape-char' is "C-c" and "C-x" M-x ansi-term</code></pre> <h2 id="shell-mode">shell-mode</h2> -<p>The name is a misnomer; shell-mode is a terminal emulator, not a shell; it’s called that because it is used for running a shell (bash, zsh, …). The idea of this mode is to use an external shell, but make it Emacs-y. History is not handled by the shell, but by Emacs; <code>M-p</code> and <code>M-n</code> access the history, while arrows/<code>C-p</code>/<code>C-n</code> move the point (which is is consistent with other Emacs REPL-type interfaces). It ignores VT100-type terminal colors, and colorizes things itself (it inspects words to see if they are directories, in the case of <code>ls</code>). This has the benefit that it does syntax highlighting on the currently being typed command. Ncurses programs will of course not work. This mode is activated with:</p> +<p>The name is a misnomer; shell-mode is a terminal emulator, not a +shell; it’s called that because it is used for running a shell (bash, +zsh, …). The idea of this mode is to use an external shell, but make it +Emacs-y. History is not handled by the shell, but by Emacs; +<code>M-p</code> and <code>M-n</code> access the history, while +arrows/<code>C-p</code>/<code>C-n</code> move the point (which is is +consistent with other Emacs REPL-type interfaces). It ignores VT100-type +terminal colors, and colorizes things itself (it inspects words to see +if they are directories, in the case of <code>ls</code>). This has the +benefit that it does syntax highlighting on the currently being typed +command. Ncurses programs will of course not work. This mode is +activated with:</p> <pre><code>M-x shell</code></pre> <h2 id="eshell-mode">eshell-mode</h2> -<p>This is a shell+terminal, entirely written in Emacs lisp. (Interestingly, it doesn’t set <code>$SHELL</code>, so that will be whatever it was when you launched Emacs). This won’t even be running zsh or bash, it will be running “esh”, part of Emacs.</p> +<p>This is a shell+terminal, entirely written in Emacs lisp. +(Interestingly, it doesn’t set <code>$SHELL</code>, so that will be +whatever it was when you launched Emacs). This won’t even be running zsh +or bash, it will be running “esh”, part of Emacs.</p> </article> <footer> |