]> code.delx.au - gnu-emacs-elpa/blob - README.md
Note crucial ForwardX11Timeout in xsel.el entry.
[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 * **[multishell.el](./multishell.el)**
9
10 I use the emacs shell a *lot*. I bind this to Meta-space to make it easy to:
11
12 * Get to a shell buffer with a keystroke,
13 * ... or to the input point for the current shell buffer.
14 * Use universal arguments to launch and choose between alternate shell
15 buffers and to select which is default.
16 * Prepend a path to a new shell name to launch a shell in that directory,
17 * and use Emacs tramp path syntax to launch a remote shell.
18
19 On top of emacs' powerful shell and tramp facilities, this turns emacs
20 into a versatile tool for conducting operations and development across
21 numerous hosts.
22
23 * **[xsel.el](./xsel.el)**
24
25 X copy and paste emacs region from emacs tty sessions, using a shell command.
26
27 If xsel or linux or cygwin equivalent is installed, and DISPLAY is
28 working, use `klm:xsel-copy` to copy the region to the X clipboard and
29 `klm:xsel-paste` to paste the contents of the clipboard at point.
30
31 One benefit is that `klm:xsel-paste` pastes are single units, rather than
32 a sequence of individual keystrokes that constitute regular X pastes to a
33 terminal. This avoids layers of parsing, indenting, auto-paren insertion,
34 and so forth. (You can always do a regular X paste on occasions when you
35 want that processing.)
36
37 NOTE well - ssh has has a little known, severe default X11 forwarding
38 timeout that leads to unexpected failures after ten minutes - yikes! To
39 mitigate it, set ForwardX11Timeout to something larger - up to the
40 unexpected max of 596h, slightly beyond which the number is ignored. See
41 http://b.kl3in.com/2012/01/x11-display-forwarding-fails-after-some-time/
42 for details.
43
44 * **[pdbtrack.el](./pdbtrack.el)**
45
46 [I've moved my standalone version of pdbtrack aside. I hadn't realized
47 that the version that I derived this code from lacks my source-buffer
48 fallback provisions. It looks like I'm going to have to do some
49 unraveling to reconstruct the best basis.]
50
51 Add sensitivity to comint shells so the source file lines are automatically
52 presented in a separate window when the Python PDB debugger steps to them.
53
54 This is derived from the pdb tracking code, which I originally wrote, and
55 which has been included in (various) official Emacs Python modes. I wanted
56 a version that I could more easily tweak and maintain, independently of
57 the python-mode code.
58
59 It would be nice to eventually generalize this code, to work for things
60 like the node.js debugger. We'll see if I (or anyone) ever gets around to
61 that.