30
|
1 Q: Options menu is ugly under Emacs 19
|
|
2 A: Wait for 19.35 - this is because of a 'feature lack' in easymenu.el
|
|
3
|
118
|
4 Q: Animated GIFs cause XEmacs 19.14 or 20.0 to crash
|
|
5 A: There was a bug in the GIF decoding routines in XEmacs 19.14 - please
|
|
6 upgrade to XEmacs 19.15 or later.
|
|
7
|
30
|
8 Q: I get an error when starting up:
|
118
|
9 Symbol's function definition is void: custom-declare-group
|
30
|
10 A: This usually means you compiled W3 in an emacs that could not find
|
|
11 the 'custom' package (or found an old version), but are running W3
|
|
12 in an emacs that find the new one. This is usually the case if you
|
|
13 have a recent version of GNUS installed in a non-standard place.
|
|
14
|
|
15 Make sure that you can load the custom library when compiling
|
|
16 emacs. Set the environment variable WIDGETDIR to where your custom
|
|
17 library lives (ie: ~/lisp/gnus/lisp)
|
118
|
18
|
134
|
19 Q: I like being warned about invalid HTML on my own pages, but how can
|
|
20 I make Emacs/W3 stop telling me almost everything on the Web is
|
|
21 invalid?
|
|
22 A: You can use the 'file preparation hook', which is run before any
|
|
23 parsing is done.
|
|
24
|
|
25 (defun my-w3-file-prepare-hook ()
|
|
26 (setq w3-debug-html
|
|
27 (if (or (string= (url-type url-current-object) "file")
|
|
28 (string-match ".*\\.some\\.domain\\.name"
|
|
29 (or (url-host url-current-object) "")))
|
|
30 'style
|
|
31 nil)))
|
|
32 (add-hook 'w3-file-prepare-hook 'my-w3-file-prepare-hook)
|
|
33
|
|
34 This will turn on stylistic warnings for any local HTML files or
|
|
35 files loaded from the `*.some.domain.name' domain.
|
|
36
|
138
|
37 Q: How do I make emacs scroll the window horizontally when tabbing
|
|
38 through links?
|
|
39 A: XEmacs:
|
|
40 (add-hook 'w3-mode-hook '(lambda () (auto-show-mode 1)))
|
|
41
|
|
42 Emacs (if you have hscroll.el from ftp:// ?????):
|
|
43 (autoload 'turn-on-hscroll "hscroll" nil t)
|
|
44 (add-hook 'w3-mode-hook 'turn-on-hscroll)
|
|
45
|
118
|
46 Courtesy of greg stark <gsstark@mit.edu>
|
|
47 Q: How do i get Shift-Tab to go backwards on a text terminal or XTerm?
|
|
48 aka: I hate the new text widgets, I can't go through the links with n and b
|
|
49 I can go forward using TAB but how do i go backward on a terminal?
|
|
50
|
|
51 A: Not all terminals can distinguish between a shifted tab and an unshifted
|
|
52 tab at all. Tab is indicated on a text terminal by a control-i. There is no
|
|
53 such thing as capital control characters, so if the terminal is going to
|
|
54 indicate a shift-tab somehow it has to be completely differently. The most
|
|
55 appropriate thing to use is probably "backtab" which on old text terminals was
|
|
56 sometimes a separate key and Emacs is already set up to recognize
|
|
57 automatically if it exists.
|
|
58
|
|
59 Making "backtab" work involves several steps. First you have to make sure your
|
|
60 console generates some character sequence to indicate the key you want to
|
|
61 generate a "backtab". Then you have to configure termcap or terminfo to
|
|
62 recognize that key sequence. Then you may have to make your programs do useful
|
|
63 things when they get a "backtab", Emacs for example will recognize it
|
|
64 automatically but except for the Widget and W3 commands nothing is ever bound
|
122
|
65 it it.
|
118
|
66
|
|
67 Step 1 On An XTerm: XTerm obeys standard X Toolkit translations which you can
|
|
68 use to specify what character sequence Shift-Tab generates. The following X
|
|
69 Resources will cause Shift-Tab and Meta-Shift-Tab to generate reasonable
|
|
70 character sequences. You can either put this in your .Xresources or .Xdefaults
|
|
71 file, or you can put it in /usr/lib/X11/app-defaults/XTerm to make it a
|
|
72 site-wide default. (On Debian systems you should put it in
|
|
73 /etc/X11/Xresources, not the app-defaults files):
|
|
74
|
|
75 XTerm*VT100.translations: #override \
|
|
76 ~Meta Shift<Key>Tab: string(\033[Z) \n\
|
|
77 Meta Shift<Key>Tab: string(\033\033[Z) \n
|
|
78
|
|
79 I recommend these sequences, they are based on what seems to be a more or less
|
|
80 standard sequence ^[[Z for backtab.
|
|
81
|
|
82 Step 1 On Rxvt: By default Rxvt sends ^[[Z for Shift-Tab.
|
|
83 However, if Shift-Tab generates another keysym, like for example in XFree86
|
|
84 3.2 where it's bound to ISO_Left_Tab then Rxvt will just ignore it. You would
|
|
85 need to defeat this feature to make rxvt work again by doing something like:
|
|
86
|
|
87 xmodmap -e 'keysym Tab = Tab'
|
|
88
|
|
89 or adding that command to some global X configuration file (On Debian systems
|
122
|
90 adding ``Keysym Tab = Tab'' to /etc/X11/Xmodmap or ~/.Xmodmap is sufficient)
|
118
|
91
|
|
92 Step 1 On A Linux Virtual Console: on a Linux virtual console you can
|
|
93 configure what character sequences are generated by which keys using the
|
|
94 loadkeys command. Many systems are set up to run loadkeys automatically on
|
|
95 startup with some keymap file. On Debian systems this is true, the keymap file
|
|
96 is specified in /etc/kbd/config and usually lives in the
|
|
97 /usr/lib/kbd/keytables directory. You want to put something like the following
|
|
98 in your keytable file:
|
|
99
|
|
100 keycode 15 = Tab F91
|
|
101 alt keycode 15 = Meta_Tab
|
|
102 shift alt keycode 15 = F92
|
|
103
|
|
104 where keycode 15 is Tab on my keyboard (and probably any keyboard). This
|
|
105 defines Tab and Alt-Tab normally, and also defines Shift-Tab to be F91 and
|
|
106 Shift-Alt-Tab to be F92.
|
|
107
|
|
108 Then put something like this:
|
|
109 # backtab and M-backtab
|
|
110 string F91 = "\033[Z"
|
|
111 string F92 = "\033\033[Z"
|
|
112
|
|
113 later in the file. This defines what character sequence F91 (Shift-Tab) and
|
|
114 F92 (Alt-Shift-Tab) should generate. I recommend these sequences, they are
|
|
115 based on what seems to be a more or less standard sequence ^[[Z for backtab.
|
|
116
|
|
117 Step 2 On A Termcap System:
|
|
118
|
|
119 The termcap capability is kB, i'm not familiar with termcap tools, i think you
|
|
120 just need to add it to the /etc/termcap file for the terminal you're concerned
|
|
121 with as kB=\E[Z.
|
|
122
|
|
123 Step 2 On A Terminfo System:
|
|
124
|
|
125 The terminfo capability is kcbt (the long name is key_btab). You want to run
|
|
126 infocmp to generate an edittable copy of the terminal info. Add the
|
|
127 capability, then use tic to compile that information. Something like this:
|
|
128
|
|
129 infocmp $TERM > info
|
|
130 emacs info & # add kcbt=\E[Z, to the file
|
|
131 tic info
|
|
132
|
|
133 If you do this as root it should add the new definition to the system wide
|
|
134 terminfo database. If you do it as a normal user it should create a
|
|
135 ~/.terminfo database with a local terminfo info definition for that terminal.
|
|
136
|
|
137 Step 3 On Emacs:
|
|
138
|
|
139 The standard terminal initialization should recognize the backtab capability
|
|
140 automatically. To test it try C-h c Shift-Tab and see what it calls the key.
|
|
141 To bind commands to it just use [backtab] in local-set-key or global-set-key
|
|
142 as in:
|
|
143
|
|
144 (local-set-key [backtab] 'hippie-expand)
|
|
145 or
|
|
146 (global-set-key [backtab] 'hippie-expand)
|
|
147
|
|
148 In the interest of maintaining a single consistent set of key bindings between
|
|
149 X and tty emacsen you may want to make equivalent X keystroke generate
|
|
150 "backtab" as well, you can do this by doing this:
|
|
151
|
|
152 (define-key function-key-map [S-tab] [backtab])
|
|
153 or
|
|
154 (define-key function-key-map [iso-lefttab] [backtab])
|
|
155
|
|
156 To make S-tab or whatever keystroke you made generate backtab on a terminal
|
|
157 be recognized as backtab under X11 as well. You can check how Emacs recognizes
|
|
158 this keystroke currently by doing C-h c <keystroke>.
|
|
159
|
|
160
|