* **[poptoshell.el](./poptoshell.el)**
- I use the emacs shell a lot. This code enables me to streamline and
- extend how I can a single one, or multiple ones in a project-oriented
- fashion:
-
- * It simplifies getting to the input prompt, by doing the right thing when
- I hit the key I have bound to pop-to-shell (I use [M-space], ie
- meta-space:
- * If the cursor is in a buffer that has no subprocess, pop the window to
- the primary shell buffer
- * If there is no shell buffer, start one.
- * If the cursor is in a buffer which has a process, move the cursor to
- the process input point.
- * With a universal argument, even if the current buffer has a subprocess,
- solicit the name of the target shell buffer - defaulting to the currently
- chosen primary one - and pop to that.
- * This enables starting an alternate shell buffer, for instance, and/or
- switching between the main and alternate ones.
- * (The expected name is without the surrounding asterisks, and
- completion is done against existing shell buffer names stripped of
- their asterisks.)
- * With a doubled universal arg, prompt for the target shell buffer and
- use the provided name as the ensuing default. This is how the "primary"
- is chosen.
-
- The last few things enable a kind of project-focus mode. I often have
- various shell buffers, each one associated with a project. As I switch
- which project is currently my primary focus, I use the double universal
- argument to switch which shell buffer is the default. I can still use the
- single universal argument to easily switch to any of the shells, but most
- easily to my current primary.
-
- (This code has grown gradually over many years, and undoubtedly could stand
- cleaning and clarifying. It works quite reliably, though, and in a choice
- between spending the time cleaning versus spending the time releasing it, I'm
- choosing to release.)
+ I use the emacs shell a lot. I bind this to Meta-space to make it easy to:
+
+ * Return to the current primary shell, in an alternate window
+ * When within a shell buffer, get to the input prompt
+ * Start alternate shells, and easily choose between any that are going:
+ * With one universal argument, prompt for the name of the shell
+ * with completion on existing names,
+ * and new names to start a new shells.
+ * Prefix names of new shells with paths, to specify starting directory
+ * For a remote shell, use tramp-style remote path!
+ * Without an explicit name following the last slash, the host name is
+ used as the shell name. But the trailing name makes it easy to
+ distinguish, eg, root shells:
+ > `/ssh:myserver.net|sudo:root@myserver.net:/#myserver`
+ * Since the current directory is used by default:
+ * if the remote shell has been disconnected, it's reconnected by default
+ * visiting files from a remote shell buffer visits relative to the remote host!
+ * Change which shell is the session default by using a doubled
+ universal argument.
+ * Handy for a kind of current-project modality, easily changing
+ which shell is the default as you change project focus.
* **[xsel.el](./xsel.el)**