0
+ − 1 \input texinfo.tex @c -*-texinfo-*-
+ − 2 @c %**start of header
+ − 3 @setfilename ../info/xemacs-faq.info
+ − 4 @settitle Frequently asked questions about XEmacs
+ − 5 @setchapternewpage off
+ − 6 @c %**end of header
+ − 7
+ − 8 @titlepage
+ − 9 @title XEmacs FAQ
+ − 10 @subtitle Frequently asked questions about XEmacs
+ − 11 @subtitle Last Modified: 1995/08/29
+ − 12 @sp 1
+ − 13 @author Anthony Rossini <arossini@@biostats.hmc.psu.edu>
+ − 14 @author Ben Wing <wing@@netcom.com>
+ − 15 @author Chuck Thompson <cthomp@@cs.uiuc.edu>
+ − 16 @page
+ − 17 @end titlepage
+ − 18
+ − 19 @c Some of this stuff needs to go in the HTML version which means it
+ − 20 @c needs to be put outside of the ifinfo statement.
+ − 21
+ − 22 @ifinfo
+ − 23 @node top, 1. Introductory Questions, (dir), (dir)
+ − 24 @unnumbered XEmacs FAQ
+ − 25
+ − 26 Version: OUT OF DATE
+ − 27
+ − 28 Current-Editor: Steven L Baur <steve@@miranova.com>
+ − 29
+ − 30 Copying Status: Freely Redistributable. I take no liability for the
+ − 31 correctness and safety of any procedures or advice given
+ − 32 here. This FAQ is distributed in the hope that it will
+ − 33 be useful, but WITHOUT ANY WARRANTY; without even the
+ − 34 implied warranty of MERCHANTABILITY or FITNESS FOR A
+ − 35 PARTICULAR PURPOSE.
+ − 36
+ − 37 WARNING! WARNING! Danger Will Robinson!
+ − 38
+ − 39 This file was not updated for the 19.14 release and is very out-of-date.
+ − 40 Our apologies. This situation will be corrected for 19.15. Steven Baur
+ − 41 has taken over as the FAQ maintainer and is keeping a very up-to-date
+ − 42 copy on the Web at <http://www.miranova.com/~steve/xemacs-faq.html>. Of
+ − 43 course, it is also available at <http://www.xemacs.org/faq/xemacs-faq.html>.
+ − 44
+ − 45 Out of date FAQ starts here:
+ − 46
+ − 47 This is a list of frequently asked questions for XEmacs users and
+ − 48 maintainers.
+ − 49
+ − 50 You can obtain the latest version of this file by anonymous FTP from
+ − 51 site @file{ftp.cs.uiuc.edu:/pub/xemacs/faq/xemacs-faq.FORMAT} where FORMAT
+ − 52 is text, texinfo (the master copy), postscript, dvi, html, info. Note that
+ − 53 the html version has 2 files.
+ − 54
+ − 55 Thanks to the many who contributed, especially to JWZ <jwz@@netscape.com> for
+ − 56 starting this whole wonderful mess... Special thanks to Tim Geisler
+ − 57 <tmgeisle@@faui80.informatik.uni-erlangen.de> for the initial texinfo
+ − 58 version and to Giacomo Boffi <sboff@@hp735.stru.polimi.it> for the initial
+ − 59 HTML version. Other contributors (many left out, unfortunately, due to an
+ − 60 old mail-purge) include:
+ − 61 @itemize @bullet
+ − 62 @item
+ − 63 Juergen Nickelsen <nickel@@prz.tu-berlin.de>
+ − 64 @item
+ − 65 Evelyn Ginsparg <ginsparg@@adra.com>
+ − 66 @item
+ − 67 d3h554@@foghorn.pnl.gov
+ − 68 @item
+ − 69 Marty Hall <hall@@aplcenmp.apl.jhu.edu>
+ − 70 @item
+ − 71 Richard Caley <rjc@@cogsci.ed.ac.uk>
+ − 72 @item
+ − 73 fcg@@philabs.Philips.COM
+ − 74 @item
+ − 75 Stig <stig@@hackvan.com>
+ − 76 @item
+ − 77 Arup Mukherjee <arup+@@cmu.edu>
+ − 78 @item
+ − 79 Kevin R. Powell <powell@@csl.ncsa.uiuc.edu>
+ − 80 @item
+ − 81 Eric Eide <eeide@@cs.utah.edu>
+ − 82 @item
+ − 83 William G. Dubuque <wgd@@martigny.ai.mit.edu>
+ − 84 @item
+ − 85 Chris Flatters <cflatter@@nrao.edu>
+ − 86 @item
+ − 87 John A. Turner <turner@@lanl.gov>
+ − 88 @end itemize
+ − 89
+ − 90 @end ifinfo
+ − 91
+ − 92 @menu
+ − 93 * top:: XEmacs FAQ
+ − 94 * 1. Introductory Questions::.
+ − 95 * 2. Compiling XEmacs::.
+ − 96 * 3. Problems running XEmacs / weird messages::.
+ − 97 * 4. Customization -- Emacs Lisp and the .emacs file::.
+ − 98 * 5. Customization -- X resources::.
+ − 99 * 6. Changing textual fonts and colors::.
+ − 100 * 7. The modeline::.
+ − 101 * 8. The keyboard::.
+ − 102 * 9. The cursor::.
+ − 103 * 10. The mouse; cutting and pasting::.
+ − 104 * 11. Highlighting::.
+ − 105 * 12. The menubar and toolbar::.
+ − 106 * 13. Scrollbars::.
+ − 107 * 14. Frame Geometry::.
+ − 108 * 15. Window/icon title; window manager problems::.
+ − 109 * 16. Editing source code (C mode; Lisp mode; etc.)::.
+ − 110 * 17. Text mode::.
+ − 111 * 18. Shell mode::.
+ − 112 * 19. Mail; VM; GNUS; BBDB; and related::.
+ − 113 * 20. Printing::.
+ − 114 * 21. Gnuserv::.
+ − 115 * 22. Miscellaneous::.
+ − 116 @end menu
+ − 117
+ − 118
+ − 119
+ − 120 @node 1. Introductory Questions, 2. Compiling XEmacs, top, top
+ − 121 @chapter 1. Introductory Questions
+ − 122
+ − 123 @menu
+ − 124 * 1.1.:: 1.1. Preface
+ − 125 * 1.2.:: 1.2. What is XEmacs?
+ − 126 * 1.3.:: 1.3. What is the current version of XEmacs?
+ − 127 * 1.4.:: 1.4. Where can I find it?
+ − 128 * 1.5.:: 1.5. Why another version of Emacs?
+ − 129 * 1.6.:: 1.6. What do @kbd{M-x}, GNU, etc. mean?
+ − 130 * 1.7.:: 1.7. Where can I get help for using XEmacs?
+ − 131 * 1.8.:: 1.8. Where is the mailing list archived?
+ − 132 * 1.9.:: 1.9. What is InfoDock, how does it relate to XEmacs, and how can I obtain it?
+ − 133 @end menu
+ − 134
+ − 135
+ − 136 @node 1.1.
+ − 137 @section 1.1. Preface
+ − 138
+ − 139 This is the introduction to a list of frequently asked questions (FAQ's)
+ − 140 about XEmacs with answers. This article contains a listing of the
+ − 141 questions; subsequent articles contain the questions and answers.
+ − 142
+ − 143 This is not a substitute for general Emacs questions, and actually
+ − 144 includes nothing that might help a novice learn to use Emacs or XEmacs.
+ − 145 For that, check out the regular Emacs lists, the tutorial inside of
+ − 146 XEmacs (look on the Help menu), or the O'Reilly book @cite{Learning GNU
+ − 147 Emacs}. This FAQ focuses on specific issues regarding XEmacs. If you
+ − 148 don't find the answer here, perhaps it really is a more general
+ − 149 question, and check the GNU Emacs FAQ for more information, as well.
+ − 150
+ − 151 The FAQ list is posted to reduce the noise level in the
+ − 152 @samp{comp.emacs.xemacs} newsgroup which results from the repetition of
+ − 153 frequently asked questions, wrong answers to these questions,
+ − 154 corrections to the wrong answers, corrections to the corrections,
+ − 155 debate, name calling, etc. Also, it serves as a repository of the
+ − 156 canonical ``best'' answers to these questions. However, if you know a
+ − 157 better answer or even a slight change that improves an answer, please
+ − 158 tell me!
+ − 159
+ − 160 If you know the answer of a question is in the FAQ list, please reply to
+ − 161 the question by e-mail instead of posting. Help reduce noise!
+ − 162
+ − 163 Please suggest new questions, answers, wording changes, deletions, etc.
+ − 164 The most helpful form for suggestions is a context diff (i.e. the output
+ − 165 of @samp{diff -c}). Include @samp{FAQ} in the subject of messages sent
+ − 166 to us about the FAQ list.
+ − 167
+ − 168 Please do not send questions to us just because you do not want to
+ − 169 disturb a lot of people and you think we would know the answer. We do
+ − 170 not have time to answer questions individually and keep up with
+ − 171 everything else we have to get done.
+ − 172
+ − 173 Many thanks need to go to all contributors on the old alt.lucid-emacs.*
+ − 174 and current comp.emacs.xemacs groups. This would never have been
+ − 175 collected without you.
+ − 176
+ − 177 Any directories given are usually in reference to the base directory
+ − 178 formed by unpacking XEmacs.
+ − 179
+ − 180
+ − 181 @node 1.2.
+ − 182 @section 1.2. What is XEmacs?
+ − 183
+ − 184 An alternative to GNU Emacs, originally based on an early alpha version
+ − 185 of FSF's version 19. XEmacs was known as Lucid Emacs through version
+ − 186 19.10. Almost all features of GNU Emacs are supported in XEmacs (the
+ − 187 ones that aren't supported are generally implemented in a better way in
+ − 188 XEmacs). The maintainers of XEmacs actively track changes to GNU Emacs
+ − 189 while also working to add new features never before seen in Emacs.
+ − 190
+ − 191
+ − 192 @node 1.3.
+ − 193 @section 1.3. What is the current version of XEmacs?
+ − 194
+ − 195 The current version is 19.13, released on September 1, 1995.
+ − 196
+ − 197
+ − 198 @node 1.4.
+ − 199 @section 1.4. Where can I find it?
+ − 200
+ − 201 The canonical source and binaries is found via anonymous FTP at
+ − 202 @ifinfo
+ − 203 @file{ftp.cs.uiuc.edu:/pub/xemacs}.
+ − 204 @end ifinfo
+ − 205 @ifhtml
+ − 206 <A HREF="ftp://ftp.cs.uiuc.edu/pub/xemacs/">ftp.cs.uiuc.edu:/pub/xemacs/</A>
+ − 207 @end ifhtml
+ − 208
+ − 209 @node 1.5.
+ − 210 @section 1.5. Why Another Version of Emacs?
+ − 211
+ − 212 @ifinfo
+ − 213 For a detailed description of the differences between GNU Emacs and
+ − 214 XEmacs, and a detailed history of XEmacs, see the file @file{etc/NEWS}
+ − 215 in the source distribution. However, here is a list of some of the
+ − 216 reasons why we think you might consider using it:
+ − 217 @end ifinfo
+ − 218 @ifhtml
+ − 219 For a detailed description of the differences between GNU Emacs and
+ − 220 XEmacs and a detailed history of XEmacs, check out the
+ − 221 <A HREF="http://xemacs.cs.uiuc.edu/NEWS.html/">NEWS</A> file. However,
+ − 222 here is a list of some of the reasons why we think you might consider
+ − 223 using it:
+ − 224 @end ifhtml
+ − 225
+ − 226 @itemize @bullet
+ − 227 @item
+ − 228 It looks nicer
+ − 229 @item
+ − 230 The XEmacs maintainers are generally more receptive to suggestions than
+ − 231 the GNU Emacs maintainers
+ − 232 @item
+ − 233 Many more bundled packages than GNU Emacs, all properly integrated with
+ − 234 XEmacs
+ − 235 @item
+ − 236 Binaries are available for many common operating systems
+ − 237 @item
+ − 238 Face support on TTY's
+ − 239 @item
+ − 240 A built-in toolbar
+ − 241 @item
+ − 242 Better Motif compliance
+ − 243 @item
+ − 244 Some internationalization support for European languages. Full MULE
+ − 245 (Multi-Lingual EMacs) support is being actively worked on.
+ − 246 @item
+ − 247 Variable-width fonts
+ − 248 @item
+ − 249 Variable-height lines
+ − 250 @item
+ − 251 Marginal annotations
+ − 252 @item
+ − 253 ToolTalk support
+ − 254 @item
+ − 255 XEmacs can be used as an Xt widget, and can be embedded within another
+ − 256 application
+ − 257 @item
+ − 258 Horizontal and vertical scrollbars (using real toolkit scrollbars)
+ − 259 @item
+ − 260 Better APIs (and performance) for attaching fonts, colors, and other
+ − 261 properties to text
+ − 262 @item
+ − 263 The ability to embed arbitrary graphics in a buffer
+ − 264 @item
+ − 265 Completely compatible (at the C level) with the Xt-based toolkits
+ − 266 @end itemize
+ − 267
+ − 268
+ − 269 @node 1.6.
+ − 270 @section 1.6. What do @kbd{M-x}, GNU, etc. mean?
+ − 271
+ − 272 This is really a general Emacs question, but a table of some common
+ − 273 terms/acronyms is provided here for your convenience.
+ − 274 @ifinfo
+ − 275 See the @cite{GNU Emacs FAQ} for a more complete list.
+ − 276 @end ifinfo
+ − 277 @ifhtml
+ − 278 See the <A HREF="http://www.eecs.nwu.edu/emacs/faq">GNU Emacs FAQ</A>
+ − 279 for a more complete list.
+ − 280 @end ifhtml
+ − 281
+ − 282 @table @samp
+ − 283 @item BLAT FOOP
+ − 284 Historical XEmacs error message
+ − 285 @item C-x
+ − 286 @dfn{C-x} means that the @key{Control} key and the @key{X} key should be
+ − 287 pressed together, like when you use the @key{Shift} key.
+ − 288 @item E-Lisp
+ − 289 Same as @dfn{Emacs-Lisp}.
+ − 290 @item Emacs-Lisp
+ − 291 The dialect of Lisp supported by Emacs and XEmacs. You use this to
+ − 292 customize XEmacs.
+ − 293 @item FAQ
+ − 294 Frequently asked question(s).
+ − 295 @item FSF
+ − 296 The Free Software Foundation.
+ − 297 @item GNU
+ − 298 @dfn{GNU} refers to products written by the Free Software Foundation.
+ − 299 @item JWZ
+ − 300 Jamie Zawinski <jwz@@netscape.com>, the former maintainer of Lucid Emacs
+ − 301 (which XEmacs evolved from).
+ − 302 @item M-x
+ − 303 @dfn{M-x} means that the @key{Meta} key and the @key{X} key should be
+ − 304 pressed together, like when you use the @key{Shift} key. Sometimes
+ − 305 the @key{Meta} key is labelled @samp{Alt} or with a diamond. Some
+ − 306 keyboards don't have a @key{Meta} key at all; then you can get the
+ − 307 equivalent by typing the @key{Esc} key followed by the @key{X} key.
+ − 308 @item RMS
+ − 309 Richard Stallman <rms@@gnu.ai.mit.edu>, the author of GNU Emacs.
+ − 310 @item VI
+ − 311 An editor used by those heretics that don't subscribe to the Emacs religion.
+ − 312 @end table
+ − 313
+ − 314
+ − 315 @node 1.7.
+ − 316 @section 1.7. Where can I get help for using XEmacs?
+ − 317
+ − 318 Probably the easiest way, if everything is installed, is to use info, by
+ − 319 pressing @kbd{C-h i}, or selecting @samp{Emacs Info} from the Help Menu.
+ − 320 Also, @kbd{M-x apropos} will look for commands for you.
+ − 321
+ − 322 Try reading this FAQ, examining the regular GNU Emacs FAQ (which can be
+ − 323 found with the Emacs 19 distribution) as well as at
+ − 324 @ifinfo
+ − 325 @file{http://www.eecs.nwu.edu/emacs/faq/} and reading the Usenet group
+ − 326 @end ifinfo
+ − 327 @ifhtml
+ − 328 <A HREF="http://www.eecs.nwu.edu/emacs/faq/">http://www.eecs.nwu.edu/emacs/faq/</A>
+ − 329 and reading the Usenet group
+ − 330 @end ifhtml
+ − 331 @samp{comp.emacs.xemacs}. If that does not help, try posting your
+ − 332 question to @samp{comp.emacs.xemacs}. If you cannot post or read
+ − 333 Usenet news, there is a corresponding mailing list which is available.
+ − 334 It can be subscribed to by sending mail to
+ − 335
+ − 336 @example
+ − 337 xemacs-request@@cs.uiuc.edu
+ − 338 @end example
+ − 339
+ − 340 for subscription information and
+ − 341
+ − 342 @example
+ − 343 xemacs@@cs.uiuc.edu
+ − 344 @end example
+ − 345
+ − 346 to send messages to the list.
+ − 347
+ − 348 To cancel a subscription, YOU MUST use the xemacs-request address.
+ − 349
+ − 350 Bug reports should be sent to the same locations.
+ − 351
+ − 352
+ − 353 @node 1.8.
+ − 354 @section 1.8. Where is the mailing list archived?
+ − 355
+ − 356 The mailing list is archived in the directory
+ − 357 @ifinfo
+ − 358 @file{ftp.cs.uiuc.edu:/pub/xemacs/mlists/}.
+ − 359 @end ifinfo
+ − 360 @ifhtml
+ − 361 <A HREF="ftp://ftp.cs.uiuc.edu/pub/xemacs/mlists/">ftp.cs.uiuc.edu:/pub/xemacs/mlists/</A>
+ − 362 @end ifhtml
+ − 363
+ − 364
+ − 365 @node 1.9.
+ − 366 @section 1.9. What is InfoDock, how does it relate to XEmacs, and how can I obtain it?
+ − 367
+ − 368 InfoDock is an integrated productivity toolset, mainly aimed at
+ − 369 technical people. It is built atop the XEmacs variant of GNU Emacs and
+ − 370 so has all of the power of Emacs, but with an easier to use and more
+ − 371 comprehensive menu-based user interface. The next section describes how
+ − 372 it differs from XEmacs and GNU Emacs from the Free Software Foundation.
+ − 373
+ − 374 The quickest way to get a feel for InfoDock is to browse the InfoDock
+ − 375 Manual, especially the section on tools. This will help you decide
+ − 376 whether or not to download InfoDock for local use. This manual is
+ − 377 available in gzipped Postscript form, alongside the InfoDock
+ − 378 distribution. (See below for FTP retrieval instructions.)
+ − 379
+ − 380 InfoDock is aimed at people who want a free, turn-key productivity
+ − 381 environment. Although InfoDock is customizable, it is not intended for
+ − 382 people who like basic versions of Emacs which need to be customized
+ − 383 extensively for local use; standard Emacs distributions are better for
+ − 384 such uses. InfoDock is for those people who want a complete,
+ − 385 pre-customized environment in one package, which they need not touch
+ − 386 more than once or twice a year to update to new revisions.
+ − 387
+ − 388 InfoDock is pre-built for SPARCstations running SunOS V4 or V5
+ − 389 (Solaris). It is intended for use on a color display, although most
+ − 390 features will work on monochrome monitors. Simply unpack InfoDock
+ − 391 according to the instructions in the ID-INSTALL file and you are ready
+ − 392 to run.
+ − 393
+ − 394 The InfoDock Manual is concise, yet sufficient as a user guide for users
+ − 395 who have never used an Emacs-type editor before. For users who are
+ − 396 already familiar with Emacs, it supplements the information in the GNU
+ − 397 Emacs Manual.
+ − 398
+ − 399 InfoDock menus are much more extensive and more mature than standard
+ − 400 Emacs menus. Each menu offers a @samp{Manual} item which displays
+ − 401 documentation associated with the menu's functions.
+ − 402
+ − 403 Three types of menubars are provided:
+ − 404 @enumerate
+ − 405 @item
+ − 406 An extensive menubar providing access to global InfoDock commands.
+ − 407 @item
+ − 408 Mode-specific menubars tailored to the current major mode.
+ − 409 @item
+ − 410 A simple menubar for basic editing to help novices get started with InfoDock.
+ − 411 @end enumerate
+ − 412
+ − 413 Most modes also include mode-specific popup menus. Additionally, region and
+ − 414 rectangle popup menus are included.
+ − 415 @itemize @bullet
+ − 416 @item
+ − 417 @samp{Hyperbole}, the everyday information manager, is a core part of
+ − 418 InfoDock. This provides context-sensitive mouse keys, a rolodex-type
+ − 419 contact manager, programmable hypertext buttons, and an autonumbered
+ − 420 outliner with embedded hyperlink anchors.
+ − 421 @item
+ − 422 @samp{PIEmail}, the prototype Personalized Information Environment Mail
+ − 423 Tool, is included.
+ − 424 @item
+ − 425 The @samp{OO-Browser}, a multi-language object-oriented code browser, is a
+ − 426 standard part of InfoDock.
+ − 427 @end itemize
+ − 428
+ − 429 InfoDock saves a more extensive set of user options than other Emacs
+ − 430 versions.
+ − 431
+ − 432 InfoDock inserts a useful file header in many file types, showing the
+ − 433 author, summary, and last modification time of each file. A summary
+ − 434 program can then be used to summarize all of the files in a directory,
+ − 435 for easy MANIFEST file creation.
+ − 436
+ − 437 Your working set of buffers is automatically saved and restored (if you
+ − 438 answer yes to a prompt) between InfoDock sessions.
+ − 439
+ − 440 Refined color choices for code highlighting are provided for both dark and
+ − 441 light background display frames.
+ − 442
+ − 443 The @kbd{C-z} key prefix performs frame-based commands which parallel the
+ − 444 @kbd{C-x} key prefix for window-based commands.
+ − 445
+ − 446 The Smart Menu system is included for producing command menus on dumb
+ − 447 terminals. (InfoDock does not yet run on dumb terminals but will in 1995.)
+ − 448
+ − 449 Lisp libraries are better categorized according to function.
+ − 450
+ − 451 Extensions and improvements to many areas of Emacs are included, such as:
+ − 452 paragraph filling, mail reading with Rmail, shell handling, outlining, code
+ − 453 highlighting and browsing, and man page browsing.
+ − 454
+ − 455 InfoDock questions, answers and discussion should go to the mail list
+ − 456 @samp{infodock@@hub.ucsb.edu}. Use
+ − 457 @samp{infodock-request@@hub.ucsb.edu} to be added or removed from the
+ − 458 list. Always include your InfoDock version number when sending help
+ − 459 requests.
+ − 460
+ − 461 InfoDock is available across the Internet via anonymous FTP. To get
+ − 462 it, first move to a directory into which you want the InfoDock archive
+ − 463 files placed. We will call this <DIST-DIR>.
+ − 464
+ − 465 @example
+ − 466 cd <DIST-DIR>
+ − 467 @end example
+ − 468
+ − 469 FTP to ftp.cs.uiuc.edu (Internet Host ID = 128.174.252.1):
+ − 470
+ − 471 @example
+ − 472 prompt> ftp ftp.cs.uiuc.edu
+ − 473 @end example
+ − 474
+ − 475 Login as @samp{anonymous} with your own <user-id>@@<site-name> as a password.
+ − 476
+ − 477 @example
+ − 478 Name (ftp.cs.uiuc.edu): anonymous
+ − 479 331 Guest login ok, send your complete e-mail address as password.
+ − 480 Password: -<your-user-id@@your-domain>
+ − 481 230 Guest login ok, access restrictions apply.
+ − 482 @end example
+ − 483
+ − 484 Move to the location of the InfoDock archives:
+ − 485
+ − 486 @example
+ − 487 ftp> cd pub/xemacs/infodock
+ − 488 @end example
+ − 489
+ − 490 Set your transfer mode to binary:
+ − 491
+ − 492 @example
+ − 493 ftp> bin
+ − 494 200 Type set to I.
+ − 495 @end example
+ − 496
+ − 497 Turn off prompting:
+ − 498
+ − 499 @example
+ − 500 ftp> prompt
+ − 501 Interactive mode off.
+ − 502 @end example
+ − 503
+ − 504 Retrieve the InfoDock archives that you want, either by using a
+ − 505 @samp{get <file>} for each file you want or by using the following to
+ − 506 get a complete distribution, including all binaries:
+ − 507
+ − 508 @example
+ − 509 ftp> mget ID-INSTALL
+ − 510 ftp> mget id-*
+ − 511 @end example
+ − 512
+ − 513 Close the FTP connection:
+ − 514
+ − 515 @example
+ − 516 ftp> quit
+ − 517 221 Goodbye.
+ − 518 @end example
+ − 519
+ − 520 Read the @file{ID-INSTALL} file which you just retrieved for
+ − 521 step-by-step installation instructions.
+ − 522
+ − 523
+ − 524
+ − 525 @node 2. Compiling XEmacs, 3. Problems running XEmacs / weird messages, 1. Introductory Questions, top
+ − 526 @chapter 2. Compiling XEmacs
+ − 527
+ − 528 @menu
+ − 529 * 2.1.:: 2.1. What is the best way to compile XEmacs with the netaudio system, since I have got the netaudio system compiled but installed at a weird place, I am not root. Also in the READMEs it does not say anything about compiling with the audioserver?
+ − 530 @end menu
+ − 531
+ − 532
+ − 533 @node 2.1.
+ − 534 @section 2.1. What is the best way to compile XEmacs with the netaudio system, since I have got the netaudio system compiled but installed at a weird place, I am not root. Also in the READMEs it does not say anything about compiling with the audioserver?
+ − 535
+ − 536 You should only need to add some stuff to the configure command line. To tell
+ − 537 it to compile in netaudio support:
+ − 538
+ − 539 @example
+ − 540 --with-sound=both
+ − 541 @end example
+ − 542
+ − 543 (Or @samp{--with-sound=nas} if you don't want native sound support for
+ − 544 some reason.) To tell it where to find the netaudio includes and
+ − 545 libraries:
+ − 546
+ − 547 @example
+ − 548 --site-libraries=WHATEVER
+ − 549 --site-includes=WHATEVER
+ − 550 @end example
+ − 551
+ − 552 Then (fingers crossed) it should compile and it will use netaudio if you
+ − 553 have a server running corresponding to the X server. The netaudio server
+ − 554 has to be there when XEmacs starts. If the netaudio server goes away and
+ − 555 another is run, XEmacs should cope (fingers crossed, error handling in
+ − 556 netaudio isn't perfect).
+ − 557
+ − 558 BTW, netaudio has been renamed as it has a name clash with something
+ − 559 else, so if you see references to NAS or Network Audio System, it's the
+ − 560 @ifinfo
+ − 561 same thing. It also might be found at
+ − 562
+ − 563 @example
+ − 564 ftp.x.org:/contrib/audio/nas/
+ − 565 ftp.ncd.com:/pub/ncd/technology/src/nas/
+ − 566 @end example
+ − 567 @end ifinfo
+ − 568 @ifhtml
+ − 569 same thing. It also might be found at
+ − 570 <A HREF="ftp://ftp.x.org/contrib/audio/nas/">ftp.x.org:/contrib/audio/nas/</A>
+ − 571 <A HREF="ftp://ftp.ncd.com:/pub/ncd/technology/src/nas/">ftp.ncd.com:/pub/ncd/technology/src/nas/</A>
+ − 572 @end ifhtml
+ − 573
+ − 574 @node 3. Problems running XEmacs / weird messages, 4. Customization -- Emacs Lisp and the .emacs file, 2. Compiling XEmacs, top
+ − 575 @chapter 3. Problems running XEmacs / weird messages
+ − 576
+ − 577 @menu
+ − 578 * 3.1.:: 3.1. Help! XEmacs just crashed on me!
+ − 579 * 3.2.:: 3.2. When I try to use some particular option of some particular package, I get a cryptic error in the minibuffer.
+ − 580 * 3.3.:: 3.3. I get tons of translation table syntax error messages during startup. How do I get rid of them?
+ − 581 * 3.4.:: 3.4. How can I avoid the startup warnings about deducing proper fonts?
+ − 582 * 3.5.:: 3.5. Help! I can not get XEmacs to display on my Envizex X-terminal!
+ − 583 * 3.6.:: 3.6. Why do I get weird messages about giftoppm and ppmdither not being found?
+ − 584 * 3.7.:: 3.7. How can I avoid those messages about deleting excess backup files?
+ − 585 * 3.8.:: 3.8. Help! XEmacs just locked up my X server on my Linux box!
+ − 586 @end menu
+ − 587
+ − 588
+ − 589 @node 3.1.
+ − 590 @section 3.1. Help! XEmacs just crashed on me!
+ − 591
+ − 592 First of all, don't panic. Whenever XEmacs crashes, it tries extremely
+ − 593 hard to auto-save all of your files before dying. (The main time that
+ − 594 this will not happen is if the machine physically lost power or if you
+ − 595 killed the XEmacs process using @samp{kill -9}.) The next time you
+ − 596 try to edit those files, you will be informed that a more recent
+ − 597 auto-save file exists. You can use @kbd{M-x recover-file} to retrieve
+ − 598 the auto-saved version of the file.
+ − 599
+ − 600 Now, XEmacs is not perfect, and there may occasionally be times, or
+ − 601 particular sequences of actions, that cause it to crash. If you can
+ − 602 come up with a reproducible way of doing this (or even if you have a
+ − 603 pretty good memory of exactly what you were doing at the time), the
+ − 604 maintainers would be very interested in knowing about it. Post a
+ − 605 message to @samp{comp.emacs.xemacs} or send mail to
+ − 606 @samp{xemacs@@cs.uiuc.edu}.
+ − 607
+ − 608 If at all possible, include a stack backtrace of the core dump that was
+ − 609 produced. This shows where exactly things went wrong, and makes it much
+ − 610 easier to diagnose problems. To do this, you need to locate the core
+ − 611 file (it's called @samp{core}, and is usually sitting in the directory
+ − 612 that you started XEmacs from, or your home directory if that other
+ − 613 directory was not writable). Then, go to that directory and execute a
+ − 614 command like
+ − 615
+ − 616 @example
+ − 617 gdb `which xemacs` core
+ − 618 @end example
+ − 619
+ − 620 and then issue the command @samp{where} to get the stack backtrace.
+ − 621 (You might have to use @samp{dbx} or some similar debugger in place
+ − 622 of @samp{gdb}. If you don't have any such debugger available,
+ − 623 complain to your system administrator.)
+ − 624
+ − 625 It's possible that a core file didn't get produced, in which case
+ − 626 you're out of luck. Go complain to your system administrator and
+ − 627 tell him not to disable core files by default. (If you explicitly
+ − 628 disabled core files, then double shame on you!)
+ − 629
+ − 630
+ − 631 @node 3.2.
+ − 632 @section 3.2. When I try to use some particular option of some particular package, I get a cryptic error in the minibuffer.
+ − 633
+ − 634 If you can't figure out what's going on, try typing @kbd{ESC ESC} and
+ − 635 issuing the command
+ − 636
+ − 637 @example
+ − 638 (setq debug-on-error t)
+ − 639 @end example
+ − 640
+ − 641 and then try and make the error happen again. This will give you a
+ − 642 backtrace that may be enlightening. If not, try reading farther down in
+ − 643 this FAQ; if that fails, you could try posting to
+ − 644 @samp{comp.emacs.xemacs} (making sure to include the backtrace) and
+ − 645 someone may be able to help.
+ − 646
+ − 647
+ − 648 @node 3.3.
+ − 649 @section 3.3. I get tons of translation table syntax error messages during startup. How do I get rid of them?
+ − 650
+ − 651 There are two causes of this problem. The first usually only strikes
+ − 652 people using the prebuilt binaries. The culprit in both cases is the
+ − 653 file @file{XKeysymDB}.
+ − 654 @itemize @bullet
+ − 655 @item
+ − 656 The binary cannot find the XKeysymDB file. The location is hardcoded at
+ − 657 compile time so if the system the binary was built on puts it a
+ − 658 different place than your system does, you have problems. To fix, set
+ − 659 the environment variable @samp{XKEYSYMDB} to the location of the
+ − 660 XKeysymDB file on your system or to the location of the one included
+ − 661 with XEmacs which should be at:
+ − 662
+ − 663 @example
+ − 664 <xemacs_root_directory>/lib/xemacs-19.13/etc/XKeysymDB
+ − 665 @end example
+ − 666
+ − 667 @item
+ − 668 The binary is finding the XKeysymDB but it is out-of-date on your system
+ − 669 and does not contain the necessary lines. Either ask your system
+ − 670 administrator to replace it with the one which comes with XEmacs (which
+ − 671 is the stock R6 version and is backwards compatible) or set your
+ − 672 @samp{XKEYSYMDB} variable to the location of XEmacs's described above.
+ − 673 @end itemize
+ − 674
+ − 675
+ − 676 @node 3.4.
+ − 677 @section 3.4. How can I avoid the startup warnings about deducing proper fonts?
+ − 678
+ − 679 This is highly dependent on your installation, but try with the
+ − 680 following font as your base font for XEmacs and see what it does:
+ − 681
+ − 682 @example
+ − 683 -adobe-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-1
+ − 684 @end example
+ − 685
+ − 686 More precisely, do the following in your resource file:
+ − 687
+ − 688 @example
+ − 689 Emacs.default.attributeFont: -adobe-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-1
+ − 690 @end example
+ − 691
+ − 692
+ − 693 @node 3.5.
+ − 694 @section 3.5. Help! I can not get XEmacs to display on my Envizex X-terminal!
+ − 695
+ − 696 Try setting the DISPLAY variable using the numeric IP address of the
+ − 697 host you are running XEmacs from.
+ − 698
+ − 699
+ − 700 @node 3.6.
+ − 701 @section 3.6. Why do I get weird messages about giftoppm and ppmdither not being found?
+ − 702
+ − 703 Because they are not. You are probably trying to read some HTML files,
+ − 704 or using W3-mode as your Web client. To display inline pictures, this
+ − 705 requires the above programs (which can be found in the netpbm package or
+ − 706 its older version, pbmplus). The netpbm package can be found at
+ − 707 @ifinfo
+ − 708 @samp{ftp.x.org}, or any of its mirror sites. It can also be found at
+ − 709 @samp{ftp.cs.uiuc.edu:/pub/xemacs/aux}.
+ − 710 @end ifinfo
+ − 711 @ifhtml
+ − 712 <A HREF="ftp://ftp.x.org/contrib/utilities/">ftp.x.org:/contrib/utilities/</A>
+ − 713 . It can also be found at
+ − 714 <A HREF="ftp://ftp.cs.uiuc.edu/pub/xemacs/aux/">ftp.cs.uiuc.edu:/pub/xemacs/aux/</A>
+ − 715 @end ifhtml
+ − 716
+ − 717
+ − 718 @node 3.7.
+ − 719 @section 3.7. How can I avoid those messages about deleting excess backup files?
+ − 720
+ − 721
+ − 722 Try the following Emacs-Lisp:
+ − 723
+ − 724 @example
+ − 725 (setq version-control t)
+ − 726 (setq kept-old-versions 0)
+ − 727 (setq kept-new-versions 8)
+ − 728 (if (string-match "XEmacs\\|Lucid" emacs-version)
+ − 729 (setq trim-versions-without-asking t)
+ − 730 (setq delete-old-versions t))
+ − 731 @end example
+ − 732
+ − 733 @node 3.8.
+ − 734 @section 3.8. Help! XEmacs just locked up my X server on my Linux box!
+ − 735
+ − 736 There have been several reports of the X server locking up under Linux.
+ − 737 In all reported cases removing speedo and scaled fonts from the font
+ − 738 path corrected the problem. This can be done with the command 'xset'.
+ − 739
+ − 740 It is possible that using a font server may also solve the problem.
+ − 741
+ − 742
+ − 743
+ − 744 @node 4. Customization -- Emacs Lisp and the .emacs file, 5. Customization -- X resources, 3. Problems running XEmacs / weird messages, top
+ − 745 @chapter 4. Customization -- Emacs Lisp and the .emacs file
+ − 746
+ − 747 @menu
+ − 748 * 4.1.:: 4.1. How can @file{.emacs} determine which of the family of emacsen I am using?
+ − 749 * 4.2.:: 4.2. How can I detect a color display?
+ − 750 * 4.3.:: 4.3. How can I evaluate emacs-lisp expressions without switching to the *scratch* buffer?
+ − 751 * 4.4.:: 4.4. If you put (setq tab-width 6) in your @file{.emacs} file it does not work! Is there a reason for this. If you do it at the EVAL prompt it works fine!! How strange.
+ − 752 * 4.5.:: 4.5. How can I add directories to the load-path?
+ − 753 * 4.6.:: 4.6. How to check if a lisp function is defined or not?
+ − 754 * 4.7.:: 4.7. Can I force the output of (list-faces) to a buffer other than the minibuffer since it is too wide to fit?
+ − 755 @end menu
+ − 756
+ − 757
+ − 758 @node 4.1.
+ − 759 @section 4.1. How can @file{.emacs} determine which of the family of Emacsen I am using?
+ − 760
+ − 761 To determine if you are currently running GNU Emacs 18, GNU Emacs 19,
+ − 762 XEmacs 19, or Epoch, and use appropriate code, check out the example
+ − 763 given in @file{etc/sample.emacs}. There are other nifty things in there
+ − 764 as well! Alternatively, there is a package, @file{emacs-vers.el},
+ − 765 available at an Emacs-Lisp archive near you; try searching
+ − 766
+ − 767 @example
+ − 768 archive.cis.ohio-state.edu:/pub/gnu/emacs/elisp-archive/misc/
+ − 769 @end example
+ − 770
+ − 771
+ − 772 @node 4.2.
+ − 773 @section 4.2. How can I detect a color display?
+ − 774
+ − 775 You can test the return value of the function
+ − 776 @code{(device-class)}, as in:
+ − 777
+ − 778 @example
+ − 779 (if (eq (device-class) 'color)
+ − 780 (progn
+ − 781 (set-face-foreground 'font-lock-comment-face "Grey")
+ − 782 (set-face-foreground 'font-lock-string-face "Red")
+ − 783 ....
+ − 784 ))
+ − 785 @end example
+ − 786
+ − 787
+ − 788 @node 4.3.
+ − 789 @section 4.3. How can I evaluate Emacs-Lisp expressions without switching to the *scratch* buffer?
+ − 790
+ − 791 @example
+ − 792 (put 'eval-expression 'disabled nil)
+ − 793 @end example
+ − 794
+ − 795 This sets it so that hitting @kbd{ESC ESC} lets you type a single
+ − 796 expression to be evaluated. This line can also be put into your
+ − 797 @file{.emacs}.
+ − 798
+ − 799
+ − 800 @node 4.4.
+ − 801 @section 4.4. If you put (setq tab-width 6) in your @file{.emacs} file it does not work! Is there a reason for this. If you do it at the EVAL prompt it works fine!! How strange.
+ − 802
+ − 803 Use setq-default, since tab-width is all-buffer-local.
+ − 804
+ − 805
+ − 806 @node 4.5.
+ − 807 @section 4.5. How can I add directories to the load-path?
+ − 808
+ − 809 Here are two ways to do that, one that puts your directories at the front of
+ − 810 the load-path, the other at the end:
+ − 811
+ − 812 @example
+ − 813 ;;; Add things at the beginning of the load-path
+ − 814 (setq load-path (cons "bar" load-path))
+ − 815 (setq load-path (cons "foo" load-path))
+ − 816
+ − 817 ;;; Add things at the end
+ − 818 (setq load-path (append load-path '("foo" "bar")))
+ − 819 @end example
+ − 820
+ − 821
+ − 822 @node 4.6.
+ − 823 @section 4.6. How to check if a lisp function is defined or not?
+ − 824
+ − 825 Use the following elisp:
+ − 826
+ − 827 @example
+ − 828 (fboundp 'foo)
+ − 829 @end example
+ − 830
+ − 831 It's always a mistake, under all circumstances, to test `emacs-version' or
+ − 832 any similar variables, in case they are not bound, unless you do the above.
+ − 833
+ − 834 Instead, use feature-tests, such as featurep or boundp or fboundp, or
+ − 835 even simple behavioural tests, eg
+ − 836 (defvar foo-old-losing-code? (condition-case nil (progn (losing-code t) nil)
+ − 837 (wrong-number-of-arguments t)))
+ − 838
+ − 839 There is an incredible amount of broken code out there which could
+ − 840 work much better more often in more places if it did the above instead
+ − 841 of trying to divine its environment from the value of one variable.
+ − 842
+ − 843
+ − 844 @node 4.7.
+ − 845 @section 4.7. Can I force the output of (face-list) to a buffer other than the minibuffer since it is too wide to fit?
+ − 846
+ − 847 Evaluate the expression in the "*scratch*" buffer with point on the rightmost
+ − 848 paren and typing @kbd{C-j}.
+ − 849
+ − 850
+ − 851
+ − 852 @node 5. Customization -- X resources, 6. Changing textual fonts and colors, 4. Customization -- Emacs Lisp and the .emacs file, top
+ − 853 @chapter 5. Customization -- X resources
+ − 854
+ − 855 @menu
+ − 856 * 5.1.:: 5.1. Where is a list of X resources?
+ − 857 @end menu
+ − 858
+ − 859
+ − 860 @node 5.1.
+ − 861 @section 5.1. Where is a list of X resources?
+ − 862
+ − 863 Search through the NEWS file for ``X Resources''. A fairly comprehensive list
+ − 864 is given after it.
+ − 865
+ − 866 In addition, an app-defaults file is supplied, @file{etc/Emacs.ad},
+ − 867 listing the defaults. The file @file{etc/sample.Xdefaults} gives a set
+ − 868 of defaults that you might consider. It is essentially the same as
+ − 869 @file{etc/Emacs.ad} but some entries are slightly altered. Be careful
+ − 870 about installing the contents of this file into your @file{.Xdefaults}
+ − 871 (.Xresources) file if you use FSF GNU Emacs under X11 as well.
+ − 872
+ − 873
+ − 874
+ − 875 @node 6. Changing textual fonts and colors, 7. The modeline, 5. Customization -- X resources, top
+ − 876 @chapter 6. Changing textual fonts and colors
+ − 877
+ − 878 @menu
+ − 879 * 6.1.:: 6.1. How do I set the text, menu and modeline fonts?
+ − 880 * 6.2.:: 6.2. How can I set the background/foreground colors when highlighting a region?
+ − 881 * 6.3.:: 6.3. How can I set the most commonly used color options from my @file{.emacs} instead of from my @file{.Xdefaults}?
+ − 882 @end menu
+ − 883
+ − 884
+ − 885 @node 6.1.
+ − 886 @section 6.1. How do I set the text, menu and modeline fonts?
+ − 887
+ − 888 Note that you should use @samp{Emacs.} and not @samp{Emacs*} when
+ − 889 setting face values.
+ − 890
+ − 891 In @file{.Xdefaults}:
+ − 892
+ − 893 @example
+ − 894 Emacs.default.attributeFont: -*-*-medium-r-*-*-*-120-*-*-m-*-*-*
+ − 895 Emacs*menubar*font: fixed
+ − 896 Emacs.modeline.attributeFont: fixed
+ − 897 @end example
+ − 898
+ − 899 This is confusing because modeline is a face, and can be found listed
+ − 900 with all faces in the current mode by using M-x set-face-font (enter) ?.
+ − 901 It uses the face specification of "attributeFont", while menubar is a
+ − 902 normal X thing that uses the specification "font". With Motif it may be
+ − 903 necessary to use "fontList" instead of "font". (Please rewrite this if
+ − 904 you understand this better than me ... A general description of faces
+ − 905 would be very useful. I am just saying that menubar is a FAQ because
+ − 906 it's not a face and not listed.)
+ − 907
+ − 908
+ − 909 @node 6.2.
+ − 910 @section 6.2. How can I set the background/foreground colors when highlighting a region?
+ − 911
+ − 912 You can change the face `zmacs-region' either in your @file{.Xdefaults}:
+ − 913
+ − 914 @example
+ − 915 Emacs.zmacs-region.attributeForeground: firebrick
+ − 916 Emacs.zmacs-region.attributeBackground: lightseagreen
+ − 917 @end example
+ − 918
+ − 919 or in your @file{.emacs}:
+ − 920
+ − 921 @example
+ − 922 (set-face-background 'zmacs-region "red")
+ − 923 (set-face-foreground 'zmacs-region "yellow")
+ − 924 @end example
+ − 925
+ − 926
+ − 927 @node 6.3.
+ − 928 @section 6.3. How can I set the most commonly used color options from my @file{.emacs} instead of from my @file{.Xdefaults}?
+ − 929
+ − 930 @example
+ − 931 (set-face-background 'default "bisque") ; frame background
+ − 932 (set-face-foreground 'default "black") ; normal text
+ − 933 (set-face-background 'zmacs-region "red") ; When selecting w/
+ − 934 ; mouse
+ − 935 (set-face-foreground 'zmacs-region "yellow")
+ − 936 (set-face-font 'default "*courier-bold-r*120-100-100*")
+ − 937 (set-face-background 'highlight "blue") ; Ie when selecting buffers
+ − 938 (set-face-foreground 'highlight "yellow")
+ − 939 (set-face-background 'modeline "blue") ; Line at bottom of buffer
+ − 940 (set-face-foreground 'modeline "white")
+ − 941 (set-face-font 'modeline "*bold-r-normal*140-100-100*")
+ − 942 (set-face-background 'isearch "yellow") ; When highlighting while
+ − 943 ; searching
+ − 944 (set-face-foreground 'isearch "red")
+ − 945 (setq x-pointer-foreground-color "black") ; Adds to bg color,
+ − 946 ; so keep black
+ − 947 (setq x-pointer-background-color "blue") ; This is color you really
+ − 948 @end example
+ − 949 ; want ptr/crsr
+ − 950
+ − 951
+ − 952 @node 7. The modeline, 8. The keyboard, 6. Changing textual fonts and colors, top
+ − 953 @chapter 7. The modeline
+ − 954
+ − 955 @menu
+ − 956 * 7.1.:: 7.1. How can I make the modeline go away?
+ − 957 * 7.2.:: 7.2. How do you have XEmacs display the line number in the modeline?
+ − 958 * 7.3.:: 7.3. How do I get XEmacs to put the time of day on the modeline?
+ − 959 * 7.4.:: 7.4. How can one change the color of the modeline based on the mode used? i.e. red for C mode, green for TeX mode etc.?
+ − 960 @end menu
+ − 961
+ − 962
+ − 963 @node 7.1.
+ − 964 @section 7.1. How can I make the modeline go away?
+ − 965
+ − 966 (set-specifier has-modeline-p nil)
+ − 967
+ − 968
+ − 969 @node 7.2.
+ − 970 @section 7.2. How do you have XEmacs display the line number in the modeline?
+ − 971
+ − 972 Add the following line to your @file{.emacs} file:
+ − 973
+ − 974 @example
+ − 975 (setq line-number-mode t)
+ − 976 @end example
+ − 977
+ − 978
+ − 979 @node 7.3.
+ − 980 @section 7.3. How do I get XEmacs to put the time of day on the modeline?
+ − 981
+ − 982 @example
+ − 983 (display-time)
+ − 984 @end example
+ − 985
+ − 986
+ − 987 @node 7.4.
+ − 988 @section 7.4. How can one change the color of the modeline based on the mode used? i.e. red for C mode, green for TeX mode etc.?
+ − 989
+ − 990 You can use something like the following:
+ − 991
+ − 992 @example
+ − 993 (add-hook 'lisp-mode-hook
+ − 994 '(lambda () (set-face-background 'modeline "red" (current-buffer))
+ − 995 (set-face-foreground 'modeline "yellow" (current-buffer))))
+ − 996 @end example
+ − 997
+ − 998 Then, when editing a Lisp file (ie went into Lisp mode), the modeline
+ − 999 colors change from the default set in your @file{.emacs}. The change
+ − 1000 will only be made in the buffer you just entered (which contains the
+ − 1001 Lisp file you are editing) and will not affect the modeline colors
+ − 1002 anywhere else.
+ − 1003
+ − 1004 Notes:
+ − 1005
+ − 1006 @itemize @bullet
+ − 1007 @item
+ − 1008 The hook is the mode name plus "-hook". Ie c-mode-hook, c++-mode-hook,
+ − 1009 emacs-lisp-mode-hook (ie your @file{.emacs} or a xx.el file),
+ − 1010 lisp-interaction-mode-hook (the *scratch* buffer), text-mode-hook, etc.
+ − 1011 @item
+ − 1012 Be sure to use add-hook, not (setq c-mode-hook xxxx), otherwise you will
+ − 1013 erase anything that anybody has already put on the hook.
+ − 1014 @item
+ − 1015 You can also do (set-face-font 'modeline @code{font}), eg (set-face-font
+ − 1016 'modeline "*bold-r-normal*140-100-100*" (current-buffer)) if you wish
+ − 1017 the modeline font to vary based on the current mode.
+ − 1018 @end itemize
+ − 1019
+ − 1020
+ − 1021 @node 8. The keyboard, 9. The cursor, 7. The modeline, top
+ − 1022 @chapter 8. The keyboard
+ − 1023
+ − 1024 @menu
2
+ − 1025 * 8.1.:: 8.1. What is the difference in key sequences between XEmacs and GNU Emacs?
0
+ − 1026 * 8.2.:: 8.2. How can I make XEmacs recognize the Alt key of my HP workstation as a Meta key?
+ − 1027 * 8.3.:: 8.3. How can I stop the down-arrow-key from adding empty lines at the bottom of my buffers?
+ − 1028 * 8.4.:: 8.4. I wonder if there is an interactive function that can generate "fake" keyboard events. This way, I could simply map them inside XEmacs.
+ − 1029 * 8.5.:: 8.5. I am trying to bind C-. to scroll up by one line and C-; to scroll down by one line...
+ − 1030 * 8.6.:: 8.6. I cannot manage to globally bind my @key{Delete} key to something other than the default. How does one do this?
+ − 1031 * 8.7.:: 8.7. How can I bind complex functions (or macros) to keys?
+ − 1032 * 8.8.:: 8.8. Can the cursor keys scroll the screen a line at a time, rather than the default half page jump? I tend it to find it disorienting.
+ − 1033 * 8.9.:: 8.9. How to map "Help" key alone on Sun type4 keyboard?
+ − 1034 * 8.10.:: 8.10. How can you type in special characters in XEmacs?
+ − 1035 @end menu
+ − 1036
+ − 1037
+ − 1038 @node 8.1.
+ − 1039 @section 8.1. What is the difference in in key sequences between XEmacs and GNU Emacs?
+ − 1040
+ − 1041 The real question might be rephrased as "When should one use the quoted list,
+ − 1042 vector, or escaped string representations of key sequences?" Is there any
+ − 1043 particular advantage to one representation over another?
+ − 1044
+ − 1045 From Richard Mlynarik <mly@@adoc.xerox.com>:
+ − 1046
+ − 1047 @table @asis
+ − 1048 @item (meta a)
+ − 1049 is a convenience shorthand for the sequence @code{[(meta a)]}.
+ − 1050 @code{(global-set-key 'a 'foo)} means the same thing as
+ − 1051 @code{(global-set-key '[a] 'foo)}. It could be argued that allowing
+ − 1052 such a shorthand just leads to sloppiness and bugs, but it's there, and
+ − 1053 it isn't likely to go away.
+ − 1054
+ − 1055 @item [(meta a)]
+ − 1056 is The Right Thing. It corresponds in a one-to-one way with the
+ − 1057 internal representation of key-sequences in keymaps.
+ − 1058
+ − 1059 @item [Meta-a]
+ − 1060 is typical FSF Emacs 19 brain damage. As is usual, an existing,
+ − 1061 functional design is ignored (XEmacs) and an incompatible and
+ − 1062 technically worse kludge is used.
+ − 1063
+ − 1064 @item "\ea"
+ − 1065 is compatible with Emacs 18, but suffers from ASCII Seven-Bit Brain
+ − 1066 Damage. I also find it harder to read. Use this if you're trying to
+ − 1067 write code which works in every Emacs, but be aware that you can not
+ − 1068 express all Possible key-sequences (@kbd{control-9}, @kbd{f1}, etc.)
+ − 1069 using this.
+ − 1070
+ − 1071 @end table
+ − 1072
+ − 1073
+ − 1074 @node 8.2.
+ − 1075 @section 8.2. How can I make XEmacs recognize the Alt key of my HP workstation as a Meta key?
+ − 1076
+ − 1077 Put the following line into a file and load it with xmodmap(1) before
+ − 1078 starting XEmacs:
+ − 1079
+ − 1080 @example
+ − 1081 remove Mod1 = Mode_switch
+ − 1082 @end example
+ − 1083
+ − 1084
+ − 1085 @node 8.3.
+ − 1086 @section 8.3. How can I stop the down-arrow-key from adding empty lines at the bottom of my buffers?
+ − 1087
+ − 1088 Add the following line to your @file{.emacs} file:
+ − 1089
+ − 1090 @example
+ − 1091 (setq next-line-add-newlines nil)
+ − 1092 @end example
+ − 1093
+ − 1094
+ − 1095 @node 8.4.
+ − 1096 @section 8.4. I wonder if there is an interactive function that can generate "fake" keyboard events. This way, I could simply map them inside XEmacs.
+ − 1097
+ − 1098 This seems to work:
+ − 1099 @example
+ − 1100 (defun cg--generate-char-event (ch)
+ − 1101 "Generate an event, as if ch has been typed"
+ − 1102 (dispatch-event (character-to-event ch)))
+ − 1103
+ − 1104 ;; Backspace and Delete stuff
+ − 1105 (global-set-key '(backspace)
+ − 1106 '(lambda () (interactive) (cg--generate-char-event 127)))
+ − 1107 (global-set-key '(unknown_keysym_0x4)
+ − 1108 '(lambda () (interactive) (cg--generate-char-event 4)))
+ − 1109 @end example
+ − 1110
+ − 1111
+ − 1112 @node 8.5.
+ − 1113 @section 8.5. I am trying to bind C-. to scroll up by one line and C-; to scroll down by one line...
+ − 1114
+ − 1115 Add the following (Thanks to Richard Mlynarik <mly@@adoc.xerox.com> and
+ − 1116 Wayne Newberry <wayne@@zen.cac.stratus.com>) to @file{.emacs}:
+ − 1117
+ − 1118 @example
+ − 1119 (defun scroll-up-one-line ()
+ − 1120 (interactive)
+ − 1121 (scroll-up 1))
+ − 1122
+ − 1123 (defun scroll-down-one-line ()
+ − 1124 (interactive)
+ − 1125 (scroll-down 1))
+ − 1126
+ − 1127 (global-set-key [(control ?.)] 'scroll-up-one-line) ; C-.
+ − 1128 (global-set-key [(control ?;)] 'scroll-down-one-line) ; C-;
+ − 1129 @end example
+ − 1130
+ − 1131 The key point is that you can only bind simple functions to keys; you can not
+ − 1132 bind a key to a function that you're also passing arguments to. (See <A
+ − 1133 HREF="#ss8.7">8.7 How can I bind complex functions</A> for a better answer.)
+ − 1134
+ − 1135 @c Fix the above HTML specifier reference
+ − 1136
+ − 1137 @node 8.6.
+ − 1138 @section 8.6. I cannot manage to globally bind my @key{Delete} key to something other than the default. How does one do this?
+ − 1139
+ − 1140 @example
+ − 1141 (defun Foo ()
+ − 1142 (interactive)
+ − 1143 (message "You hit DELETE"))
+ − 1144
+ − 1145 (global-set-key "\C-?" 'Foo)
+ − 1146 @end example
+ − 1147
+ − 1148 However, some modes explicitly bind @key{Delete}, so you would need to
+ − 1149 add a hook that does @code{local-set-key} for them.
+ − 1150
+ − 1151
+ − 1152 @node 8.7.
+ − 1153 @section 8.7. How can I bind complex functions (or macros) to keys?
+ − 1154
+ − 1155 As an example, say you want the PASTE key on a Sun keyboard to insert the
+ − 1156 current Primary X selection at point. You can accomplish this with:
+ − 1157
+ − 1158 @example
+ − 1159 (define-key global-map 'f18 'x-insert-selection)
+ − 1160 @end example
+ − 1161
+ − 1162 However, this only works if there is a current X selection (the
+ − 1163 selection will be highlighted). The functionality I like is for the
+ − 1164 PASTE key to insert the current X selection if there is one, otherwise
+ − 1165 insert the contents of the clipboard. To do this you need to pass
+ − 1166 arguments to x-insert-selection. This is done by wrapping the call in a
+ − 1167 'lambda form:
+ − 1168
+ − 1169 @example
+ − 1170 (define-key global-map 'f18
+ − 1171 (function (lambda () (interactive) (x-insert-selection t nil))))
+ − 1172 @end example
+ − 1173
+ − 1174 This binds the 'f18 key to a "generic" functional object. The interactive
+ − 1175 spec is required because only interactive functions can be bound to keys.
+ − 1176 Also take a look at the doc for "function".
+ − 1177
+ − 1178 For the FAQ example you could use:
+ − 1179
+ − 1180 @example
+ − 1181 (global-set-key [(control ?.)]
+ − 1182 (function (lambda () (interactive) (scroll-up 1))))
+ − 1183 (global-set-key [(control ?;)]
+ − 1184 (function (lambda () (interactive) (scroll-up -1))))
+ − 1185 @end example
+ − 1186
+ − 1187 This is fine if you only need a few functions within the lambda body. If
+ − 1188 you're doing more it's cleaner to define a separate function as in the
+ − 1189 original FAQ example (<A HREF="#ss11.3">question 11.3</A>).
+ − 1190
+ − 1191 @c Fix the above HTML specifier reference
+ − 1192
+ − 1193 @node 8.8.
+ − 1194 @section 8.8. Can the cursor keys scroll the screen a line at a time, rather than the default half page jump? I tend it to find it disorienting.
+ − 1195
+ − 1196 Try this:
+ − 1197
+ − 1198 @example
+ − 1199 (defun scroll-one-line-up (&optional arg)
+ − 1200 "Scroll the selected window up (forward in the text) one line (or N lines)."
+ − 1201 (interactive "p")
+ − 1202 (scroll-up (or arg 1)))
+ − 1203
+ − 1204 (defun scroll-one-line-down (&optional arg)
+ − 1205 "Scroll the selected window down (backward in the text) one line (or N)."
+ − 1206 (interactive "p")
+ − 1207 (scroll-down (or arg 1)))
+ − 1208
+ − 1209 (global-set-key 'up 'scroll-one-line-up)
+ − 1210 (global-set-key 'down 'scroll-one-line-down)
+ − 1211 @end example
+ − 1212
+ − 1213 The following will also work but will affect more than just the cursor
+ − 1214 keys (i.e. C-n and C-p):
+ − 1215
+ − 1216 @example
+ − 1217 (setq scroll-step 1)
+ − 1218 @end example
+ − 1219
+ − 1220 @node 8.9.
+ − 1221 @section 8.9. How to map "Help" key alone on Sun type4 keyboard?
+ − 1222
+ − 1223 The following works in GNU Emacs 19:
+ − 1224
+ − 1225 @example
+ − 1226 (global-set-key [help] 'help-command) ;; Help
+ − 1227 @end example
+ − 1228
+ − 1229 The following works in XEmacs 19.13 with the addition of shift:
+ − 1230
+ − 1231 @example
+ − 1232 (global-set-key [(shift help)] 'help-command) ;; Help
+ − 1233 @end example
+ − 1234
+ − 1235 But it doesn't work alone. This is in the file @file{PROBLEMS} which
+ − 1236 should have come with your XEmacs installation:
+ − 1237
+ − 1238 @emph{Emacs ignores the @key{help} key when running OLWM}.
+ − 1239
+ − 1240 OLWM grabs the @key{help} key, and retransmits it to the appropriate
+ − 1241 client using XSendEvent. Allowing Emacs to react to synthetic events is
+ − 1242 a security hole, so this is turned off by default. You can enable it by
+ − 1243 setting the variable x-allow-sendevents to t. You can also cause fix
+ − 1244 this by telling OLWM to not grab the help key, with the null binding
+ − 1245 @samp{OpenWindows.KeyboardCommand.Help:}.
+ − 1246
+ − 1247
+ − 1248 @node 8.10.
+ − 1249 @section 8.10. How can you type in special characters in XEmacs?
+ − 1250
+ − 1251 One way is to use the package @file{x-compose}. Then you can use sequences
+ − 1252 like @kbd{Compose " a} to get d (a-umlaut), etc.
+ − 1253
+ − 1254
+ − 1255
+ − 1256 @node 9. The cursor, 10. The mouse; cutting and pasting, 8. The keyboard, top
+ − 1257 @chapter 9. The cursor
+ − 1258
+ − 1259 @menu
+ − 1260 * 9.1.:: 9.1. Is there a way to make the bar cursor a little thicker than one-pixel thick since I lose it?
+ − 1261 * 9.2.:: 9.2. On the same subject -- is there a way to get back the old "block" cursor where the cursor covers the character in front of the point?
+ − 1262 @end menu
+ − 1263
+ − 1264
+ − 1265 @node 9.1.
+ − 1266 @section 9.1. Is there a way to make the bar cursor a little thicker than one-pixel thick since I lose it?
+ − 1267
+ − 1268 For a 1 pixel bar cursor, use:
+ − 1269
+ − 1270 @example
+ − 1271 (setq bar-cursor t)
+ − 1272 @end example
+ − 1273
+ − 1274 For a 2 pixel bar cursor, use:
+ − 1275
+ − 1276 @example
+ − 1277 (setq bar-cursor 'anything-else)
+ − 1278 @end example
+ − 1279
+ − 1280 You can use a color to make it stand out better:
+ − 1281
+ − 1282 @example
+ − 1283 Emacs*cursorColor: Red
+ − 1284 @end example
+ − 1285
+ − 1286
+ − 1287 @node 9.2.
+ − 1288 @section 9.2. On the same subject -- is there a way to get back the old "block" cursor where the cursor covers the character in front of the point?
+ − 1289
+ − 1290 @example
+ − 1291 (setq bar-cursor nil)
+ − 1292 @end example
+ − 1293
+ − 1294
+ − 1295
+ − 1296 @node 10. The mouse; cutting and pasting, 11. Highlighting, 9. The cursor, top
+ − 1297 @chapter 10. The mouse; cutting and pasting
+ − 1298
+ − 1299 @menu
+ − 1300 * 10.1.:: 10.1. I keep hitting the middle mouse button by accident and getting stuff pasted into my buffer so how can I turn this off?
+ − 1301 * 10.2.:: 10.2. How do I set control/meta/etc modifiers on mouse buttons?
+ − 1302 * 10.3.:: 10.3. I do "^x ^b" to get a list of buffers and the entries get highlighted when I move the mouse over them but clicking the left mouse does not do anything.
+ − 1303 * 10.4.:: 10.4. How can I get a list of buffers to popup when I hit button 3 on the mouse?
+ − 1304 * 10.5.:: 10.5. Why does cut-and-paste not work between XEmacs and a cmdtool?
+ − 1305 * 10.6.:: 10.6. How I can set XEmacs up so that it pastes where the cursor is _not_ where the pointer lies?
+ − 1306 * 10.7.:: 10.7. How do I select a rectangular region?
+ − 1307 * 10.8.:: 10.8. Why does M-w take so long?
+ − 1308 @end menu
+ − 1309
+ − 1310
+ − 1311 @node 10.1.
+ − 1312 @section 10.1. I keep hitting the middle mouse button by accident and getting stuff pasted into my buffer so how can I turn this off?
+ − 1313
+ − 1314 Here is an alternative binding, whereby the middle mouse button selects (but
+ − 1315 does not cut) the expression under the mouse. Clicking middle on a left or
+ − 1316 right paren will select to the matching one. Note that you can use
+ − 1317 @code{define-key} or @code{global-set-key}.
+ − 1318
+ − 1319 @example
+ − 1320 (defun Mouse-Set-Point-and-Select (event)
+ − 1321 "Sets the point at the mouse location, then marks following form"
+ − 1322 (interactive "@@e")
+ − 1323 (mouse-set-point event)
+ − 1324 (mark-sexp 1)
+ − 1325 )
+ − 1326 (define-key global-map 'button2 'Mouse-Set-Point-and-Select)
+ − 1327 @end example
+ − 1328
+ − 1329 @c Get this fixed
+ − 1330 (Editor's Note -- there is a problem with texinfo/text/html conversion, so
+ − 1331 the double at-sign should only be a single, above. I'll fix it one of these
+ − 1332 days -- AJR)
+ − 1333
+ − 1334
+ − 1335 @node 10.2.
+ − 1336 @section 10.2. How do I set control/meta/etc modifiers on mouse buttons?
+ − 1337
+ − 1338 Use, for instance, @code{[(meta button1)]}. For example, here is a
+ − 1339 common setting for Common Lisp programmers who use the bundled ilisp
+ − 1340 package, whereby meta-button1 on a function name will find the file
+ − 1341 where the function name was defined, and put you at that location in
+ − 1342 the source file.
+ − 1343
+ − 1344 [Inside a function that gets called by the lisp-mode-hook and ilisp-mode-hook]
+ − 1345 @example
+ − 1346 (local-set-key [(meta button1)] 'edit-definitions-lisp)
+ − 1347 @end example
+ − 1348
+ − 1349
+ − 1350 @node 10.3.
+ − 1351 @section 10.3. I do "^x ^b" to get a list of buffers and the entries get highlighted when I move the mouse over them but clicking the left mouse does not do anything.
+ − 1352
+ − 1353 Use the middle mouse button.
+ − 1354
+ − 1355
+ − 1356 @node 10.4.
+ − 1357 @section 10.4. How can I get a list of buffers to popup when I hit button 3 on the mouse?
+ − 1358
+ − 1359 The following code will actually replace the default popup on button3:
+ − 1360
+ − 1361 @example
+ − 1362 (defun cw-build-buffers ()
+ − 1363 "Popup buffer menu."
+ − 1364 (interactive "@@")
+ − 1365 (run-hooks 'activate-menubar-hook)
+ − 1366 (popup-menu (car (find-menu-item current-menubar '("Buffers")))))
+ − 1367
+ − 1368 (define-key global-map [(button3)] 'cw-build-buffers)
+ − 1369 @end example
+ − 1370
+ − 1371 @c Get this fixed
+ − 1372
+ − 1373 (Editor's Note -- there is a problem with texinfo/text/html conversion, so
+ − 1374 the double at-sign should only be a single, above. I'll fix it one of these
+ − 1375 days -- AJR)
+ − 1376
+ − 1377
+ − 1378 @node 10.5.
+ − 1379 @section 10.5. Why does cut-and-paste not work between XEmacs and a cmdtool?
+ − 1380
+ − 1381 We don't know. It's a bug. There does seem to be a work-around,
+ − 1382 however. Try running xclipboard first. It appears to fix the problem
+ − 1383 even if you exit it. (This should be mostly fixed in 19.13, but we
+ − 1384 haven't yet verified that).
+ − 1385
+ − 1386
+ − 1387 @node 10.6.
+ − 1388 @section 10.6. How I can set XEmacs up so that it pastes where the cursor is _not_ where the pointer lies?
+ − 1389
+ − 1390
+ − 1391 Try adding the following to your @file{.emacs}:
+ − 1392
+ − 1393 @example
+ − 1394 (define-key global-map 'button2 'x-insert-selection)
+ − 1395 @end example
+ − 1396
+ − 1397 This comes from the @file{sample.emacs} file in @file{etc/}, which has
+ − 1398 lots of goodies.
+ − 1399
+ − 1400
+ − 1401 @node 10.7.
+ − 1402 @section 10.7. How do I select a rectangular region?
+ − 1403
+ − 1404
+ − 1405 Just select the region normally, then use the rectangle commands (e.g.
+ − 1406 @code{kill-rectangle}) on it. The region does not highlight as a
+ − 1407 rectangle, but the commands work just fine.
+ − 1408
+ − 1409 To actually sweep out rectangular regions with the mouse do the
+ − 1410 following:
+ − 1411
+ − 1412 @example
+ − 1413 (setq mouse-track-rectangle-p t)
+ − 1414 @end example
+ − 1415
+ − 1416
+ − 1417 @node 10.8.
+ − 1418 @section 10.8. Why does M-w take so long?
+ − 1419
+ − 1420 It actually doesn't. It leaves the region visible for a second so that
+ − 1421 you can see what area is being yanked. If you start working, though, it
+ − 1422 will immediately complete its operation. In other words, it will only
+ − 1423 delay for a second if you let it.
+ − 1424
+ − 1425
+ − 1426 @node 11. Highlighting, 12. The menubar and toolbar, 10. The mouse; cutting and pasting, top
+ − 1427 @chapter 11. Highlighting
+ − 1428
+ − 1429 @menu
+ − 1430 * 11.1.:: 11.1. How can I highlight selections?
+ − 1431 * 11.2.:: 11.2. How do I get a pending-delete type of behavior?
+ − 1432 * 11.3.:: 11.3. I do not like my text highlighted while I am doing isearch as I am not able to see whats underneath. How do I turn it off?
+ − 1433 * 11.4.:: 11.4. The text gets highlighted when I do C-x C-p (mark-page). Is there a way to turn this feature off?
+ − 1434 @end menu
+ − 1435
+ − 1436
+ − 1437 @node 11.1.
+ − 1438 @section 11.1. How can I highlight selections?
+ − 1439
+ − 1440 Use zmacs mode. This mode allows for what some might call gratuitous
+ − 1441 highlighting for selected regions (either by setting mark or by using the
+ − 1442 mouse). To use, add the following line to your @file{.emacs} file:
+ − 1443
+ − 1444 @example
+ − 1445 (setq zmacs-regions t)
+ − 1446 @end example
+ − 1447
+ − 1448 This is the default behavior.
+ − 1449
+ − 1450
+ − 1451 @node 11.2.
+ − 1452 @section 11.2. How do I get a pending-delete type of behavior?
+ − 1453
+ − 1454 @dfn{Pending delete} is what happens when you select a region (with the
+ − 1455 mouse or keyboard) and you press a key to replace the selected region by
+ − 1456 the key you typed. Usually backspace kills the selected region.
+ − 1457
+ − 1458 To get this behavior, add the following line to your @file{.emacs} file:
+ − 1459
+ − 1460 @example
+ − 1461 (require 'pending-del)
+ − 1462 @end example
+ − 1463
+ − 1464
+ − 1465 @node 11.3.
+ − 1466 @section 11.3. I do not like my text highlighted while I am doing isearch as I am not able to see whats underneath. How do I turn it off?
+ − 1467
+ − 1468 @example
+ − 1469 (setq isearch-highlight nil)
+ − 1470 @end example
+ − 1471
+ − 1472 Note also that isearch-highlight affects query-replace and ispell. Instead
+ − 1473 of disabling isearch-highlight you may find that a better solution consists
+ − 1474 of customizing the 'isearch' face.
+ − 1475
+ − 1476
+ − 1477 @node 11.4.
+ − 1478 @section 11.4. The text gets highlighted when I do C-x C-p (mark-page). Is there a way to turn this feature off?
+ − 1479
+ − 1480 @example
+ − 1481 (setq zmacs-regions nil)
+ − 1482 @end example
+ − 1483
+ − 1484
+ − 1485
+ − 1486 @node 12. The menubar and toolbar, 13. Scrollbars, 11. Highlighting, top
+ − 1487 @chapter 12. The menubar and toolbar
+ − 1488
+ − 1489 @menu
+ − 1490 * 12.1.:: 12.1. How do I get rid of the menu (or menubar) ?
+ − 1491 * 12.2.:: 12.2. Can I customize the basic menubar?
+ − 1492 * 12.3.:: 12.3. What controls how many buffers are listed in the menu "Buffers" list?
+ − 1493 * 12.4.:: 12.4. I am trying to use a resource like @code{Emacs*menubar*font} to set the font of the menubar but it's not working.
+ − 1494
+ − 1495 @end menu
+ − 1496
+ − 1497
+ − 1498 @node 12.1.
+ − 1499 @section 12.1. How do I get rid of the menu (or menubar) ?
+ − 1500
+ − 1501 Answer: To get rid of the menubar, add to @file{.emacs}:
+ − 1502
+ − 1503 @example
+ − 1504 (set-menubar nil)
+ − 1505 @end example
+ − 1506
+ − 1507
+ − 1508 @node 12.2.
+ − 1509 @section 12.2. Can I customize the basic menubar?
+ − 1510
+ − 1511 For an extensive menubar, add the line
+ − 1512
+ − 1513 @example
+ − 1514 (load "big-menubar")
+ − 1515 @end example
+ − 1516
+ − 1517 to your @file{.emacs} file. If you'd like to write your own, this file
+ − 1518 provides a good set of examples to start from:
+ − 1519
+ − 1520 @example
+ − 1521 lisp/packages/big-menubar.el
+ − 1522 @end example
+ − 1523
+ − 1524 (starting from your system XEmacs installation directory).
+ − 1525
+ − 1526
+ − 1527 @node 12.3.
+ − 1528 @section 12.3. What controls how many buffers are listed in the menu "Buffers" list?
+ − 1529
+ − 1530 Add the following to your @file{.emacs}, modified as needed:
+ − 1531
+ − 1532 @example
+ − 1533 (setq buffers-menu-max-size 20)
+ − 1534 @end example
+ − 1535
+ − 1536 If you do not want a limit, try
+ − 1537
+ − 1538 @example
+ − 1539 (setq buffers-menu-max-size nil)
+ − 1540 @end example
+ − 1541
+ − 1542
+ − 1543 @node 12.4.
+ − 1544 @section 12.4. I am trying to use a resource like @code{Emacs*menubar*font} to set the font of the menubar but it's not working.
+ − 1545
+ − 1546 If you are using the real Motif menubar, this resource is not recognized;
+ − 1547 you have to say
+ − 1548
+ − 1549 @example
+ − 1550 Emacs*menubar*fontList: FONT
+ − 1551 @end example
+ − 1552
+ − 1553 If you are using the Lucid menubar, the former resource will be recognized
+ − 1554 only if the latter resource is unset. This means that the resource
+ − 1555
+ − 1556 @example
+ − 1557 *fontList: FONT
+ − 1558 @end example
+ − 1559
+ − 1560 will override
+ − 1561
+ − 1562 @example
+ − 1563 Emacs*menubar*font: FONT
+ − 1564 @end example
+ − 1565
+ − 1566 even though the latter is more specific.
+ − 1567
+ − 1568
+ − 1569 @node 13. Scrollbars, 14. Frame Geometry, 12. The menubar and toolbar, top
+ − 1570 @chapter 13. Scrollbars
+ − 1571
+ − 1572 @menu
+ − 1573 * 13.1.:: 13.1. How can I disable the scrollbar?
+ − 1574 * 13.2.:: 13.2. How can one use resources to change scrollbar colors?
+ − 1575 * 13.3.:: 13.3. When I move the scrollbar in an XEmacs window, it moves the point as well, which should not be the default behavior. Is this a bug or a feature? Can I disable it?
+ − 1576 @end menu
+ − 1577
+ − 1578
+ − 1579 @node 13.1.
+ − 1580 @section 13.1. How can I disable the scrollbar?
+ − 1581
+ − 1582 To turn disable them for all frames, add the following line to
+ − 1583 your @file{.Xdefaults}:
+ − 1584
+ − 1585 @example
+ − 1586 Emacs.scrollBarWidth: 0
+ − 1587 @end example
+ − 1588
+ − 1589 To turn the scrollbar off on a per-frame basis, use the following function:
+ − 1590
+ − 1591 @example
+ − 1592 (set-specifier scrollbar-width (cons (selected-frame) 0))
+ − 1593 @end example
+ − 1594
+ − 1595 You can actually turn the scrollbars on at any level you want by
+ − 1596 substituting for (selected-frame) in the above command. For example, to
+ − 1597 turn the scrollbars off only in a single buffer:
+ − 1598
+ − 1599 @example
+ − 1600 (set-specifier scrollbar-width (cons (current-buffer) 0))
+ − 1601 @end example
+ − 1602
+ − 1603
+ − 1604 @node 13.2.
+ − 1605 @section 13.2. How can one use resources to change scrollbar colors?
+ − 1606
+ − 1607 Here's a recap of how to use resources to change your scrollbar colors:
+ − 1608
+ − 1609 @example
+ − 1610 ! Motif scrollbars
+ − 1611
+ − 1612 Emacs*XmScrollBar.Background: skyblue
+ − 1613 Emacs*XmScrollBar.troughColor: lightgray
+ − 1614
+ − 1615 ! Athena scrollbars
+ − 1616
+ − 1617 Emacs*Scrollbar.Foreground: skyblue
+ − 1618 Emacs*Scrollbar.Background: lightgray
+ − 1619 @end example
+ − 1620
+ − 1621 Note the capitalization of @samp{Scrollbar} for the Athena widget.
+ − 1622
+ − 1623
+ − 1624 @node 13.3.
+ − 1625 @section 13.3. When I move the scrollbar in an XEmacs window, it moves the point as well, which should not be the default behavior. Is this a bug or a feature? Can I disable it?
+ − 1626
+ − 1627 The current behavior is a feature, not a bug. Point remains at the same
+ − 1628 buffer position as long as that position does not scroll off the screen. In
+ − 1629 that event, point will end up in either the upper-left or lower-left hand
+ − 1630 corner.
+ − 1631
+ − 1632
+ − 1633
+ − 1634 @node 14. Frame Geometry, 15. Window/icon title; window manager problems, 13. Scrollbars, top
+ − 1635 @chapter 14. Frame Geometry
+ − 1636
+ − 1637 @menu
+ − 1638 * 14.1.:: 14.1. In Lucid Emacs 19.6 I did @code{(set-screen-width @var{characters})} and @code{(set-screen-height @var{lines})} in my @file{.emacs} instead of specifying @samp{Emacs*EmacsScreen.geometry} in my @file{.Xdefaults} but this does not work in XEmacs 19.13.
+ − 1639 * 14.2.:: 14.2. In XEmacs 19.11 I specified @samp{Emacs*EmacsScreen.geometry} in my @file{.emacs} but this does not work in XEmacs 19.13.
+ − 1640 @end menu
+ − 1641
+ − 1642
+ − 1643 @node 14.1.
+ − 1644 @section 14.1. In Lucid Emacs 19.6 I did @code{(set-screen-width @var{characters})} and @code{(set-screen-height @var{lines})} in my @file{.emacs} instead of specifying @samp{Emacs*EmacsScreen.geometry} in my @file{.Xdefaults} but this does not work in XEmacs 19.13.
+ − 1645
+ − 1646 These two functions now take frame arguments:
+ − 1647
+ − 1648 @example
+ − 1649 (set-frame-width (selected-frame) @var{characters})
+ − 1650 (set-frame-height (selected-frame) @var{lines})
+ − 1651 @end example
+ − 1652
+ − 1653 @node 14.2.
+ − 1654 @section 14.2. In XEmacs 19.11 I specified @samp{Emacs*EmacsScreen.geometry} in my @file{.emacs} but this does not work in XEmacs 19.13.
+ − 1655
+ − 1656 We have switched from using the term 'screen' to using the term 'frame'.
+ − 1657 The correct entry for your @file{.Xdefaults} is now:
+ − 1658
+ − 1659 @example
+ − 1660 Emacs*EmacsFrame.geometry
+ − 1661 @end example
+ − 1662
+ − 1663
+ − 1664 @node 15. Window/icon title; window manager problems, 16. Editing source code (C mode; Lisp mode; etc.), 14. Frame Geometry, top
+ − 1665 @chapter 15. Window/icon title; window manager problems
+ − 1666
+ − 1667 @menu
+ − 1668 * 15.1.:: 15.1. How can I get the icon to just say @samp{XEmacs} and not include the name of the current file in it?
+ − 1669 * 15.2.:: 15.2. How can I have the window title area display the full directory/name of the current buffer file and not just the name?
+ − 1670 * 15.3.:: 15.3. When I run @samp{xterm -name junk} I get an xterm whose class name according to xprop, is @samp{junk}. This is the way it's supposed to work, I think. When I run @samp{xemacs -name junk} the class name is not set to @samp{junk}. It's still @samp{emacs}. What does @samp{xemacs -name} really do? The reason I ask is that my window manager (fvwm) will make a window sticky and I use XEmacs to read my mail. I want that XEmacs window to be sticky, without having to use the window manager's function to set the window sticky. What gives?
+ − 1671 @end menu
+ − 1672
+ − 1673
+ − 1674 @node 15.1.
+ − 1675 @section 15.1. How can I get the icon to just say @samp{XEmacs} and not include the name of the current file in it?
+ − 1676
+ − 1677 Add the following line to your @file{.emacs} file:
+ − 1678
+ − 1679 @example
+ − 1680 (setq frame-icon-title-format "XEmacs")
+ − 1681 @end example
+ − 1682
+ − 1683
+ − 1684 @node 15.2.
+ − 1685 @section 15.2. How can I have the window title area display the full directory/name of the current buffer file and not just the name?
+ − 1686
+ − 1687 Add the following line to your @file{.emacs} file:
+ − 1688
+ − 1689 @example
+ − 1690 (setq frame-title-format "%S: %f")
+ − 1691 @end example
+ − 1692 A more sophisticated title might be:
+ − 1693
+ − 1694 @example
+ − 1695 (setq frame-title-format
+ − 1696 '("%S: " (buffer-file-name "%f" (dired-directory dired-directory "%b"))))
+ − 1697 @end example
+ − 1698
+ − 1699 That is, use the file name, or the dired-directory, or the buffer name.
+ − 1700
+ − 1701
+ − 1702 @node 15.3.
+ − 1703 @section 15.3. When I run @samp{xterm -name junk} I get an xterm whose class name according to xprop, is @samp{junk}. This is the way it's supposed to work, I think. When I run @samp{xemacs -name junk} the class name is not set to @samp{junk}. It's still @samp{emacs}. What does @samp{xemacs -name} really do? The reason I ask is that my window manager (fvwm) will make a window sticky and I use XEmacs to read my mail. I want that XEmacs window to be sticky, without having to use the window manager's function to set the window sticky. What gives?
+ − 1704
+ − 1705 @samp{xemacs -name} sets the application-name for the program (that is,
+ − 1706 the thing which normally comes from @code{argv[0]}.) Using @samp{-name}
+ − 1707 is the same as making a copy of the executable with that new name. The
+ − 1708 WM_CLASS property on each frame is set to the frame-name, and the
+ − 1709 application-class. So, if you did @samp{xemacs -name FOO} and then
+ − 1710 created a frame named @samp{BAR}, you'd get an X window with WM_CLASS =
+ − 1711 @samp{( "BAR", "Emacs")}. However, the resource hierarchy for this
+ − 1712 widget would be
+ − 1713
+ − 1714 @example
+ − 1715 Name: FOO .shell. .pane .BAR
+ − 1716 Class: Emacs.TopLevelShell.XmMainWindow.EmacsFrame
+ − 1717 @end example
+ − 1718
+ − 1719 instead of the default
+ − 1720
+ − 1721 @example
+ − 1722 Name: xemacs.shell. .pane .emacs
+ − 1723 Class: Emacs .TopLevelShell.XmMainWindow.EmacsFrame
+ − 1724 @end example
+ − 1725
+ − 1726 It is arguable that the first element of WM_CLASS should be set to the
+ − 1727 application-name instead of the frame-name, but I think that's less
+ − 1728 flexible, since it does not give you the ability to have multiple
+ − 1729 frames with different WM_CLASS properties. Another possibility would
+ − 1730 be for the default frame name to come from the application name instead
+ − 1731 of simply being @samp{emacs}. However, at this point, making that
+ − 1732 change would be troublesome: it would mean that many users would have to
+ − 1733 make yet another change to their resource files (since the default
+ − 1734 frame name would suddenly change from @samp{emacs} to @samp{xemacs}, or
+ − 1735 whatever the executable happened to be named), so we'd rather avoid it.
+ − 1736
+ − 1737 To make a frame with a particular name use:
+ − 1738
+ − 1739 @example
+ − 1740 (make-frame '((name . "the-name")))
+ − 1741 @end example
+ − 1742
+ − 1743
+ − 1744
+ − 1745 @node 16. Editing source code (C mode; Lisp mode; etc.), 17. Text mode, 15. Window/icon title; window manager problems, top
+ − 1746 @chapter 16. Editing source code (C mode; Lisp mode; etc.)
+ − 1747
+ − 1748 @menu
+ − 1749 * 16.1.:: 16.1. How can I do source code highlighting using font-lock?
+ − 1750 * 16.2.:: 16.2. How do you arrange it so that XEmacs indents all the clauses of a Common Lisp @code{if} the same amount instead of indenting the 3rd clause differently from the first two?
+ − 1751 * 16.3.:: 16.3. I do not like cc-mode. How do I use the old c-mode?
+ − 1752 * 16.4.:: 16.4. When I try to edit a postscript file it gets stuck saying: fontifying 'filename' (regexps....) and it just sits there. If I press ctrl-c in the window where XEmacs was started, it suddenly becomes alive again.
+ − 1753 * 16.5.:: 16.5. Does anyone know how to get the "More" Syntax Highlighting on by default?
+ − 1754 @end menu
+ − 1755
+ − 1756
+ − 1757 @node 16.1.
+ − 1758 @section 16.1. How can I do source code highlighting using font-lock?
+ − 1759
+ − 1760 For most modes, font-lock is already set up and just needs to be turned
+ − 1761 on. This can be done by
+ − 1762
+ − 1763 @example
+ − 1764 M-x font-lock-mode
+ − 1765 @end example
+ − 1766
+ − 1767 or by having XEmacs automatically start it by adding lines like
+ − 1768
+ − 1769 @example
+ − 1770 (add-hook 'emacs-lisp-mode-hook 'turn-on-font-lock)
+ − 1771 (add-hook 'dired-mode-hook 'turn-on-font-lock)
+ − 1772 @end example
+ − 1773
+ − 1774 to your @file{.emacs}. See the file @code{etc/sample.emacs} for more
+ − 1775 examples.
+ − 1776
+ − 1777
+ − 1778 @node 16.2.
+ − 1779 @section 16.2. How do you arrange it so that XEmacs indents all the clauses of a Common Lisp @code{if} the same amount instead of indenting the 3rd clause differently from the first two?
+ − 1780
+ − 1781 One way is to add, to @file{.emacs}:
+ − 1782
+ − 1783 @example
+ − 1784 (put 'if 'lisp-indent-function nil)
+ − 1785 @end example
+ − 1786
+ − 1787 However, note that the package @file{cl-indent.el} that comes with
+ − 1788 XEmacs sets up this kind of indentation by default. @file{cl-indent} also
+ − 1789 knows about many other CL-specific forms. To use @file{cl-indent}, one can
+ − 1790 do this:
+ − 1791
+ − 1792 @example
+ − 1793 (load "cl-indent")
+ − 1794 (setq lisp-indent-function (function common-lisp-indent-function))
+ − 1795 @end example
+ − 1796
+ − 1797 One can also customize @file{cl-indent.el} so it mimics the default @samp{if}
+ − 1798 indentation (@samp{then} indented more than the @samp{else}). Here's
+ − 1799 how:
+ − 1800
+ − 1801 @example
+ − 1802 (put 'if 'common-lisp-indent-function '(nil nil &body))
+ − 1803 @end example
+ − 1804
+ − 1805 Also, a new version (1.2) of @file{cl-indent.el} was posted to
+ − 1806 @samp{comp.emacs.xemacs} on 12/9/94. This version includes more
+ − 1807 documentation than previous versions. This may prove useful if you
+ − 1808 need to customize any indent-functions. The post can be retrieved by
+ − 1809 searching the XEmacs mail archives.
+ − 1810
+ − 1811
+ − 1812 @node 16.3.
+ − 1813 @section 16.3. I do not like cc-mode. How do I use the old c-mode?
+ − 1814
+ − 1815 Well, first off, consider if you really want to do this. cc-mode is
+ − 1816 much more powerful than the old c-mode. But if you still insist, add
+ − 1817 the following lines to your @file{.emacs}:
+ − 1818
+ − 1819 @example
+ − 1820 (fmakunbound 'c-mode)
+ − 1821 (makunbound 'c-mode-map)
+ − 1822 (fmakunbound 'c++-mode)
+ − 1823 (makunbound 'c++-mode-map)
+ − 1824 (makunbound 'c-style-alist)
+ − 1825 (load-library "old-c-mode")
+ − 1826 (load-library "old-c++-mode")
+ − 1827 @end example
+ − 1828
+ − 1829 This must be done before any other reference is made to either c-mode
+ − 1830 or c++-mode.
+ − 1831
+ − 1832
+ − 1833 @node 16.4.
+ − 1834 @section 16.4. When I try to edit a postscript file it gets stuck saying: fontifying 'filename' (regexps....) and it just sits there. If I press ctrl-c in the window where XEmacs was started, it suddenly becomes alive again.
+ − 1835
+ − 1836 This was caused by a bug in the Postscript font-lock regular
+ − 1837 expressions. It should be fixed in 19.13. For earlier versions of
+ − 1838 XEmacs, have a look at your @file{.emacs} file. You will probably have
+ − 1839 a line like:
+ − 1840
+ − 1841 @example
+ − 1842 (add-hook 'postscript-mode-hook 'turn-on-font-lock)
+ − 1843 @end example
+ − 1844
+ − 1845 Take it out, restart XEmacs, and it won't try to fontify your
+ − 1846 postscript files anymore.
+ − 1847
+ − 1848
+ − 1849 @node 16.5.
+ − 1850 @section 16.5. Does anyone know how to get the "More" Syntax Highlighting on by default?
+ − 1851
+ − 1852 For C, C++, and Lisp, you can try adding the following to your @file{.emacs} file:
+ − 1853
+ − 1854 @example
+ − 1855 (setq c-font-lock-keywords c-font-lock-keywords-2)
+ − 1856 (setq c++-font-lock-keywords c++-font-lock-keywords-2)
+ − 1857 (setq lisp-font-lock-keywords lisp-font-lock-keywords-2)
+ − 1858 @end example
+ − 1859
+ − 1860
+ − 1861
+ − 1862 @node 17. Text mode, 18. Shell mode, 16. Editing source code (C mode; Lisp mode; etc.), top
+ − 1863 @chapter 17. Text mode
+ − 1864
+ − 1865 @menu
+ − 1866 * 17.1.:: 17.1. How can I enable auto-indent?
+ − 1867 * 17.2.:: 17.2. How can I get XEmacs to come up in text mode (auto-fill) by default?
+ − 1868 @end menu
+ − 1869
+ − 1870
+ − 1871 @node 17.1.
+ − 1872 @section 17.1. How can I enable auto-indent?
+ − 1873
+ − 1874 Put the following line in your @file{.emacs}.
+ − 1875
+ − 1876 @example
+ − 1877 (setq indent-line-function 'indent-relative-maybe)
+ − 1878 @end example
+ − 1879
+ − 1880 If you want to get fancy, try @file{filladapt} and @file{fa-extras},
+ − 1881 available from the Emacs Lisp Archive at Ohio State University.
+ − 1882 @ifinfo
+ − 1883 Get them at URL:
+ − 1884
+ − 1885 @example
+ − 1886 ftp://archive.cis.ohio-state.edu/pub/gnu/emacs/elisp-archive/packages
+ − 1887 @end example
+ − 1888 @end ifinfo
+ − 1889 @ifhtml
+ − 1890 Get them at
+ − 1891 <A HREF="ftp://archive.cis.ohio-state.edu/pub/gnu/emacs/elisp-archive/packages/">ftp://archive.cis.ohio-state.edu/pub/gnu/emacs/elisp-archive/packages/</A>
+ − 1892 @end ifhtml
+ − 1893
+ − 1894
+ − 1895 @node 17.2.
+ − 1896 @section 17.2. How can I get XEmacs to come up in text mode (auto-fill) by default?
+ − 1897
+ − 1898 Try the following lisp in your @file{.emacs} file
+ − 1899
+ − 1900 @example
+ − 1901 (setq default-major-mode 'text-mode)
+ − 1902 (setq text-mode-hook 'turn-on-auto-fill)
+ − 1903 @end example
+ − 1904
+ − 1905 WARNING: note that changing default-major-mode from fundamental-mode can
+ − 1906 break a large amount of built-in code that expects newly created buffers to
+ − 1907 be in fundamental-mode. (Changing from fundamental-mode to auto-fill
+ − 1908 text-mode might not wreak too much havoc, but changing to something more
+ − 1909 exotic like a lisp-mode would break many Emacs packages.
+ − 1910
+ − 1911 Note that Emacs defaultly starts up in buffer *scratch* in
+ − 1912 initial-major-mode, which defaults to lisp-interaction-mode. Thus
+ − 1913 adding the following form to your Emacs init file will cause the
+ − 1914 initial *scratch* buffer to be put into auto-fill'ed text-mode.
+ − 1915
+ − 1916 @example
+ − 1917 (setq initial-major-mode
+ − 1918 (function (lambda ()
+ − 1919 (text-mode)
+ − 1920 (turn-on-auto-fill))))
+ − 1921 @end example
+ − 1922
+ − 1923 Note that after your init file is loaded, if inhibit-startup-message
+ − 1924 is null (the default) and the startup buffer is *scratch* then the
+ − 1925 startup message will be inserted into *scratch*; it will be removed
+ − 1926 after a timeout by erasing the entire *scratch* buffer. Keep in mind
+ − 1927 this default usage of *scratch* if you desire any prior manipulation
+ − 1928 of *scratch* from within your Emacs init file. In particular, anything
+ − 1929 you insert into *scratch* from your init file will be later erased.
+ − 1930 Also, if you change the mode of *scratch* be sure that this will
+ − 1931 not interfere with possible later insertion of the startup message
+ − 1932 (e.g. if you put *scratch* into a nonstandard mode that has automatic
+ − 1933 font lock rules, then the startup message might get fontified in
+ − 1934 a strange foreign manner, e.g. as code in some programming language).
+ − 1935
+ − 1936
+ − 1937
+ − 1938 @node 18. Shell mode, 19. Mail; VM; GNUS; BBDB; and related, 17. Text mode, top
+ − 1939 @chapter 18. Shell mode
+ − 1940
+ − 1941 @menu
+ − 1942 * 18.1.:: 18.1. How do I start up a second shell buffer?
+ − 1943 * 18.2.:: 18.2. I'm using the Emacs @kbd{M-x shell} function, and I would like to invoke and use a telnet session within it. Everything works fine except that now all ^M's are filtered out by Emacs. Fixes?
+ − 1944 * 18.3.:: 18.3. If I type a very long command line (like a compile command) into a shell buffer, the output seems to be messed up.
+ − 1945 @end menu
+ − 1946
+ − 1947
+ − 1948 @node 18.1.
+ − 1949 @section 18.1. How do I start up a second shell buffer?
+ − 1950
+ − 1951 In the *shell* buffer:
+ − 1952
+ − 1953 @example
+ − 1954 M-x rename-buffer RET *shell-1* RET
+ − 1955 M-x shell RET
+ − 1956 @end example
+ − 1957
+ − 1958 This will then start a second shell. The key is that no buffer named
+ − 1959 *shell* can exist. It might be preferable to use @kbd{M-x
+ − 1960 rename-uniquely} to rename the *shell* buffer instead of @kbd{M-x
+ − 1961 rename-buffer}.
+ − 1962
+ − 1963
+ − 1964 @node 18.2.
+ − 1965 @section 18.2. I'm using the Emacs @kbd{M-x shell} function, and I would like to invoke and use a telnet session within it. Everything works fine except that now all ^M's are filtered out by Emacs. Fixes?
+ − 1966
+ − 1967 Use @kbd{M-x rsh} or @kbd{M-x telnet} to open remote sessions rather
+ − 1968 than doing rsh or telnet within the local shell buffer.
+ − 1969
+ − 1970
+ − 1971 @node 18.3.
+ − 1972 @section 18.3. If I type a very long command line (like a compile command) into a shell buffer, the output seems to be messed up.
+ − 1973
+ − 1974 If you see lots of ^G's in the buffer, you're using an old version of
+ − 1975 XEmacs. If the command line seems to be delayed or split into pieces,
+ − 1976 you are probably using csh with the @samp{filec} variable set. To fix
+ − 1977 this, add the following line to your @file{.cshrc}, after @samp{filec} is set:
+ − 1978
+ − 1979 @example
+ − 1980 if ( "$TERM" == emacs || "$TERM" == unknown ) unset filec
+ − 1981 @end example
+ − 1982
+ − 1983 @node 19. Mail; VM; GNUS; BBDB; and related, 20. Printing, 18. Shell mode, top
+ − 1984 @chapter 19. Mail; VM; GNUS; BBDB; and related
+ − 1985
+ − 1986 @menu
+ − 1987 * 19.1.:: 19.1. How and where I am suppose to set the face attributes for customizing the appearance of messages (i.e. for VM)?
+ − 1988 * 19.2.:: 19.2. I seem to have heard that there's a package distributed with XEmacs which will use the echo area to notify you of incoming mail in a rather configurable way (multiple spool files, different actions for different files). What and where is it?
+ − 1989 * 19.3.:: 19.3. Is there any way to add more faces and regexps to GNUS without hacking gnus.el?
+ − 1990 * 19.4.:: 19.4. What is BBDB?
+ − 1991 * 19.5.:: 19.5. I noticed that BBDB evokes an XEmacs bug; is there a fix?
+ − 1992 * 19.6.:: 19.6. I'm getting the error 'Wrong type argument: listp :-pos' when I try to start BBDB. What do I do?
+ − 1993 * 19.7.:: 19.7. I'm getting the error 'movemail: Permission denied' when I try and start VM. What do I do?
+ − 1994 @end menu
+ − 1995
+ − 1996
+ − 1997 @node 19.1.
+ − 1998 @section 19.1. How and where I am suppose to set the face attributes for customizing the appearance of messages (i.e. for VM)?
+ − 1999
+ − 2000 Suppose you want to use:
+ − 2001
+ − 2002 @example
+ − 2003 (set-face-font 'message-highlighted-header-contents
+ − 2004 "-adobe-courier-bold-r-normal--12*")
+ − 2005 (set-face-foreground 'message-headers "darkslateblue")
+ − 2006 (set-face-foreground 'message-header-contents "brown")
+ − 2007 (set-face-foreground 'message-highlighted-header-contents "black")
+ − 2008 (set-face-foreground 'message-cited-text "darkgreen")
+ − 2009 @end example
+ − 2010
+ − 2011 Well, this should work, provided that @code{(require
+ − 2012 'highlight-headers)} is executed first. Also, highlight-headers is
+ − 2013 self-contained and you don't need to turn on font-lock mode.
+ − 2014
+ − 2015
+ − 2016 @node 19.2.
+ − 2017 @section 19.2. I seem to have heard that there's a package distributed with XEmacs which will use the echo area to notify you of incoming mail in a rather configurable way (multiple spool files, different actions for different files). What and where is it?
+ − 2018
+ − 2019 It's called reportmail. Add the following to your @file{.emacs}:
+ − 2020
+ − 2021 @example
+ − 2022 (load-library "reportmail")
+ − 2023 @end example
+ − 2024
+ − 2025
+ − 2026 @node 19.3.
+ − 2027 @section 19.3. Is there any way to add more faces and regexps to GNUS without hacking gnus.el?
+ − 2028
+ − 2029 You can try the folowing elisp:
+ − 2030
+ − 2031 @example
+ − 2032 (add-hook 'gnus-startup-hook
+ − 2033 '(lambda ()
+ − 2034 (font-lock-mode)
+ − 2035 (set-face-foreground 'message-headers "red")
+ − 2036 (set-face-foreground 'message-header-contents "orange")
+ − 2037 (set-face-foreground 'message-cited-text "blue")))
+ − 2038 @end example
+ − 2039
+ − 2040
+ − 2041 @node 19.4.
+ − 2042 @section 19.4. What is BBDB?
+ − 2043
+ − 2044 BBDB is the Big Brother Database, written by Jamie Zawinski
+ − 2045 <jwz@@netscape.com>. It interfaces to VM, mh-e, and GNUS and
+ − 2046 conveniently snarfs information about people and other things from
+ − 2047 articles and messages that go by.
+ − 2048
+ − 2049 BBDB is available from the elisp archive
+ − 2050
+ − 2051 @ifinfo
+ − 2052 @example
+ − 2053 archive.cis.ohio-state.edu:/pub/gnu/emacs/elisp-archive
+ − 2054 @end example
+ − 2055 @end ifinfo
+ − 2056 @ifhtml
+ − 2057 <A HREF="ftp://archive.cis.ohio-state.edu/pub/gnu/emacs/elisp-archive/">ftp://archive.cis.ohio-state.edu/pub/gnu/emacs/elisp-archive/</A>
+ − 2058 @end ifhtml
+ − 2059
+ − 2060 BBDB has a mailing list devoted to it:
+ − 2061
+ − 2062 @example
+ − 2063 info-bbdb@@cs.uiuc.edu
+ − 2064 @end example
+ − 2065
+ − 2066 This mailing list is archived at
+ − 2067
+ − 2068 @ifinfo
+ − 2069 @example
+ − 2070 ftp.cs.uiuc.edu:/pub/bbdb
+ − 2071 @end example
+ − 2072 @end ifinfo
+ − 2073 @ifhtml
+ − 2074 <A
+ − 2075 HREF="ftp://ftp.cs.uiuc.edu:/pub/bbdb/">ftp.cs.uiuc.edu:/pub/bbdb/</A>
+ − 2076 @end ifhtml
+ − 2077
+ − 2078
+ − 2079 @node 19.5.
+ − 2080 @section 19.5. I noticed that BBDB evokes an XEmacs bug; is there a fix?
+ − 2081
+ − 2082 This worked for me:
+ − 2083
+ − 2084 @example
+ − 2085 (setq bbdb-electric-p nil)
+ − 2086 @end example
+ − 2087
+ − 2088 @node 19.6.
+ − 2089 @section 19.6. I'm getting the error 'Wrong type argument: listp :-pos' when I try to start BBDB. What do I do?
+ − 2090
+ − 2091 Discard the copy of mail-extr.el that came with bbdb.
+ − 2092
+ − 2093 XEmacs 19.12 made the change that you cannot change the value of
+ − 2094 interned symbols whose names begin with a colon. The mail-extr.el
+ − 2095 that's distributed with 19.12+ is fixed to live with this restriction,
+ − 2096 but old copies of mail-extr.el will bomb.
+ − 2097
+ − 2098
+ − 2099 @node 19.7.
+ − 2100 @section 19.7. I'm getting the error 'movemail: Permission denied' when I try and start VM. What do I do?
+ − 2101
+ − 2102 Execute the following two commands. movemail is normally located in the
+ − 2103 XEmacs install tree at @file{.../lib/xemacs-19.13/$@{arch@}/movemail}.
+ − 2104
+ − 2105 @example
+ − 2106 chgrp mail movemail
+ − 2107 chmod 2555 movemail
+ − 2108 @end example
+ − 2109
+ − 2110
+ − 2111 @node 20. Printing, 21. Gnuserv, 19. Mail; VM; GNUS; BBDB; and related, top
+ − 2112 @chapter 20. Printing
+ − 2113
+ − 2114 @menu
+ − 2115 * 20.1.:: 20.1. Font-lock looks nice. How can I print (WYSIWYG) the highlighted document?
+ − 2116 * 20.2.:: 20.2. My printer is a Postscript printer and @code{lpr} only works for Postscript files, so how do I get @kbd{M-x lpr-region} and @kbd{M-x lpr-buffer} to work?
+ − 2117 @end menu
+ − 2118
+ − 2119
+ − 2120 @node 20.1.
+ − 2121 @section 20.1. Font-lock looks nice. How can I print (WYSIWYG) the highlighted document?
+ − 2122
+ − 2123 The package ps-print.el, which is now included with XEmacs, provides the
+ − 2124 ability to do this. It contains complete instructions on its use:
+ − 2125
+ − 2126 @example
+ − 2127 <xemacs_src_root>/lisp/packages/ps-print.el
+ − 2128 @end example
+ − 2129
+ − 2130
+ − 2131 @node 20.2.
+ − 2132 @section 20.2. My printer is a Postscript printer and @code{lpr} only works for Postscript files, so how do I get @kbd{M-x lpr-region} and @kbd{M-x lpr-buffer} to work?
+ − 2133
+ − 2134 @example
+ − 2135 (setq lpr-command "@var{Command to print text files}")
+ − 2136 @end example
+ − 2137
+ − 2138 Please don't forget to replace @var{Command to print text files} with the
+ − 2139 actual command (@samp{enscript}, @samp{nenscript}, etc.)!
+ − 2140
+ − 2141
+ − 2142
+ − 2143 @node 21. Gnuserv, 22. Miscellaneous, 20. Printing, top
+ − 2144 @chapter 21. Gnuserv
+ − 2145
+ − 2146 @menu
+ − 2147 * 21.1.:: 21.1. How do I disable gnuserv from opening a new frame?
+ − 2148 * 21.2.:: 21.2. What do I do to start the gnuserv server so that each subseqeuent XEmacs is a client?
+ − 2149 @end menu
+ − 2150
+ − 2151
+ − 2152 @node 21.1.
+ − 2153 @section 21.1. How do I disable gnuserv from opening a new frame?
+ − 2154
+ − 2155 If you set the gnuserv-screen variable to the frame that should be
+ − 2156 used to display buffers that are pulled up, a new frame will not be
+ − 2157 created. For example, you could put
+ − 2158
+ − 2159 @example
+ − 2160 (setq gnuserv-screen (selected-frame))
+ − 2161 @end example
+ − 2162
+ − 2163 early on in your @file{.emacs}, to ensure that the first frame created is
+ − 2164 the one used for your gnuserv buffers.
+ − 2165
+ − 2166
+ − 2167 @node 21.2.
+ − 2168 @section 21.2. What do I do to start the gnuserv server so that each subseqeuent XEmacs is a client?
+ − 2169
+ − 2170 Put the following in your @file{.emacs} file to start the server:
+ − 2171
+ − 2172 @example
+ − 2173 (gnuserv-start)
+ − 2174 @end example
+ − 2175
+ − 2176 Start your first XEmacs as usual. After that, you can do
+ − 2177
+ − 2178 @example
+ − 2179 gnuclient randomfilename
+ − 2180 @end example
+ − 2181
+ − 2182 from the command line to get your existing XEmacs process to open a new
+ − 2183 frame and visit randomfilename in that window. When you're done editing
+ − 2184 randomfilename, hit @kbd{C-x #} to kill the buffer and get rid of the
+ − 2185 frame.
+ − 2186
+ − 2187
+ − 2188
+ − 2189 @node 22. Miscellaneous,, 21. Gnuserv, top
+ − 2190 @chapter 22. Miscellaneous
+ − 2191
+ − 2192 @menu
+ − 2193 * 22.1.:: 22.1. How do I specify the paths that XEmacs uses for finding files?
+ − 2194 * 22.2.:: 22.2. Why does edt emulation not work?
+ − 2195 * 22.3.:: 22.3. How can I emulate VI and use it as my default mode?
+ − 2196 * 22.4.:: 22.4. Is there some way to get the behavior so that if the current buffer has a file associated with it, the current buffer will use that files name else use the buffer name?
+ − 2197 * 22.5.:: 22.5. I have no idea where this is coming from, but ever since I moved from 19.9 to 19.13 I have started seeing that all of my buffers will get a minor mode called @samp{Omit}. I have no idea how it got there nor do I know what it does. What is it?
+ − 2198 * 22.6.:: 22.6. How do I turn off the sound?
+ − 2199 * 22.7.:: 22.7. Can I have the end of the buffer delimited in some way? Say, with: [END] ?
+ − 2200 * 22.8.:: 22.8. Can I insert today's date into buffer?
+ − 2201 * 22.9.:: 22.9. Are only certain syntactic character classes available for abbrevs? I didn't see any restrictions in the info.
+ − 2202 * 22.10.:: 22.10. Filladapt used to work after I loaded it. Now in 19.13 it doesn't. What gives?
+ − 2203 @end menu
+ − 2204
+ − 2205
+ − 2206 @node 22.1.
+ − 2207 @section 22.1. How do I specify the paths that XEmacs uses for finding files?
+ − 2208
+ − 2209 You can specify what paths to use by using a number of different flags
+ − 2210 when running configure. See the section MAKE VARIABLES in the top-level
+ − 2211 file INSTALL in the XEmacs distribution for a listing of those flags.
+ − 2212
+ − 2213 Most of the time, however, the simplest fix is: DO NOT specify paths as
+ − 2214 you might for FSF GNU Emacs. XEmacs can generally determine the
+ − 2215 necessary paths dynamically at run time. The only path that generally
+ − 2216 needs to be specified is the root directory to install into. That can
+ − 2217 be specified by passing the @code{--prefix} flag to configure. For a
+ − 2218 description of the XEmacs install tree, please consult the NEWS file.
+ − 2219
+ − 2220
+ − 2221 @node 22.2.
+ − 2222 @section 22.2. Why does edt emulation not work?
+ − 2223
+ − 2224 We don't know, but you can use tpu-edt emulation instead, which works fine
+ − 2225 and is a little fancier than the standard edt emulation. To do this, add
+ − 2226 the following line to your @file{.emacs}:
+ − 2227
+ − 2228 @example
+ − 2229 (load "tpu-edt")
+ − 2230 @end example
+ − 2231
+ − 2232 If you don't want it to replace Ctrl-h with edt-style help menu add this as
+ − 2233 well:
+ − 2234
+ − 2235 @example
+ − 2236 (global-set-key '(control h) 'help-for-help)
+ − 2237 @end example
+ − 2238
+ − 2239
+ − 2240 @node 22.3.
+ − 2241 @section 22.3. How can I emulate VI and use it as my default mode?
+ − 2242
+ − 2243 Our recommended VI emulator is viper. To put the current buffer into
+ − 2244 viper-mode, use the command:
+ − 2245
+ − 2246 @example
+ − 2247 M-x viper
+ − 2248 @end example
+ − 2249
+ − 2250 To make viper-mode the default, add the following lines to your @file{.emacs}:
+ − 2251
+ − 2252 @example
+ − 2253 (load-library "viper")
+ − 2254 (setq term-setup-hook 'viper)
+ − 2255 (setq find-file-hooks 'viper)
+ − 2256 (setq find-file-not-found-hooks 'viper)
+ − 2257 @end example
+ − 2258
+ − 2259
+ − 2260 @node 22.4.
+ − 2261 @section 22.4. Is there some way to get the behavior so that if the current buffer has a file associated with it, the current buffer will use that files name else use the buffer name?
+ − 2262
+ − 2263 Just set frame-title-format from find-file-hooks. Alternatively, look at
+ − 2264 the answer to question 15.2.
+ − 2265
+ − 2266 In addition, one could set modeline-format.
+ − 2267
+ − 2268
+ − 2269 @node 22.5.
+ − 2270 @section 22.5. I have no idea where this is coming from, but ever since I moved from 19.9 to 19.13 I have started seeing that all of my buffers will get a minor mode called @samp{Omit}. I have no idea how it got there nor do I know what it does. What is it?
+ − 2271
+ − 2272 It's part of dired. In dired, you can type M-o to get Omit mode and that will
+ − 2273 ignore uninteresting files (checkpoint files and backups, for example). You
+ − 2274 get Omit in the modeline everywhere because the variable `dired-omit-files-p'
+ − 2275 is globally set to some non-nil value. If you want this functionality, it's
+ − 2276 probably best to use a hook:
+ − 2277
+ − 2278 @example
+ − 2279 (add-hook 'dired-after-readin-hook '(lambda () (dired-omit-toggle)))
+ − 2280 @end example
+ − 2281
+ − 2282 Alternatively, since it seems odd to toggle the omit
+ − 2283 state with every readin, since readin can happen many times in a Dired
+ − 2284 buffer, you can try this hook to correct the "Omit" problem:
+ − 2285
+ − 2286 @example
+ − 2287 (add-hook 'dired-mode-hook
+ − 2288 (function (lambda ()
+ − 2289 ;; `dired-omit-files-p' is made buffer-local by "dired-x.el", but
+ − 2290 ;; maybe not soon enough.
+ − 2291 (make-local-variable 'dired-omit-files-p)
+ − 2292 (setq dired-omit-files-p t))))
+ − 2293 @end example
+ − 2294
+ − 2295 This is only run once, when the Dired buffer is created.
+ − 2296
+ − 2297
+ − 2298 @node 22.6.
+ − 2299 @section 22.6. How do I turn off the sound?
+ − 2300
+ − 2301 Add the following line to your @file{.emacs} file:
+ − 2302
+ − 2303 @example
+ − 2304 (setq bell-volume 0)
+ − 2305 (setq sound-alist nil)
+ − 2306 @end example
+ − 2307
+ − 2308
+ − 2309 @node 22.7.
+ − 2310 @section 22.7. Can I have the end of the buffer delimited in some way? Say, with: [END] ?
+ − 2311
+ − 2312 @example
+ − 2313 (make-annotation "[END]" (point-max) 'text (current-buffer))
+ − 2314 @end example
+ − 2315
+ − 2316 Note that you might want to put this in a hook.
+ − 2317
+ − 2318 You might also need:
+ − 2319
+ − 2320 @example
+ − 2321 (require 'annotations)
+ − 2322 @end example
+ − 2323
+ − 2324 since @code{make-annotation} is not defined by default.
+ − 2325
+ − 2326
+ − 2327 @node 22.8.
+ − 2328 @section 22.8. Can I insert today's date into buffer?
+ − 2329
+ − 2330 Use this lisp in a function:
+ − 2331
+ − 2332 @example
+ − 2333 (insert (current-time-string))
+ − 2334 @end example
+ − 2335
+ − 2336
+ − 2337 @node 22.9.
+ − 2338 @section 22.9. Are only certain syntactic character classes available for abbrevs? I didn't see any restrictions in the info.
+ − 2339
+ − 2340 Yes, abbrevs only expand word-syntax strings. So, in c-mode if you
+ − 2341 wanted to expand something to @samp{define }, you would be able to
+ − 2342 expand @samp{xd} but not @samp{#d}.
+ − 2343
+ − 2344
+ − 2345 @node 22.10.
+ − 2346 @section 22.10. Filladapt used to work after I loaded it. Now in 19.13 it doesn't. What gives?
+ − 2347
+ − 2348 Filladapt 2.x is included in 19.13+. In it filladapt is now a minor
+ − 2349 mode and minor modes are traditionally off by default. The following
+ − 2350 added to your .emacs will turn it on for all buffers:
+ − 2351
+ − 2352 @example
+ − 2353 (setq-default filladapt-mode t)
+ − 2354 @end example
+ − 2355
+ − 2356 Use @code{turn-on-filladapt-mode} to turn Filladapt on in particular
+ − 2357 major modes, like this:
+ − 2358
+ − 2359 @example
+ − 2360 (add-hook 'text-mode-hook 'turn-on-filladapt-mode)
+ − 2361 @end example
+ − 2362
+ − 2363
+ − 2364 @page
+ − 2365 @contents
+ − 2366 @bye