]> code.delx.au - gnu-emacs-elpa/blob - README.md
Clarify pop-to-shell description.
[gnu-emacs-elpa] / README.md
1 EmacsUtils
2 ==========
3
4 Handy Emacs utilities
5
6 I've been using Gnu Emacs since it was publicly available (1985?), and have contributed some packages which are included with Emacs, notably the [Allout outliner](http://myriadicity.net/software-and-systems/craft/emacs-allout), [icomplete mode](http://www.emacswiki.org/emacs/IcompleteMode), and python-mode's [pdbtrack functionality](http://myriadicity.net/software-and-systems/craft/crafty-hacks#section-1). Like many long-time Emacs users, I've use some custom code, some of which I wouldn't do without. Here's a few items that I particularly like, and think might be useful to others - I hope to include more, as time allows.
7
8 * **[poptoshell.el](./poptoshell.el)**
9
10 I use the emacs shell a lot. I bind this to Meta-space to make it easy to:
11
12 * Return to the current primary shell, in an alternate window
13 * When within a shell buffer, get to the input prompt
14 * Start alternate shells, and easily choose between any that are going:
15 * With one universal argument, prompt for the name of the shell
16 * with completion on existing names,
17 * and new names to start a new shells.
18 * Prefix names of new shells with paths, to specify starting directory
19 * For a remote shell, use tramp-style remote path!
20 * Without an explicit name following the last slash, the host name is
21 used as the shell name. But the trailing name makes it easy to
22 distinguish, eg, root shells:
23 > `/ssh:myserver.net|sudo:root@myserver.net:/#myserver`
24 * Since the current directory is used by default:
25 * if the remote shell has been disconnected, it's reconnected by default
26 * visiting files from a remote shell buffer visits relative to the remote host!
27 * Change which shell is the session default by using a doubled
28 universal argument.
29 * Handy for a kind of current-project modality, easily changing
30 which shell is the default as you change project focus.
31
32 * **[xsel.el](./xsel.el)**
33
34 X copy and paste emacs region from emacs tty sessions, using a shell command.
35
36 If xsel or linux or cygwin equivalent is installed, and DISPLAY is
37 working, use `klm:xsel-copy` to copy the region to the X clipboard and
38 `klm:xsel-paste` to paste the contents of the clipboard at point.
39
40 One benefit is that `klm:xsel-paste` pastes are single units, rather than
41 a sequence of individual keystrokes that constitute regular X pastes to a
42 terminal. This avoids layers of parsing, indenting, auto-paren insertion,
43 and so forth. (You can always do a regular X paste on occasions when you
44 want that processing.)
45
46 * **[pdbtrack.el](./pdbtrack.el)**
47
48 [I've moved my standalone version of pdbtrack aside. I hadn't realized
49 that the version that I derived this code from lacks my source-buffer
50 fallback provisions. It looks like I'm going to have to do some
51 unraveling to reconstruct the best basis.]
52
53 Add sensitivity to comint shells so the source file lines are automatically
54 presented in a separate window when the Python PDB debugger steps to them.
55
56 This is derived from the pdb tracking code, which I originally wrote, and
57 which has been included in (various) official Emacs Python modes. I wanted
58 a version that I could more easily tweak and maintain, independently of
59 the python-mode code.
60
61 It would be nice to eventually generalize this code, to work for things
62 like the node.js debugger. We'll see if I (or anyone) ever gets around to
63 that.