annotate lisp/eterm/README.term @ 36:c53a95d3c46d r19-15b101

Import from CVS: tag r19-15b101
author cvs
date Mon, 13 Aug 2007 08:53:38 +0200
parents 376386a54a3c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1 This new term-mode is a merge of the comint shell mode with a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2 ANSI-compatible terminal-emulator.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4 If you're using emacs-19.23 (or newer) or xemacs-19.11 (or newer),
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
5 and only want the terminal-emulator itself, just load the file
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
6 term.el. (You probably want to byte-compile it first, especially
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
7 if you have a slow machine.)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
8
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
9 To start term do M-x term RETURN.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
10
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
11 Compared to terminal.el:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
12 * Uses standard ANSI (vt102) escape sequences.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
13 * High-lighting (inverse video, underline, bold) are supported.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
14 * Fully integrated into shell mode.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
15 * Can switch back and forth between character mode (acts like xterm)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
16 and line mode (acts like old shell mode).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
17 * Tab and line breaks are stored in buffer (so cut and paste will get
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
18 the correct tabs and line breaks), but terminal motion uses the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
19 "visible" layout of the screen (and display programs can assume
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
20 tab, cr and lf work as on plain terminal).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
21
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
22 In character ("raw") sub-mode:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
23 Each character type is sent to the inferior process, except for C-c.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
24 C-c C-c Send a C-c to the inferior.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25 C-c C-j Enter line sub-mode
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26 C-c OTHER Same as cooked C-x map
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
27 Can use bash line editing, filename completion, and history.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28 Can run emacs in an emacs window! (bash users first do: export -n DISPLAY)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
30 In line ("cooked") mode:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
31 Like traditional shell mode
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
32 C-c C-k Enter character sub-mode
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34 Either character or line sub-mode:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
35 C-c C-q Toggle pager sub-mode (enable or disable)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
36 The "pager" provides functionality similar to the "more" program:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
37 Whenever a screenful has been received, emacs stops reading from
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
38 the process until you type the appropriate key. (The key 'h' provides help.)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
39 The pager is smart enough that you can leave it on, even while
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
40 running full-screen interactive programs inside a shell window.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
41 (The pager does not work under xemacs 19.11.)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
42
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
43 The file tshell.el is a preliminary replacement for shell mode.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
44 After loading it, you invoke it with M-x tshell RET.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
45 This needs a little work, and is not recommended. It differs from
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
46 term-mode in that it starts in line mode, and it performs directory
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
47 tracking. Such directory tracking cannot be made reliable.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
48 It you're running bash, it is better to just use term-mode and have
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
49 bash tell term the current directory. You can do that by adding
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
50 the following to your ~/.bashrc:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
51
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
52 if [ "$TERM" = "eterm" ]; then
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
53 PROMPT_COMMAND='echo "/${PWD}"'
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
54 fi
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
55
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
56 The file tgud.el is a preliminary replacement for gud.el, including
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
57 gdb-mode. After loading it, invoke "tgdb-mode" with M-x tgdb RET.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
58
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
59 An alternative is to run gdb from term (or tshell) mode.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
60 Just start gdb with the --fullname flag. This will cause gdb to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
61 ask emacs to display proper source frame on break-points -
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
62 even over a telnet/rlogin link! You would not be able to use the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
63 gud-specific commands, but you can use gdb/readline line editing.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
64
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
65 If you're using terminfo, copy the e directory (itself, not just
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
66 the files in it) into the emacs 'etc' directory (as given by
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
67 ESC ESC data-directory RET), so you have ..../etc/e/eterm.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
68 (Your system uses terminfo if ESC ESC (boundp 'system-uses-terminfo) RET
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
69 return t.) If you can't do that, replace the word "data-directory"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
70 in term.el by a string naming this directory.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
71
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
72 The file TODO.term notes ideas for improvements.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
73
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
74 The file term.texi contain some notes that one day may become part
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
75 of a manual.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
76
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
77 Term.el will be in the next emacs release from the FSF.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
78 It will also probably be in the next xemacs release.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
79 The comint-based shell.el and gud.el will be replaced later.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
80 Telnet.el can then be junked.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
81 Long-term, term.el will replace comint.el, but can co-exist with it.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
82
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
83 Comments and bug fixes should be sent to Per Bothner (bothner@cygnus.com).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
84 Note that I'm new to emacs hacking, so improvements are very welcome.