langhelp 0.9.8
Sign up to get free protection for your applications and to get access to all the features.
- data/Changes +2530 -0
- data/bin/mklanghelp +50 -0
- data/data/langhelp/config.sample +889 -0
- data/files +39 -0
- data/graphviz-dot.jpg +0 -0
- data/langhelp.en.html +409 -0
- data/langhelp.en.rd +390 -0
- data/langhelp.ja.html +524 -0
- data/langhelp.ja.rd +487 -0
- data/lib/el4r/emacsruby/autoload/50langhelp.rb +2 -0
- data/lib/el4r/emacsruby/langhelp.rb +864 -0
- data/lib/el4r/emacsruby/test-langhelp.rb +300 -0
- data/lib/langhelp/langhelp-base.rb +649 -0
- data/lib/langhelp/langhelp-sub.rb +1023 -0
- data/lib/langhelp/lh_lua.rb +25 -0
- data/lib/langhelp/lh_perl.rb +112 -0
- data/lib/langhelp/lh_php.rb +34 -0
- data/lib/langhelp/lh_python.rb +31 -0
- data/lib/langhelp/lh_ruby.rb +400 -0
- data/lib/langhelp/mklanghelp.rb +140 -0
- data/lib/langhelp/parse-info.rb +145 -0
- data/ri.jpg +0 -0
- data/setup.rb +1551 -0
- data/test/a_classes.lst +2 -0
- data/test/a_methods.lst +2 -0
- data/test/b_classes.lst +2 -0
- data/test/b_methods.lst +2 -0
- data/test/c_methods.lst +4 -0
- data/test/common.rb +15 -0
- data/test/d_methods.lst +4 -0
- data/test/langhelp.e +566 -0
- data/test/ruby.e +3 -0
- data/test/tagify01-before.html +11 -0
- data/test/tagify02-before.html +11 -0
- data/test/test-base.rb +538 -0
- data/test/test-command.rb +92 -0
- data/test/test-parse-info.rb +175 -0
- data/test/test-ruby.rb +242 -0
- data/test/testdoc.rd +6 -0
- metadata +84 -0
data/files
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
Changes
|
2
|
+
bin/mklanghelp
|
3
|
+
data/langhelp/config.sample
|
4
|
+
files
|
5
|
+
graphviz-dot.jpg
|
6
|
+
langhelp.en.html
|
7
|
+
langhelp.en.rd
|
8
|
+
langhelp.ja.html
|
9
|
+
langhelp.ja.rd
|
10
|
+
lib/el4r/emacsruby/autoload/50langhelp.rb
|
11
|
+
lib/el4r/emacsruby/langhelp.rb
|
12
|
+
lib/el4r/emacsruby/test-langhelp.rb
|
13
|
+
lib/langhelp/langhelp-base.rb
|
14
|
+
lib/langhelp/langhelp-sub.rb
|
15
|
+
lib/langhelp/lh_lua.rb
|
16
|
+
lib/langhelp/lh_perl.rb
|
17
|
+
lib/langhelp/lh_php.rb
|
18
|
+
lib/langhelp/lh_python.rb
|
19
|
+
lib/langhelp/lh_ruby.rb
|
20
|
+
lib/langhelp/mklanghelp.rb
|
21
|
+
lib/langhelp/parse-info.rb
|
22
|
+
ri.jpg
|
23
|
+
setup.rb
|
24
|
+
test/a_classes.lst
|
25
|
+
test/a_methods.lst
|
26
|
+
test/b_classes.lst
|
27
|
+
test/b_methods.lst
|
28
|
+
test/c_methods.lst
|
29
|
+
test/common.rb
|
30
|
+
test/d_methods.lst
|
31
|
+
test/langhelp.e
|
32
|
+
test/ruby.e
|
33
|
+
test/tagify01-before.html
|
34
|
+
test/tagify02-before.html
|
35
|
+
test/test-base.rb
|
36
|
+
test/test-command.rb
|
37
|
+
test/test-parse-info.rb
|
38
|
+
test/test-ruby.rb
|
39
|
+
test/testdoc.rd
|
data/graphviz-dot.jpg
ADDED
Binary file
|
data/langhelp.en.html
ADDED
@@ -0,0 +1,409 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-2022-jp" ?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja">
|
6
|
+
<head>
|
7
|
+
<title>langhelp: Integrated help system in EmacsRuby</title>
|
8
|
+
<meta http-equiv="Content-type" content="text/html; charset=iso-2022-jp" />
|
9
|
+
<!-- head-element:nil -->
|
10
|
+
</head>
|
11
|
+
<body>
|
12
|
+
<h2>Index</h2>
|
13
|
+
|
14
|
+
<ul>
|
15
|
+
<li><p><a href="#label:1">What's new</a></p>
|
16
|
+
<ul>
|
17
|
+
<li><a href="#label:2">[2006/09/21] 0.9.8 released</a></li>
|
18
|
+
<li><a href="#label:3">[2006/08/03] 0.9.7 released</a></li>
|
19
|
+
<li><a href="#label:4">[2006/02/09] 0.9.6 released</a></li>
|
20
|
+
<li><a href="#label:5">[2006/02/01] 0.9.5 released</a></li>
|
21
|
+
<li><a href="#label:6">[2005/12/23] 0.9.4 released</a></li>
|
22
|
+
<li><a href="#label:7">[2005/12/11] 0.9.3 released</a></li>
|
23
|
+
<li><a href="#label:8">[2005/12/10] 0.9.2 released</a></li>
|
24
|
+
<li><a href="#label:9">[2005/12/03] 0.9.1 released</a></li>
|
25
|
+
<li><a href="#label:10">[2005/12/02] 0.9.0 released</a></li>
|
26
|
+
</ul></li>
|
27
|
+
<li><a href="#label:11">Abstract</a></li>
|
28
|
+
<li><a href="#label:12">Screenshots</a></li>
|
29
|
+
<li><p><a href="#label:13">Environment</a></p>
|
30
|
+
<ul>
|
31
|
+
<li><a href="#label:14">Langhelp support tools</a></li>
|
32
|
+
</ul></li>
|
33
|
+
<li><a href="#label:24">Install</a></li>
|
34
|
+
<li><p><a href="#label:25">Configuration file</a></p>
|
35
|
+
<ul>
|
36
|
+
<li><a href="#label:26">Quick start</a></li>
|
37
|
+
<li><a href="#label:27">Language-specific configuration</a></li>
|
38
|
+
<li><a href="#label:28">Checking document definitions</a></li>
|
39
|
+
<li><a href="#label:29">Troubleshooting</a></li>
|
40
|
+
</ul></li>
|
41
|
+
<li><p><a href="#label:30">How to Use</a></p>
|
42
|
+
<ul>
|
43
|
+
<li><a href="#label:31">Making Indexes</a></li>
|
44
|
+
<li><p><a href="#label:32">In Emacs</a></p>
|
45
|
+
<ul>
|
46
|
+
<li><a href="#label:33">With `C-u'</a></li>
|
47
|
+
<li><a href="#label:34">With `C-u C-u'</a></li>
|
48
|
+
</ul></li>
|
49
|
+
</ul></li>
|
50
|
+
<li><p><a href="#label:35">Customizing</a></p>
|
51
|
+
<ul>
|
52
|
+
<li><a href="#label:36">`~/.langhelp/mklanghelp-init.rb'</a></li>
|
53
|
+
<li><a href="#label:37">`~/.el4r/init.rb'</a></li>
|
54
|
+
<li><a href="#label:38">If you do not like frames</a></li>
|
55
|
+
</ul></li>
|
56
|
+
<li><a href="#label:39">Porting to Other Editors</a></li>
|
57
|
+
<li><a href="#label:40">Feedbacks</a></li>
|
58
|
+
<li><a href="#label:41">License</a></li>
|
59
|
+
</ul>
|
60
|
+
<hr />
|
61
|
+
|
62
|
+
<h1><a name="Title:" href="#Title:">Title:</a> <a name="label:0">langhelp: Integrated help system in EmacsRuby</a></h1><!-- RDLabel: "langhelp: Integrated help system in EmacsRuby" -->
|
63
|
+
|
64
|
+
<h2><a name="1" href="#1">1</a> <a name="label:1">What's new</a></h2><!-- RDLabel: "What's new" -->
|
65
|
+
|
66
|
+
<h3><a name="1.1" href="#1.1">1.1</a> <a name="label:2">[2006/09/21] 0.9.8 released</a></h3><!-- RDLabel: "[2006/09/21] 0.9.8 released" -->
|
67
|
+
|
68
|
+
<ul>
|
69
|
+
<li>The code was refactored, so langhelp needs el4r 1.0.4 or newer.</li>
|
70
|
+
<li>Better Ri for (X)Emacs handling.</li>
|
71
|
+
<li>New function: lh-man*</li>
|
72
|
+
<li>New command: langhelp-test-definition-this-line</li>
|
73
|
+
</ul>
|
74
|
+
<h3><a name="1.2" href="#1.2">1.2</a> <a name="label:3">[2006/08/03] 0.9.7 released</a></h3><!-- RDLabel: "[2006/08/03] 0.9.7 released" -->
|
75
|
+
|
76
|
+
<ul>
|
77
|
+
<li>`langhelp-at-point' enables you to search for current word.</li>
|
78
|
+
<li>Langhelp uses its own frame by default.</li>
|
79
|
+
<li>Added a script to fetch <a href="http://srfi.schemers.org/">SRFI</a> documents.</li>
|
80
|
+
<li>Adjusted to Emacs 22.</li>
|
81
|
+
</ul>
|
82
|
+
<h3><a name="1.3" href="#1.3">1.3</a> <a name="label:4">[2006/02/09] 0.9.6 released</a></h3><!-- RDLabel: "[2006/02/09] 0.9.6 released" -->
|
83
|
+
|
84
|
+
<ul>
|
85
|
+
<li>Fixed display problem of `lh-ri' function with ri-emacs.</li>
|
86
|
+
<li><p>Many ways to follow link.</p>
|
87
|
+
<ul>
|
88
|
+
<li>Follow link in this line and put point on screen top. (normal:l, RET)</li>
|
89
|
+
<li>Follow link in this line and center point in window. (;, L, C)</li>
|
90
|
+
<li>Follow link in this line and select the help window to edit. (o)</li>
|
91
|
+
<li>Follow link in this line and kill the help window buffer. (K, D)</li>
|
92
|
+
</ul></li>
|
93
|
+
</ul>
|
94
|
+
<h3><a name="1.4" href="#1.4">1.4</a> <a name="label:5">[2006/02/01] 0.9.5 released</a></h3><!-- RDLabel: "[2006/02/01] 0.9.5 released" -->
|
95
|
+
|
96
|
+
<ul>
|
97
|
+
<li>Colorized title</li>
|
98
|
+
<li>New function: lh-file, lh-center</li>
|
99
|
+
<li>Narrowing to section</li>
|
100
|
+
<li>*langhelp index* was sorted</li>
|
101
|
+
<li>Many bug fix</li>
|
102
|
+
</ul>
|
103
|
+
<h3><a name="1.5" href="#1.5">1.5</a> <a name="label:6">[2005/12/23] 0.9.4 released</a></h3><!-- RDLabel: "[2005/12/23] 0.9.4 released" -->
|
104
|
+
|
105
|
+
<ul>
|
106
|
+
<li>New function: lh-to</li>
|
107
|
+
<li>Reimplemented function: lh-goto-link</li>
|
108
|
+
<li>Speeduped function: lh-w3m</li>
|
109
|
+
<li>config: cvsbook, cvsbook-ja, WWWC documents</li>
|
110
|
+
<li><p>class HTML</p>
|
111
|
+
<ul>
|
112
|
+
<li>new attributes: :recursive, :basedir</li>
|
113
|
+
</ul></li>
|
114
|
+
<li>Indented by tab.</li>
|
115
|
+
</ul>
|
116
|
+
<h3><a name="1.6" href="#1.6">1.6</a> <a name="label:7">[2005/12/11] 0.9.3 released</a></h3><!-- RDLabel: "[2005/12/11] 0.9.3 released" -->
|
117
|
+
|
118
|
+
<ul>
|
119
|
+
<li><p>class HTML</p>
|
120
|
+
<ul>
|
121
|
+
<li>Now you can specify multiple HTMLs.</li>
|
122
|
+
<li>Extract the HTML title.</li>
|
123
|
+
<li>Disable charset conversion with `:noconv' attribute.</li>
|
124
|
+
<li>Support subversion book using these features.</li>
|
125
|
+
</ul></li>
|
126
|
+
</ul>
|
127
|
+
<h3><a name="1.7" href="#1.7">1.7</a> <a name="label:8">[2005/12/10] 0.9.2 released</a></h3><!-- RDLabel: "[2005/12/10] 0.9.2 released" -->
|
128
|
+
|
129
|
+
<ul>
|
130
|
+
<li>langhelp full index (<kbd>d</kbd> in langhelp buffer or <kbd>C-u C-c s</kbd>).</li>
|
131
|
+
<li>New class: HTML; create HTML index.</li>
|
132
|
+
<li>More config settings. Not only programming languages but also shell commands.</li>
|
133
|
+
</ul>
|
134
|
+
<h3><a name="1.8" href="#1.8">1.8</a> <a name="label:9">[2005/12/03] 0.9.1 released</a></h3><!-- RDLabel: "[2005/12/03] 0.9.1 released" -->
|
135
|
+
|
136
|
+
<ul>
|
137
|
+
<li>Adjust to Ruby1.9.</li>
|
138
|
+
<li>Langhelp default key binding (<kbd>C-c s</kbd>).</li>
|
139
|
+
</ul>
|
140
|
+
<h3><a name="1.9" href="#1.9">1.9</a> <a name="label:10">[2005/12/02] 0.9.0 released</a></h3><!-- RDLabel: "[2005/12/02] 0.9.0 released" -->
|
141
|
+
|
142
|
+
<p>Initial release</p>
|
143
|
+
<h2><a name="2" href="#2">2</a> <a name="label:11">Abstract</a></h2><!-- RDLabel: "Abstract" -->
|
144
|
+
|
145
|
+
<p>Langhelp creates an index of documents of various programming languages and shell commands.
|
146
|
+
Langhelp enables you to search documents instantly in Emacs.
|
147
|
+
If you are a programmer, then you may sometimes wonder, what is the usage of this function?
|
148
|
+
If you use Unices, then you may wonder, what is the usage of this command?
|
149
|
+
Langhelp answers the question INSTANTLY.</p>
|
150
|
+
<p>Currently langhelp supports languages and commands below.</p>
|
151
|
+
<pre>planner, xnee, html, svn, bison,
|
152
|
+
cvs, libtool, latex, ratpoisonrc, java,
|
153
|
+
id-utils, gengetopt, wget, lua, php,
|
154
|
+
texinfo, c++, c, standards, grep,
|
155
|
+
rb, gdb, diff, octave, scheme,
|
156
|
+
python, global, flex, tcl, m4,
|
157
|
+
sed, screenrc, xmms-shell, gzip, perl,
|
158
|
+
emacs-lisp, ruby, autoconf, sgrep, hurd,
|
159
|
+
el4r, binutils, awk, graphviz-dot, makefile,
|
160
|
+
sh, </pre>
|
161
|
+
<p>Langhelp may be the first tool written in EmacsRuby in the world.
|
162
|
+
In other words, langhelp is an practical example of EmacsRuby script.</p>
|
163
|
+
<h2><a name="3" href="#3">3</a> <a name="label:12">Screenshots</a></h2><!-- RDLabel: "Screenshots" -->
|
164
|
+
|
165
|
+
<ul>
|
166
|
+
<li><a href="ri.jpg">Calling `ri' from langhelp. (Ruby)</a></li>
|
167
|
+
<li><a href="graphviz-dot.jpg">Seeing HTML document of Graphviz DOT language.</a></li>
|
168
|
+
</ul>
|
169
|
+
<h2><a name="4" href="#4">4</a> <a name="label:13">Environment</a></h2><!-- RDLabel: "Environment" -->
|
170
|
+
|
171
|
+
<p>Langhelp depends on some tools.</p>
|
172
|
+
<ul>
|
173
|
+
<li><a href="http://www.ruby-lang.org/">Ruby 1.8.2 or upper</a></li>
|
174
|
+
<li>emacs21 / xemacs21 / emacs22</li>
|
175
|
+
<li><a href="http://www.rubyist.net/~rubikitch/computer/el4r/">el4r 1.0.4 or upper</a></li>
|
176
|
+
</ul>
|
177
|
+
<p>I use Debian GNU/Linux and Emacs21<a name="footmark:1" id="footmark:1" href="#foottext:1"><sup><small>*1</small></sup></a>.
|
178
|
+
Langhelp probably works on other GNU/Linux or Unices.
|
179
|
+
Langhelp also works on Windows(Meadow + Cygwin).</p>
|
180
|
+
<p>Langhelp does not compete against other document-lookup tools, but langhelp INTEGRATES document-lookup tools.
|
181
|
+
The more you have tools, the more usefule langhelp is.</p>
|
182
|
+
<h3><a name="4.1" href="#4.1">4.1</a> <a name="label:14">Langhelp support tools</a></h3><!-- RDLabel: "Langhelp support tools" -->
|
183
|
+
|
184
|
+
<p>The following tools are not mandatory but strengthens langhelp.</p>
|
185
|
+
<dl>
|
186
|
+
<dt><a name="label:15" id="label:15"></a>various Info documents</dt><!-- RDLabel: "various Info documents" -->
|
187
|
+
<dd>
|
188
|
+
<p>Langhelp treats Info documents VERY EASY.</p>
|
189
|
+
</dd>
|
190
|
+
<dt><a name="label:16" id="label:16"></a><a href="http://w3m.sourceforge.net/">w3m</a>, <a href="http://emacs-w3m.namazu.org/">emacs_w3m</a></dt><!-- RDLabel: ", " -->
|
191
|
+
<dd>
|
192
|
+
<p>W3m processes HTML documents.
|
193
|
+
Emacs-w3m is a WWW browser in Emacs, uses w3m internally.</p>
|
194
|
+
</dd>
|
195
|
+
<dt><a name="label:17" id="label:17"></a>Ri</dt><!-- RDLabel: "Ri" -->
|
196
|
+
<dd>
|
197
|
+
<p>Ri looks up Ruby methods. It is bundled in Ruby distribution.</p>
|
198
|
+
</dd>
|
199
|
+
<dt><a name="label:18" id="label:18"></a><a href="http://rubyforge.org/projects/ri-emacs/">Ri for (X)Emacs</a></dt><!-- RDLabel: "" -->
|
200
|
+
<dd>
|
201
|
+
<p>This tool speeds up `ri' calls.</p>
|
202
|
+
</dd>
|
203
|
+
<dt><a name="label:19" id="label:19"></a><a href="http://lua-users.org/files/wiki_insecure/users/NormanRamsey/luahelp">luahelp</a></dt><!-- RDLabel: "" -->
|
204
|
+
<dd>
|
205
|
+
<p>Luahelp searches <a href="http://www.lua.org/">Lua</a> documents.</p>
|
206
|
+
</dd>
|
207
|
+
<dt><a name="label:20" id="label:20"></a><a href="http://www.damtp.cam.ac.uk/user/sje30/emacs/ell.html">Emacs Lisp List</a></dt><!-- RDLabel: "" -->
|
208
|
+
<dd>
|
209
|
+
<p>There are MANY EmacsLisp programs.</p>
|
210
|
+
</dd>
|
211
|
+
<dt><a name="label:21" id="label:21"></a><a href="http://www.rubyist.net/~rubikitch/computer/screenrc-mode/">screenrc.el</a></dt><!-- RDLabel: "" -->
|
212
|
+
<dd>
|
213
|
+
<p>Major mode for editing screenrc.</p>
|
214
|
+
</dd>
|
215
|
+
<dt><a name="label:22" id="label:22"></a>ratpoison.el</dt><!-- RDLabel: "ratpoison.el" -->
|
216
|
+
<dd>
|
217
|
+
<p>Major mode for editing ratpoisonrc. It is bundled in ratpoison distribution.</p>
|
218
|
+
</dd>
|
219
|
+
<dt><a name="label:23" id="label:23"></a><a href="http://cvs.savannah.gnu.org/viewcvs/*checkout*/bm/bm/bm.el?rev=HEAD&content-type=text/plain">bm.el</a></dt><!-- RDLabel: "" -->
|
220
|
+
<dd>
|
221
|
+
<p>Visible bookmarks in buffer.</p>
|
222
|
+
</dd>
|
223
|
+
</dl>
|
224
|
+
<h2><a name="5" href="#5">5</a> <a name="label:24">Install</a></h2><!-- RDLabel: "Install" -->
|
225
|
+
|
226
|
+
<p>First install el4r to run EmacsRuby scripts.</p>
|
227
|
+
<pre>ruby -ropen-uri -e 'URI("http://www.rubyist.net/~rubikitch/archive/el4r-1.0.4.tar.gz").read.display' > el4r-1.0.4.tar.gz
|
228
|
+
tar xzf el4r-1.0.4.tar.gz
|
229
|
+
cd el4r-1.0.4
|
230
|
+
ruby setup.rb
|
231
|
+
|
232
|
+
ruby -S el4r-rctool -p
|
233
|
+
ruby -S el4r-rctool -i</pre>
|
234
|
+
<p>Then install langhelp.
|
235
|
+
Please execute the following commands.</p>
|
236
|
+
<pre>ruby -ropen-uri -e 'URI("http://www.rubyist.net/~rubikitch/archive/langhelp-0.9.8.tar.gz").read.display' > langhelp-0.9.8.tar.gz
|
237
|
+
tar xzvf langhelp-0.9.8.tar.gz</pre>
|
238
|
+
<p>When you failed, please download it from the next link.</p>
|
239
|
+
<ul>
|
240
|
+
<li><a href="http://www.rubyist.net/~rubikitch/archive/langhelp-0.9.8.tar.gz">langhelp-0.9.8.tar.gz</a></li>
|
241
|
+
</ul>
|
242
|
+
<p>Then, install it.</p>
|
243
|
+
<pre>cd langhelp-0.9.8
|
244
|
+
ruby setup.rb</pre>
|
245
|
+
<p>Victor Borja created <a href="http://darcs.thehatcher.com/vic/erebor-ebuilds/app-emacs/">Gentoo ebuild</a>. Thanks.</p>
|
246
|
+
<p>Boris Daix created <a href="http://alysse.dyndns.org/~bdaix/debian/">Debian package</a>. Thanks.
|
247
|
+
Put the following to your /etc/apt/sources.list:</p>
|
248
|
+
<pre>deb http://alysse.dyndns.org/~bdaix/debian/packages unstable/
|
249
|
+
deb-src http://alysse.dyndns.org/~bdaix/debian/packages unstable/</pre>
|
250
|
+
<h2><a name="6" href="#6">6</a> <a name="label:25">Configuration file</a></h2><!-- RDLabel: "Configuration file" -->
|
251
|
+
|
252
|
+
<p>The user configuration file of langhelp is `~/.langhelp/config', which is pure Ruby script.</p>
|
253
|
+
<p>If you install langhelp for the first time, copy `data/langhelp/config.sample' to `~/.langhelp/config'.</p>
|
254
|
+
<pre>cp data/langhelp/config.sample ~/.langhelp/config</pre>
|
255
|
+
<p>Writing config from scratch is very very hard, so `config.sample' is also installed.
|
256
|
+
The following command indicates where `config.sample' is.</p>
|
257
|
+
<pre>ruby -rrbconfig -e 'puts "#{Config::CONFIG["datadir"]}/langhelp/config.sample"'</pre>
|
258
|
+
<h3><a name="6.1" href="#6.1">6.1</a> <a name="label:26">Quick start</a></h3><!-- RDLabel: "Quick start" -->
|
259
|
+
|
260
|
+
<p>First execute `mklanghelp' command. Beware two hyphens.</p>
|
261
|
+
<pre>mklanghelp --all</pre>
|
262
|
+
<p>If you use Windows, you may use `ruby -S'.</p>
|
263
|
+
<pre>ruby -S mklanghelp --all</pre>
|
264
|
+
<p>Probably you would encounter with many error messages because the documents does not exist in the path specified in the config file.
|
265
|
+
Errors are ignored and langhelp does the best effort.</p>
|
266
|
+
<p>Errors are erased by</p>
|
267
|
+
<ul>
|
268
|
+
<li>installing missing documents later</li>
|
269
|
+
<li>fixing the paths</li>
|
270
|
+
<li>commenting out the line</li>
|
271
|
+
</ul>
|
272
|
+
<p>Modify your config file after reading comments in config file CAREFULLY.</p>
|
273
|
+
<h3><a name="6.2" href="#6.2">6.2</a> <a name="label:27">Language-specific configuration</a></h3><!-- RDLabel: "Language-specific configuration" -->
|
274
|
+
|
275
|
+
<p>Langhelp works in Emacs.
|
276
|
+
Many major modes for programming languages exist.
|
277
|
+
Normally the name of major mode ends with `-mode'.</p>
|
278
|
+
<p>Langhelp knows currently editing language by major mode.
|
279
|
+
Here the `language name' of langhelp is defined: <em>the string removed `-mode' from major mode name</em>.
|
280
|
+
For instance, ruby-mode is the major mode of Ruby, then the language name is `ruby'.
|
281
|
+
graphviz-dot-mode is the major mode of <a href="http://www.graphviz.org/">Graphviz DOT language</a>, then the language name is `graphviz-dot'.</p>
|
282
|
+
<p>If there is no major mode, use `define-generic-mode' or `define-derived-mode' to fabricate major mode.
|
283
|
+
It is needed that the major mode ONLY exists.</p>
|
284
|
+
<pre>Example:
|
285
|
+
(define-generic-mode 'foo-mode (list ?#) nil nil nil nil)
|
286
|
+
(define-derived-mode baz-mode fundamental-mode "baz")</pre>
|
287
|
+
<p>Language-specific configuration means to specify @lang variable properly.</p>
|
288
|
+
<p>The details are written in `data/langhelp/config.sample'.</p>
|
289
|
+
<h3><a name="6.3" href="#6.3">6.3</a> <a name="label:28">Checking document definitions</a></h3><!-- RDLabel: "Checking document definitions" -->
|
290
|
+
|
291
|
+
<p>Since version 0.9.8, langhelp provides document definition check function.
|
292
|
+
Point the line containing file name (document definition Hash) and issue</p>
|
293
|
+
<pre>M-x langhelp-test-definition-this-line</pre>
|
294
|
+
<p>You check the index the document definition outputs.</p>
|
295
|
+
<h3><a name="6.4" href="#6.4">6.4</a> <a name="label:29">Troubleshooting</a></h3><!-- RDLabel: "Troubleshooting" -->
|
296
|
+
|
297
|
+
<p>The following command does syntax check.</p>
|
298
|
+
<pre>ruby -c ~/.langhelp/config</pre>
|
299
|
+
<h2><a name="7" href="#7">7</a> <a name="label:30">How to Use</a></h2><!-- RDLabel: "How to Use" -->
|
300
|
+
|
301
|
+
<h3><a name="7.1" href="#7.1">7.1</a> <a name="label:31">Making Indexes</a></h3><!-- RDLabel: "Making Indexes" -->
|
302
|
+
|
303
|
+
<p>Langhelp has indexes by language.
|
304
|
+
`mklanghelp' command makes indexes based on config file.</p>
|
305
|
+
<p>Invoking langhelp without arguments shows the usage.</p>
|
306
|
+
<pre>Usage: mklanghelp [options] [languages]
|
307
|
+
Supported languages: planner, xnee, html, svn, bison, cvs, libtool, latex, ratpoisonrc, java, id-utils, gengetopt, wget, lua, php, texinfo, c++, c, standards, grep, rb, gdb, diff, octave, scheme, python, global, flex, tcl, m4, sed, screenrc, xmms-shell, gzip, perl, emacs-lisp, ruby, autoconf, sgrep, hurd, el4r, binutils, awk, graphviz-dot, makefile, sh
|
308
|
+
-a, --all Output index of all languages.
|
309
|
+
--home=DIR Output directory of index files.
|
310
|
+
--suffix=SUFFIX Suffix of index files [default: .e]
|
311
|
+
-c, --init-script FILE Initialize script name [default: /home/rubikitch/.langhelp/mklanghelp-init.rb]
|
312
|
+
-f Suppress read of init script.
|
313
|
+
--langs Output supported languages.
|
314
|
+
--stdout Output index into stdout.
|
315
|
+
-e, --eval=EXP Evaluate.
|
316
|
+
-d, --debug Output stack trace when error occurred.</pre>
|
317
|
+
<p>Invoking langhelp with arguments makes indexes of each languages.
|
318
|
+
With `--all' option, languages makes indexes of all languages.</p>
|
319
|
+
<pre>Example:
|
320
|
+
mklanghelp ruby emacs-lisp
|
321
|
+
mklanghelp --all</pre>
|
322
|
+
<h3><a name="7.2" href="#7.2">7.2</a> <a name="label:32">In Emacs</a></h3><!-- RDLabel: "In Emacs" -->
|
323
|
+
|
324
|
+
<p>If you want to access documents managed by langhelp, type</p>
|
325
|
+
<pre>C-c s</pre>
|
326
|
+
<p>If you are upgrading from 0.9.0, add the line below to config.</p>
|
327
|
+
<pre>@langhelp_key = '\C-cs'</pre>
|
328
|
+
<p>Then, the `*langhelp:langname*' buffer appears and starts incremental search.</p>
|
329
|
+
<p>When you call langhelp, many lines containing EmacsLisp sexps appear.
|
330
|
+
Sexp are colored by font-lock.
|
331
|
+
Langhelp accesses information sources by evaluating sexps, so called lisp-hyperlink.
|
332
|
+
This means that if you define the appropriate EmacsLisp function then langhelp can call EVERYTHING!</p>
|
333
|
+
<p>The cursor movement is performed by vi-like <kbd>k</kbd>/<kbd>j</kbd> as well as <kbd>p</kbd>/<kbd>n</kbd>.</p>
|
334
|
+
<p>To follow the link, type <kbd>l</kbd> or <kbd>RET</kbd>.
|
335
|
+
Some links specify LINE to jump(line number or line contents).
|
336
|
+
<kbd>l</kbd> or <kbd>RET</kbd> follow link in this line and put point on screen top.
|
337
|
+
<kbd>;</kbd>, <kbd>L</kbd> or <kbd>C</kbd> follow link in this line and center point in window.
|
338
|
+
<kbd>o</kbd> follows link in this line and selects the help window to edit.</p>
|
339
|
+
<p>Following many links increase buffers.
|
340
|
+
Typing <kbd>K</kbd> or <kbd>D</kbd> kills the help window buffer.</p>
|
341
|
+
<p>Typing <kbd>C-o</kbd> in incremental search does search refinement.</p>
|
342
|
+
<p>If <a href="http://cvs.savannah.gnu.org/viewcvs/*checkout*/bm/bm/bm.el?rev=HEAD&content-type=text/plain">bm.el</a> are installed, typing <kbd>m</kbd> makes bookmark.
|
343
|
+
<kbd>P</kbd> and <kbd>N</kbd> perform bookmark jump.</p>
|
344
|
+
<p><kbd>C-c C-n</kbd> toggles narrowing to this section.</p>
|
345
|
+
<p>Typing <kbd>C-c C-c</kbd> exits langhelp and restore window configuration before langhelp was called.</p>
|
346
|
+
<p>Some people may perfer using `window manager' of Emacs.
|
347
|
+
Install <a href="http://www.gentei.org/~yuuji/software/windows.el">windows.el</a>, <a href="http://www.splode.com/~friedman/software/emacs-lisp/src/escreen.el">escreen.el</a> or <a href="http://www.morishima.net/~naoto/software/elscreen/">elscreen.el</a> when you want to save window configuration.</p>
|
348
|
+
<p>Remember to restart el4r when you remake indexes or modify config file after starting langhelp.</p>
|
349
|
+
<pre>M-x el4r-boot</pre>
|
350
|
+
<h4><a name="7.2.1" href="#7.2.1">7.2.1</a> <a name="label:33">With `C-u'</a></h4><!-- RDLabel: "With `C-u'" -->
|
351
|
+
|
352
|
+
<p>Typing <kbd>C-u C-c s</kbd> shows langhelp full index, which is the list of languages managed by langhelp.
|
353
|
+
Typing <kbd>d</kbd> in langhelp buffer also shows langhelp full index.</p>
|
354
|
+
<h4><a name="7.2.2" href="#7.2.2">7.2.2</a> <a name="label:34">With `C-u C-u'</a></h4><!-- RDLabel: "With `C-u C-u'" -->
|
355
|
+
|
356
|
+
<p>Typing <kbd>C-u C-u C-c s</kbd> searches current word. (since v0.9.7)</p>
|
357
|
+
<p>Alternatively typing</p>
|
358
|
+
<pre>M-x langhelp-at-point</pre>
|
359
|
+
<p>does the same thing.</p>
|
360
|
+
<h2><a name="8" href="#8">8</a> <a name="label:35">Customizing</a></h2><!-- RDLabel: "Customizing" -->
|
361
|
+
|
362
|
+
<p>If you want to customize langhelp, read config file carefully.</p>
|
363
|
+
<p>As explaining in the config file there are some general purpose classes:`Grep', `W3MGrep'.
|
364
|
+
`Grep' extracts lines matching the regexp and makes index.
|
365
|
+
`W3MGrep' is almost the same as `Grep', the only difference is that the plain-text generated by w3m is to be processed.
|
366
|
+
Manuals in plain-text or HTML can be imported into langhelp easily by regexp.</p>
|
367
|
+
<h3><a name="8.1" href="#8.1">8.1</a> <a name="label:36">`~/.langhelp/mklanghelp-init.rb'</a></h3><!-- RDLabel: "`~/.langhelp/mklanghelp-init.rb'" -->
|
368
|
+
|
369
|
+
<p>`~/.langhelp/mklanghelp-init.rb' is a Ruby script called by `mklanghelp' before processing.</p>
|
370
|
+
<p>Index classes are subclass of AbstractIndex.
|
371
|
+
Write your own index classes in that file.</p>
|
372
|
+
<p>After defining new index classes you can use it by specifying config file.</p>
|
373
|
+
<pre>Example:
|
374
|
+
@lang["foo"] = [
|
375
|
+
{:FooIndex => true, :title=>"Foo", :cmd=>"fooindex"},
|
376
|
+
]</pre>
|
377
|
+
<p>Then execute `mklanghelp'.</p>
|
378
|
+
<h3><a name="8.2" href="#8.2">8.2</a> <a name="label:37">`~/.el4r/init.rb'</a></h3><!-- RDLabel: "`~/.el4r/init.rb'" -->
|
379
|
+
|
380
|
+
<p>`~/.el4r/init.rb' are loaded when starting el4r.</p>
|
381
|
+
<p>Langhelp can treat any EmacsLisp functions as lisp-hyperlink.
|
382
|
+
But the functions with the prefix `lh-' are colorized by font-lock.</p>
|
383
|
+
<h3><a name="8.3" href="#8.3">8.3</a> <a name="label:38">If you do not like frames</a></h3><!-- RDLabel: "If you do not like frames" -->
|
384
|
+
|
385
|
+
<p>Since v0.9.7, langhelp on Emacs on window systems uses its own frame.
|
386
|
+
If you do not like frames, add</p>
|
387
|
+
<pre>@NO_FRAME = true</pre>
|
388
|
+
<p>to `~/.langhelp/config'.</p>
|
389
|
+
<h2><a name="9" href="#9">9</a> <a name="label:39">Porting to Other Editors</a></h2><!-- RDLabel: "Porting to Other Editors" -->
|
390
|
+
|
391
|
+
<p>`bin/mklanghelp' and `lib/langhelp/*.rb' does not utterly depend on specific editors.
|
392
|
+
The task of These files is only to write indexes.
|
393
|
+
Writing `Local Variables' section is only related to Emacs.</p>
|
394
|
+
<p>If you write the program corresponding to `lib/el4r/emacsruby/langhelp.rb', i.e. implementing all the functions appearing in the index, langhelp will work on other Lisp-based editors.
|
395
|
+
Because sexps appearing in the index are not nested, reading the text between () will enable langhelp to work on non-Lisp-based editors.</p>
|
396
|
+
<p>If you port langhelp to other editors, I am willing to include your contribution.</p>
|
397
|
+
<h2><a name="10" href="#10">10</a> <a name="label:40">Feedbacks</a></h2><!-- RDLabel: "Feedbacks" -->
|
398
|
+
|
399
|
+
<p>If you are trouble with langhelp, please post to the mail form at the end of this page freely.
|
400
|
+
I am waiting for better configurations and new language supports.</p>
|
401
|
+
<h2><a name="11" href="#11">11</a> <a name="label:41">License</a></h2><!-- RDLabel: "License" -->
|
402
|
+
|
403
|
+
<p>GPL</p>
|
404
|
+
<hr />
|
405
|
+
<p>
|
406
|
+
<a name="foottext:1" id="foottext:1" href="#footmark:1"><sup><small>*1</small></sup></a><small>I currently use Emacs22.</small><br />
|
407
|
+
</p>
|
408
|
+
</body>
|
409
|
+
</html>
|