Initial Commit
[packages] / xemacs-packages / w3 / texi / w3-faq.txi
1 \input texinfo
2 @c -*-texinfo-*-
3 @c Copyright (C) 1997 Free Software Foundation, Inc.
4 @setfilename w3-faq.info
5 @dircategory FAQs
6 @dircategory GNU Emacs Lisp
7 @direntry
8 * Emacs/W3 FAQ: (w3-faq).          FAQ for Emacs/W3 World Wide Web browser.
9 @end direntry
10
11 @node Top, Installation FAQ, (dir), (dir)
12 @section Frequently Asked Questions
13
14 This is the Emacs/W3 Frequently Asked Questions list.
15
16 @menu
17 * Installation FAQ::      Installation of Emacs/W3.
18 * Runtime FAQ::           Running Emacs/W3.
19 * Arcana::                Obscure, but cool.
20 * Customization FAQ::     Customizing Emacs/W3.
21 @end menu
22
23 @node Installation FAQ, Runtime FAQ, Top, Top
24 @subsection Installation
25
26 @itemize @bullet
27 @item
28 Q1.1  What is the latest version of Emacs/W3?
29
30 The latest version is $State: v4.0pre.47 $.
31
32 @item
33 Q1.2  Where do I get Emacs/W3?
34
35 Any of the following locations:
36
37 @itemize @minus
38 @item
39 @url{http://www.cs.indiana.edu/elisp/w3/download.html}
40 @item
41 @url{ftp://ftp.cs.indiana.edu/pub/elisp/w3/}
42 @end itemize
43
44 @item
45 Q1.3  Which version of Emacs do I need?
46
47 At least GNU Emacs 19.34, or XEmacs 19.14 is recommended.  GNU Emacs
48 19.28 has been known to work, but highlighting will not work due to
49 differences in how faces are handled in newer Emacs versions.
50
51 @item
52 Q1.4  I get './configure: sh internal 2K buffer overflow' when configuring.
53
54 On some systems (notably HP-UX 9.x), the standard /bin/sh is not quite
55 up to snuff.  You should use bash to run configure if you possibly can,
56 ie: bash ./configure [standard-arguments]
57
58 If anyone has ideas about how I could fix my autoconf sources, please
59 contact @url{mailto:wmperry@@aventail.com}.
60
61 @item
62 Q1.5  How can I build Emacs/W3 under Windows 95 or Windows NT?
63
64 @item
65 Q1.6  How can I build Emacs/W3 under VMS?
66
67 @item
68 Q1.7  I still want to use Emacs 19, are there any special problems?
69
70 Since Emacs 19.x does not include a suitably `new' version of the custom
71 and widget libraries, you will need to install them yourself.  Please
72 see @url{http://www.dina.kvl.dk/~abraham/custom/} for more information
73 on installing.  After this, you will need to re-run your configure
74 script, including the --with-custom=/path/to/custom/library/directory.
75
76 @end itemize
77
78 @node Runtime FAQ, Arcana, Installation FAQ, Top
79 @subsection Runtime
80
81 @itemize @bullet
82 @item
83 Q2.1  The options menu is ugly under Emacs 19
84
85 In Emacs 19, Emacs/W3 uses the 'easymenu' package to define menus.
86 Unfortunately, this package does not show the current state of a boolean
87 menu entry, it just shows as 'Toggle xxxx'.
88
89 This feature-lack will be fixed in Emacs 19.35 or Emacs 20.1 when they
90 are released.
91
92 @item
93 Q2.2  Animated GIFs cause XEmacs 19.14 or 20.0 to crash.
94
95 There was a bug in the GIF decoding routines in XEmacs 19.14 and 20.0 -
96 please update to XEmacs 19.15 or 20.1 respectively.
97
98 @item
99 Q2.3  I get an error when starting up about custom-declare-group
100
101 This usually means you compiled Emacs/W3 in an emacs that could not find
102 the 'custom' package (or found an old version), but you are running it
103 in an emacs that finds the new one.  This is usually the case if you
104 have a recent version of GNUS installed in a non-standard place.
105
106 Make sure that you can load the custom library when compiling emacs.
107 Set the environment variable WIDGETDIR to where your custom library
108 lives (ie: ~/lisp/gnus/lisp), or rerun configure with the
109 '--with-custom=/full/path/to/custom/lisp/' command line argument and
110 then remake with a 'make clean all'.
111
112 @item
113 Q2.4  It is incredibly slow under OS/2
114
115 This appears to be a problem with how fonts are looked up.  Thanks to
116 chang@@wsu.edu for this analysis.
117
118 In OS/2, the font name default to forms like
119
120 @example
121 "-*-Courier-medium-r-normal--*-100-*-*-m-*-cp850" ......
122 or
123 "10.Courier"
124 @end example
125
126 In these two cases, font detection fails because this does not match
127 x-font-regexp.
128
129 To solve this, set the default font as
130 "-*-Courier-medium-r-normal--*-100-*-*-m-*-cp850-1"
131
132 @item
133 Q2.5  How do I make emacs scroll the window horizontally when moving?
134
135 In XEmacs, you should simply put something like this in your .emacs
136 file:
137
138 @example
139    (add-hook 'w3-mode-hook '(lambda () (auto-show-mode 1)))
140 @end example
141
142 Under Emacs 19, there are a variety of different packages that provide
143 this functionality.  The one I have seen used the most is 'hscroll.el',
144 from @url{http://reality.sgi.com/wmesard/ftp/emacs/hscroll.el} - to turn
145 it on, add this to your .emacs file:
146
147 @example
148    (autoload 'turn-on-hscroll "hscroll" nil t)
149    (add-hook 'w3-mode-hook 'turn-on-hscroll)
150 @end example
151
152 @item
153 Q2.6  I like being warned about invalid HTML on my own pages, but how
154       can I make Emacs/W3 stop telling me almost everything on the Web
155       is invalid?
156
157 Snide answer: Make everyone start writing valid HTML pages. :)
158
159 Real answer: You can use the file preparation hook, which is run before
160 any parsing is done.  Something like this should work.
161
162 @example
163 (defun my-w3-file-prepare-hook ()
164   (make-local-variable 'w3-debug-html)
165   (setq w3-debug-html
166       (if (or (string= (url-type url-current-object) "file")
167               (string-match ".*\\.some\\.domain\\.name"
168                             (or (url-host url-current-object) "")))
169           'style
170         nil)))
171 (add-hook 'w3-file-prepare-hook 'my-w3-file-prepare-hook)
172 @end example
173 This will turn on stylistic warnings for any local HTML files or files
174 loaded from the `*.some.domain.name' domain.
175
176 @item
177 Q2.7  I get an error restarting Emacs after using the preferences menu
178       in Emacs/W3:
179       @samp{Symbol's function definition is void: custom-set-variables}
180
181 Typically this happens if you are running GNU Emacs 19.  Because the
182 custom libraries are not bundled with Emacs, you need to make sure that
183 you load it from within your .emacs file.   Place the following line
184 before any of the calls to @code{custom-set-variables}:
185
186 @example
187 (require 'custom)
188 @end example
189
190 @item
191 Q2.8  When using Emacs 20.x, a \201 character appears in the buffer
192       before every character above ASCII 127?
193
194 You should install the LEIM package and put the following lines in your
195 .emacs file:
196
197 @example
198 (set-language-environment 'Latin-1)
199 (standard-display-european t 'iso-latin-1)
200 @end example
201
202 LEIM packages for Emacs 20.x are located at
203 @url{ftp://prep.ai.mit.edu/pub/gnu/}, filename is
204 @file{leim-XX.Y.tar.gz}, where XX.Y matches the Emacs version you are
205 currently running.
206
207 @item
208 Q2.9  All my FTP directory listings show up as HTML!  I HATE THAT!
209
210 This will happen if you are going through a web-based proxy server.  To
211 use the normal ftp support that Emacs provides, you will need to set up
212 the no-proxy section of your proxy services to not include @b{any} ftp
213 traffic  @xref{Proxy Gateways, , Proxy Gateways, w3, Emacs/W3 User's
214 Manual}.  You must then also configure Ange-FTP or EFS to know about
215 your specific proxy setup.
216
217 After all this pain and anguish, you will see your FTP directories in
218 dired as the gods intended.
219
220 @item
221 Q2.10 Why can't I choose an option in an HTML form using the minibuffer
222       instead of the #%!@@ing 'widget choose' buffer?
223
224 This is in the hands of the @b{widget} library.  Thankfully, there is a
225 way to change this behaviour.  Set the variable
226 @code{widget-menu-minibuffer-flag} to @code{t} in your @file{~/.emacs}
227 file, and you will get the expected behaviour.
228
229 @end itemize
230
231 @node Arcana, Customization FAQ, Runtime FAQ, Top
232 @subsection Arcana
233
234 @itemize @bullet
235 @item
236 Q3.2  How do i get Shift-Tab to go backwards on a text terminal or XTerm?
237
238 aka: I hate the new text widgets, I can't go through the links with n and b
239      I can go forward using TAB but how do i go backward on a terminal? 
240
241 Thanks to Greg Stark <gsstark@@mit.edu> for this incredibly thorough
242 answer.  I have verified that this works on my Linux laptop.
243
244 Not all terminals can distinguish between a shifted tab and an unshifted
245 tab at all. Tab is indicated on a text terminal by a control-i. There is
246 no such thing as capital control characters, so if the terminal is going
247 to indicate a shift-tab somehow it has to be completely differently. The
248 most appropriate thing to use is probably "backtab" which on old text
249 terminals was sometimes a separate key and Emacs is already set up to
250 recognize automatically if it exists.
251
252 Making "backtab" work involves several steps. First you have to make
253 sure your console generates some character sequence to indicate the key
254 you want to generate a "backtab". Then you have to configure termcap or
255 terminfo to recognize that key sequence. Then you may have to make your
256 programs do useful things when they get a "backtab", Emacs for example
257 will recognize it automatically but except for the Widget and W3
258 commands nothing is ever bound it it.
259
260 Step 1 On An XTerm: XTerm obeys standard X Toolkit translations which
261 you can use to specify what character sequence Shift-Tab generates. The
262 following X Resources will cause Shift-Tab and Meta-Shift-Tab to
263 generate reasonable character sequences. You can either put this in your
264 .Xresources or .Xdefaults file, or you can put it in
265 /usr/lib/X11/app-defaults/XTerm to make it a site-wide default. (On
266 Debian systems you should put it in /etc/X11/Xresources, not the
267 app-defaults files):
268
269 @example
270 XTerm*VT100.translations: #override \
271    ~Meta Shift<Key>Tab: string(\033[Z) \n\
272     Meta Shift<Key>Tab: string(\033\033[Z) \n
273 @end example
274
275 I recommend these sequences, they are based on what seems to be a more
276 or less standard sequence ^[[Z for backtab.
277
278 Step 1 On Rxvt: By default Rxvt sends ^[[Z for Shift-Tab.  However, if
279 Shift-Tab generates another keysym, like for example in XFree86 3.2
280 where it's bound to ISO_Left_Tab then Rxvt will just ignore it. You
281 would need to defeat this feature to make rxvt work again by doing
282 something like:
283
284 @example
285 xmodmap -e 'keysym Tab = Tab'
286 @end example
287
288 or adding that command to some global X configuration file (On Debian
289 systems adding ``Keysym Tab = Tab'' to /etc/X11/Xmodmap or ~/.Xmodmap is
290 sufficient)
291
292 Step 1 On A Linux Virtual Console: on a Linux virtual console you can
293 configure what character sequences are generated by which keys using the
294 loadkeys command. Many systems are set up to run loadkeys automatically on
295 startup with some keymap file. On Debian systems this is true, the keymap file
296 is specified in /etc/kbd/config and usually lives in the
297 /usr/lib/kbd/keytables directory. You want to put something like the following
298 in your keytable file:
299
300 @example
301 keycode  15 = Tab   F91
302         alt     keycode  15 = Meta_Tab        
303         shift   alt     keycode  15 = F92
304 @end example
305
306 where keycode 15 is Tab on my keyboard (and probably any keyboard). This
307 defines Tab and Alt-Tab normally, and also defines Shift-Tab to be F91
308 and Shift-Alt-Tab to be F92.
309
310 Then put something like this:
311
312 @example
313 # backtab and M-backtab
314 string F91 = "\033[Z"
315 string F92 = "\033\033[Z"
316 @end example
317
318 later in the file. This defines what character sequence F91 (Shift-Tab)
319 and F92 (Alt-Shift-Tab) should generate. I recommend these sequences,
320 they are based on what seems to be a more or less standard sequence ^[[Z
321 for backtab.
322
323 Step 2 On A Termcap System:
324
325 The termcap capability is kB, i'm not familiar with termcap tools, i think you
326 just need to add it to the /etc/termcap file for the terminal you're concerned
327 with as kB=\E[Z.
328
329 Step 2 On A Terminfo System:
330
331 The terminfo capability is kcbt (the long name is key_btab). You want to
332 run infocmp to generate an edittable copy of the terminal info. Add the
333 capability, then use tic to compile that information. Something like
334 this:
335
336 infocmp $TERM > info
337 emacs info & # add kcbt=\E[Z, to the file
338 tic info
339
340 If you do this as root it should add the new definition to the system
341 wide terminfo database. If you do it as a normal user it should create a
342 ~/.terminfo database with a local terminfo info definition for that
343 terminal.
344
345 Step 3 On Emacs:
346
347 The standard terminal initialization should recognize the backtab
348 capability automatically. To test it try C-h c Shift-Tab and see what it
349 calls the key.  To bind commands to it just use [backtab] in
350 local-set-key or global-set-key as in:
351
352 @example
353 (local-set-key [backtab] 'hippie-expand)
354 or
355 (global-set-key [backtab] 'hippie-expand)
356 @end example
357
358 In the interest of maintaining a single consistent set of key bindings
359 between X and tty emacsen you may want to make equivalent X keystroke
360 generate "backtab" as well, you can do this by doing this:
361
362 (define-key function-key-map [S-tab] [backtab])
363 or
364 (define-key function-key-map [iso-lefttab] [backtab])
365
366 To make S-tab or whatever keystroke you made generate backtab on a
367 terminal be recognized as backtab under X11 as well. You can check how
368 Emacs recognizes this keystroke currently by doing C-h c <keystroke>.
369
370 @end itemize
371
372 @node Customization FAQ,  , Arcana, Top
373 @subsection Customization
374 @itemize @bullet
375 @end itemize
376
377 @bye