annotate lisp/hyperbole/DEMO @ 24:4103f0995bd7 r19-15b95

Import from CVS: tag r19-15b95
author cvs
date Mon, 13 Aug 2007 08:51:03 +0200
parents 376386a54a3c
children 131b0175ea99
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 * Overview
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2
24
4103f0995bd7 Import from CVS: tag r19-15b95
cvs
parents: 0
diff changeset
3 InfoDock Associates, the developer of Hyperbole and InfoDock (an industrial
4103f0995bd7 Import from CVS: tag r19-15b95
cvs
parents: 0
diff changeset
4 quality turn-key version of XEmacs), sells high quality commercial support,
4103f0995bd7 Import from CVS: tag r19-15b95
cvs
parents: 0
diff changeset
5 training, books and custom package development for InfoDock, XEmacs or GNU
4103f0995bd7 Import from CVS: tag r19-15b95
cvs
parents: 0
diff changeset
6 Emacs on a variety of platforms. Contact us at <info@infodock.com> or visit
4103f0995bd7 Import from CVS: tag r19-15b95
cvs
parents: 0
diff changeset
7 our web site at http://www.infodock.com.
4103f0995bd7 Import from CVS: tag r19-15b95
cvs
parents: 0
diff changeset
8
4103f0995bd7 Import from CVS: tag r19-15b95
cvs
parents: 0
diff changeset
9 ------------------
4103f0995bd7 Import from CVS: tag r19-15b95
cvs
parents: 0
diff changeset
10
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
11 This file demonstrates simple usage of the basic Hyperbole button-action
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
12 types and shows how Hyperbole can support a style of self-documenting,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
13 interactive files. See the glossary in the Hyperbole Manual,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
14 "(hyperbole.info)Glossary", if terms used here are unfamiliar to you.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
15
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
16 * Smart Keys
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
17
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
18 Hyperbole provides two context-sensitive keys, the Action Key and the Assist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
19 Key, jointly referred to as Smart Keys. The Action Key is the shift-middle
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
20 mouse button on a 3-button mouse or shift-left button on a two button mouse
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
21 or {M-RET} on your keyboard. The Assist Key is the shift-right mouse button
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
22 or {C-u M-RET}. (InfoDock users may also use the middle mouse button as the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
23 Action Key.)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
24
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25 See also the later section, <(Smart Mouse Keys)>.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
27
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28 ** Button Activation and Help
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
30 This button prints the <(factorial)> of 5 in the minibuffer when activated
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
31 with the Action Key. (Once you have Hyperbole installed, just press the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
32 Action Key on the word, <(factorial)>.) If you instead press the Assist Key,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33 you get help for the preceding button. The help provides a summary report of
24
4103f0995bd7 Import from CVS: tag r19-15b95
cvs
parents: 0
diff changeset
34 the button. You will see that it utilizes the `eval-elisp' action type. You
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
35 can also see who created it. Try it.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
36
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
37 Note that the create-time and mod-time are displayed using your own
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
38 timezone but they are stored as universal times. So if you work with
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
39 people at other sites, you can mix their buttons with your own within
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
40 the same document and see one unified view of the modification times on
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
41 each button. These times will also be useful for sorting buttons by
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
42 time when such features are provided in future Hyperbole releases.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
43
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
44 ** Smart Scrolling
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
45
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
46 By default, the variable smart-scroll-proportional is set to t (TRUE). This
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
47 makes a press of the Action Key at the end of a line scroll forward, so that
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
48 the current line is placed at the top of the window; the Assist Key does the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
49 reverse when pressed at the end of line; it places the current line at the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
50 bottom of the window. This is called proportional scrolling because the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
51 amount of scrolling is relative to the point's position in the window. Try
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
52 it and then come back here.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
53
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
54 Alternatively, if this variable is set to nil (FALSE), the Smart Keys scroll
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
55 forward or backward a windowful when at the end of a line, regardless of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
56 which line point is on, just as {C-v} and {M-v} do.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
57
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
58 Let's try windowful scrolling a bit. Click this button and then practice
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
59 scrolling: <(toggle-scroll-proportional)>. If you prefer the default
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
60 proportional scrolling, click on the previous button again to restore it.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
61
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
62 If you always want windowful scrolling, you'll have to add a setting of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
63 smart-scroll-proportional to your "~/.emacs" file after the point at which
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
64 you load Hyperbole or else set it as part of hyperb:init-hook, which executes
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
65 whenever Hyperbole is loaded, e.g.:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
66
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
67 (setq hyperb:init-hook
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
68 (list (function (lambda () (setq smart-scroll-proportional nil)))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
69
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
70
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
71 ** Hyperbole Menus
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
72
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
73 To display the top-level Hyperbole menu, click the Action Key anywhere
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
74 within this paragraph or alternatively, use {C-h h}. Clicking within the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
75 paragraph, applies the default operation, given by action-key-default-function,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
76 since the Action Key finds no more specialized context. The default
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
77 operation happens to bring up the Hyperbole menu.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
78
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
79 {q} or {C-g} will quit from the menu without invoking any commands if you
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
80 just want to take a look. A menu item is selected by pressing the Action Key
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
81 over it or by typing its first letter in upper or lower case.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
82
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
83 A click of the Assist Key on a menu item gives help on it.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
84
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
85
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
86 ** Help Buffers
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
87
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
88 Context-sensitive Action Key help typically is bound to {C-h A}. {C-u C-h A}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
89 displays the same kind of help for the Assist Key. Try it.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
90
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
91 Any buffer whose name ends in `Help*' is presumed to be a temporary buffer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
92 that one wants to inspect and then remove from view. If you click either the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
93 Action or Assist Key at the end of a help buffer, the buffer is buried from
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
94 view and your window configuration is restored to its state prior to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
95 displaying the help. If you have removed the Smart Key help buffer, bring it
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
96 back. Then press one of the Smart Keys at its end to remove it. Note how
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
97 your window configuration is restored.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
98
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
99 Remember that this works for any help buffer, whether or not Hyperbole
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
100 generated it.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
101
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
102 * Explicit Button Samples
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
103
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
104 Hyperbole is pretty forgiving about the format of explicit buttons. For
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
105 example, all of the following represent the same button, as long as one
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
106 clicks on the *first* line of the button, within the button delimiters:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
107
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
108 <(factorial button)>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
109
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
110 <( factorial button)>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
111
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
112 Pam> <(factorial
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
113 Pam> button)>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
114
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
115 ;; <(factorial
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
116 ;; button)>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
117
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
118 /* <( factorial */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
119 /* button )> */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
120
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
121
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
122 If your <(Info-directory-list)> or <(Info-directory)> variables include the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
123 directory that contains the online GNU Emacs manual, activation of the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
124 next button will tell you about <(keyboard macros)>. Can't remember a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
125 Hyperbole term? Check out the Hyperbole Manual <(glossary)>.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
126
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
127 Here is a <(keyboard macro)> button. It displays documentation for the first
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
128 Emacs Lisp function that follows it, e.g. (hbut:report). You can see that a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
129 button label can consist of a number of words, up to a set <(maximum
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
130 length)>.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
131
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
132 A <(shell command)> button can do many things, such as display the length of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
133 this file. While such commands are executing, you can perform other
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
134 operations. If you create a button that runs a shell command which
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
135 displays its own window system window, i.e. a window outside of Emacs, use
24
4103f0995bd7 Import from CVS: tag r19-15b95
cvs
parents: 0
diff changeset
136 `exec-window-cmd' rather than `exec-shell-cmd' as its action type.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
137
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
138 You can link to files such as your <(.login)> file. Or directories,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
139 like the <(tmp directory)>. When creating file links, if the file you
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
140 are linking to is loaded in a buffer, you are prompted as to whether you
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
141 want the link to jump to the present point in that buffer. If so, the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
142 link will always jump there, so position point within the referent file
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
143 to take advantage of this feature. Note how a separate window is used
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
144 when you activate file link buttons. Most basic Hyperbole action types
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
145 display their results in this manner.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
146
24
4103f0995bd7 Import from CVS: tag r19-15b95
cvs
parents: 0
diff changeset
147 You can make a button an alias for another by using the `link-to-ebut'
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
148 action type. This <(factorial alias)> button does whatever the earlier
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
149 <(factorial)> button does.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
150
24
4103f0995bd7 Import from CVS: tag r19-15b95
cvs
parents: 0
diff changeset
151 The `link-to-mail' action type allows you to reference mail messages
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
152 that you have stored away. We can't demonstrate it here since we don't
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
153 have the mail messages that you do.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
154
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
155 Hyperbole buttons may also be embedded within mail messages. Even
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
156 buttons copied into mail replies can work:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
157
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
158 Emile said:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
159 >
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
160 > Hyperbole is better than home baked bread but not as filling.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
161 > The following sample button displays a message, <(as long as
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
162 > you click within its first line)>.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
163
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
164
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
165 * Implicit Button Samples
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
166
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
167 ** Key Sequence Buttons
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
168
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
169 Any Emacs key sequence delimited with braces may be executed by
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
170 activating it as a button, for example {C-u C-p} should leave point four
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
171 lines above the button line. A help request upon the key sequence
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
172 displays the documentation for its command binding, i.e. what it does.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
173 If it does not represent a bound key sequence, it will not be
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
174 treated as a key sequence button.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
175
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
176 ** Implicit Path Links
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
177
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
178 Any doubly quoted pathname acts as an implicit button that either displays the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
179 referenced path within a buffer, passes it to an external viewer program, or
24
4103f0995bd7 Import from CVS: tag r19-15b95
cvs
parents: 0
diff changeset
180 runs a function that operates upon the path. These are `pathname' implicit
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
181 buttons. For example, activate "README".
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
182
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
183 Most pathnames simply link to the files that they name and so are simply
24
4103f0995bd7 Import from CVS: tag r19-15b95
cvs
parents: 0
diff changeset
184 displayed for editing. The variable `hpath:suffixes' is a list of filename
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
185 suffix strings that are added to or removed from pathnames when searching for
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
186 a match. "So if "README.gz" existed, the pathname button "README" would
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
187 display it. If you use the Emacs "crypt.el" package, then compressed files
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
188 will be uncompressed before they are displayed. Activate "README.gz" and
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
189 you'll see that the README file is displayed as desired.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
190
24
4103f0995bd7 Import from CVS: tag r19-15b95
cvs
parents: 0
diff changeset
191 The variable `hpath:display-alist' contains pairs of pathname expressions and
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
192 edit functions. When a pathname matches an expression, the associated edit
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
193 function is invoked upon the pathname.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
194
24
4103f0995bd7 Import from CVS: tag r19-15b95
cvs
parents: 0
diff changeset
195 The variable `hpath:find-alist' determines the file suffixes which should be
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
196 viewed with external programs. It also specifies the associated viewer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
197 program for each different window system under which Hyperbole may be run.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
198 See its documentation for more details. Under the X window system, for
24
4103f0995bd7 Import from CVS: tag r19-15b95
cvs
parents: 0
diff changeset
199 example, if you have the `xv' program, all of the following file formats may
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
200 be displayed as images: gif, tiff, xbm, pm, pbm, and jpeg.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
201
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
202 Several prefix characters may be attached to pathnames to indicate that
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
203 a different action should be taken when the button is activated.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
204 An exclamation point prefix indicates that the full pathname should be run
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
205 as a non-windowed shell program. For example, try "!/bin/date".
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
206 An ampersand prefix means run the full pathname as a windowed program, e.g.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
207 "&/usr/bin/X11/xeyes". Finally, a hyphen indicates that the filename should
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
208 be evaluated as an Emacs Lisp program, e.g. "-hibtypes.elc", rather than
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
209 displayed.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
210
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
211 If you use the ange-ftp or efs add-on to GNU Emacs, such remote pathnames
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
212 will work as well. (The latest version of ange-ftp may always be obtained
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
213 via anonymous ftp to:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
214 "/anonymous@alpha.gnu.ai.mit.edu:ange-ftp/ange-ftp.tar.gz").
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
215
24
4103f0995bd7 Import from CVS: tag r19-15b95
cvs
parents: 0
diff changeset
216 Once you have *loaded* the ange-ftp or the efs package (or you use a version
4103f0995bd7 Import from CVS: tag r19-15b95
cvs
parents: 0
diff changeset
217 of Emacs 19 which autoloads ange-ftp), if you are on the Internet, you can
4103f0995bd7 Import from CVS: tag r19-15b95
cvs
parents: 0
diff changeset
218 click on any of the following to browse the contents of the Hyperbole
4103f0995bd7 Import from CVS: tag r19-15b95
cvs
parents: 0
diff changeset
219 distribution at the University of Illinois at Urbana (limit the amount
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
220 you do this so as not to deny others access to the archive):
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
221
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
222 "/anonymous@ftp.xemacs.org:pub/infodock/"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
223 /anonymous@128.174.252.16:/pub/infodock/
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
224 /ftp.xemacs.org:pub/infodock/
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
225
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
226 You can see that for ange-ftp/efs pathnames, Hyperbole recognizes them with
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
227 or without the double quote delimiters. These same pathnames can be used
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
228 within explicit buttons which link to files or directories. The HTML
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
229 (HyperText Markup Language) ftp pathname format used by World-Wide-Web
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
230 browsers is also recognized:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
231
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
232 "ftp://ftp.xemacs.org/pub/infodock/
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
233
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
234
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
235 GNU Info (filename)node references such as "(hyperbole.info)Glossary" or
24
4103f0995bd7 Import from CVS: tag r19-15b95
cvs
parents: 0
diff changeset
236 "(emacs)Glossary", work similarly, thanks to the `Info-node' button type.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
237 Try one of the Glossary buttons above.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
238
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
239 If you want to quickly learn how to create explicit buttons, see
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
240 "(hyperbole.info)Drags" and "(hyperbole.info)Menus".
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
241
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
242 So now when browsing the many documents that refer to filenames or Info
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
243 nodes in this way, you can just click on the name to see the contents.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
244 (If a doubly quoted string references a local pathname that does not
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
245 exist within the file system, it will not be considered a pathname
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
246 button by Hyperbole.) Pathname implicit buttons provide one example of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
247 how Hyperbole can improve your working environment without you having to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
248 do any work at all.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
249
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
250
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
251 Hyperbole provides a history command which returns you to previous button
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
252 locations in the reverse order of the way you traverse them. You access it
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
253 by selecting the Hist command from the top-level Hyperbole menu, {C-h h h}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
254 Remember this because you will want to use that command to return to this
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
255 DEMO later.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
256
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
257 Now suppose you want to browse through a number of files within the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
258 Hyperbole distribution. You could use the Emacs dired subsystem,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
259 "(emacs)Dired", but a faster way is to note that files named MANIFEST
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
260 and DIR are used to summarize the files in a directory, so we can use
24
4103f0995bd7 Import from CVS: tag r19-15b95
cvs
parents: 0
diff changeset
261 each of their entries as an implicit button (of `dir-summary' type) to
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
262 take us to the file.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
263
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
264 Let's look at "MANIFEST". Now click anywhere within a line in the MANIFEST
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
265 file and you see that it is displayed as expected. (Remember to use the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
266 Hyperbole history command to return here.) You can get help on these buttons
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
267 just like any others.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
268
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
269 Table of contents entries in "README" files act similarly. Click on "README"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
270 to view that file and then click on a table of contents entry to jump to the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
271 associated section in the "README" file.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
272
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
273 ** World-Wide-Web URL Buttons
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
274
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
275 If you use the w3 World-Wide-Web browser add-on to GNU Emacs, you can browse
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
276 URLs (universal resource locators) from within any buffer just as you would
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
277 any other implicit button, once you do some initial setup.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
278
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
279 First you must ensure that you load the Hyperbole library that supports URL
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
280 viewing. Either your "hsite.el" file should require hsys-w3 as part of
24
4103f0995bd7 Import from CVS: tag r19-15b95
cvs
parents: 0
diff changeset
281 `hibtypes:begin-load-hook' or you should move point after the following line
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
282 and hit {C-x C-e} to evaluate it.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
283
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
284 (progn (require 'w3) (require 'hsys-w3))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
285
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
286 Now try using the Action Key on:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
287
24
4103f0995bd7 Import from CVS: tag r19-15b95
cvs
parents: 0
diff changeset
288 "http://www.infodock.com"
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
289
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
290 ** Grep, Occurrence, Debugger and Compiler Error Buttons, and Cscope Analyzer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
291 Lines
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
292
24
4103f0995bd7 Import from CVS: tag r19-15b95
cvs
parents: 0
diff changeset
293 The output of `grep -n', the UNIX line pattern matcher, can be
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
294 activated as buttons that jump to each matched line within its source
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
295 file; use {M-x grep RET}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
296
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
297 Compiler error messages also serve as implicit buttons that jump to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
298 associated source lines; use {M-x compile RET}. GDB, DBX or XDB stack frames
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
299 along with GDB breakpoint listing lines also link to source lines.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
300
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
301 {M-x occur RET} (find matches in a single buffer) and {M-x moccur RET}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
302 (find matches across multiple buffers and files) also produce implicit
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
303 button output that displays associated source lines.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
304
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
305 If you have the Cscope C/C++ code analyzer from the AT&T Toolchest and have
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
306 loaded the cscope.el library add-on for GNU Emacs, then the output lines from
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
307 a cscope query serve as implicit buttons which jump to associated source
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
308 lines. Cscope goes beyond the basic Emacs tags facility to allow you to see
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
309 the callers of a function and the functions called by a specific routine.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
310
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
311 ** Annotated Bibliography Buttons
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
312
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
313 Here's a use of an annotated bibliography reference implicit button
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
314 which allows you to see a bibliography entry such as [Stallman 87] when
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
315 you activate the button between brackets.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
316
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
317 ** Completion Buttons
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
318
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
319 Often when Emacs or Hyperbole prompts for an argument in the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
320 minibuffer, a list of possible argument completions is available by
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
321 pressing {?}. A single Action Key press on any of these completions
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
322 inserts it into the minibuffer for your inspection. A second press on
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
323 the same completion causes it to be used as the argument value and any
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
324 succeeding argument prompt is then displayed. Test this technique
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
325 with a {C-x C-f} (find-file) and then a {?}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
326
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
327 ** Hyperbole Source Buttons
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
328
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
329 If you ask for help on the [Stallman 87] button, the first line of the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
330 help buffer will look like this:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
331
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
332 @loc> "DEMO"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
333
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
334 except it will contain the full pathname of the file. If the button
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
335 were embedded within a buffer without an attached file, the first line
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
336 of the help buffer might look like:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
337
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
338 @loc> #<buffer *scratch*>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
339
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
340 If you click on the buffer name, the buffer will be displayed just as a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
341 file buffer would. This type of implicit button is called a
24
4103f0995bd7 Import from CVS: tag r19-15b95
cvs
parents: 0
diff changeset
342 `hyp-source' button.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
343
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
344 You can also activate any explicit buttons shown in a help buffer.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
345
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
346 ** UNIX Man Apropos Buttons
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
347
24
4103f0995bd7 Import from CVS: tag r19-15b95
cvs
parents: 0
diff changeset
348 Below are some lines output by the UNIX `apropos' command (with a little
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
349 touchup for display purposes). A button activation anywhere within such
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
350 a line recognizes the line as an apropos entry and tries to display the
24
4103f0995bd7 Import from CVS: tag r19-15b95
cvs
parents: 0
diff changeset
351 man page for the entry. Try it. (If you happen to use the `superman'
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
352 package which fetches man pages in the background, you'll have to wait
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
353 for the next version of superman which removes incompatibilities with
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
354 the standard man page fetch command before you can use these
24
4103f0995bd7 Import from CVS: tag r19-15b95
cvs
parents: 0
diff changeset
355 `man-apropos' implicit buttons.)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
356
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
357 grep, egrep, fgrep (1V) - search a file for a string or regular expression
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
358 rm, rmdir (1) - remove (unlink) files or directories
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
359 touch (1V) - update the access and modification times of a file
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
360 cat (1V) - concatenate and display
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
361
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
362 ** Internet Request For Comments (RFC) Document Browsing
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
363
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
364 If you are on the Internet and you have the ange-ftp or efs remote file
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
365 handling package for GNU Emacs, you can retrieve and browse RFC documents
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
366 used in Internet standard-making. Simply use the Action Key on an RFC
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
367 document identifier, like RFC-822. Rfc822 and rfc 822 work as well. The
24
4103f0995bd7 Import from CVS: tag r19-15b95
cvs
parents: 0
diff changeset
368 `rfc' implicit button type provides this service. The `hpath:rfc' variable
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
369 specifies the location from which to retrieve RFCs.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
370
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
371 Once you have retrieved an RFC, an Action Key press most anywhere within a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
372 line typically will produce a table of contents summary of the RFC (via the
24
4103f0995bd7 Import from CVS: tag r19-15b95
cvs
parents: 0
diff changeset
373 `rfc-toc' implicit button type). An Action Key press on any of the table of
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
374 contents lines then displays that section, for easy random access browsing.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
375
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
376 ** Site-specific Online Library Document IDs
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
377
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
378 Hyperbole offers a powerful, yet easy to use facility for building online
24
4103f0995bd7 Import from CVS: tag r19-15b95
cvs
parents: 0
diff changeset
379 libraries through the use of the `doc-id' implicit button type. A document id
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
380 is used just like a reference citation in traditional publications but
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
381 it actually links to the document that it references and the card catalog
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
382 (index) entry for the document. One can easily pass around doc ids to point
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
383 people to appropriate documents. For example, a mail message in response to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
384 a question might say, "See [Emacs-001] for examples of what Emacs can do."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
385
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
386 Since the format and handling of document identifiers and their index entries
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
387 is site-specific, document id handling is not completely configured in a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
388 default Hyperbole configuration. If you wish to setup this facility for
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
389 site or personal use, see the DESCRIPTION section in "hib-doc-id.el" for
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
390 installation and use information.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
391
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
392
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
393 * Smart Mouse Keys
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
394
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
395 If you use Emacs with mouse support under the X window system, NeXTstep,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
396 OpenWindows, SunView, or Apollo's DM window system, Hyperbole automatically
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
397 configures your mouse keys for use as Smart Keys and provides additional
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
398 display-oriented operations as demonstrated here.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
399
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
400 See the Hyperbole menu item, Doc/SmartKy, for a summary of all Smart Key
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
401 operations. For extensive details on Smart Key operation, see the Hyperbole
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
402 manual section, "(hyperbole.info)Smart Key Reference".
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
403
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
404 When Hyperbole is installed, a key may be bound which allows you to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
405 switch between the Smart Key mouse bindings and your prior ones. `C-h w
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
406 hmouse-toggle-bindings RTN' should show you any key which performs this
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
407 command. If no key binding has been established or if you prefer one of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
408 your own, simply select a key and bind it within your "~/.emacs" file.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
409 For example, (global-set-key "\C-ct" 'hmouse-toggle-bindings).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
410
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
411
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
412 ** Context-sensitive Help
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
413
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
414 Since the Smart Keys perform different operations in different contexts, it
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
415 is important to have context-sensitive help available. The earlier section
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
416 on Help Buffers explained how to display such help from the keyboard. The
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
417 same help can be displayed using the mouse by depressing the Smart Key for
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
418 which you want help, performing any action necessary to register a context,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
419 such as a drag motion, and then pressing the other Smart Key.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
420
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
421 Here is an example. Depress the Action Key somewhere within this paragraph
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
422 and while holding it down, depress the Assist Key. Then release the keys in
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
423 any order and the help display will pop up. It explains that there was no
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
424 particular matching Smart Key context, so a default operation is performed
24
4103f0995bd7 Import from CVS: tag r19-15b95
cvs
parents: 0
diff changeset
425 (the value of the variable `action-key-default-function' determines the
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
426 operation performed).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
427
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
428 ** Scrolling to the Beginning and End of Buffers
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
429
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
430 A left to right horizontal drag of the Action Key of 5 or more characters
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
431 scrolls the current buffer to its end (what {M->} does by default). A right
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
432 to left drag of the Action Key does the opposite; it scrolls to the buffer's
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
433 beginning (what {M-<} does by default). Try out these operations and then
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
434 use the Smart Key end of line scrolling capability to return here.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
435
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
436 ** Creating and Deleting Windows
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
437
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
438 Horizontal and vertical drags of the Assist Key within a single window can be
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
439 used to create and delete Emacs windows.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
440
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
441 A horizontal drag of five or more characters from left to right creates a new
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
442 window by splitting the current window into two windows, one on top of the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
443 other. A horizontal drag from right to left deletes the current window. A
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
444 vertical drag in either direction splits the current window into two
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
445 side-by-side windows.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
446
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
447 Let's try these. Remember to use your Assist Key. You need only move your
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
448 mouse pointer a few characters to register a drag. First, split this window
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
449 with a left to right drag, then delete either one of the windows with a right
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
450 to left drag.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
451
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
452 Now try a side-by-side window split. Drag vertically in the up or down
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
453 direction three or more lines to split the window and then use a right to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
454 left drag to delete either one of the side-by-side windows.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
455
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
456 ** Resizing Windows
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
457
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
458 You can easily resize Emacs windows by dragging their window separators
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
459 (modelines or vertical side lines) within a frame. Simply depress either
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
460 Smart Key on a modeline or near a window side, hold it down while you drag to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
461 a new location and then release. The window separator will then jump to the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
462 location of release. Basically, just drag the window separator to where you
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
463 want it. If you want a single window to fill an entire frame, drag its
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
464 modeline, and if necessary its side, to the edge of the frame.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
465
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
466 Did you follow all that? Let's try it to be sure. First, you need at least
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
467 two windows, so create a new one with the drag techniques you just learned.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
468 Now drag with either Smart Key from the shared window edge to a new location.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
469 See how both windows change size?
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
470
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
471 Try to drag the bottom modeline. You see that you can't.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
472
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
473 ** Swapping Buffers
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
474
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
475 Swapping buffer locations is quick and easy with Hyperbole. Simply drag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
476 from one window to another with the Assist Key.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
477
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
478 Split the current window into two, one above the other. Drag the upper
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
479 modeline so that one window is clearly bigger than the other. Now try
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
480 dragging from inside one window to another with the Assist Key.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
481
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
482 ** Modeline Clicks
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
483
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
484 Window modelines are treated specially be Hyperbole. They are broken up into
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
485 three regions, each with their own Smart Key operations. The regions are:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
486 the left edge, the right edge, and the middle portion (the non-edge part of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
487 the modeline). The edge regions are the left or rightmost three characters
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
488 of the modeline, by default.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
489
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
490 *** Switching to Another Buffer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
491
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
492 An Action Key click in the left edge of a modeline buries the current buffer,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
493 i.e. puts it on the bottom of the buffer list and removes it from view, if it
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
494 is not the only available buffer. An Assist Key click in the left edge of a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
495 modeline unburies the bottom buffer. Repeated clicks of either key allow you
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
496 to cycle through buffers to get to the one you want. Try this out.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
497
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
498 *** Displaying Documentation
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
499
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
500 An Action Key click in the right edge of a modeline displays the Info manual
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
501 browsing system, see "(info)". Once in Info, you can click with your Action
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
502 Key to follow menu items, cross references, or to jump to Info nodes
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
503 referenced within the top header line of a node. Try browsing a bit and
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
504 while in Info display context-sensitive help for both the Action and Assist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
505 Keys to see all that they can do.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
506
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
507 If you click again with the Action Key on the right edge of the window
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
508 displaying Info, it will hide the Info buffer. Thus, it works as a toggle to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
509 display or to hide the Info buffer. Try it.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
510
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
511 A click of the Assist Key at the right edge of a modeline toggles between
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
512 display and removal of a Smart Key operation summary. To remove the summary,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
513 you must click on the modeline of the window displaying the summary.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
514
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
515
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
516 *** Buffer Menu Display
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
517
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
518 An Action Key click in the center portion of a modeline displays a buffer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
519 menu, a summary of available buffers. An Action Key click on any buffer menu
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
520 line then displays that buffer.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
521
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
522 This behavior is subject to change in the future if a more useful Action Key
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
523 operation is found for the middle of modelines.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
524
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
525
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
526 ** Saving and Restoring Window Configurations
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
527
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
528 A window configuration consists of the set of windows within a single Emacs
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
529 frame. This includes their locations, buffers, and scrolled positions of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
530 their buffers.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
531
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
532 Hyperbole allows you to save and restore window configurations with simple
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
533 diagonal mouse drags within a single window. A diagonal drag in any
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
534 direction of the Action Key saves the current window configuration to a ring
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
535 of window configurations, just like the Emacs text kill ring. (See
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
536 "(Emacs)Kill Ring".) Each diagonal drag in any direction of the Assist Key
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
537 restores a prior saved window configuration from the ring. Window
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
538 configurations are restored in reverse order of the way they were saved.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
539 Since a ring is circular, after the oldest element is restored, the newest
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
540 element will again be restored and so on.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
541
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
542 If these operations are unclear to you, just forget about them and move on.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
543 They are not necessary to enjoy the rest of Hyperbole. Otherwise, give them
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
544 a try by creating various window configurations and then saving and restoring
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
545 them.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
546
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
547 * Outliner
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
548
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
549 The Hyperbole outliner only works under GNU Emacs version 19 or higher and
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
550 XEmacs version 19.9 or higher. You can tell whether you are running a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
551 version of Emacs which supports the outliner by hitting
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
552 @{@kbd{C-h h}@} to display the Hyperbole menu. If you see an
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
553 @code{Otl/} entry in the menu, then the outliner is available.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
554 Otherwise, the outliner does not work with your version of Emacs, so
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
555 this section of the DEMO will not be of interest to you.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
556
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
557 The Hyperbole outliner produces structured, autonumbered documents
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
558 composed of hierarchies of cells. Each cell has two identifiers, a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
559 relative autonumber indicating its present position within the outline
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
560 and a permanent identifier suitable for use within hyperlink references
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
561 to the cell.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
562
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
563 If the outliner works in your Emacs, see "kotl/EXAMPLE.kotl", an outline file
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
564 that explains how to operate the outliner. Use the @code{Otl/Example} menu
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
565 entry to display this file. Additional documentation can be found in
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
566 "(hyperbole.info)Outliner". "(hyperbole.info)Outliner Keys"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
567 summarizes in alphabetical order the outliner commands which are bound
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
568 to keys.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
569
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
570
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
571 * References
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
572
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
573 [Stallman 87] Stallman, Richard. GNU Emacs Manual. Free Software
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
574 Foundation, Cambridge: MA, March 1987.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
575
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
576 * THE END