Mercurial > hg > xemacs-beta
changeset 2459:4c1db13742bc
[xemacs-hg @ 2004-12-29 05:08:26 by ben]
Commit FAQ
xemacs-faq.texi: Major rearrangement. Expand to 10 sections. Add various questions,
mostly stubs currently. Remove some obsolete stuff. Update a bunch
of the links
author | ben |
---|---|
date | Wed, 29 Dec 2004 05:08:26 +0000 |
parents | 0806ff4f2810 |
children | 12f65e3f41bb |
files | man/ChangeLog man/xemacs-faq.texi |
diffstat | 2 files changed, 2894 insertions(+), 2900 deletions(-) [+] |
line wrap: on
line diff
--- a/man/ChangeLog Tue Dec 28 22:51:31 2004 +0000 +++ b/man/ChangeLog Wed Dec 29 05:08:26 2004 +0000 @@ -1,3 +1,194 @@ +2004-12-28 Ben Wing <ben@xemacs.org> + + * xemacs-faq.texi (Top): + * xemacs-faq.texi (Introduction): + * xemacs-faq.texi (Q1.0.3): + * xemacs-faq.texi (Q1.0.5): + * xemacs-faq.texi (Q1.0.10): + * xemacs-faq.texi (Q1.1.4): + * xemacs-faq.texi (Q1.1.5): + * xemacs-faq.texi (Q1.4.1): + * xemacs-faq.texi (Q1.4.3): + * xemacs-faq.texi (Q1.5.8): + * xemacs-faq.texi (Installation): + * xemacs-faq.texi (Q2.0.3): + * xemacs-faq.texi (Q2.0.5): + * xemacs-faq.texi (Q2.1.1): + * xemacs-faq.texi (Q2.1.2): + * xemacs-faq.texi (Q2.2.7): + * xemacs-faq.texi (Q2.4.6): + * xemacs-faq.texi (Editing): + * xemacs-faq.texi (Q3.0.1): + * xemacs-faq.texi (Q3.0.2): + * xemacs-faq.texi (Q3.0.3): + * xemacs-faq.texi (Q3.0.4): + * xemacs-faq.texi (Q3.0.5): + * xemacs-faq.texi (Q3.0.6): + * xemacs-faq.texi (Q3.0.7): + * xemacs-faq.texi (Q3.0.8): + * xemacs-faq.texi (Q3.0.9): + * xemacs-faq.texi (Q3.0.10): + * xemacs-faq.texi (Q3.0.11): + * xemacs-faq.texi (Q3.1.1): + * xemacs-faq.texi (Q3.1.2): + * xemacs-faq.texi (Q3.1.3): + * xemacs-faq.texi (Q3.1.4): + * xemacs-faq.texi (Q3.1.5): + * xemacs-faq.texi (Q3.2.1): + * xemacs-faq.texi (Q3.2.2): + * xemacs-faq.texi (Q3.2.3): + * xemacs-faq.texi (Q3.2.4): + * xemacs-faq.texi (Q3.2.5): + * xemacs-faq.texi (Q3.3.1): + * xemacs-faq.texi (Q3.3.2): + * xemacs-faq.texi (Q3.3.3): + * xemacs-faq.texi (Q3.3.4): + * xemacs-faq.texi (Q3.3.5): + * xemacs-faq.texi (Q3.3.6): + * xemacs-faq.texi (Q3.4.1): + * xemacs-faq.texi (Q3.4.2): + * xemacs-faq.texi (Display): + * xemacs-faq.texi (Q4.0.1): + * xemacs-faq.texi (Q4.0.2): + * xemacs-faq.texi (Q4.0.3): + * xemacs-faq.texi (Q4.0.4): + * xemacs-faq.texi (my-toggle-toolbar): Removed. + * xemacs-faq.texi (Q4.0.5): + * xemacs-faq.texi (Q4.0.6): + * xemacs-faq.texi (Q4.0.7): + * xemacs-faq.texi (Q4.0.8): + * xemacs-faq.texi (Q4.0.9): + * xemacs-faq.texi (Q4.1.1): + * xemacs-faq.texi (Q4.1.2): + * xemacs-faq.texi (Q4.2.1): + * xemacs-faq.texi (Q4.2.2): + * xemacs-faq.texi (Q4.2.3): + * xemacs-faq.texi (Q4.2.4): + * xemacs-faq.texi (Q4.3.1): + * xemacs-faq.texi (Q4.3.2): + * xemacs-faq.texi (Q4.3.3): + * xemacs-faq.texi (Q4.4.1): + * xemacs-faq.texi (Q4.4.2): + * xemacs-faq.texi (Q4.4.3): + * xemacs-faq.texi (Q4.4.4): + * xemacs-faq.texi (Q4.4.5): + * xemacs-faq.texi (Q4.5.1): + * xemacs-faq.texi (Q4.5.2): + * xemacs-faq.texi (Q4.5.3): + * xemacs-faq.texi (Q4.5.4): + * xemacs-faq.texi (Q4.6.1): + * xemacs-faq.texi (Q4.6.2): + * xemacs-faq.texi (Q4.6.3): + * xemacs-faq.texi (Q4.6.4): + * xemacs-faq.texi (scroll-up): Removed. + * xemacs-faq.texi (Q4.6.5): + * xemacs-faq.texi (scroll-down): Removed. + * xemacs-faq.texi (Q4.6.6): + * xemacs-faq.texi (Q4.6.7): + * xemacs-faq.texi (Q4.7.1): + * xemacs-faq.texi (Q4.7.2): + * xemacs-faq.texi (Q4.7.3): + * xemacs-faq.texi (Q4.7.4): + * xemacs-faq.texi (External Subsystems): + * xemacs-faq.texi (Q5.0.1): + * xemacs-faq.texi (Q5.0.2): + * xemacs-faq.texi (Q5.0.3): + * xemacs-faq.texi (Q5.0.4): + * xemacs-faq.texi (Q5.0.5): + * xemacs-faq.texi (Q5.0.6): + * xemacs-faq.texi (Q5.1.1): + * xemacs-faq.texi (Q5.1.2): + * xemacs-faq.texi (Q5.2.1): + * xemacs-faq.texi (Q5.2.2): + * xemacs-faq.texi (Q5.2.3): + * xemacs-faq.texi (Q5.2.4): + * xemacs-faq.texi (Q5.3.1): + * xemacs-faq.texi (Q5.3.2): + * xemacs-faq.texi (Q5.3.3): + * xemacs-faq.texi (Q5.3.4): + * xemacs-faq.texi (Q5.4.1): + * xemacs-faq.texi (Q5.4.2): + * xemacs-faq.texi (Q5.4.3): + * xemacs-faq.texi (Q5.4.4): + * xemacs-faq.texi (Q5.4.5): + * xemacs-faq.texi (Q5.5.1): + * xemacs-faq.texi (Q5.5.2): + * xemacs-faq.texi (Q5.5.3): + * xemacs-faq.texi (Q5.5.4): + * xemacs-faq.texi (Q5.5.5): + * xemacs-faq.texi (Internet): + * xemacs-faq.texi (Q6.0.1): + * xemacs-faq.texi (Q6.0.2): + * xemacs-faq.texi (Q6.0.3): + * xemacs-faq.texi (Q6.0.4): + * xemacs-faq.texi (Q6.0.5): + * xemacs-faq.texi (Q6.0.6): + * xemacs-faq.texi (Q6.0.7): + * xemacs-faq.texi (Q6.0.8): + * xemacs-faq.texi (Q6.0.9): + * xemacs-faq.texi (Q6.0.10): + * xemacs-faq.texi (Q6.0.11): + * xemacs-faq.texi (Q6.1.1): + * xemacs-faq.texi (Q6.1.2): + * xemacs-faq.texi (Q6.1.3): + * xemacs-faq.texi (Q6.1.4): + * xemacs-faq.texi (Q6.1.5): + * xemacs-faq.texi (Q6.1.6): + * xemacs-faq.texi (Q6.2.1): + * xemacs-faq.texi (Q6.2.2): + * xemacs-faq.texi (Q6.3.1): + * xemacs-faq.texi (Q6.3.2): + * xemacs-faq.texi (Q6.4.1): + * xemacs-faq.texi (Q6.4.2): + * xemacs-faq.texi (Q6.4.3): + * xemacs-faq.texi (Advanced): + * xemacs-faq.texi (Q7.0.1): + * xemacs-faq.texi (Q7.0.2): + * xemacs-faq.texi (Q7.1.1): + * xemacs-faq.texi (Q7.1.2): + * xemacs-faq.texi (Q7.1.3): + * xemacs-faq.texi (Q7.1.4): + * xemacs-faq.texi (Q7.1.5): + * xemacs-faq.texi (Q7.1.6): + * xemacs-faq.texi (Q7.2.1): + * xemacs-faq.texi (Q7.2.2): + * xemacs-faq.texi (Q7.2.3): + * xemacs-faq.texi (Q7.2.4): + * xemacs-faq.texi (Q7.2.5): + * xemacs-faq.texi (Q7.2.6): + * xemacs-faq.texi (Q7.2.7): + * xemacs-faq.texi (Q7.2.8): + * xemacs-faq.texi (Q7.2.9): + * xemacs-faq.texi (Q7.2.10): + * xemacs-faq.texi (Q7.2.11): + * xemacs-faq.texi (Q7.3.1): + * xemacs-faq.texi (Q7.3.2): + * xemacs-faq.texi (Q7.3.3): + * xemacs-faq.texi (Q7.3.4): + * xemacs-faq.texi (Other Packages): + * xemacs-faq.texi (Q8.0.1): + * xemacs-faq.texi (Q8.0.2): + * xemacs-faq.texi (Q8.0.3): + * xemacs-faq.texi (Q8.0.4): + * xemacs-faq.texi (Q8.1.1): + * xemacs-faq.texi (Q8.1.2): + * xemacs-faq.texi (Q8.1.3): + * xemacs-faq.texi (Q8.2.1): + * xemacs-faq.texi (Q8.2.2): + * xemacs-faq.texi (Q8.2.3): + * xemacs-faq.texi (Q8.2.4): + * xemacs-faq.texi (Current Events): + * xemacs-faq.texi (Q9.0.1): + * xemacs-faq.texi (my-function): Removed. + * xemacs-faq.texi (Q9.0.2): + * xemacs-faq.texi (Q9.0.3): + * xemacs-faq.texi (Q9.0.4): + * xemacs-faq.texi (Q9.0.5): + * xemacs-faq.texi (Legacy Versions): + Major rearrangement. Expand to 10 sections. Add various questions, + mostly stubs currently. Remove some obsolete stuff. Update a bunch + of the links. + 2004-12-15 Ville Skyttä <scop@xemacs.org> * lispref/help.texi: Document 3rd arg to `make-obsolete'.
--- a/man/xemacs-faq.texi Tue Dec 28 22:51:31 2004 +0000 +++ b/man/xemacs-faq.texi Wed Dec 29 05:08:26 2004 +0000 @@ -7,7 +7,7 @@ @finalout @titlepage @title XEmacs FAQ -@subtitle Frequently asked questions about XEmacs @* Last Modified: $Date: 2004/12/06 03:51:29 $ +@subtitle Frequently asked questions about XEmacs @* Last Modified: $Date: 2004/12/29 05:08:26 $ @sp 1 @author Ben Wing <ben@@xemacs.org> @author Tony Rossini <rossini@@u.washington.edu> @@ -180,10 +180,12 @@ @menu * Introduction:: Introduction, Policy, Credits. * Installation:: Installation and Troubleshooting. -* Display Subsystems:: Basic Display-Related Subsystems. +* Editing:: Editing Functions. +* Display:: Display Functions. * External Subsystems:: Interfacing with the OS and External Devices. * Internet:: Connecting to the Internet. * Advanced:: Advanced Customization Using XEmacs Lisp. +* Other Packages:: Other External Packages. * Current Events:: What the Future Holds. * Legacy Versions:: New information about old XEmacsen. @@ -230,7 +232,7 @@ * Q1.3.3:: Who contributed to the FAQ in the past? 1.4: Internationalization -* Q1.4.1:: What is the status of internationalization support aka MULE (including Asian language support? +* Q1.4.1:: What is the status of internationalization support aka MULE (including Asian language support)? * Q1.4.2:: How can I help with internationalization? * Q1.4.3:: How do I type non-ASCII characters? * Q1.4.4:: Can XEmacs messages come out in a different language? @@ -261,11 +263,9 @@ * Q2.0.6:: XEmacs is too big * Q2.0.7:: EFS fails with "500 AUTH not understood" (NEW) -2.1: Unix/Mac OS Installation (Also Relevant to Cygwin, MinGW) +2.1: Unix/Mac OS X Installation (Also Relevant to Cygwin, MinGW) * Q2.1.1:: Libraries in non-standard locations * Q2.1.2:: Why can't I strip XEmacs? -* Q2.1.3:: Compiling XEmacs with Netaudio. -* Q2.1.4:: Problems with Linux and ncurses. 2.2: Windows Installation (Windows, Cygwin, MinGW) * Q2.2.1:: What exactly are all the different ways to build XEmacs under Windows? @@ -298,229 +298,245 @@ * Q2.4.5:: Warnings from incorrect key modifiers. * Q2.4.6:: XEmacs 21.1 on Windows used to spawn an ugly console window on every startup. Has that been fixed? -3 Basic Display-Related Subsystems +3 Editing Functions 3.0: The Keyboard -* Q3.0.1:: How can I bind complex functions (or macros) to keys? -* Q3.0.2:: How do I bind C-. and C-; to scroll one line up and down? -* Q3.0.3:: Globally binding @kbd{Delete}? -* Q3.0.4:: How to map @kbd{Help} key alone on Sun type4 keyboard? -* Q3.0.5:: How can you type in special characters in XEmacs? -* Q3.0.6:: Can I turn on @dfn{sticky} modifier keys? -* Q3.0.7:: How do I map the arrow keys? -* Q3.0.8:: HP Alt key as Meta. -* Q3.0.9:: Why does edt emulation not work? -* Q3.0.10:: How can I emulate VI and use it as my default mode? +* Q3.0.1:: How can I customize the keyboard? +* Q3.0.2:: How can I bind complex functions (or macros) to keys? +* Q3.0.3:: How do I bind C-. and C-; to scroll one line up and down? +* Q3.0.4:: Globally binding @kbd{Delete}? +* Q3.0.5:: How to map @kbd{Help} key alone on Sun type4 keyboard? +* Q3.0.6:: How can you type in special characters in XEmacs? +* Q3.0.7:: Can I turn on @dfn{sticky} modifier keys? +* Q3.0.8:: How do I map the arrow keys? +* Q3.0.9:: HP Alt key as Meta. +* Q3.0.10:: Why does edt emulation not work? +* Q3.0.11:: How can I emulate VI and use it as my default mode? 3.1: The Mouse * Q3.1.1:: How can I turn off Mouse pasting? * Q3.1.2:: How do I set control/meta/etc modifiers on mouse buttons? * Q3.1.3:: Clicking the left button does not do anything in buffer list. * Q3.1.4:: How can I get a list of buffers when I hit mouse button 3? -* Q3.1.5:: How I can set XEmacs up so that it pastes where the text cursor is? - -3.2: Textual Fonts and Colors -* Q3.2.1:: How do I specify a font? -* Q3.2.2:: How do I set the text, menu and modeline fonts? -* Q3.2.3:: How can I set color options from @file{init.el}? -* Q3.2.4:: How can I set the colors when highlighting a region? -* Q3.2.5:: How can I limit color map usage? -* Q3.2.6:: My tty supports color, but XEmacs doesn't use them. -* Q3.2.7:: Can I have pixmap backgrounds in XEmacs? -* Q3.2.8:: How do I display non-ASCII characters? -* Q3.2.9:: Font selections in don't get saved after @code{Save Options}. - -3.3: The Menubar and Toolbar -* Q3.3.1:: How do I get rid of the menu (or menubar)? -* Q3.3.2:: Can I customize the basic menubar? -* Q3.3.3:: How do I control how many buffers are listed in the menu @code{Buffers List}? -* Q3.3.4:: Resources like @code{Emacs*menubar*font} are not working? -* Q3.3.5:: How can I bind a key to a function to toggle the toolbar? -* Q3.3.6:: @samp{Can't instantiate image error...} in toolbar - -3.4: Scrollbars and Scrolling -* Q3.4.1:: How can I disable the scrollbar? -* Q3.4.2:: How can one use resources to change scrollbar colors? -* Q3.4.3:: Moving the scrollbar can move the point; can I disable this? -* Q3.4.4:: Scrolling one line at a time. -* Q3.4.5:: How can I turn off automatic horizontal scrolling in specific modes? -* Q3.4.6:: I find auto-show-mode disconcerting. How do I turn it off? - -3.5: The Modeline -* Q3.5.1:: How can I make the modeline go away? -* Q3.5.2:: How do you have XEmacs display the line number in the modeline? -* Q3.5.3:: How do I get XEmacs to put the time of day on the modeline? -* Q3.5.4:: How can one change the modeline color based on the mode used? - -3.6: The Cursor -* Q3.6.1:: Is there a way to make the bar cursor thicker? -* Q3.6.2:: Is there a way to get back the block cursor? -* Q3.6.3:: Can I make the cursor blink? - -3.7: Text Selections -* Q3.7.1:: How do I select a rectangular region? -* Q3.7.2:: How can I turn off or change highlighted selections? -* Q3.7.3:: How do I get that typing on an active region removes it? -* Q3.7.4:: Can I turn off the highlight during isearch? -* Q3.7.5:: How do I turn off highlighting after @kbd{C-x C-p} (mark-page)? -* Q3.7.6:: The region disappears when I hit the end of buffer while scrolling. -* Q3.7.7:: Why is killing so slow? -* Q3.7.8:: Why does @kbd{M-w} take so long? - -3.8: Buffers, Text Editing -* Q3.8.1:: Can I have the end of the buffer delimited in some way? -* Q3.8.2:: How do I insert today's date into a buffer? -* Q3.8.3:: How do I get a single minibuffer frame? -* Q3.8.4:: How can I enable auto-indent and/or Filladapt? -* Q3.8.5:: How can I get XEmacs to come up in text/auto-fill mode by default? - -3.9: Editing Source Code -* Q3.9.1:: How can I do source code highlighting using font-lock? -* Q3.9.2:: How do I get @samp{More} Syntax Highlighting on by default? -* Q3.9.3:: Where do I get the latest CC Mode? -* Q3.9.4:: I do not like cc-mode. How do I use the old c-mode? -* Q3.9.5:: How do you make XEmacs indent CL if-clauses correctly? - -4 Interfacing with the Operating System and External Devices - -4.0: X Window System and Resources -* Q4.0.1:: Where is a list of X resources? -* Q4.0.2:: How can I detect a color display? -* Q4.0.3:: How can I get the icon to just say @samp{XEmacs}? -* Q4.0.4:: How can I have the window title area display the full path? -* Q4.0.5:: @samp{xemacs -name junk} doesn't work? -* Q4.0.6:: @samp{-iconic} doesn't work. - -4.1: Microsoft Windows -* Q4.1.1:: Does XEmacs rename all the @samp{win32-*} symbols to @samp{w32-*}? -* Q4.1.2:: How do I get Windows Explorer to associate a file type with XEmacs? - -4.2: Printing -* Q4.2.1:: What do I need to change to make printing work? -* Q4.2.2:: How can I print WYSIWYG a font-locked buffer? -* Q4.2.3:: Getting @kbd{M-x lpr} to work with postscript printer. -* Q4.2.4:: Can you print under MS Windows? - -4.3: Sound -* Q4.3.1:: How do I turn off the sound? -* Q4.3.2:: How do I get funky sounds instead of a boring beep? -* Q4.3.3:: What's NAS, how do I get it? -* Q4.3.4:: Sunsite sounds don't play. - -4.4: Running an Interior Shell, Invoking Subprocesses -* Q4.4.1:: What is an interior shell? -* Q4.4.2:: How do I start up a second shell buffer? -* Q4.4.3:: Telnet from shell filters too much -* Q4.4.4:: Strange things are happening in Shell Mode. -* Q4.4.5:: XEmacs complains "No such file or directory, diff" - -4.5: Multiple Device Support -* Q4.5.1:: How do I open a frame on another screen of my multi-headed display? -* Q4.5.2:: Can I really connect to a running XEmacs after calling up over a modem? How? -* Q4.5.3:: How do I disable gnuserv from opening a new frame? -* Q4.5.4:: How do I start gnuserv so that each subsequent XEmacs is a client? -* Q4.5.5:: Is there a way to start a new XEmacs if there's no gnuserv running, and otherwise use gnuclient? - -4.6: TeX -* Q4.6.1:: Is there something better than LaTeX mode? -* Q4.6.2:: What is AUCTeX? Where do you get it? -* Q4.6.3:: Problems installing AUCTeX. -* Q4.6.4:: How do I turn off current chapter from AUCTeX modeline? - -4.7: Other Unbundled Packages -* Q4.7.1:: Is there a reason for an Emacs package not to be included in XEmacs? -* Q4.7.2:: Are there any Emacs Lisp Spreadsheets? -* Q4.7.3:: Is there a MatLab mode? - -4.8: Environments Built Around XEmacs -* Q4.8.1:: What are SPARCworks, EOS, and WorkShop? -* Q4.8.2:: How do I start the Sun Workshop support in XEmacs 21? -* Q4.8.3:: What is/was Energize? -* Q4.8.4:: What is Infodock? - -5 Connecting to the Internet - -5.0: General Mail and News -* Q5.0.1:: What are the various packages for reading mail? -* Q5.0.2:: How can I send mail? -* Q5.0.3:: How do I get my outgoing mail archived? -* Q5.0.4:: How can I read and/or compose MIME messages? -* Q5.0.5:: How do I customize the From line? -* Q5.0.6:: How do I get my MUA to filter mail for me? -* Q5.0.7:: Remote mail reading with an MUA. -* Q5.0.8:: An MUA gets an error incorporating new mail. -* Q5.0.9:: Why isn't @file{movemail} working? -* Q5.0.10:: How do I make my MUA display graphical smilies? -* Q5.0.11:: How can I get those oh-so-neat X-Face lines? - -5.1: Reading Mail with VM -* Q5.1.1:: How do I set up VM to retrieve mail from a remote site using POP? -* Q5.1.2:: How can I get VM to automatically check for new mail? -* Q5.1.3:: I have various addresses at which I receive mail. How can I tell VM to ignore them when doing a "reply-all"? -* Q5.1.4:: Is there a mailing list or FAQ for VM? -* Q5.1.5:: How do I make VM stay in a single frame? -* Q5.1.6:: Customization of VM not covered in the manual, or here. - -5.2: Reading Netnews and Mail with Gnus -* Q5.2.1:: GNUS, (ding) Gnus, Gnus 5, September Gnus, Red Gnus, Quassia Gnus, argh! -* Q5.2.2:: How do I make Gnus stay within a single frame? - -5.3: FTP Access -* Q5.3.1:: Can I edit files on other hosts? -* Q5.3.2:: What is EFS? - -5.4: Web Browsing with W3 -* Q5.4.1:: What is W3? -* Q5.4.2:: How do I run W3 from behind a firewall? -* Q5.4.3:: Is it true that W3 supports style sheets and tables? - -6 Advanced Customization Using XEmacs Lisp - -6.0: Online Help -* Q6.0.1:: How can I get two instances of info? -* Q6.0.2:: How do I add new Info directories? - -6.1: Emacs Lisp and @file{init.el} -* Q6.1.1:: What version of Emacs am I running? -* Q6.1.2:: How can I evaluate Emacs-Lisp expressions? -* Q6.1.3:: @code{(setq tab-width 6)} behaves oddly. -* Q6.1.4:: How can I add directories to the @code{load-path}? -* Q6.1.5:: How to check if a lisp function is defined? -* Q6.1.6:: Can I force the output of @code{(face-list)} to a buffer? - -6.2: Emacs Lisp Programming Techniques -* Q6.2.1:: What is the difference in key sequences between XEmacs and GNU Emacs? -* Q6.2.2:: Can I generate "fake" keyboard events? -* Q6.2.3:: Could you explain @code{read-kbd-macro} in more detail? -* Q6.2.4:: What is the performance hit of @code{let}? -* Q6.2.5:: What is the recommended use of @code{setq}? -* Q6.2.6:: What is the typical misuse of @code{setq}? -* Q6.2.7:: I like the @code{do} form of cl, does it slow things down? -* Q6.2.8:: I like recursion, does it slow things down? -* Q6.2.9:: How do I put a glyph as annotation in a buffer? -* Q6.2.10:: @code{map-extents} won't traverse all of my extents! -* Q6.2.11:: My elisp program is horribly slow. Is there - -6.3: Mathematics -* Q6.3.1:: What are bignums, ratios, and bigfloats in Lisp? -* Q6.3.2:: XEmacs segfaults when I use very big numbers! -* Q6.3.3:: Bignums are really slow! -* Q6.3.4:: Equal bignums don't compare as equal! What gives? - -7 What the Future Holds - -7.0: Changes -* Q7.0.1:: What new features will be in XEmacs soon? -* Q7.0.2:: What's new in XEmacs 21.4? -* Q7.0.3:: What's new in XEmacs 21.1? -* Q7.0.4:: What's new in XEmacs 20.4? -* Q7.0.5:: What's new in XEmacs 20.3? -* Q7.0.6:: What's new in XEmacs 20.2? - -8 New information about old XEmacsen - -8.0: XEmacs 21.1 -* Q8.0.1:: Gnus 5.10 won't display smileys in XEmacs 21.1. +* Q3.1.5:: How can I set XEmacs up so that it pastes where the text cursor is? + +3.2: Buffers, Text Editing +* Q3.2.1:: Can I have the end of the buffer delimited in some way? +* Q3.2.2:: How do I insert today's date into a buffer? +* Q3.2.3:: How do I get a single minibuffer frame? +* Q3.2.4:: How can I enable auto-indent and/or Filladapt? +* Q3.2.5:: How can I get XEmacs to come up in text/auto-fill mode by default? + +3.3: Text Selections +* Q3.3.1:: How do I select a rectangular region? +* Q3.3.2:: How can I turn off or change highlighted selections? +* Q3.3.3:: How do I cause typing on an active region to remove it? +* Q3.3.4:: Can I turn off the highlight during isearch? +* Q3.3.5:: Why is killing so slow? +* Q3.3.6:: Why does @kbd{M-w} take so long? + +3.4: Editing Source Code +* Q3.4.1:: I do not like cc-mode. How do I use the old c-mode? +* Q3.4.2:: How do you make XEmacs indent CL if-clauses correctly? + +4 Display Functions + +4.0: Textual Fonts and Colors +* Q4.0.1:: How do I specify a font? +* Q4.0.2:: How do I set the text, menu and modeline fonts? +* Q4.0.3:: How can I set color options from @file{init.el}? +* Q4.0.4:: How can I set the colors when highlighting a region? +* Q4.0.5:: How can I limit color map usage? +* Q4.0.6:: My tty supports color, but XEmacs doesn't use them. +* Q4.0.7:: Can I have pixmap backgrounds in XEmacs? +* Q4.0.8:: How do I display non-ASCII characters? +* Q4.0.9:: Font selections in don't get saved after @code{Save Options}. + +4.1: Syntax Highlighting (Font Lock) +* Q4.1.1:: How can I do source code highlighting using font-lock? +* Q4.1.2:: How do I get @samp{More} Syntax Highlighting on by default? + +4.2: The Modeline +* Q4.2.1:: How can I make the modeline go away? +* Q4.2.2:: How do you have XEmacs display the line number in the modeline? +* Q4.2.3:: How do I get XEmacs to put the time of day on the modeline? +* Q4.2.4:: How can I change the modeline color based on the mode used? + +4.3: The Cursor +* Q4.3.1:: Is there a way to make the bar cursor thicker? +* Q4.3.2:: Is there a way to get back the block cursor? +* Q4.3.3:: Can I make the cursor blink? + +4.4: The Menubar +* Q4.4.1:: How do I get rid of the menubar? +* Q4.4.2:: How can I customize the menubar? +* Q4.4.3:: How do I enable use of the keyboard (@kbd{Alt}) to access menu items? +* Q4.4.4:: How do I control how many buffers are listed in the menu @code{Buffers List}? +* Q4.4.5:: Resources like @code{Emacs*menubar*font} are not working? + +4.5: The Toolbar +* Q4.5.1:: How do I get rid of the toolbar? +* Q4.5.2:: How can I customize the toolbar? +* Q4.5.3:: How can I bind a key to a function to toggle the toolbar? +* Q4.5.4:: @samp{Can't instantiate image error...} in toolbar + +4.6: Scrollbars and Scrolling +* Q4.6.1:: How can I disable the scrollbar? +* Q4.6.2:: How can I change the scrollbar width? +* Q4.6.3:: How can I use resources to change scrollbar colors? +* Q4.6.4:: Moving the scrollbar can move the point; can I disable this? +* Q4.6.5:: Scrolling one line at a time. +* Q4.6.6:: How can I turn off automatic horizontal scrolling in specific modes? +* Q4.6.7:: I find auto-show-mode disconcerting. How do I turn it off? + +4.7: The Gutter Tabs, The Progress Bar, Widgets +* Q4.7.1:: How can I disable the gutter tabs? +* Q4.7.2:: How can I disable the progress bar? +* Q4.7.3:: There are bugs in the gutter or widgets. +* Q4.7.4:: How can I customize the gutter or gutter tabs? + +5 Interfacing with the Operating System and External Devices + +5.0: X Window System and Resources +* Q5.0.1:: Where is a list of X resources? +* Q5.0.2:: How can I detect a color display? +* Q5.0.3:: How can I get the icon to just say @samp{XEmacs}? +* Q5.0.4:: How can I have the window title area display the full path? +* Q5.0.5:: @samp{xemacs -name junk} doesn't work? +* Q5.0.6:: @samp{-iconic} doesn't work. + +5.1: Microsoft Windows +* Q5.1.1:: Does XEmacs rename all the @samp{win32-*} symbols to @samp{w32-*}? +* Q5.1.2:: How do I get Windows Explorer to associate a file type with XEmacs? + +5.2: Printing +* Q5.2.1:: What do I need to change to make printing work? +* Q5.2.2:: How can I print WYSIWYG a font-locked buffer? +* Q5.2.3:: Getting @kbd{M-x lpr} to work with postscript printer. +* Q5.2.4:: Can you print under MS Windows? + +5.3: Sound +* Q5.3.1:: How do I turn off the sound? +* Q5.3.2:: How do I get funky sounds instead of a boring beep? +* Q5.3.3:: What are NAS and ESD (EsounD)? +* Q5.3.4:: Sunsite sounds don't play. + +5.4: Running an Interior Shell, Invoking Subprocesses +* Q5.4.1:: What is an interior shell? +* Q5.4.2:: How do I start up a second shell buffer? +* Q5.4.3:: Telnet from shell filters too much +* Q5.4.4:: Strange things are happening in Shell Mode. +* Q5.4.5:: XEmacs complains "No such file or directory, diff" + +5.5: Multiple Device Support +* Q5.5.1:: How do I open a frame on another screen of my multi-headed display? +* Q5.5.2:: Can I really connect to a running XEmacs after calling up over a modem? How? +* Q5.5.3:: How do I disable gnuserv from opening a new frame? +* Q5.5.4:: How do I start gnuserv so that each subsequent XEmacs is a client? +* Q5.5.5:: Is there a way to start a new XEmacs if there's no gnuserv running, and otherwise use gnuclient? + +6 Connecting to the Internet + +6.0: General Mail and News +* Q6.0.1:: What are the various packages for reading mail? +* Q6.0.2:: How can I send mail? +* Q6.0.3:: How do I get my outgoing mail archived? +* Q6.0.4:: How can I read and/or compose MIME messages? +* Q6.0.5:: How do I customize the From line? +* Q6.0.6:: How do I get my MUA to filter mail for me? +* Q6.0.7:: Remote mail reading with an MUA. +* Q6.0.8:: An MUA gets an error incorporating new mail. +* Q6.0.9:: Why isn't @file{movemail} working? +* Q6.0.10:: How do I make my MUA display graphical smilies? +* Q6.0.11:: How can I get those oh-so-neat X-Face lines? + +6.1: Reading Mail with VM +* Q6.1.1:: How do I set up VM to retrieve mail from a remote site using POP? +* Q6.1.2:: How can I get VM to automatically check for new mail? +* Q6.1.3:: I have various addresses at which I receive mail. How can I tell VM to ignore them when doing a "reply-all"? +* Q6.1.4:: Is there a mailing list or FAQ for VM? +* Q6.1.5:: How do I make VM stay in a single frame? +* Q6.1.6:: Customization of VM not covered in the manual, or here. + +6.2: Reading Netnews and Mail with Gnus +* Q6.2.1:: GNUS, (ding) Gnus, Gnus 5, September Gnus, Red Gnus, Quassia Gnus, argh! +* Q6.2.2:: How do I make Gnus stay within a single frame? + +6.3: FTP Access +* Q6.3.1:: Can I edit files on other hosts? +* Q6.3.2:: What is EFS? + +6.4: Web Browsing with W3 +* Q6.4.1:: What is W3? +* Q6.4.2:: How do I run W3 from behind a firewall? +* Q6.4.3:: Is it true that W3 supports style sheets and tables? + +7 Advanced Customization Using XEmacs Lisp + +7.0: Online Help +* Q7.0.1:: How can I get two instances of info? +* Q7.0.2:: How do I add new Info directories? + +7.1: Emacs Lisp and @file{init.el} +* Q7.1.1:: What version of Emacs am I running? +* Q7.1.2:: How can I evaluate Emacs-Lisp expressions? +* Q7.1.3:: @code{(setq tab-width 6)} behaves oddly. +* Q7.1.4:: How can I add directories to the @code{load-path}? +* Q7.1.5:: How to check if a lisp function is defined? +* Q7.1.6:: Can I force the output of @code{(face-list)} to a buffer? + +7.2: Emacs Lisp Programming Techniques +* Q7.2.1:: What is the difference in key sequences between XEmacs and GNU Emacs? +* Q7.2.2:: Can I generate "fake" keyboard events? +* Q7.2.3:: Could you explain @code{read-kbd-macro} in more detail? +* Q7.2.4:: What is the performance hit of @code{let}? +* Q7.2.5:: What is the recommended use of @code{setq}? +* Q7.2.6:: What is the typical misuse of @code{setq}? +* Q7.2.7:: I like the @code{do} form of cl, does it slow things down? +* Q7.2.8:: I like recursion, does it slow things down? +* Q7.2.9:: How do I put a glyph as annotation in a buffer? +* Q7.2.10:: @code{map-extents} won't traverse all of my extents! +* Q7.2.11:: My elisp program is horribly slow. Is there an easy way to find out where it spends time? + +7.3: Mathematics +* Q7.3.1:: What are bignums, ratios, and bigfloats in Lisp? +* Q7.3.2:: XEmacs segfaults when I use very big numbers! +* Q7.3.3:: Bignums are really slow! +* Q7.3.4:: Equal bignums don't compare as equal! What gives? + +8 Other External Packages + +8.0: TeX +* Q8.0.1:: Is there something better than LaTeX mode? +* Q8.0.2:: What is AUCTeX? Where do you get it? +* Q8.0.3:: Problems installing AUCTeX. +* Q8.0.4:: How do I turn off current chapter from AUCTeX modeline? + +8.1: Other Unbundled Packages +* Q8.1.1:: Is there a reason for an Emacs package not to be included in XEmacs? +* Q8.1.2:: Are there any Emacs Lisp Spreadsheets? +* Q8.1.3:: Is there a MatLab mode? + +8.2: Environments Built Around XEmacs +* Q8.2.1:: What are SPARCworks, EOS, and WorkShop? +* Q8.2.2:: How do I start the Sun Workshop support in XEmacs 21? +* Q8.2.3:: What is/was Energize? +* Q8.2.4:: What is Infodock? + +9 What the Future Holds + +9.0: Changes +* Q9.0.1:: What new features will be in XEmacs soon? +* Q9.0.2:: What's new in XEmacs 21.4? +* Q9.0.3:: What's new in XEmacs 21.1? +* Q9.0.4:: What's new in XEmacs 20.4? +* Q9.0.5:: What's new in XEmacs 20.3? +* Q9.0.6:: What's new in XEmacs 20.2? + +10 New information about old XEmacsen + +10.0: XEmacs 21.1 +* Q10.0.1:: Gnus 5.10 won't display smileys in XEmacs 21.1. @end detailmenu @end menu @@ -596,7 +612,7 @@ * Q1.3.3:: Who contributed to the FAQ in the past? 1.4: Internationalization -* Q1.4.1:: What is the status of internationalization support aka MULE (including Asian language support? +* Q1.4.1:: What is the status of internationalization support aka MULE (including Asian language support)? * Q1.4.2:: How can I help with internationalization? * Q1.4.3:: How do I type non-ASCII characters? * Q1.4.4:: Can XEmacs messages come out in a different language? @@ -653,10 +669,10 @@ @node Q1.0.3, Q1.0.4, Q1.0.2, Introduction @unnumberedsubsec Q1.0.3: Where can I find it? -The canonical source and binaries can be found via anonymous FTP at: +The canonical source and binaries can be found at: @example -@uref{ftp://ftp.xemacs.org/pub/xemacs/} +@uref{http://ftp.xemacs.org/pub/xemacs/} @end example @node Q1.0.4, Q1.0.5, Q1.0.3, Introduction @@ -810,10 +826,10 @@ provided with Motif or Athena. @item Community Participation -Starting with XEmacs 20, joining the XEmacs development team is -simple. Mail to @email{xemacs-beta@@xemacs.org, XEmacs Developers}, and -you're in! (If you want to be, of course. You're also welcome to just -post development-related questions and bug reports.) The GNU Emacs +Joining the XEmacs development team is simple. Mail to +@email{xemacs-beta@@xemacs.org, XEmacs Developers}, and you're in! (If +you want to be, of course. You're also welcome to just post +development-related questions and bug reports.) The GNU Emacs development team and internal mailing lists are still by invitation only. @@ -1006,9 +1022,6 @@ Help Menu. @kbd{M-x apropos} can be used to look for particular commands. For items not found in the manual, try reading this FAQ -@comment , examining the regular GNU Emacs FAQ (which can be -@comment found with the Emacs 19 distribution) as well as at -@comment @uref{http://www.eecs.nwu.edu/emacs/faq/} and reading the Usenet group comp.emacs.xemacs. If you choose to post to a newsgroup, @strong{please use @@ -1133,7 +1146,7 @@ Also, it follows the Unix filesystem and process model very closely (some will undoubtedly view this as an advantage). -See @uref{http://sources.redhat.com/cygwin/} for more information on +See @uref{http://www.cygwin.com/} for more information on Cygwin. MinGW is a collection of header files and import libraries that allow @@ -1235,7 +1248,7 @@ @itemize @minus @item -Starting with version 19.30, it has been possible to compile GNU Emacs +Starting with GNU Emacs 19.30, it has been possible to compile GNU Emacs under MS Windows using the DJGPP compiler and X libraries. The result is very similar to GNU Emacs compiled under MS DOS, only it works somewhat better because it runs in 32-bit mode, makes use of all the @@ -1649,7 +1662,7 @@ @unnumberedsec 1.4: Internationalization @node Q1.4.1, Q1.4.2, Q1.3.3, Introduction -@unnumberedsubsec Q1.4.1: What is the status of internationalization support aka MULE (including Asian language support? +@unnumberedsubsec Q1.4.1: What is the status of internationalization support aka MULE (including Asian language support)? Both the stable and development versions of XEmacs include internationalization support (aka MULE). MULE currently (21.4) works on @@ -1675,7 +1688,7 @@ @node Q1.4.3, Q1.4.4, Q1.4.2, Introduction @unnumberedsubsec Q1.4.3: How do I type non-ASCII characters? -@xref{Q3.0.5, How can you type in special characters in XEmacs?}, in +@xref{Q3.0.6, How can you type in special characters in XEmacs?}, in part 3 of this FAQ, for some simple methods that also work in non-MULE builds of XEmacs (but only for one-octet coded character sets, and mostly for ISO 8859/1). Many of the methods available for Cyrillic @@ -1683,7 +1696,7 @@ has more general capabilities. @xref{Q1.4.5, Please explain the various input methods in MULE/XEmacs}. -@xref{Q3.2.8, How do I display non-ASCII characters?}, which covers +@xref{Q4.0.8, How do I display non-ASCII characters?}, which covers display of non-ASCII characters. @node Q1.4.4, Q1.4.5, Q1.4.3, Introduction @@ -2104,7 +2117,7 @@ There is also new @samp{browser} mode for Customize. Try it out with @kbd{M-x customize-browse} -@node Installation, Display Subsystems, Introduction, Top +@node Installation, Editing, Introduction, Top @unnumbered 2 Installation and Troubleshooting This is part 2 of the XEmacs Frequently Asked Questions list. This @@ -2123,8 +2136,6 @@ 2.1: Unix/Mac OS X Installation (Also Relevant to Cygwin, MinGW) * Q2.1.1:: Libraries in non-standard locations * Q2.1.2:: Why can't I strip XEmacs? -* Q2.1.3:: Compiling XEmacs with Netaudio. -* Q2.1.4:: Problems with Linux and ncurses. 2.2: Windows Installation (Windows, Cygwin, MinGW) * Q2.2.1:: What exactly are all the different ways to build XEmacs under Windows? @@ -2248,199 +2259,18 @@ @node Q2.0.3, Q2.0.4, Q2.0.2, Installation @unnumberedsubsec Q2.0.3: Where do I find external libraries? -All external libraries used by XEmacs can be found at the XEmacs FTP +All external libraries used by XEmacs can be found on the XEmacs web site @iftex @* @end iftex -@uref{http://ftp.xemacs.org/pub/aux/}. +@uref{http://www.xemacs.org/Download/optLibs.html}. The library versions available here are known to work with XEmacs. (Newer versions will probably work as well but we can't guarantee it.) We try to keep the libraries up-to-date but may not always succeed. -If you want to make sure of getting the latest version, check the -canonical locations below. - -The canonical locations (at the time of this writing) are as follows: - -@subheading Databases: - -These DBM implementations are supported by XEmacs: -native dbm (provided by OS), GDBM, and Berkeley DB version 1, 2 and 3. - -@example -GDBM is the GNU DBM library, compatible with the Unix dbm library. -gdbm-1.8.3.tar.gz -ftp://ftp.gnu.org/pub/gnu/gdbm/ -http://www.gnu.org/software/gdbm/gdbm.html -configure flag: --with-database=gnudbm - -Berkeley DB is provided by Sleepycat Software. -db-4.1.25.tar.gz -http://www.sleepycat.com/ -configure flag: --with-database=berkdb - -OpenLDAP is an implementation of the LDAP X.500 Directory protocol. -openldap-2.1.12.tgz -http://www.openldap.org/ -configure flag: --with-ldap -@end example - -@subheading Image Format Libraries: - -@example -`compface' is an old library for viewing X-Faces in messages. -It is no longer being maintained and has been frozen for 10 years or -so, but still works. It should be compiled with the same options that -X11 was compiled with on your system. The version of this library at -xemacs.org includes the `xbm2xface.pl' script, written by -@email{stig@@hackvan.com, Stig}, which may be useful when generating -your own xface. -compface.tar.gz -ftp://ftp.cs.indiana.edu/pub/faces/compface/ -configure flag: --with-xface - -The JPEG image format library -jpegsrc.v6b.tar.gz -ftp://ftp.uu.net/graphics/jpeg/ -http://www.ijg.org/ -configure flag: --with-jpeg - -The TIFF image format library -tiff-v3.4-tar.gz -ftp://ftp.sgi.com/graphics/tiff/ -configure flag: --with-tiff - -The XPM image format library -xpm-3.4k.tar.gz -ftp://koala.inria.fr/pub/xpm/ -http://www.inria.fr/koala/lehors/xpm.html -configure flag: --with-xpm - -The PNG image format library -libpng-1.2.15.tar.gz -http://www.libpng.org/pub/png/ -configure flag: --with-png - -The ZLIB compression library is used by the PNG library. -A GZIP coding system is also available, in XEmacs 21.5 and onward. -zlib-1.1.4.tar.gz -http://www.gzip.org/zlib/ -@end example - -@subheading Other Multimedia: - -@example -Network Audio System (NAS) is a client-server sound library for X. -nas-1.6.src.tar.gz -ftp://ftp.x.org/contrib/audio/nas/ -http://radscan.com/nas.html -configure flag: --with-nas - -Enlightened Sound Daemon (ESD) is yet another sound system. -esound-0.2.8.tar.gz -http://www.tux.org/~ricdude/EsounD.html - -Netpbm is a collection of programs that XEmacs might use at runtime. -netpbm-1mar1994.tar.gz -netpbm-9.2.tar.gz -ftp://metalab.unc.edu/pub/Linux/apps/graphics/convert/ - -Xaw3d is designed to be a drop-in replacement for the Athena widget -library that `looks cooler'. -Xaw3d-1.5.tar.gz -ftp://ftp.x.org/contrib/widgets/Xaw3d/ -@end example - -@subheading Internationalization: - -@example -Canna is a Japanese language input method. -Canna has not been updated since 1996. -Canna35b2.tar.gz -cfw35f1p.exe (Canna on W95) -http://www.nec.co.jp/canna/ (in Japanese) -http://www.nec.co.jp/canna/c-down.html (download site, for those not able - to read Japanese) -configure flag: --with-canna - -Wnn is a multi-language mule input method. -Wnn4 is the free version, while Wnn6 is the commercial version. -Wnn4.2.tar.gz -ftp://ftp.omronsoft.co.jp/pub/Wnn6/ (commercial version) - -Wnn4 appears completely orphaned; searches on google turn up XEmacs' own -site first. However, here is a (very old) site with some info on WNN: -http://web.kyoto-inet.or.jp/people/tomoko-y/biwa/root/wnn_e.html - -configure flag: --with-wnn - -Mew is a multi-lingual mailreader. -mew-1.94.2.tar.gz -http://www.mew.org/ - -kterm is a multi-lingual terminal emulator with special support for -Asian languages with large character sets. -kterm-6.2.0.tar.gz -ftp://ftp.x.org/contrib/applications/ - -ispell is a spelling checker with support for multiple languages. -ispell-3.2.06.tar.gz -http://ficus-www.cs.ucla.edu/ficus-members/geoff/ispell.html -http://www.kdstevens.com/~stevens/ispell-page.html - -SKK (Simple Kana-to-Kanji) is a simple input method for Japanese. -It has been modified to work with XEmacs. -skk-8.6x.tar.gz - -X11 fonts for numerous languages. -intlfonts-1.2.tar.gz -http://www.gnu.org/directory/localization/intlfonts.html -@end example - -@subheading Miscellaneous: - -@example -ncurses is the standard free software curses library. -ncurses-5.3.tar.gz -http://dickey.his.com/ncurses/ncurses.html -ftp://dickey.his.com/ncurses/ -@end example - -@subheading Developer Tools: - -@example -CVS is the version control system used by XEmacs to manage the sources. -cvs-1.11.5.tar.gz -http:/www.cvshome.org/ - -bzip2 is a compressor that compresses much better than gzip. -bzip2-1.0.2.tar.gz -http://sources.redhat.com/bzip2/ - -texi2html is a script that converts Texinfo pages to HTML. -texi2html-1.64.tar.gz -http://www.mathematik.uni-kl.de/~obachman/Texi2html/ - -Gnats is a bug tracking system. Red Hat recommends using GNATS 4.0 for any -new installations (see the beta below). -gnats-3.113.tar.gz -gnats-3.999.2.tar.gz -cern_wwwgnats_v2.0-beta.tar.gz (WWW front end to Gnats) -http://sources.redhat.com/gnats/ - -Use autoconf to generate `configure' from `configure.in'. -NOTE: There is a more recent series, 2.5x, that XEmacs doesn't currently -work with. -autoconf-2.13.tar.gz -http://www.gnu.org/software/autoconf/ - -Use the `applypatch' program from the makepatch package -to apply patches to upgrade from one beta release to another. -Use this if you have a slow or expensive connection to the Net. -makepatch-2.00_09.tar.gz -http://www.squirrel.nl/people/jvromans/ -@end example +Check the above page for the canonical locations of the external libraries, +allowing you to download the latest, bleeding-edge versions. @node Q2.0.4, Q2.0.5, Q2.0.3, Installation @unnumberedsubsec Q2.0.4: How do I specify the paths that XEmacs uses for finding files? @@ -2470,11 +2300,11 @@ A good method is to make a shell alias for xemacs: @example -alias xemacs=/i/xemacs-20.2/src/xemacs +alias xemacs=/src/xemacs-21.5/src/xemacs @end example (You will obviously use whatever directory you downloaded the source -tree to instead of @file{/i/xemacs-20.2}). +tree to instead of @file{/src/xemacs-21.5}). This will let you run XEmacs without massive copying. @@ -2528,15 +2358,21 @@ @node Q2.1.1, Q2.1.2, Q2.0.7, Installation @unnumberedsubsec Q2.1.1: Libraries in non-standard locations -I have x-faces, jpeg, xpm etc. all in different places. I've tried -space-separated, comma-separated, several --site-libraries, all to no -avail. +If your libraries are in a non-standard location, you can specify the location +using the following flags to @file{configure}: + +@example +--site-libraries=WHATEVER +--site-includes=WHATEVER +@end example + +If you have multiple paths to specify, use the following syntax: @example --site-libraries='/path/one /path/two /path/etc' @end example -@node Q2.1.2, Q2.1.3, Q2.1.1, Installation +@node Q2.1.2, Q2.2.1, Q2.1.1, Installation @unnumberedsubsec Q2.1.2: Why can't I strip XEmacs? @email{cognot@@fronsac.ensg.u-nancy.fr, Richard Cognot} writes: @@ -2591,60 +2427,9 @@ @end enumerate @end quotation -@node Q2.1.3, Q2.1.4, Q2.1.2, Installation -@unnumberedsubsec Q2.1.3: Compiling XEmacs with Netaudio. - -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? - -You should only need to add some stuff to the configure command line. -To tell it to compile in netaudio support: @samp{--with-sound=both}, or -@samp{--with-sound=nas} if you don't want native sound support for some -reason.) To tell it where to find the netaudio includes and libraries: - -@example ---site-libraries=WHATEVER ---site-includes=WHATEVER -@end example - -Then (fingers crossed) it should compile and it will use netaudio if you -have a server running corresponding to the X server. The netaudio server -has to be there when XEmacs starts. If the netaudio server goes away and -another is run, XEmacs should cope (fingers crossed, error handling in -netaudio isn't perfect). - -BTW, netaudio has been renamed as it has a name clash with something -else, so if you see references to NAS or Network Audio System, it's the -same thing. It also might be found at -@uref{ftp://ftp.x.org/contrib/audio/nas/}. - -@node Q2.1.4, Q2.2.1, Q2.1.3, Installation -@unnumberedsubsec Q2.1.4: Problems with Linux and ncurses. - -On Linux 1.3.98 with termcap 2.0.8 and the ncurses that came with libc -5.2.18, XEmacs 20.0b20 is unable to open a tty device: - -@example -src/xemacs -nw -q -Initialization error: -@iftex -@* -@end iftex -Terminal type `xterm' undefined (or can't access database?) -@end example - -@email{ben@@xemacs.org, Ben Wing} writes: - -@quotation -Your ncurses configuration is messed up. Your /usr/lib/terminfo is a -bad pointer, perhaps to a CD-ROM that is not inserted. -@end quotation - @unnumberedsec 2.2: Windows Installation (Windows, Cygwin, MinGW) -@node Q2.2.1, Q2.2.2, Q2.1.4, Installation +@node Q2.2.1, Q2.2.2, Q2.1.2, Installation @unnumberedsubsec Q2.2.1: What exactly are all the different ways to build XEmacs under Windows? XEmacs can be built in several ways in the MS Windows environment. @@ -2795,7 +2580,7 @@ As noted above, the non-Cygwin X support is basically orphaned, and probably won't work. But if it want to try, it's described in @file{nt/README} in some detail. Basically, you need to get X11 -libraries from @uref{ftp://ftp.x.org}, and compile them. If the +libraries from @uref{http://ftp.x.org}, and compile them. If the precompiled versions are available somewhere, we don't know of it. @node Q2.2.8, Q2.3.1, Q2.2.7, Installation @@ -3529,101 +3314,64 @@ works around the "no useful stdio" problem by creating its own console window as necessary to display messages in.) -@node Display Subsystems, External Subsystems, Installation, Top -@unnumbered 3 Basic Display-Related Subsystems +@node Editing, Display, Installation, Top +@unnumbered 3 Editing Functions This is part 3 of the XEmacs Frequently Asked Questions list. This -section is devoted to the basic display-related capabilities of -XEmacs, such as the keyboard, the mouse, fonts, colors, the modeline, -etc. +section is devoted to the editing-related capabilities of XEmacs (the +keyboard, mouse, buffers, text selections, etc.) and how to customize +them. @menu 3.0: The Keyboard -* Q3.0.1:: How can I bind complex functions (or macros) to keys? -* Q3.0.2:: How do I bind C-. and C-; to scroll one line up and down? -* Q3.0.3:: Globally binding @kbd{Delete}? -* Q3.0.4:: How to map @kbd{Help} key alone on Sun type4 keyboard? -* Q3.0.5:: How can you type in special characters in XEmacs? -* Q3.0.6:: Can I turn on @dfn{sticky} modifier keys? -* Q3.0.7:: How do I map the arrow keys? -* Q3.0.8:: HP Alt key as Meta. -* Q3.0.9:: Why does edt emulation not work? -* Q3.0.10:: How can I emulate VI and use it as my default mode? +* Q3.0.1:: How can I customize the keyboard? +* Q3.0.2:: How can I bind complex functions (or macros) to keys? +* Q3.0.3:: How do I bind C-. and C-; to scroll one line up and down? +* Q3.0.4:: Globally binding @kbd{Delete}? +* Q3.0.5:: How to map @kbd{Help} key alone on Sun type4 keyboard? +* Q3.0.6:: How can you type in special characters in XEmacs? +* Q3.0.7:: Can I turn on @dfn{sticky} modifier keys? +* Q3.0.8:: How do I map the arrow keys? +* Q3.0.9:: HP Alt key as Meta. +* Q3.0.10:: Why does edt emulation not work? +* Q3.0.11:: How can I emulate VI and use it as my default mode? 3.1: The Mouse * Q3.1.1:: How can I turn off Mouse pasting? * Q3.1.2:: How do I set control/meta/etc modifiers on mouse buttons? * Q3.1.3:: Clicking the left button does not do anything in buffer list. * Q3.1.4:: How can I get a list of buffers when I hit mouse button 3? -* Q3.1.5:: How I can set XEmacs up so that it pastes where the text cursor is? - -3.2: Textual Fonts and Colors -* Q3.2.1:: How do I specify a font? -* Q3.2.2:: How do I set the text, menu and modeline fonts? -* Q3.2.3:: How can I set color options from @file{init.el}? -* Q3.2.4:: How can I set the colors when highlighting a region? -* Q3.2.5:: How can I limit color map usage? -* Q3.2.6:: My tty supports color, but XEmacs doesn't use them. -* Q3.2.7:: Can I have pixmap backgrounds in XEmacs? -* Q3.2.8:: How do I display non-ASCII characters? -* Q3.2.9:: Font selections in don't get saved after @code{Save Options}. - -3.3: The Menubar and Toolbar -* Q3.3.1:: How do I get rid of the menu (or menubar)? -* Q3.3.2:: Can I customize the basic menubar? -* Q3.3.3:: How do I control how many buffers are listed in the menu @code{Buffers List}? -* Q3.3.4:: Resources like @code{Emacs*menubar*font} are not working? -* Q3.3.5:: How can I bind a key to a function to toggle the toolbar? -* Q3.3.6:: @samp{Can't instantiate image error...} in toolbar - -3.4: Scrollbars and Scrolling -* Q3.4.1:: How can I disable the scrollbar? -* Q3.4.2:: How can one use resources to change scrollbar colors? -* Q3.4.3:: Moving the scrollbar can move the point; can I disable this? -* Q3.4.4:: Scrolling one line at a time. -* Q3.4.5:: How can I turn off automatic horizontal scrolling in specific modes? -* Q3.4.6:: I find auto-show-mode disconcerting. How do I turn it off? - -3.5: The Modeline -* Q3.5.1:: How can I make the modeline go away? -* Q3.5.2:: How do you have XEmacs display the line number in the modeline? -* Q3.5.3:: How do I get XEmacs to put the time of day on the modeline? -* Q3.5.4:: How can one change the modeline color based on the mode used? - -3.6: The Cursor -* Q3.6.1:: Is there a way to make the bar cursor thicker? -* Q3.6.2:: Is there a way to get back the block cursor? -* Q3.6.3:: Can I make the cursor blink? - -3.7: Text Selections -* Q3.7.1:: How do I select a rectangular region? -* Q3.7.2:: How can I turn off or change highlighted selections? -* Q3.7.3:: How do I get that typing on an active region removes it? -* Q3.7.4:: Can I turn off the highlight during isearch? -* Q3.7.5:: How do I turn off highlighting after @kbd{C-x C-p} (mark-page)? -* Q3.7.6:: The region disappears when I hit the end of buffer while scrolling. -* Q3.7.7:: Why is killing so slow? -* Q3.7.8:: Why does @kbd{M-w} take so long? - -3.8: Buffers, Text Editing -* Q3.8.1:: Can I have the end of the buffer delimited in some way? -* Q3.8.2:: How do I insert today's date into a buffer? -* Q3.8.3:: How do I get a single minibuffer frame? -* Q3.8.4:: How can I enable auto-indent and/or Filladapt? -* Q3.8.5:: How can I get XEmacs to come up in text/auto-fill mode by default? - -3.9: Editing Source Code -* Q3.9.1:: How can I do source code highlighting using font-lock? -* Q3.9.2:: How do I get @samp{More} Syntax Highlighting on by default? -* Q3.9.3:: Where do I get the latest CC Mode? -* Q3.9.4:: I do not like cc-mode. How do I use the old c-mode? -* Q3.9.5:: How do you make XEmacs indent CL if-clauses correctly? +* Q3.1.5:: How can I set XEmacs up so that it pastes where the text cursor is? + +3.2: Buffers, Text Editing +* Q3.2.1:: Can I have the end of the buffer delimited in some way? +* Q3.2.2:: How do I insert today's date into a buffer? +* Q3.2.3:: How do I get a single minibuffer frame? +* Q3.2.4:: How can I enable auto-indent and/or Filladapt? +* Q3.2.5:: How can I get XEmacs to come up in text/auto-fill mode by default? + +3.3: Text Selections +* Q3.3.1:: How do I select a rectangular region? +* Q3.3.2:: How can I turn off or change highlighted selections? +* Q3.3.3:: How do I cause typing on an active region to remove it? +* Q3.3.4:: Can I turn off the highlight during isearch? +* Q3.3.5:: Why is killing so slow? +* Q3.3.6:: Why does @kbd{M-w} take so long? + +3.4: Editing Source Code +* Q3.4.1:: I do not like cc-mode. How do I use the old c-mode? +* Q3.4.2:: How do you make XEmacs indent CL if-clauses correctly? @end menu @unnumberedsec 3.0: The Keyboard -@node Q3.0.1, Q3.0.2, Display Subsystems, Display Subsystems -@unnumberedsubsec Q3.0.1: How can I bind complex functions (or macros) to keys? +@node Q3.0.1, Q3.0.2, Editing, Editing +@unnumberedsubsec Q3.0.1: How can I customize the keyboard? + +#### Write me. + +@node Q3.0.2, Q3.0.3, Q3.0.1, Editing +@unnumberedsubsec Q3.0.2: How can I bind complex functions (or macros) to keys? As an example, say you want the @kbd{paste} key on a Sun keyboard to insert the current Primary X selection at point. You can accomplish this @@ -3660,11 +3408,11 @@ This is fine if you only need a few functions within the lambda body. If you're doing more it's cleaner to define a separate function. -@xref{Q3.0.2, How do I bind C-. and C-; to scroll one line up and +@xref{Q3.0.3, How do I bind C-. and C-; to scroll one line up and down?}. -@node Q3.0.2, Q3.0.3, Q3.0.1, Display Subsystems -@unnumberedsubsec Q3.0.2: How do I bind C-. and C-; to scroll one line up and down? +@node Q3.0.3, Q3.0.4, Q3.0.2, Editing +@unnumberedsubsec Q3.0.3: How do I bind C-. and C-; to scroll one line up and down? Add the following (Thanks to @email{mly@@adoc.xerox.com, Richard Mlynarik} and @email{wayne@@zen.cac.stratus.com, Wayne Newberry}) to @file{.emacs}: @@ -3684,11 +3432,11 @@ The key point is that you can only bind simple functions to keys; you can not bind a key to a function that you're also passing arguments -to. (@pxref{Q3.0.1, How can I bind complex functions (or macros) to +to. (@pxref{Q3.0.2, How can I bind complex functions (or macros) to keys?} for a better answer). -@node Q3.0.3, Q3.0.4, Q3.0.2, Display Subsystems -@unnumberedsubsec Q3.0.3: Globally binding @kbd{Delete}? +@node Q3.0.4, Q3.0.5, Q3.0.3, Editing +@unnumberedsubsec Q3.0.4: Globally binding @kbd{Delete}? I cannot manage to globally bind my @kbd{Delete} key to something other than the default. How does one do this? @@ -3705,8 +3453,8 @@ (global-set-key 'redirected-delete 'foo) @end lisp -@node Q3.0.4, Q3.0.5, Q3.0.3, Display Subsystems -@unnumberedsubsec Q3.0.4: How to map @kbd{Help} key alone on Sun type4 keyboard? +@node Q3.0.5, Q3.0.6, Q3.0.4, Editing +@unnumberedsubsec Q3.0.5: How to map @kbd{Help} key alone on Sun type4 keyboard? The following works in GNU Emacs 19: @@ -3735,8 +3483,8 @@ can also cause fix this by telling OLWM to not grab the help key, with the null binding @code{OpenWindows.KeyboardCommand.Help:}. -@node Q3.0.5, Q3.0.6, Q3.0.4, Display Subsystems -@unnumberedsubsec Q3.0.5: How can you type in special characters in XEmacs? +@node Q3.0.6, Q3.0.7, Q3.0.5, Editing +@unnumberedsubsec Q3.0.6: How can you type in special characters in XEmacs? One way is to use the package @code{x-compose}. Then you can use sequences like @kbd{Compose " a} to get ä, etc. @@ -3784,10 +3532,10 @@ @end quotation For the related problem of @emph{displaying} non-ASCII characters in a -non-Mule XEmacs, @xref{Q3.2.8, How do I display non-ASCII characters?}. - -@node Q3.0.6, Q3.0.7, Q3.0.5, Display Subsystems -@unnumberedsubsec Q3.0.6: Can I turn on @dfn{sticky} modifier keys? +non-Mule XEmacs, @xref{Q4.0.8, How do I display non-ASCII characters?}. + +@node Q3.0.7, Q3.0.8, Q3.0.6, Editing +@unnumberedsubsec Q3.0.7: Can I turn on @dfn{sticky} modifier keys? Yes, with @code{(setq modifier-keys-are-sticky t)}. This will give the effect of being able to press and release Shift and have the next @@ -3801,8 +3549,8 @@ of the frame and back in, it cancels all currently ``stuck'' modifiers. @end quotation -@node Q3.0.7, Q3.0.8, Q3.0.6, Display Subsystems -@unnumberedsubsec Q3.0.7: How do I map the arrow keys? +@node Q3.0.8, Q3.0.9, Q3.0.7, Editing +@unnumberedsubsec Q3.0.8: How do I map the arrow keys? @c New Say you want to map @kbd{C-@key{right}} to forward-word: @@ -3825,8 +3573,8 @@ @end lisp @end quotation -@node Q3.0.8, Q3.0.9, Q3.0.7, Display Subsystems -@unnumberedsubsec Q3.0.8: HP Alt key as Meta. +@node Q3.0.9, Q3.0.10, Q3.0.8, Editing +@unnumberedsubsec Q3.0.9: HP Alt key as Meta. How can I make XEmacs recognize the Alt key of my HP workstation as a Meta key? @@ -3838,8 +3586,8 @@ remove Mod1 = Mode_switch @end example -@node Q3.0.9, Q3.0.10, Q3.0.8, Display Subsystems -@unnumberedsubsec Q3.0.9: Why does edt emulation not work? +@node Q3.0.10, Q3.0.11, Q3.0.9, Editing +@unnumberedsubsec Q3.0.10: Why does edt emulation not work? We don't know, but you can use tpu-edt emulation instead, which works fine and is a little fancier than the standard edt emulation. To do @@ -3856,8 +3604,8 @@ (global-set-key [(control h)] 'help-for-help) @end lisp -@node Q3.0.10, Q3.1.1, Q3.0.9, Display Subsystems -@unnumberedsubsec Q3.0.10: How can I emulate VI and use it as my default mode? +@node Q3.0.11, Q3.1.1, Q3.0.10, Editing +@unnumberedsubsec Q3.0.11: How can I emulate VI and use it as my default mode? Our recommended VI emulator is viper. To make viper-mode the default, add this to your @file{init.el}: @@ -3875,7 +3623,7 @@ @unnumberedsec 3.1: The Mouse -@node Q3.1.1, Q3.1.2, Q3.0.10, Display Subsystems +@node Q3.1.1, Q3.1.2, Q3.0.11, Editing @unnumberedsubsec Q3.1.1: How can I turn off Mouse pasting? I keep hitting the middle mouse button by accident and getting stuff @@ -3895,7 +3643,7 @@ (define-key global-map [button2] 'mouse-set-point-and-select) @end lisp -@node Q3.1.2, Q3.1.3, Q3.1.1, Display Subsystems +@node Q3.1.2, Q3.1.3, Q3.1.1, Editing @unnumberedsubsec Q3.1.2: How do I set control/meta/etc modifiers on mouse buttons? Use, for instance, @code{[(meta button1)]}. For example, here is a common @@ -3911,7 +3659,7 @@ (local-set-key [(meta button1)] 'edit-definitions-lisp) @end lisp -@node Q3.1.3, Q3.1.4, Q3.1.2, Display Subsystems +@node Q3.1.3, Q3.1.4, Q3.1.2, Editing @unnumberedsubsec Q3.1.3: Clicking the left button does not do anything in buffer list. I do @kbd{C-x C-b} to get a list of buffers and the entries get @@ -3920,7 +3668,7 @@ Use the middle mouse button. -@node Q3.1.4, Q3.1.5, Q3.1.3, Display Subsystems +@node Q3.1.4, Q3.1.5, Q3.1.3, Editing @unnumberedsubsec Q3.1.4: How can I get a list of buffers when I hit mouse button 3? The following code will replace the default popup on button3: @@ -3929,8 +3677,8 @@ (global-set-key [button3] 'popup-buffer-menu) @end lisp -@node Q3.1.5, Q3.2.1, Q3.1.4, Display Subsystems -@unnumberedsubsec Q3.1.5: How I can set XEmacs up so that it pastes where the text cursor is? +@node Q3.1.5, Q3.2.1, Q3.1.4, Editing +@unnumberedsubsec Q3.1.5: How can I set XEmacs up so that it pastes where the text cursor is? By default XEmacs pastes X selections where the mouse pointer is. How do I disable this? @@ -3944,598 +3692,197 @@ (setq mouse-yank-at-point t) @end lisp -Starting with XEmacs-20.2 you can also change this with Customize. -Select from the @code{Options} menu -@code{Advanced (Customize)->Emacs->Editing->Mouse->Yank At Point...} or type -@kbd{M-x customize @key{RET} mouse @key{RET}}. - -@unnumberedsec 3.2: Textual Fonts and Colors - -@node Q3.2.1, Q3.2.2, Q3.1.5, Display Subsystems -@unnumberedsubsec Q3.2.1: How do I specify a font? - -#### Update me. - -In 21.4 and above, you can use the @samp{Options} menu to change the font. -You can also do it in your init file, e.g. like this (for MS Windows): - -@display - (set-face-font 'default "Lucida Console:Regular:10") - (set-face-font 'modeline "MS Sans Serif:Regular:10") -@end display - -@node Q3.2.2, Q3.2.3, Q3.2.1, Display Subsystems -@unnumberedsubsec Q3.2.2: How do I set the text, menu and modeline fonts? - -#### Update me. - -Note that you should use @samp{Emacs.} and not @samp{Emacs*} when -setting face values. - -In @file{.Xresources}: - -@example -Emacs.default.attributeFont: -*-*-medium-r-*-*-*-120-*-*-m-*-*-* -Emacs*menubar*font: fixed -Emacs.modeline.attributeFont: fixed -@end example - -This is confusing because @samp{default} and @samp{modeline} are face -names, and can be found listed with all faces in the current mode by -using @kbd{M-x set-face-font (enter) ?}. They use the face-specific -resource @samp{attributeFont}. - -On the other hand, @samp{menubar} is a normal X thing that uses the -resource @samp{font}. With Motif it @emph{may be} necessary to use -@samp{fontList} @emph{instead of} @samp{font}. In @emph{non-Motif} -configurations with Mule it @emph{is} necessary to use @samp{fontSet} -instead of @samp{font}. (Sorry, there just is no simple recipe here.) - -@node Q3.2.3, Q3.2.4, Q3.2.2, Display Subsystems -@unnumberedsubsec Q3.2.3: How can I set color options from @file{init.el}? - -How can I set the most commonly used color options from my -@file{init.el} instead of from my @file{.Xresources}? +You can also change this with Customize. Select from the +@code{Options} menu @code{Advanced +(Customize)->Emacs->Editing->Mouse->Yank At Point...} or type @kbd{M-x +customize @key{RET} mouse @key{RET}}. + +@unnumberedsec 3.2: Buffers, Text Editing + +@node Q3.2.1, Q3.2.2, Q3.1.5, Editing +@unnumberedsubsec Q3.2.1: Can I have the end of the buffer delimited in some way? + +Say, with: @samp{[END]}? + +Try this: + +@lisp +(let ((ext (make-extent (point-min) (point-max)))) + (set-extent-property ext 'start-closed t) + (set-extent-property ext 'end-closed t) + (set-extent-property ext 'detachable nil) + (set-extent-end-glyph ext (make-glyph [string :data "[END]"]))) +@end lisp + +Since this is XEmacs, you can specify an icon to be shown on +window-system devices. To do so, change the @code{make-glyph} call to +something like this: + +@lisp +(make-glyph '([xpm :file "~/something.xpm"] + [string :data "[END]"])) +@end lisp + +You can inline the @sc{xpm} definition yourself by specifying +@code{:data} instead of @code{:file}. Here is such a full-featured +version that works on both X and TTY devices: + +@lisp +(let ((ext (make-extent (point-min) (point-max)))) + (set-extent-property ext 'start-closed t) + (set-extent-property ext 'end-closed t) + (set-extent-property ext 'detachable nil) + (set-extent-end-glyph ext (make-glyph '([xpm :data "\ +/* XPM */ +static char* eye = @{ +\"20 11 7 2\", +\"__ c None\" +\"_` c #7f7f7f\", +\"_a c #fefefe\", +\"_b c #7f0000\", +\"_c c #fefe00\", +\"_d c #fe0000\", +\"_e c #bfbfbf\", +\"___________`_`_`___b_b_b_b_________`____\", +\"_________`_`_`___b_c_c_c_b_b____________\", +\"_____`_`_`_e___b_b_c_c_c___b___b_______`\", +\"___`_`_e_a___b_b_d___b___b___b___b______\", +\"_`_`_e_a_e___b_b_d_b___b___b___b___b____\", +\"_`_`_a_e_a___b_b_d___b___b___b___b___b__\", +\"_`_`_e_a_e___b_b_d_b___b___b___b___b_b__\", +\"___`_`_e_a___b_b_b_d_c___b___b___d_b____\", +\"_____`_`_e_e___b_b_b_d_c___b_b_d_b______\", +\"_`_____`_`_`_`___b_b_b_d_d_d_d_b________\", +\"___`_____`_`_`_`___b_b_b_b_b_b__________\", +@} ;"] + [string :data "[END]"])))) +@end lisp + +Note that you might want to make this a function, and put it to a hook. +We leave that as an exercise for the reader. + +@node Q3.2.2, Q3.2.3, Q3.2.1, Editing +@unnumberedsubsec Q3.2.2: How do I insert today's date into a buffer? Like this: @lisp -(set-face-background 'default "bisque") ; frame background -(set-face-foreground 'default "black") ; normal text -(set-face-background 'zmacs-region "red") ; When selecting w/ - ; mouse -(set-face-foreground 'zmacs-region "yellow") -(set-face-font 'default "*courier-bold-r*120-100-100*") -(set-face-background 'highlight "blue") ; Ie when selecting - ; buffers -(set-face-foreground 'highlight "yellow") -(set-face-background 'modeline "blue") ; Line at bottom - ; of buffer -(set-face-foreground 'modeline "white") -(set-face-font 'modeline "*bold-r-normal*140-100-100*") -(set-face-background 'isearch "yellow") ; When highlighting - ; while searching -(set-face-foreground 'isearch "red") -(setq x-pointer-foreground-color "black") ; Adds to bg color, - ; so keep black -(setq x-pointer-background-color "blue") ; This is color - ; you really - ; want ptr/crsr -@end lisp - -@node Q3.2.4, Q3.2.5, Q3.2.3, Display Subsystems -@unnumberedsubsec Q3.2.4: How can I set the colors when highlighting a region? - -How can I set the background/foreground colors when highlighting a -region? - -You can change the face @code{zmacs-region} either in your -@file{.Xresources}: - -@example -Emacs.zmacs-region.attributeForeground: firebrick -Emacs.zmacs-region.attributeBackground: lightseagreen -@end example - -or in your @file{init.el}: - -@lisp -(set-face-background 'zmacs-region "red") -(set-face-foreground 'zmacs-region "yellow") +(insert (current-time-string)) @end lisp -@node Q3.2.5, Q3.2.6, Q3.2.4, Display Subsystems -@unnumberedsubsec Q3.2.5: How can I limit color map usage? - -I'm using Netscape (or another color grabber like XEmacs); -is there any way to limit the number of available colors in the color map? - -Answer: No, but you can start Netscape before XEmacs, and it will use -the closest available color if the colormap is full. You can also limit -the number of colors Netscape uses, using the flags -mono, -ncols <#> or --install (for mono, limiting to <#> colors, or for using a private color -map). - -If you have the money, another solution would be to use a truecolor or -direct color video. - -@node Q3.2.6, Q3.2.7, Q3.2.5, Display Subsystems -@unnumberedsubsec Q3.2.6: My tty supports color, but XEmacs doesn't use them. - -XEmacs tries to automatically determine whether your tty supports color, -but sometimes guesses wrong. In that case, you can make XEmacs Do The -Right Thing using this Lisp code: - -@lisp -(if (eq 'tty (device-type)) - (set-device-class nil 'color)) -@end lisp - -@node Q3.2.7, Q3.2.8, Q3.2.6, Display Subsystems -@unnumberedsubsec Q3.2.7: Can I have pixmap backgrounds in XEmacs? -@c New -@email{jvillaci@@wahnsinnig.extreme.indiana.edu, Juan Villacis} writes: - -@quotation -There are several ways to do it. For example, you could specify a -default pixmap image to use in your @file{~/.Xresources}, e.g., - - -@example - Emacs*EmacsFrame.default.attributeBackgroundPixmap: /path/to/image.xpm -@end example - - -and then reload ~/.Xresources and restart XEmacs. Alternatively, -since each face can have its own pixmap background, a better way -would be to set a face's pixmap within your XEmacs init file, e.g., +@node Q3.2.3, Q3.2.4, Q3.2.2, Editing +@unnumberedsubsec Q3.2.3: How do I get a single minibuffer frame? + +@email{acs@@acm.org, Vin Shelton} writes: @lisp - (set-face-background-pixmap 'default "/path/to/image.xpm") - (set-face-background-pixmap 'bold "/path/to/another_image.xpm") +(setq initial-frame-plist '(minibuffer nil)) +(setq default-frame-plist '(minibuffer nil)) +(setq default-minibuffer-frame + (make-frame + '(minibuffer only + width 86 + height 1 + menubar-visible-p nil + default-toolbar-visible-p nil + name "minibuffer" + top -2 + left -2 + has-modeline-p nil))) +(frame-notice-user-settings) @end lisp -and so on. You can also do this interactively via @kbd{M-x edit-faces}. - -@end quotation - -@node Q3.2.8, Q3.2.9, Q3.2.7, Display Subsystems -@unnumberedsubsec Q3.2.8: How do I display non-ASCII characters? -@c New - -If you're using a Mule-enabled XEmacs, then display is automatic. If -you're not seeing the characters you expect, either (1) you don't have -appropriate fonts available or (2) XEmacs did not correctly detect the -coding system (@pxref{Recognize Coding, , , xemacs}). In case (1), -install fonts as is customary for your platform. In case (2), you -need to tell XEmacs explicitly what coding systems you're using. -@ref{Specify Coding, , , xemacs}. - -If your XEmacs is not Mule-enabled, and for some reason getting a -Mule-enabled XEmacs seems like the wrong thing to do, all is not lost. -You can arrange it by brute force. In @file{event-Xt.c} (suppress the -urge to look in this file---play Doom instead, because you'll survive -longer), it is written: - -@quotation -In a non-Mule world, a user can still have a multi-lingual editor, by -doing @code{(set-face-font "-*-iso8859-2" (current-buffer))} for all -their Latin-2 buffers, etc. -@end quotation - -For the related problem of @emph{inputting} non-ASCII characters in a -non-Mule XEmacs, @xref{Q3.0.5, How can you type in special characters -in XEmacs?}. - -@node Q3.2.9, Q3.3.1, Q3.2.8, Display Subsystems -@unnumberedsubsec Q3.2.9: Font selections in don't get saved after @code{Save Options}. - -@email{mannj@@ll.mit.edu, John Mann} writes: - -@quotation -You have to go to @samp{Options->Menubars} and unselect -@samp{Frame-Local Font Menu}. If this option is selected, font changes -are only applied to the @emph{current} frame and do @emph{not} get saved -when you save options. -@end quotation - -Also, set the following in your @file{init.el}: - -@lisp -(setq options-save-faces t) -@end lisp - -@unnumberedsec 3.3: The Menubar and Toolbar - -@node Q3.3.1, Q3.3.2, Q3.2.9, Display Subsystems -@unnumberedsubsec Q3.3.1: How do I get rid of the menu (or menubar)? - -@lisp -(set-specifier menubar-visible-p nil) -@end lisp - -@node Q3.3.2, Q3.3.3, Q3.3.1, Display Subsystems -@unnumberedsubsec Q3.3.2: Can I customize the basic menubar? - -For an extensive menubar, add this line to your @file{init.el}: +@strong{Please note:} The single minibuffer frame may not be to everyone's +taste, and there any number of other XEmacs options settings that may +make it difficult or inconvenient to use. + +@node Q3.2.4, Q3.2.5, Q3.2.3, Editing +@unnumberedsubsec Q3.2.4: How can I enable auto-indent and/or Filladapt? + +Put the following line in your @file{init.el}: @lisp -(load "big-menubar") +(setq indent-line-function 'indent-relative-maybe) @end lisp -If you'd like to write your own, this file provides as good a set of -examples as any to start from. The file is located in edit-utils -package. - -@node Q3.3.3, Q3.3.4, Q3.3.2, Display Subsystems -@unnumberedsubsec Q3.3.3: How do I control how many buffers are listed in the menu @code{Buffers List}? - -Add the following to your @file{init.el} (suit to fit): +If you want to get fancy, try the @code{filladapt} package available +standard with XEmacs. Put this into your @file{init.el}: @lisp -(setq buffers-menu-max-size 20) +(require 'filladapt) +(setq-default filladapt-mode t) +(add-hook 'c-mode-hook 'turn-off-filladapt-mode) @end lisp -For no limit, use an argument of @samp{nil}. - -Starting with XEmacs-20.3 you can also change this with Customize. -Select from the @code{Options} menu -@code{Advanced (Customize)->Emacs->Environment->Menu->Buffers Menu->Max Size...} or -type @kbd{M-x customize @key{RET} buffers-menu @key{RET}}. - -@node Q3.3.4, Q3.3.5, Q3.3.3, Display Subsystems -@unnumberedsubsec Q3.3.4: Resources like @code{Emacs*menubar*font} are not working? - -I am trying to use a resource like @code{Emacs*menubar*font} to set the -font of the menubar but it's not working. - -In Motif, the use of @samp{font} resources is obsoleted in order to -support internationalization. If you are using the real Motif menubar, -this resource is not recognized at all; you have to say: - -@example -Emacs*menubar*fontList: FONT -@end example - -If you are using the Lucid menubar, for backward compatibility with -existing user configurations, the @samp{font} resource is recognized. -Since this is not supported by Motif itself, the code is a kludge and -the @samp{font} resource will be recognized only if the @samp{fontList} -resource resource is unset. This means that the resource - -@example -*fontList: FONT -@end example - -will override - -@example -Emacs*menubar*font: FONT -@end example - -even though the latter is more specific. - -In non-Motif configurations using @samp{--with-mule} and -@samp{--with-xfs} it @emph{is} necessary to use the @code{fontSet} -resource @emph{instead of} the @code{font} resource. The backward -compatibility kludge was never implemented for non-Motif builds. -Example: - -@example -*fontSet: FONT -@end example - -@node Q3.3.5, Q3.3.6, Q3.3.4, Display Subsystems -@unnumberedsubsec Q3.3.5: How can I bind a key to a function to toggle the toolbar? - -Try something like: +This will enable Filladapt for all modes except C mode, where it doesn't +work well. To turn Filladapt on only in particular major modes, remove +the @code{(setq-default ...)} line and use +@code{turn-on-filladapt-mode}, like this: @lisp -(defun my-toggle-toolbar () - (interactive) - (set-specifier default-toolbar-visible-p - (not (specifier-instance default-toolbar-visible-p)))) -(global-set-key "\C-xT" 'my-toggle-toolbar) -@end lisp - -There are redisplay bugs in 19.14 that may make the preceding result in -a messed-up display, especially for frames with multiple windows. You -may need to resize the frame before XEmacs completely realizes the -toolbar is really gone. - -Thanks to @email{martin@@xemacs.org, Martin Buchholz} for the correct -code. - -@node Q3.3.6, Q3.4.1, Q3.3.5, Display Subsystems -@unnumberedsubsec Q3.3.6: @samp{Can't instantiate image error...} in toolbar -@c New - -@email{expt@@alanine.ram.org, Dr. Ram Samudrala} writes: - -I just installed the XEmacs (20.4-2) RPMS that I downloaded from -@uref{http://www.xemacs.org/}. Everything works fine, except that when -I place my mouse over the toolbar, it beeps and gives me this message: - -@example - Can't instantiate image (probably cached): - [xbm :mask-file "/usr/include/X11/bitmaps/leftptrmsk :mask-data - (16 16 <strange control characters> ... -@end example - -@email{kyle_jones@@wonderworks.com, Kyle Jones} writes: -@quotation -This is problem specific to some Chips and Technologies video -chips, when running XFree86. Putting - -@code{Option "sw_cursor"} - -in @file{XF86Config} gets rid of the problem. -@end quotation - -@unnumberedsec 3.4: Scrollbars - -@node Q3.4.1, Q3.4.2, Q3.3.6, Display Subsystems -@unnumberedsubsec Q3.4.1: How can I disable the scrollbar? - -To disable them for all frames, add the following line to -your @file{.Xresources}: - -@example -Emacs.scrollBarWidth: 0 -@end example - -Or select @samp{Options->Display->Scrollbars}. -Remember to save options. - -To turn the scrollbar off on a per-frame basis, use the following -function: - -@lisp -(set-specifier scrollbar-width 0 (selected-frame)) -@end lisp - -You can actually turn the scrollbars on at any level you want by -substituting for (selected-frame) in the above command. For example, to -turn the scrollbars off only in a single buffer: - -@lisp -(set-specifier scrollbar-width 0 (current-buffer)) +(add-hook 'text-mode-hook 'turn-on-filladapt-mode) @end lisp -@node Q3.4.2, Q3.4.3, Q3.4.1, Display Subsystems -@unnumberedsubsec Q3.4.2: How can one use resources to change scrollbar colors? - -Here's a recap of how to use resources to change your scrollbar colors: - -@example -! Motif scrollbars - -Emacs*XmScrollBar.Background: skyblue -Emacs*XmScrollBar.troughColor: lightgray - -! Athena scrollbars - -Emacs*Scrollbar.Foreground: skyblue -Emacs*Scrollbar.Background: lightgray -@end example - -Note the capitalization of @code{Scrollbar} for the Athena widget. - -@node Q3.4.3, Q3.4.4, Q3.4.2, Display Subsystems -@unnumberedsubsec Q3.4.3: Moving the scrollbar can move the point; can I disable this? - -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? - -The current behavior is a feature, not a bug. Point remains at the same -buffer position as long as that position does not scroll off the screen. -In that event, point will end up in either the upper-left or lower-left -hand corner. - -This cannot be changed. - -@node Q3.4.4, Q3.4.5, Q3.4.3, Display Subsystems -@unnumberedsubsec Q3.4.4: Scrolling one line at a time. - -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. - -Use the following: - -@lisp -(setq scroll-step 1) -@end lisp - -You can also change this with Customize. Select from the -@code{Options} menu @code{Advanced -(Customize)->Emacs->Environment->Windows->Scroll Step...} or type -@kbd{M-x customize @key{RET} windows @key{RET}}. - -@node Q3.4.5, Q3.4.6, Q3.4.4, Display Subsystems -@unnumberedsubsec Q3.4.5: How can I turn off automatic horizontal scrolling in specific modes? - -Do @code{(setq truncate-lines t)} in the mode-hooks for any modes -in which you want lines truncated. - -More precisely: If @code{truncate-lines} is nil, horizontal scrollbars -will never appear. Otherwise, they will appear only if the value of -@code{scrollbar-height} for that buffer/window/etc. is non-zero. If you -do - -@lisp -(set-specifier scrollbar-height 0) -@end lisp - -then horizontal scrollbars will not appear in truncated buffers unless -the package specifically asked for them. - -@node Q3.4.6, Q3.5.1, Q3.4.5, Display Subsystems -@unnumberedsubsec Q3.4.6: I find auto-show-mode disconcerting. How do I turn it off? - -@code{auto-show-mode} controls whether or not a horizontal scrollbar -magically appears when a line is too long to be displayed. This is -enabled by default. To turn it off, put the following in your -@file{init.el}: +You can customize filling and adaptive filling with Customize. +Select from the @code{Options} menu +@code{Advanced (Customize)->Emacs->Editing->Fill->Fill...} +or type @kbd{M-x customize @key{RET} fill @key{RET}}. + +Note that well-behaving text-lookalike modes will run +@code{text-mode-hook} by default (e.g. that's what Message does). For +the nasty ones, you'll have to provide the @code{add-hook}s yourself. + +Please note that the @code{fa-extras} package is no longer useful. + +@node Q3.2.5, Q3.3.1, Q3.2.4, Editing +@unnumberedsubsec Q3.2.5: How can I get XEmacs to come up in text/auto-fill mode by default? + +Try the following lisp in your @file{init.el}: @lisp -(setq auto-show-mode nil) -(setq-default auto-show-mode nil) -@end lisp - -@unnumberedsec 3.5: The Modeline - -@node Q3.5.1, Q3.5.2, Q3.4.6, Display Subsystems -@unnumberedsubsec Q3.5.1: How can I make the modeline go away? - -@lisp -(set-specifier has-modeline-p nil) -@end lisp - -@node Q3.5.2, Q3.5.3, Q3.5.1, Display Subsystems -@unnumberedsubsec Q3.5.2: How do you have XEmacs display the line number in the modeline? - -Add the following line to your @file{init.el} file to -display the line number: - -@lisp -(line-number-mode 1) -@end lisp - -Use the following to display the column number: - -@lisp -(column-number-mode 1) +(setq default-major-mode 'text-mode) +(setq text-mode-hook 'turn-on-auto-fill) @end lisp -Or select from the @code{Options} menu -@iftex -@* -@end iftex -@code{Advanced (Customize)->Emacs->Editing->Basics->Line Number Mode} -and/or -@iftex -@* -@end iftex -@code{Advanced (Customize)->Emacs->Editing->Basics->Column Number Mode} - -Or type @kbd{M-x customize @key{RET} editing-basics @key{RET}}. - -@node Q3.5.3, Q3.5.4, Q3.5.2, Display Subsystems -@unnumberedsubsec Q3.5.3: How do I get XEmacs to put the time of day on the modeline? - -Add the following line to your @file{init.el} file to -display the time: - -@lisp -(display-time) -@end lisp - -See @code{Customize} from the @code{Options} menu for customization. - -@node Q3.5.4, Q3.6.1, Q3.5.3, Display Subsystems -@unnumberedsubsec Q3.5.4: How can one change the modeline color based on the mode used? - -You can use something like the following: +@strong{WARNING}: note that changing the value of +@code{default-major-mode} from @code{fundamental-mode} can break a large +amount of built-in code that expects newly created buffers to be in +@code{fundamental-mode}. (Changing from @code{fundamental-mode} to +@code{text-mode} might not wreak too much havoc, but changing to +something more exotic like a lisp-mode would break many Emacs packages). + +Note that Emacs by default starts up in buffer @code{*scratch*} in +@code{initial-major-mode}, which defaults to +@code{lisp-interaction-mode}. Thus adding the following form to your +Emacs init file will cause the initial @code{*scratch*} buffer to be put +into auto-fill'ed @code{text-mode}: @lisp -(add-hook 'lisp-mode-hook - (lambda () - (set-face-background 'modeline "red" (current-buffer)))) +(setq initial-major-mode + (lambda () + (text-mode) + (turn-on-auto-fill))) @end lisp -Then, when editing a Lisp file (i.e. when in Lisp mode), the modeline -colors change from the default set in your @file{init.el}. -The change will only be made in the buffer you just entered (which -contains the Lisp file you are editing) and will not affect the modeline -colors anywhere else. - -Notes: - -@itemize @bullet - -@item The hook is the mode name plus @code{-hook}. eg. c-mode-hook, -c++-mode-hook, emacs-lisp-mode-hook (used for your -@file{init.el} or a @file{xx.el} file), -lisp-interaction-mode-hook (the @samp{*scratch*} buffer), -text-mode-hook, etc. - -@item -Be sure to use @code{add-hook}, not @code{(setq c-mode-hook xxxx)}, -otherwise you will erase anything that anybody has already put on the -hook. - -@item -You can also do @code{(set-face-font 'modeline @var{font})}, -eg. @code{(set-face-font 'modeline "*bold-r-normal*140-100-100*" -(current-buffer))} if you wish the modeline font to vary based on the -current mode. -@end itemize - -There are additional modeline faces, @code{modeline-buffer-id}, -@code{modeline-mousable}, and @code{modeline-mousable-minor-mode}, which -you may want to customize. - -@unnumberedsec 3.6: The Cursor - -@node Q3.6.1, Q3.6.2, Q3.5.4, Display Subsystems -@unnumberedsubsec Q3.6.1: Is there a way to make the bar cursor thicker? - -I'd like to have the bar cursor a little thicker, as I tend to "lose" it -often. - -For a 1 pixel bar cursor, use: - -@lisp -(setq bar-cursor t) -@end lisp - -For a 2 pixel bar cursor, use: - -@lisp -(setq bar-cursor 'anything-else) -@end lisp - -Starting with XEmacs-20.3 you can also change these with Customize. -Select from the @code{Options} menu -@code{Advanced (Customize)->Emacs->Environment->Display->Bar Cursor...} or type -@kbd{M-x customize @key{RET} display @key{RET}}. - -You can use a color to make it stand out better: - -@example -Emacs*cursorColor: Red -@end example - -@node Q3.6.2, Q3.6.3, Q3.6.1, Display Subsystems -@unnumberedsubsec Q3.6.2: Is there a way to get back the block cursor? - -@lisp -(setq bar-cursor nil) -@end lisp - -Starting with XEmacs 20.3 you can also change this with Customize. -Select from the @code{Options} menu -@code{Advanced (Customize)->Emacs->Environment->Display->Bar Cursor...} or type -@kbd{M-x customize @key{RET} display @key{RET}}. - -@node Q3.6.3, Q3.7.1, Q3.6.2, Display Subsystems -@unnumberedsubsec Q3.6.3: Can I make the cursor blink? - -Yes, like this: - -@lisp -(blink-cursor-mode) -@end lisp - -This function toggles between a steady cursor and a blinking cursor. -You may also set this mode from the menu bar by selecting -@samp{Options->Display->Blinking Cursor}. Remember to save options. - -@unnumberedsec 3.7: Text Selections - -@node Q3.7.1, Q3.7.2, Q3.6.3, Display Subsystems -@unnumberedsubsec Q3.7.1: How do I select a rectangular region? +Note that after your init file is loaded, if +@code{inhibit-startup-message} is @code{nil} (the default) and the +startup buffer is @code{*scratch*} then the startup message will be +inserted into @code{*scratch*}; it will be removed after a timeout by +erasing the entire @code{*scratch*} buffer. Keep in mind this default +usage of @code{*scratch*} if you desire any prior manipulation of +@code{*scratch*} from within your Emacs init file. In particular, +anything you insert into @code{*scratch*} from your init file will be +later erased. Also, if you change the mode of the @code{*scratch*} +buffer, be sure that this will not interfere with possible later +insertion of the startup message (e.g. if you put @code{*scratch*} into +a nonstandard mode that has automatic font lock rules, then the startup +message might get fontified in a strange foreign manner, e.g. as code in +some programming language). + +@unnumberedsec 3.3: Text Selections + +@node Q3.3.1, Q3.3.2, Q3.2.5, Editing +@unnumberedsubsec Q3.3.1: How do I select a rectangular region? Just select the region normally, then use the rectangle commands (e.g. @code{kill-rectangle} on it. The region does not highlight as a @@ -4552,7 +3899,7 @@ (setq mouse-track-rectangle-p t) @end lisp -Starting with XEmacs-20.2 you can also change this with Customize. +You can also change this with Customize. Select from the @code{Options} menu @code{Advanced (Customize)->Emacs->Editing->Mouse->Track Rectangle...} or type @kbd{M-x customize @key{RET} mouse @key{RET}}. @@ -4564,8 +3911,8 @@ Like `mouse-track' but selects rectangles instead of regions. @end example -@node Q3.7.2, Q3.7.3, Q3.7.1, Display Subsystems -@unnumberedsubsec Q3.7.2: How can I turn off or change highlighted selections? +@node Q3.3.2, Q3.3.3, Q3.3.1, Editing +@unnumberedsubsec Q3.3.2: How can I turn off or change highlighted selections? The @code{zmacs} mode allows for what some might call gratuitous highlighting for selected regions (either by setting mark or by using @@ -4584,8 +3931,8 @@ To change the face for selection, look at @code{Options->Advanced (Customize)} on the menubar. -@node Q3.7.3, Q3.7.4, Q3.7.2, Display Subsystems -@unnumberedsubsec Q3.7.3: How do I get that typing on an active region removes it? +@node Q3.3.3, Q3.3.4, Q3.3.2, Editing +@unnumberedsubsec Q3.3.3: How do I cause typing on an active region to remove it? I want to change things so that if I select some text and start typing, the typed text replaces the selected text, similar to Motif. @@ -4611,8 +3958,8 @@ tad more complicated than it has to be for XEmacs in order to make it more portable. -@node Q3.7.4, Q3.7.5, Q3.7.3, Display Subsystems -@unnumberedsubsec Q3.7.4: Can I turn off the highlight during isearch? +@node Q3.3.4, Q3.3.5, Q3.3.3, Editing +@unnumberedsubsec Q3.3.4: Can I turn off the highlight during isearch? I do not like my text highlighted while I am doing isearch as I am not able to see what's underneath. How do I turn it off? @@ -4623,59 +3970,15 @@ (setq isearch-highlight nil) @end lisp -Starting with XEmacs-20.2 you can also change this with Customize. Type +You can also change this with Customize. Type @kbd{M-x customize-variable @key{RET} isearch-highlight @key{RET}}. Note also that isearch-highlight affects query-replace and ispell. Instead of disabling isearch-highlight you may find that a better solution consists of customizing the @code{isearch} face. -@node Q3.7.5, Q3.7.6, Q3.7.4, Display Subsystems -@unnumberedsubsec Q3.7.5: How do I turn off highlighting after @kbd{C-x C-p} (mark-page)? - -Put this in your @code{.emacs}: - -@lisp -(setq zmacs-regions nil) -@end lisp - -@strong{Warning: This command turns off all region highlighting.} - -@xref{Q3.7.2, How can I turn off or change highlighted selections?}. - -@node Q3.7.6, Q3.7.7, Q3.7.5, Display Subsystems -@unnumberedsubsec Q3.7.6: The region disappears when I hit the end of buffer while scrolling. - -This has been fixed by default starting with XEmacs-20.3. - -With older versions you can turn this feature (if it indeed is a feature) -off like this: - -@lisp -(defadvice scroll-up (around scroll-up freeze) - (interactive "_P") - (let ((zmacs-region-stays t)) - (if (interactive-p) - (condition-case nil - ad-do-it - (end-of-buffer (goto-char (point-max)))) - ad-do-it))) - -(defadvice scroll-down (around scroll-down freeze) - (interactive "_P") - (let ((zmacs-region-stays t)) - (if (interactive-p) - (condition-case nil - ad-do-it - (beginning-of-buffer (goto-char (point-min)))) - ad-do-it))) -@end lisp - -Thanks to @email{raman@@adobe.com, T. V. Raman} for assistance in deriving this -answer. - -@node Q3.7.7, Q3.7.8, Q3.7.6, Display Subsystems -@unnumberedsubsec Q3.7.7: Why is killing so slow? +@node Q3.3.5, Q3.3.6, Q3.3.4, Editing +@unnumberedsubsec Q3.3.5: Why is killing so slow? This actually is an X Windows question, although you'll notice it with keyboard operations as well as while using the GUI. Basically, there @@ -4741,243 +4044,18 @@ Thanks to Jeff Mincy and Glynn Clements for corrections. -@node Q3.7.8, Q3.8.1, Q3.7.7, Display Subsystems -@unnumberedsubsec Q3.7.8: Why does @kbd{M-w} take so long? +@node Q3.3.6, Q3.4.1, Q3.3.5, Editing +@unnumberedsubsec Q3.3.6: Why does @kbd{M-w} take so long? It actually doesn't. It leaves the region visible for a second so that you can see what area is being yanked. If you start working, though, it will immediately complete its operation. In other words, it will only delay for a second if you let it. -@unnumberedsec 3.8: Buffers, Text Editing - -@node Q3.8.1, Q3.8.2, Q3.7.8, Display Subsystems -@unnumberedsubsec Q3.8.1: Can I have the end of the buffer delimited in some way? - -Say, with: @samp{[END]}? - -Try this: - -@lisp -(let ((ext (make-extent (point-min) (point-max)))) - (set-extent-property ext 'start-closed t) - (set-extent-property ext 'end-closed t) - (set-extent-property ext 'detachable nil) - (set-extent-end-glyph ext (make-glyph [string :data "[END]"]))) -@end lisp - -Since this is XEmacs, you can specify an icon to be shown on -window-system devices. To do so, change the @code{make-glyph} call to -something like this: - -@lisp -(make-glyph '([xpm :file "~/something.xpm"] - [string :data "[END]"])) -@end lisp - -You can inline the @sc{xpm} definition yourself by specifying -@code{:data} instead of @code{:file}. Here is such a full-featured -version that works on both X and TTY devices: - -@lisp -(let ((ext (make-extent (point-min) (point-max)))) - (set-extent-property ext 'start-closed t) - (set-extent-property ext 'end-closed t) - (set-extent-property ext 'detachable nil) - (set-extent-end-glyph ext (make-glyph '([xpm :data "\ -/* XPM */ -static char* eye = @{ -\"20 11 7 2\", -\"__ c None\" -\"_` c #7f7f7f\", -\"_a c #fefefe\", -\"_b c #7f0000\", -\"_c c #fefe00\", -\"_d c #fe0000\", -\"_e c #bfbfbf\", -\"___________`_`_`___b_b_b_b_________`____\", -\"_________`_`_`___b_c_c_c_b_b____________\", -\"_____`_`_`_e___b_b_c_c_c___b___b_______`\", -\"___`_`_e_a___b_b_d___b___b___b___b______\", -\"_`_`_e_a_e___b_b_d_b___b___b___b___b____\", -\"_`_`_a_e_a___b_b_d___b___b___b___b___b__\", -\"_`_`_e_a_e___b_b_d_b___b___b___b___b_b__\", -\"___`_`_e_a___b_b_b_d_c___b___b___d_b____\", -\"_____`_`_e_e___b_b_b_d_c___b_b_d_b______\", -\"_`_____`_`_`_`___b_b_b_d_d_d_d_b________\", -\"___`_____`_`_`_`___b_b_b_b_b_b__________\", -@} ;"] - [string :data "[END]"])))) -@end lisp - -Note that you might want to make this a function, and put it to a hook. -We leave that as an exercise for the reader. - -@node Q3.8.2, Q3.8.3, Q3.8.1, Display Subsystems -@unnumberedsubsec Q3.8.2: How do I insert today's date into a buffer? - -Like this: - -@lisp -(insert (current-time-string)) -@end lisp - -@node Q3.8.3, Q3.8.4, Q3.8.2, Display Subsystems -@unnumberedsubsec Q3.8.3: How do I get a single minibuffer frame? - -@email{acs@@acm.org, Vin Shelton} writes: - -@lisp -(setq initial-frame-plist '(minibuffer nil)) -(setq default-frame-plist '(minibuffer nil)) -(setq default-minibuffer-frame - (make-frame - '(minibuffer only - width 86 - height 1 - menubar-visible-p nil - default-toolbar-visible-p nil - name "minibuffer" - top -2 - left -2 - has-modeline-p nil))) -(frame-notice-user-settings) -@end lisp - -@strong{Please note:} The single minibuffer frame may not be to everyone's -taste, and there any number of other XEmacs options settings that may -make it difficult or inconvenient to use. - -@node Q3.8.4, Q3.8.5, Q3.8.3, Display Subsystems -@unnumberedsubsec Q3.8.4: How can I enable auto-indent and/or Filladapt? - -Put the following line in your @file{init.el}: - -@lisp -(setq indent-line-function 'indent-relative-maybe) -@end lisp - -If you want to get fancy, try the @code{filladapt} package available -standard with XEmacs. Put this into your @file{init.el}: - -@lisp -(require 'filladapt) -(setq-default filladapt-mode t) -(add-hook 'c-mode-hook 'turn-off-filladapt-mode) -@end lisp - -This will enable Filladapt for all modes except C mode, where it doesn't -work well. To turn Filladapt on only in particular major modes, remove -the @code{(setq-default ...)} line and use -@code{turn-on-filladapt-mode}, like this: - -@lisp -(add-hook 'text-mode-hook 'turn-on-filladapt-mode) -@end lisp - -You can customize filling and adaptive filling with Customize. -Select from the @code{Options} menu -@code{Advanced (Customize)->Emacs->Editing->Fill->Fill...} -or type @kbd{M-x customize @key{RET} fill @key{RET}}. - -Note that well-behaving text-lookalike modes will run -@code{text-mode-hook} by default (e.g. that's what Message does). For -the nasty ones, you'll have to provide the @code{add-hook}s yourself. - -Please note that the @code{fa-extras} package is no longer useful. - -@node Q3.8.5, Q3.9.1, Q3.8.4, Display Subsystems -@unnumberedsubsec Q3.8.5: How can I get XEmacs to come up in text/auto-fill mode by default? - -Try the following lisp in your @file{init.el}: - -@lisp -(setq default-major-mode 'text-mode) -(setq text-mode-hook 'turn-on-auto-fill) -@end lisp - -@strong{WARNING}: note that changing the value of -@code{default-major-mode} from @code{fundamental-mode} can break a large -amount of built-in code that expects newly created buffers to be in -@code{fundamental-mode}. (Changing from @code{fundamental-mode} to -@code{text-mode} might not wreak too much havoc, but changing to -something more exotic like a lisp-mode would break many Emacs packages). - -Note that Emacs by default starts up in buffer @code{*scratch*} in -@code{initial-major-mode}, which defaults to -@code{lisp-interaction-mode}. Thus adding the following form to your -Emacs init file will cause the initial @code{*scratch*} buffer to be put -into auto-fill'ed @code{text-mode}: - -@lisp -(setq initial-major-mode - (lambda () - (text-mode) - (turn-on-auto-fill))) -@end lisp - -Note that after your init file is loaded, if -@code{inhibit-startup-message} is @code{nil} (the default) and the -startup buffer is @code{*scratch*} then the startup message will be -inserted into @code{*scratch*}; it will be removed after a timeout by -erasing the entire @code{*scratch*} buffer. Keep in mind this default -usage of @code{*scratch*} if you desire any prior manipulation of -@code{*scratch*} from within your Emacs init file. In particular, -anything you insert into @code{*scratch*} from your init file will be -later erased. Also, if you change the mode of the @code{*scratch*} -buffer, be sure that this will not interfere with possible later -insertion of the startup message (e.g. if you put @code{*scratch*} into -a nonstandard mode that has automatic font lock rules, then the startup -message might get fontified in a strange foreign manner, e.g. as code in -some programming language). - -@unnumberedsec 3.9: Editing Source Code - -@node Q3.9.1, Q3.9.2, Q3.8.5, Display Subsystems -@unnumberedsubsec Q3.9.1: How can I do source code highlighting using font-lock? - -For most modes, font-lock is already set up and just needs to be turned -on. This can be done by adding the line: - -@lisp -(require 'font-lock) -@end lisp - -to your @file{init.el}. (You can turn it on for the -current buffer and session only by @kbd{M-x font-lock-mode}.) See the -file @file{etc/sample.init.el} (@file{etc/sample.emacs} in XEmacs -versions prior to 21.4) for more information. - -@c the old way: -@c (add-hook 'emacs-lisp-mode-hook 'turn-on-font-lock) -@c (add-hook 'dired-mode-hook 'turn-on-font-lock) - -See also @code{Syntax Highlighting} from the @code{Options} menu. -Remember to save options. - -@node Q3.9.2, Q3.9.3, Q3.9.1, Display Subsystems -@unnumberedsubsec Q3.9.2: How do I get @samp{More} Syntax Highlighting on by default? - -Use the following code in your @file{init.el}: - -@lisp -(setq-default font-lock-maximum-decoration t) -@end lisp - -See also @code{Syntax Highlighting} from the @code{Options} menu. -Remember to save options. - -@node Q3.9.3, Q3.9.4, Q3.9.2, Display Subsystems -@unnumberedsubsec Q3.9.3: Where do I get the latest CC Mode? - -@email{bwarsaw@@cnri.reston.va.us, Barry A. Warsaw} writes: - -@quotation -This can be had from @uref{http://www.python.org/emacs/}. -@end quotation - -@node Q3.9.4, Q3.9.5, Q3.9.3, Display Subsystems -@unnumberedsubsec Q3.9.4: I do not like cc-mode. How do I use the old c-mode? +@unnumberedsec 3.4: Editing Source Code + +@node Q3.4.1, Q3.4.2, Q3.3.6, Editing +@unnumberedsubsec Q3.4.1: I do not like cc-mode. How do I use the old c-mode? Well, first off, consider if you really want to do this. cc-mode is much more powerful than the old c-mode. If you're having trouble @@ -4999,27 +4077,19 @@ This must be done before any other reference is made to either c-mode or c++-mode. -@node Q3.9.5, , Q3.9.4, Display Subsystems -@unnumberedsubsec Q3.9.5: How do you make XEmacs indent CL if-clauses correctly? +@node Q3.4.2, , Q3.4.1, Editing +@unnumberedsubsec Q3.4.2: How do you make XEmacs indent CL if-clauses correctly? I'd like XEmacs to indent all the clauses of a Common Lisp @code{if} the same amount instead of indenting the 3rd clause differently from the first two. -One way is to add, to @file{init.el}: +The package @code{cl-indent} that comes with XEmacs sets up this kind +of indentation by default. @code{cl-indent} also knows about many +other CL-specific forms. To use @code{cl-indent}, one can do this: @lisp -(put 'if 'lisp-indent-function nil) -@end lisp - -However, note that the package @code{cl-indent} that comes with -XEmacs sets up this kind of indentation by default. @code{cl-indent} -also knows about many other CL-specific forms. To use @code{cl-indent}, -one can do this: - -@lisp -(load "cl-indent") -(setq lisp-indent-function (function common-lisp-indent-function)) +(setq lisp-indent-function 'common-lisp-indent-function) @end lisp One can also customize @file{cl-indent.el} so it mimics the default @@ -5030,80 +4100,787 @@ (put 'if 'common-lisp-indent-function '(nil nil &body)) @end lisp -Also, a new version (1.2) of @file{cl-indent.el} was posted to -comp.emacs.xemacs on 12/9/94. This version includes more documentation -than previous versions. This may prove useful if you need to customize -any indent-functions. - -@node External Subsystems, Internet, Display Subsystems, Top -@unnumbered 4 Interfacing with the Operating System and External Devices +@node Display, External Subsystems, Editing, Top +@unnumbered 4 Display Functions This is part 4 of the XEmacs Frequently Asked Questions list. This +section is devoted to the display-related capabilities of XEmacs +(fonts, colors, modeline, menubar, toolbar, scrollbar, etc.) and how +to customize them. + +@menu +4.0: Textual Fonts and Colors +* Q4.0.1:: How do I specify a font? +* Q4.0.2:: How do I set the text, menu and modeline fonts? +* Q4.0.3:: How can I set color options from @file{init.el}? +* Q4.0.4:: How can I set the colors when highlighting a region? +* Q4.0.5:: How can I limit color map usage? +* Q4.0.6:: My tty supports color, but XEmacs doesn't use them. +* Q4.0.7:: Can I have pixmap backgrounds in XEmacs? +* Q4.0.8:: How do I display non-ASCII characters? +* Q4.0.9:: Font selections in don't get saved after @code{Save Options}. + +4.1: Syntax Highlighting (Font Lock) +* Q4.1.1:: How can I do source code highlighting using font-lock? +* Q4.1.2:: How do I get @samp{More} Syntax Highlighting on by default? + +4.2: The Modeline +* Q4.2.1:: How can I make the modeline go away? +* Q4.2.2:: How do you have XEmacs display the line number in the modeline? +* Q4.2.3:: How do I get XEmacs to put the time of day on the modeline? +* Q4.2.4:: How can I change the modeline color based on the mode used? + +4.3: The Cursor +* Q4.3.1:: Is there a way to make the bar cursor thicker? +* Q4.3.2:: Is there a way to get back the block cursor? +* Q4.3.3:: Can I make the cursor blink? + +4.4: The Menubar +* Q4.4.1:: How do I get rid of the menubar? +* Q4.4.2:: How can I customize the menubar? +* Q4.4.3:: How do I enable use of the keyboard (@kbd{Alt}) to access menu items? +* Q4.4.4:: How do I control how many buffers are listed in the menu @code{Buffers List}? +* Q4.4.5:: Resources like @code{Emacs*menubar*font} are not working? + +4.5: The Toolbar +* Q4.5.1:: How do I get rid of the toolbar? +* Q4.5.2:: How can I customize the toolbar? +* Q4.5.3:: How can I bind a key to a function to toggle the toolbar? +* Q4.5.4:: @samp{Can't instantiate image error...} in toolbar + +4.6: Scrollbars and Scrolling +* Q4.6.1:: How can I disable the scrollbar? +* Q4.6.2:: How can I change the scrollbar width? +* Q4.6.3:: How can I use resources to change scrollbar colors? +* Q4.6.4:: Moving the scrollbar can move the point; can I disable this? +* Q4.6.5:: Scrolling one line at a time. +* Q4.6.6:: How can I turn off automatic horizontal scrolling in specific modes? +* Q4.6.7:: I find auto-show-mode disconcerting. How do I turn it off? + +4.7: The Gutter Tabs, The Progress Bar, Widgets +* Q4.7.1:: How can I disable the gutter tabs? +* Q4.7.2:: How can I disable the progress bar? +* Q4.7.3:: There are bugs in the gutter or widgets. +* Q4.7.4:: How can I customize the gutter or gutter tabs? +@end menu + +@unnumberedsec 4.0: Textual Fonts and Colors + +@node Q4.0.1, Q4.0.2, Display, Display +@unnumberedsubsec Q4.0.1: How do I specify a font? + +#### Update me. + +In 21.4 and above, you can use the @samp{Options} menu to change the font. +You can also do it in your init file, e.g. like this (for MS Windows): + +@display + (set-face-font 'default "Lucida Console:Regular:10") + (set-face-font 'modeline "MS Sans Serif:Regular:10") +@end display + +@node Q4.0.2, Q4.0.3, Q4.0.1, Display +@unnumberedsubsec Q4.0.2: How do I set the text, menu and modeline fonts? + +#### Update me. + +Note that you should use @samp{Emacs.} and not @samp{Emacs*} when +setting face values. + +In @file{.Xresources}: + +@example +Emacs.default.attributeFont: -*-*-medium-r-*-*-*-120-*-*-m-*-*-* +Emacs*menubar*font: fixed +Emacs.modeline.attributeFont: fixed +@end example + +This is confusing because @samp{default} and @samp{modeline} are face +names, and can be found listed with all faces in the current mode by +using @kbd{M-x set-face-font (enter) ?}. They use the face-specific +resource @samp{attributeFont}. + +On the other hand, @samp{menubar} is a normal X thing that uses the +resource @samp{font}. With Motif it @emph{may be} necessary to use +@samp{fontList} @emph{instead of} @samp{font}. In @emph{non-Motif} +configurations with Mule it @emph{is} necessary to use @samp{fontSet} +instead of @samp{font}. (Sorry, there just is no simple recipe here.) + +@node Q4.0.3, Q4.0.4, Q4.0.2, Display +@unnumberedsubsec Q4.0.3: How can I set color options from @file{init.el}? + +How can I set the most commonly used color options from my +@file{init.el} instead of from my @file{.Xresources}? + +Like this: + +@lisp +(set-face-background 'default "bisque") ; frame background +(set-face-foreground 'default "black") ; normal text +(set-face-background 'zmacs-region "red") ; When selecting w/ + ; mouse +(set-face-foreground 'zmacs-region "yellow") +(set-face-font 'default "*courier-bold-r*120-100-100*") +(set-face-background 'highlight "blue") ; Ie when selecting + ; buffers +(set-face-foreground 'highlight "yellow") +(set-face-background 'modeline "blue") ; Line at bottom + ; of buffer +(set-face-foreground 'modeline "white") +(set-face-font 'modeline "*bold-r-normal*140-100-100*") +(set-face-background 'isearch "yellow") ; When highlighting + ; while searching +(set-face-foreground 'isearch "red") +(setq x-pointer-foreground-color "black") ; Adds to bg color, + ; so keep black +(setq x-pointer-background-color "blue") ; This is color + ; you really + ; want ptr/crsr +@end lisp + +@node Q4.0.4, Q4.0.5, Q4.0.3, Display +@unnumberedsubsec Q4.0.4: How can I set the colors when highlighting a region? + +How can I set the background/foreground colors when highlighting a +region? + +You can change the face @code{zmacs-region} either in your +@file{.Xresources}: + +@example +Emacs.zmacs-region.attributeForeground: firebrick +Emacs.zmacs-region.attributeBackground: lightseagreen +@end example + +or in your @file{init.el}: + +@lisp +(set-face-background 'zmacs-region "red") +(set-face-foreground 'zmacs-region "yellow") +@end lisp + +@node Q4.0.5, Q4.0.6, Q4.0.4, Display +@unnumberedsubsec Q4.0.5: How can I limit color map usage? + +I'm using Netscape (or another color grabber like XEmacs); +is there any way to limit the number of available colors in the color map? + +Answer: No, but you can start Netscape before XEmacs, and it will use +the closest available color if the colormap is full. You can also limit +the number of colors Netscape uses, using the flags -mono, -ncols <#> or +-install (for mono, limiting to <#> colors, or for using a private color +map). + +If you have the money, another solution would be to use a truecolor or +direct color video. + +@node Q4.0.6, Q4.0.7, Q4.0.5, Display +@unnumberedsubsec Q4.0.6: My tty supports color, but XEmacs doesn't use them. + +XEmacs tries to automatically determine whether your tty supports color, +but sometimes guesses wrong. In that case, you can make XEmacs Do The +Right Thing using this Lisp code: + +@lisp +(if (eq 'tty (device-type)) + (set-device-class nil 'color)) +@end lisp + +@node Q4.0.7, Q4.0.8, Q4.0.6, Display +@unnumberedsubsec Q4.0.7: Can I have pixmap backgrounds in XEmacs? +@c New +@email{jvillaci@@wahnsinnig.extreme.indiana.edu, Juan Villacis} writes: + +@quotation +There are several ways to do it. For example, you could specify a +default pixmap image to use in your @file{~/.Xresources}, e.g., + + +@example + Emacs*EmacsFrame.default.attributeBackgroundPixmap: /path/to/image.xpm +@end example + + +and then reload ~/.Xresources and restart XEmacs. Alternatively, +since each face can have its own pixmap background, a better way +would be to set a face's pixmap within your XEmacs init file, e.g., + +@lisp + (set-face-background-pixmap 'default "/path/to/image.xpm") + (set-face-background-pixmap 'bold "/path/to/another_image.xpm") +@end lisp + +and so on. You can also do this interactively via @kbd{M-x edit-faces}. + +@end quotation + +@node Q4.0.8, Q4.0.9, Q4.0.7, Display +@unnumberedsubsec Q4.0.8: How do I display non-ASCII characters? +@c New + +If you're using a Mule-enabled XEmacs, then display is automatic. If +you're not seeing the characters you expect, either (1) you don't have +appropriate fonts available or (2) XEmacs did not correctly detect the +coding system (@pxref{Recognize Coding, , , xemacs}). In case (1), +install fonts as is customary for your platform. In case (2), you +need to tell XEmacs explicitly what coding systems you're using. +@ref{Specify Coding, , , xemacs}. + +If your XEmacs is not Mule-enabled, and for some reason getting a +Mule-enabled XEmacs seems like the wrong thing to do, all is not lost. +You can arrange it by brute force. In @file{event-Xt.c} (suppress the +urge to look in this file---play Doom instead, because you'll survive +longer), it is written: + +@quotation +In a non-Mule world, a user can still have a multi-lingual editor, by +doing @code{(set-face-font "-*-iso8859-2" (current-buffer))} for all +their Latin-2 buffers, etc. +@end quotation + +For the related problem of @emph{inputting} non-ASCII characters in a +non-Mule XEmacs, @xref{Q3.0.6, How can you type in special characters +in XEmacs?}. + +@node Q4.0.9, Q4.1.1, Q4.0.8, Display +@unnumberedsubsec Q4.0.9: Font selections in don't get saved after @code{Save Options}. + +@email{mannj@@ll.mit.edu, John Mann} writes: + +@quotation +You have to go to @samp{Options->Menubars} and unselect +@samp{Frame-Local Font Menu}. If this option is selected, font changes +are only applied to the @emph{current} frame and do @emph{not} get saved +when you save options. +@end quotation + +Also, set the following in your @file{init.el}: + +@lisp +(setq options-save-faces t) +@end lisp + +@unnumberedsec 4.1: Syntax Highlighting (Font Lock) + +@node Q4.1.1, Q4.1.2, Q4.0.9, Display +@unnumberedsubsec Q4.1.1: How can I do source code highlighting using font-lock? + +For most modes, font-lock is already set up and just needs to be turned +on. This can be done by adding the line: + +@lisp +(require 'font-lock) +@end lisp + +to your @file{init.el}. (You can turn it on for the +current buffer and session only by @kbd{M-x font-lock-mode}.) See the +file @file{etc/sample.init.el} (@file{etc/sample.emacs} in XEmacs +versions prior to 21.4) for more information. + +@c the old way: +@c (add-hook 'emacs-lisp-mode-hook 'turn-on-font-lock) +@c (add-hook 'dired-mode-hook 'turn-on-font-lock) + +See also @code{Syntax Highlighting} from the @code{Options} menu. +Remember to save options. + +@node Q4.1.2, Q4.2.1, Q4.1.1, Display +@unnumberedsubsec Q4.1.2: How do I get @samp{More} Syntax Highlighting on by default? + +Use the following code in your @file{init.el}: + +@lisp +(setq-default font-lock-maximum-decoration t) +@end lisp + +See also @code{Syntax Highlighting} from the @code{Options} menu. +Remember to save options. + +@unnumberedsec 4.2: The Modeline + +@node Q4.2.1, Q4.2.2, Q4.1.2, Display +@unnumberedsubsec Q4.2.1: How can I make the modeline go away? + +@lisp +(set-specifier has-modeline-p nil) +@end lisp + +@node Q4.2.2, Q4.2.3, Q4.2.1, Display +@unnumberedsubsec Q4.2.2: How do you have XEmacs display the line number in the modeline? + +Add the following line to your @file{init.el} file to +display the line number: + +@lisp +(line-number-mode 1) +@end lisp + +Use the following to display the column number: + +@lisp +(column-number-mode 1) +@end lisp + +Or select from the @code{Options} menu +@iftex +@* +@end iftex +@code{Advanced (Customize)->Emacs->Editing->Basics->Line Number Mode} +and/or +@iftex +@* +@end iftex +@code{Advanced (Customize)->Emacs->Editing->Basics->Column Number Mode} + +Or type @kbd{M-x customize @key{RET} editing-basics @key{RET}}. + +@node Q4.2.3, Q4.2.4, Q4.2.2, Display +@unnumberedsubsec Q4.2.3: How do I get XEmacs to put the time of day on the modeline? + +Add the following line to your @file{init.el} file to +display the time: + +@lisp +(display-time) +@end lisp + +See @code{Customize} from the @code{Options} menu for customization. + +@node Q4.2.4, Q4.3.1, Q4.2.3, Display +@unnumberedsubsec Q4.2.4: How can I change the modeline color based on the mode used? + +You can use something like the following: + +@lisp +(add-hook 'lisp-mode-hook + (lambda () + (set-face-background 'modeline "red" (current-buffer)))) +@end lisp + +Then, when editing a Lisp file (i.e. when in Lisp mode), the modeline +colors change from the default set in your @file{init.el}. +The change will only be made in the buffer you just entered (which +contains the Lisp file you are editing) and will not affect the modeline +colors anywhere else. + +Notes: + +@itemize @bullet + +@item The hook is the mode name plus @code{-hook}. eg. c-mode-hook, +c++-mode-hook, emacs-lisp-mode-hook (used for your +@file{init.el} or a @file{xx.el} file), +lisp-interaction-mode-hook (the @samp{*scratch*} buffer), +text-mode-hook, etc. + +@item +Be sure to use @code{add-hook}, not @code{(setq c-mode-hook xxxx)}, +otherwise you will erase anything that anybody has already put on the +hook. + +@item +You can also do @code{(set-face-font 'modeline @var{font})}, +eg. @code{(set-face-font 'modeline "*bold-r-normal*140-100-100*" +(current-buffer))} if you wish the modeline font to vary based on the +current mode. +@end itemize + +There are additional modeline faces, @code{modeline-buffer-id}, +@code{modeline-mousable}, and @code{modeline-mousable-minor-mode}, which +you may want to customize. + +@unnumberedsec 4.3: The Cursor + +@node Q4.3.1, Q4.3.2, Q4.2.4, Display +@unnumberedsubsec Q4.3.1: Is there a way to make the bar cursor thicker? + +I'd like to have the bar cursor a little thicker, as I tend to "lose" it +often. + +For a 1 pixel bar cursor, use: + +@lisp +(setq bar-cursor t) +@end lisp + +For a 2 pixel bar cursor, use: + +@lisp +(setq bar-cursor 'anything-else) +@end lisp + +You can also change these with Customize. +Select from the @code{Options} menu +@code{Advanced (Customize)->Emacs->Environment->Display->Bar Cursor...} or type +@kbd{M-x customize @key{RET} display @key{RET}}. + +You can use a color to make it stand out better: + +@example +Emacs*cursorColor: Red +@end example + +@node Q4.3.2, Q4.3.3, Q4.3.1, Display +@unnumberedsubsec Q4.3.2: Is there a way to get back the block cursor? + +@lisp +(setq bar-cursor nil) +@end lisp + +You can also change this with Customize. +Select from the @code{Options} menu +@code{Advanced (Customize)->Emacs->Environment->Display->Bar Cursor...} or type +@kbd{M-x customize @key{RET} display @key{RET}}. + +@node Q4.3.3, Q4.4.1, Q4.3.2, Display +@unnumberedsubsec Q4.3.3: Can I make the cursor blink? + +Yes, like this: + +@lisp +(blink-cursor-mode) +@end lisp + +This function toggles between a steady cursor and a blinking cursor. +You may also set this mode from the menu bar by selecting +@samp{Options->Display->Blinking Cursor}. Remember to save options. + +@unnumberedsec 4.4: The Menubar + +@node Q4.4.1, Q4.4.2, Q4.3.3, Display +@unnumberedsubsec Q4.4.1: How do I get rid of the menubar? + +@lisp +(set-specifier menubar-visible-p nil) +@end lisp + +@node Q4.4.2, Q4.4.3, Q4.4.1, Display +@unnumberedsubsec Q4.4.2: How can I customize the menubar? + +For an extensive menubar, add this line to your @file{init.el}: + +@lisp +(load "big-menubar") +@end lisp + +If you'd like to write your own, this file provides as good a set of +examples as any to start from. The file is located in edit-utils +package. + +@node Q4.4.3, Q4.4.4, Q4.4.2, Display +@unnumberedsubsec Q4.4.3: How do I enable use of the keyboard (@kbd{Alt}) to access menu items? + +#### Write me. + +@node Q4.4.4, Q4.4.5, Q4.4.3, Display +@unnumberedsubsec Q4.4.4: How do I control how many buffers are listed in the menu @code{Buffers List}? + +Add the following to your @file{init.el} (suit to fit): + +@lisp +(setq buffers-menu-max-size 20) +@end lisp + +For no limit, use an argument of @samp{nil}. + +You can also change this with Customize. Select from the +@code{Options} menu +@code{Advanced (Customize)->Emacs->Environment->Menu->Buffers Menu->Max Size...} +or type @kbd{M-x customize @key{RET} buffers-menu @key{RET}}. + +@node Q4.4.5, Q4.5.1, Q4.4.4, Display +@unnumberedsubsec Q4.4.5: Resources like @code{Emacs*menubar*font} are not working? + +I am trying to use a resource like @code{Emacs*menubar*font} to set the +font of the menubar but it's not working. + +In Motif, the use of @samp{font} resources is obsoleted in order to +support internationalization. If you are using the real Motif menubar, +this resource is not recognized at all; you have to say: + +@example +Emacs*menubar*fontList: FONT +@end example + +If you are using the Lucid menubar, for backward compatibility with +existing user configurations, the @samp{font} resource is recognized. +Since this is not supported by Motif itself, the code is a kludge and +the @samp{font} resource will be recognized only if the @samp{fontList} +resource resource is unset. This means that the resource + +@example +*fontList: FONT +@end example + +will override + +@example +Emacs*menubar*font: FONT +@end example + +even though the latter is more specific. + +In non-Motif configurations using @samp{--with-mule} and +@samp{--with-xfs} it @emph{is} necessary to use the @code{fontSet} +resource @emph{instead of} the @code{font} resource. The backward +compatibility kludge was never implemented for non-Motif builds. +Example: + +@example +*fontSet: FONT +@end example + +@unnumberedsec 4.5: The Toolbar + +@node Q4.5.1, Q4.5.2, Q4.4.5, Display +@unnumberedsubsec Q4.5.1: How do I get rid of the toolbar? + +#### Write me. + +@node Q4.5.2, Q4.5.3, Q4.5.1, Display +@unnumberedsubsec Q4.5.2: How can I customize the toolbar? + +#### Write me. + +@node Q4.5.3, Q4.5.4, Q4.5.2, Display +@unnumberedsubsec Q4.5.3: How can I bind a key to a function to toggle the toolbar? + +Try something like: + +@lisp +(defun my-toggle-toolbar () + (interactive) + (set-specifier default-toolbar-visible-p + (not (specifier-instance default-toolbar-visible-p)))) +(global-set-key "\C-xT" 'my-toggle-toolbar) +@end lisp + +@ignore +@c Probably not relevant any more +There are redisplay bugs in 19.14 that may make the preceding result in +a messed-up display, especially for frames with multiple windows. You +may need to resize the frame before XEmacs completely realizes the +toolbar is really gone. +@end ignore + +Thanks to @email{martin@@xemacs.org, Martin Buchholz} for the correct +code. + +@node Q4.5.4, Q4.6.1, Q4.5.3, Display +@unnumberedsubsec Q4.5.4: @samp{Can't instantiate image error...} in toolbar + +@email{expt@@alanine.ram.org, Dr. Ram Samudrala} writes: + +I just installed the XEmacs (20.4-2) RPMS that I downloaded from +@uref{http://www.xemacs.org/}. Everything works fine, except that when +I place my mouse over the toolbar, it beeps and gives me this message: + +@example + Can't instantiate image (probably cached): + [xbm :mask-file "/usr/include/X11/bitmaps/leftptrmsk :mask-data + (16 16 <strange control characters> ... +@end example + +@email{kyle_jones@@wonderworks.com, Kyle Jones} writes: +@quotation +This is problem specific to some Chips and Technologies video +chips, when running XFree86. Putting + +@code{Option "sw_cursor"} + +in @file{XF86Config} gets rid of the problem. +@end quotation + +@unnumberedsec 4.6: Scrollbars and Scrolling + +@node Q4.6.1, Q4.6.2, Q4.5.4, Display +@unnumberedsubsec Q4.6.1: How can I disable the scrollbar? + +To disable them for all frames, add the following line to +your @file{.Xresources}: + +@example +Emacs.scrollBarWidth: 0 +@end example + +Or select @samp{Options->Display->Scrollbars}. +Remember to save options. + +To turn the scrollbar off on a per-frame basis, use the following +function: + +@lisp +(set-specifier scrollbar-width 0 (selected-frame)) +@end lisp + +You can actually turn the scrollbars on at any level you want by +substituting for (selected-frame) in the above command. For example, to +turn the scrollbars off only in a single buffer: + +@lisp +(set-specifier scrollbar-width 0 (current-buffer)) +@end lisp + +@node Q4.6.2, Q4.6.3, Q4.6.1, Display +@unnumberedsubsec Q4.6.2: How can I change the scrollbar width? + +#### Write me. + +@node Q4.6.3, Q4.6.4, Q4.6.2, Display +@unnumberedsubsec Q4.6.3: How can I use resources to change scrollbar colors? + +Here's a recap of how to use resources to change your scrollbar colors: + +@example +! Motif scrollbars + +Emacs*XmScrollBar.Background: skyblue +Emacs*XmScrollBar.troughColor: lightgray + +! Athena scrollbars + +Emacs*Scrollbar.Foreground: skyblue +Emacs*Scrollbar.Background: lightgray +@end example + +Note the capitalization of @code{Scrollbar} for the Athena widget. + +@node Q4.6.4, Q4.6.5, Q4.6.3, Display +@unnumberedsubsec Q4.6.4: Moving the scrollbar can move the point; can I disable this? + +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? + +The current behavior is a feature, not a bug. Point remains at the same +buffer position as long as that position does not scroll off the screen. +In that event, point will end up in either the upper-left or lower-left +hand corner. + +This cannot be changed. + +@node Q4.6.5, Q4.6.6, Q4.6.4, Display +@unnumberedsubsec Q4.6.5: Scrolling one line at a time. + +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. + +Use the following: + +@lisp +(setq scroll-step 1) +@end lisp + +You can also change this with Customize. Select from the +@code{Options} menu +@code{Advanced (Customize)->Emacs->Environment->Windows->Scroll Step...} +or type @kbd{M-x customize @key{RET} windows @key{RET}}. + +@node Q4.6.6, Q4.6.7, Q4.6.5, Display +@unnumberedsubsec Q4.6.6: How can I turn off automatic horizontal scrolling in specific modes? + +Do @code{(setq truncate-lines t)} in the mode-hooks for any modes +in which you want lines truncated. + +More precisely: If @code{truncate-lines} is nil, horizontal scrollbars +will never appear. Otherwise, they will appear only if the value of +@code{scrollbar-height} for that buffer/window/etc. is non-zero. If you +do + +@lisp +(set-specifier scrollbar-height 0) +@end lisp + +then horizontal scrollbars will not appear in truncated buffers unless +the package specifically asked for them. + +@node Q4.6.7, Q4.7.1, Q4.6.6, Display +@unnumberedsubsec Q4.6.7: I find auto-show-mode disconcerting. How do I turn it off? + +@code{auto-show-mode} controls whether or not a horizontal scrollbar +magically appears when a line is too long to be displayed. This is +enabled by default. To turn it off, put the following in your +@file{init.el}: + +@lisp +(setq auto-show-mode nil) +(setq-default auto-show-mode nil) +@end lisp + +@unnumberedsec 4.7: The Gutter Tabs, The Progress Bar, Widgets + +@node Q4.7.1, Q4.7.2, Q4.6.7, Display +@unnumberedsubsec Q4.7.1: How can I disable the gutter tabs? + +#### Write me. + +@node Q4.7.2, Q4.7.3, Q4.7.1, Display +@unnumberedsubsec Q4.7.2: How can I disable the progress bar? + +#### Write me. + +@node Q4.7.3, Q4.7.4, Q4.7.2, Display +@unnumberedsubsec Q4.7.3: There are bugs in the gutter or widgets. + +#### Write me. + +@node Q4.7.4, , Q4.7.3, Display +@unnumberedsubsec Q4.7.4: How can I customize the gutter or gutter tabs? + +#### Write me. + +@node External Subsystems, Internet, Display, Top +@unnumbered 5 Interfacing with the Operating System and External Devices + +This is part 5 of the XEmacs Frequently Asked Questions list. This section is devoted to the various ways that XEmacs interfaces with the operating system, with other processes and with external devices such as speakers and the printer. @menu -4.0: X Window System and Resources -* Q4.0.1:: Where is a list of X resources? -* Q4.0.2:: How can I detect a color display? -* Q4.0.3:: How can I get the icon to just say @samp{XEmacs}? -* Q4.0.4:: How can I have the window title area display the full path? -* Q4.0.5:: @samp{xemacs -name junk} doesn't work? -* Q4.0.6:: @samp{-iconic} doesn't work. - -4.1: Microsoft Windows -* Q4.1.1:: Does XEmacs rename all the @samp{win32-*} symbols to @samp{w32-*}? -* Q4.1.2:: How do I get Windows Explorer to associate a file type with XEmacs? - -4.2: Printing -* Q4.2.1:: What do I need to change to make printing work? -* Q4.2.2:: How can I print WYSIWYG a font-locked buffer? -* Q4.2.3:: Getting @kbd{M-x lpr} to work with postscript printer. -* Q4.2.4:: Can you print under MS Windows? - -4.3: Sound -* Q4.3.1:: How do I turn off the sound? -* Q4.3.2:: How do I get funky sounds instead of a boring beep? -* Q4.3.3:: What's NAS, how do I get it? -* Q4.3.4:: Sunsite sounds don't play. - -4.4: Running an Interior Shell, Invoking Subprocesses -* Q4.4.1:: What is an interior shell? -* Q4.4.2:: How do I start up a second shell buffer? -* Q4.4.3:: Telnet from shell filters too much -* Q4.4.4:: Strange things are happening in Shell Mode. -* Q4.4.5:: XEmacs complains "No such file or directory, diff" - -4.5: Multiple Device Support -* Q4.5.1:: How do I open a frame on another screen of my multi-headed display? -* Q4.5.2:: Can I really connect to a running XEmacs after calling up over a modem? How? -* Q4.5.3:: How do I disable gnuserv from opening a new frame? -* Q4.5.4:: How do I start gnuserv so that each subsequent XEmacs is a client? -* Q4.5.5:: Is there a way to start a new XEmacs if there's no gnuserv running, and otherwise use gnuclient? - -4.6: TeX -* Q4.6.1:: Is there something better than LaTeX mode? -* Q4.6.2:: What is AUCTeX? Where do you get it? -* Q4.6.3:: Problems installing AUCTeX. -* Q4.6.4:: How do I turn off current chapter from AUCTeX modeline? - -4.7: Other Unbundled Packages -* Q4.7.1:: Is there a reason for an Emacs package not to be included in XEmacs? -* Q4.7.2:: Are there any Emacs Lisp Spreadsheets? -* Q4.7.3:: Is there a MatLab mode? - -4.8: Environments Built Around XEmacs -* Q4.8.1:: What are SPARCworks, EOS, and WorkShop? -* Q4.8.2:: How do I start the Sun Workshop support in XEmacs 21? -* Q4.8.3:: What is/was Energize? -* Q4.8.4:: What is Infodock? +5.0: X Window System and Resources +* Q5.0.1:: Where is a list of X resources? +* Q5.0.2:: How can I detect a color display? +* Q5.0.3:: How can I get the icon to just say @samp{XEmacs}? +* Q5.0.4:: How can I have the window title area display the full path? +* Q5.0.5:: @samp{xemacs -name junk} doesn't work? +* Q5.0.6:: @samp{-iconic} doesn't work. + +5.1: Microsoft Windows +* Q5.1.1:: Does XEmacs rename all the @samp{win32-*} symbols to @samp{w32-*}? +* Q5.1.2:: How do I get Windows Explorer to associate a file type with XEmacs? + +5.2: Printing +* Q5.2.1:: What do I need to change to make printing work? +* Q5.2.2:: How can I print WYSIWYG a font-locked buffer? +* Q5.2.3:: Getting @kbd{M-x lpr} to work with postscript printer. +* Q5.2.4:: Can you print under MS Windows? + +5.3: Sound +* Q5.3.1:: How do I turn off the sound? +* Q5.3.2:: How do I get funky sounds instead of a boring beep? +* Q5.3.3:: What are NAS and ESD (EsounD)? +* Q5.3.4:: Sunsite sounds don't play. + +5.4: Running an Interior Shell, Invoking Subprocesses +* Q5.4.1:: What is an interior shell? +* Q5.4.2:: How do I start up a second shell buffer? +* Q5.4.3:: Telnet from shell filters too much +* Q5.4.4:: Strange things are happening in Shell Mode. +* Q5.4.5:: XEmacs complains "No such file or directory, diff" + +5.5: Multiple Device Support +* Q5.5.1:: How do I open a frame on another screen of my multi-headed display? +* Q5.5.2:: Can I really connect to a running XEmacs after calling up over a modem? How? +* Q5.5.3:: How do I disable gnuserv from opening a new frame? +* Q5.5.4:: How do I start gnuserv so that each subsequent XEmacs is a client? +* Q5.5.5:: Is there a way to start a new XEmacs if there's no gnuserv running, and otherwise use gnuclient? @end menu -@unnumberedsec 4.0: X Window System and Resources - -@node Q4.0.1, Q4.0.2, External Subsystems, External Subsystems -@unnumberedsubsec Q4.0.1: Where is a list of X resources? +@unnumberedsec 5.0: X Window System and Resources + +@node Q5.0.1, Q5.0.2, External Subsystems, External Subsystems +@unnumberedsubsec Q5.0.1: Where is a list of X resources? Search through the @file{NEWS} file for @samp{X Resources}. A fairly comprehensive list is given after it. @@ -5116,8 +4893,8 @@ installing the contents of this file into your @file{.Xresources} (or legacy @file{.Xdefaults}) file if you use GNU Emacs under X11 as well. -@node Q4.0.2, Q4.0.3, Q4.0.1, External Subsystems -@unnumberedsubsec Q4.0.2: How can I detect a color display? +@node Q5.0.2, Q5.0.3, Q5.0.1, External Subsystems +@unnumberedsubsec Q5.0.2: How can I detect a color display? You can test the return value of the function @code{(device-class)}, as in: @@ -5130,8 +4907,8 @@ ) @end lisp -@node Q4.0.3, Q4.0.4, Q4.0.2, External Subsystems -@unnumberedsubsec Q4.0.3: How can I get the icon to just say @samp{XEmacs}? +@node Q5.0.3, Q5.0.4, Q5.0.2, External Subsystems +@unnumberedsubsec Q5.0.3: How can I get the icon to just say @samp{XEmacs}? I'd like the icon to just say @samp{XEmacs}, and not include the name of the current file in it. @@ -5142,8 +4919,8 @@ (setq frame-icon-title-format "XEmacs") @end lisp -@node Q4.0.4, Q4.0.5, Q4.0.3, External Subsystems -@unnumberedsubsec Q4.0.4: How can I have the window title area display the full path? +@node Q5.0.4, Q5.0.5, Q5.0.3, External Subsystems +@unnumberedsubsec Q5.0.4: How can I have the window title area display the full path? I'd like to have the window title area display the full directory/name of the current buffer file and not just the name. @@ -5164,8 +4941,8 @@ That is, use the file name, or the dired-directory, or the buffer name. -@node Q4.0.5, Q4.0.6, Q4.0.4, External Subsystems -@unnumberedsubsec Q4.0.5: @samp{xemacs -name junk} doesn't work? +@node Q5.0.5, Q5.0.6, Q5.0.4, External Subsystems +@unnumberedsubsec Q5.0.5: @samp{xemacs -name junk} doesn't work? 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 @@ -5215,8 +4992,8 @@ (make-frame '((name . "the-name"))) @end lisp -@node Q4.0.6, Q4.1.1, Q4.0.5, External Subsystems -@unnumberedsubsec Q4.0.6: @samp{-iconic} doesn't work. +@node Q5.0.6, Q5.1.1, Q5.0.5, External Subsystems +@unnumberedsubsec Q5.0.6: @samp{-iconic} doesn't work. When I start up XEmacs using @samp{-iconic} it doesn't work right. Using @samp{-unmapped} on the command line, and setting the @@ -5230,10 +5007,10 @@ bugs... @end quotation -@unnumberedsec 4.1: Microsoft Windows - -@node Q4.1.1, Q4.1.2, Q4.0.6, External Subsystems -@unnumberedsubsec Q4.1.1: Does XEmacs rename all the @samp{win32-*} symbols to @samp{w32-*}? +@unnumberedsec 5.1: Microsoft Windows + +@node Q5.1.1, Q5.1.2, Q5.0.6, External Subsystems +@unnumberedsubsec Q5.1.1: Does XEmacs rename all the @samp{win32-*} symbols to @samp{w32-*}? In his flavor of Emacs 20, Richard Stallman has renamed all the @samp{win32-*} symbols to @samp{w32-*}. Does XEmacs do the same? @@ -5260,8 +5037,8 @@ @c with our convention, but we provide the GNU Emacs names as @c compatibility aliases. -@node Q4.1.2, Q4.2.1, Q4.1.1, External Subsystems -@unnumberedsubsec Q4.1.2: How do I get Windows Explorer to associate a file type with XEmacs? +@node Q5.1.2, Q5.2.1, Q5.1.1, External Subsystems +@unnumberedsubsec Q5.1.2: How do I get Windows Explorer to associate a file type with XEmacs? @unnumberedsubsubsec Associating a new file type with XEmacs. @@ -5314,10 +5091,10 @@ Note for Windows 2000 users: Under Windows 2000, get to @samp{File Types} using @samp{Control Panel->Folder Options->File Types}. -@unnumberedsec 4.2: Printing - -@node Q4.2.1, Q4.2.2, Q4.1.2, External Subsystems -@unnumberedsubsec Q4.2.1: What do I need to change to make printing work? +@unnumberedsec 5.2: Printing + +@node Q5.2.1, Q5.2.2, Q5.1.2, External Subsystems +@unnumberedsubsec Q5.2.1: What do I need to change to make printing work? For regular printing there are two variables that can be customized. @@ -5360,8 +5137,8 @@ printing (the @code{Pretty Print Buffer} menu item) @strong{requires} a window system environment. It cannot be used outside of X11. -@node Q4.2.2, Q4.2.3, Q4.2.1, External Subsystems -@unnumberedsubsec Q4.2.2: How can I print WYSIWYG a font-locked buffer? +@node Q5.2.2, Q5.2.3, Q5.2.1, External Subsystems +@unnumberedsubsec Q5.2.2: How can I print WYSIWYG a font-locked buffer? Font-lock looks nice. How can I print (WYSIWYG) the highlighted document? @@ -5372,8 +5149,8 @@ @file{$prefix/lib/xemacs/xemacs-packages/lisp/ps-print/ps-print.el}, being the default location of an installed ps-print package. -@node Q4.2.3, Q4.2.4, Q4.2.2, External Subsystems -@unnumberedsubsec Q4.2.3: Getting @kbd{M-x lpr} to work with postscript printer. +@node Q5.2.3, Q5.2.4, Q5.2.2, External Subsystems +@unnumberedsubsec Q5.2.3: Getting @kbd{M-x lpr} to work with postscript printer. 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 @@ -5390,8 +5167,8 @@ free?), replace with the command you do use. Note also that some versions of a2ps require a @samp{-Pprinter} to ensure spooling. -@node Q4.2.4, Q4.3.1, Q4.2.3, External Subsystems -@unnumberedsubsec Q4.2.4: Can you print under MS Windows? +@node Q5.2.4, Q5.3.1, Q5.2.3, External Subsystems +@unnumberedsubsec Q5.2.4: Can you print under MS Windows? As of 21.4, printing works on Windows, using simply @samp{File->Print BUFFER...}, and can be configured with @@ -5401,10 +5178,10 @@ hacks out there. If you know how, please let us know and we'll put it here. -@unnumberedsec 4.3: Sound - -@node Q4.3.1, Q4.3.2, Q4.2.4, External Subsystems -@unnumberedsubsec Q4.3.1: How do I turn off the sound? +@unnumberedsec 5.3: Sound + +@node Q5.3.1, Q5.3.2, Q5.2.4, External Subsystems +@unnumberedsubsec Q5.3.1: How do I turn off the sound? Add the following line to your @file{init.el}: @@ -5422,8 +5199,8 @@ customize @key{RET} sound @key{RET}}. -@node Q4.3.2, Q4.3.3, Q4.3.1, External Subsystems -@unnumberedsubsec Q4.3.2: How do I get funky sounds instead of a boring beep? +@node Q5.3.2, Q5.3.3, Q5.3.1, External Subsystems +@unnumberedsubsec Q5.3.2: How do I get funky sounds instead of a boring beep? Make sure your XEmacs was compiled with sound support, and then put this in your @file{init.el}: @@ -5432,14 +5209,25 @@ (load-default-sounds) @end lisp -@node Q4.3.3, Q4.3.4, Q4.3.2, External Subsystems -@unnumberedsubsec Q4.3.3: What's NAS, how do I get it? - -@xref{Q2.1.3, Compiling XEmacs with Netaudio}, for an explanation of -the @dfn{Network Audio System}. - -@node Q4.3.4, Q4.4.1, Q4.3.3, External Subsystems -@unnumberedsubsec Q4.3.4: Sunsite sounds don't play. +@node Q5.3.3, Q5.3.4, Q5.3.2, External Subsystems +@unnumberedsubsec Q5.3.3: What are NAS and ESD (EsounD)? + +@dfn{Network Audio System} (NAS) is a client-server sound library for X. + +@uref{http://radscan.com/nas.html}. + +To build XEmacs with it, use the @file{configure} flag @samp{--with-sound=nas}. + +@dfn{Enlightened Sound Daemon} (ESD or EsounD) is yet another sound system. + +@uref{http://www.tux.org/~ricdude/EsounD.html}. + +To build XEmacs with it, use the @file{configure} flag @samp{--with-sound=esd}. + +You can specify support for both with a flag like @samp{--with-sound=nas,esd}. + +@node Q5.3.4, Q5.4.1, Q5.3.3, External Subsystems +@unnumberedsubsec Q5.3.4: Sunsite sounds don't play. I'm having some trouble with sounds I've downloaded from sunsite. They play when I run them through @code{showaudio} or cat them directly to @@ -5457,15 +5245,15 @@ need to perform a 'null' conversion from SunAudio to SunAudio. @end quotation -@unnumberedsec 4.4: Running an Interior Shell, Invoking Subprocesses - -@node Q4.4.1, Q4.4.2, Q4.3.4, External Subsystems -@unnumberedsubsec Q4.4.1: What is an interior shell? +@unnumberedsec 5.4: Running an Interior Shell, Invoking Subprocesses + +@node Q5.4.1, Q5.4.2, Q5.3.4, External Subsystems +@unnumberedsubsec Q5.4.1: What is an interior shell? #### Write me. -@node Q4.4.2, Q4.4.3, Q4.4.1, External Subsystems -@unnumberedsubsec Q4.4.2: How do I start up a second shell buffer? +@node Q5.4.2, Q5.4.3, Q5.4.1, External Subsystems +@unnumberedsubsec Q5.4.2: How do I start up a second shell buffer? In the @code{*shell*} buffer: @@ -5483,8 +5271,8 @@ If the value of this variable is non-nil, each time shell mode is invoked, a new shell is made -@node Q4.4.3, Q4.4.4, Q4.4.2, External Subsystems -@unnumberedsubsec Q4.4.3: Telnet from shell filters too much +@node Q5.4.3, Q5.4.4, Q5.4.2, External Subsystems +@unnumberedsubsec Q5.4.3: Telnet from shell filters too much 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 @@ -5495,8 +5283,8 @@ use @kbd{M-x ssh} to open secure remote session if you have @code{ssh} installed. -@node Q4.4.4, Q4.4.5, Q4.4.3, External Subsystems -@unnumberedsubsec Q4.4.4: Strange things are happening in Shell Mode. +@node Q5.4.4, Q5.4.5, Q5.4.3, External Subsystems +@unnumberedsubsec Q5.4.4: Strange things are happening in Shell Mode. Sometimes (i.e. it's not repeatable, and I can't work out why it happens) when I'm typing into shell mode, I hit return and only a @@ -5516,8 +5304,8 @@ @end example @end quotation -@node Q4.4.5, Q4.5.1, Q4.4.4, External Subsystems -@unnumberedsubsec Q4.4.5: XEmacs complains "No such file or directory, diff" +@node Q5.4.5, Q5.5.1, Q5.4.4, External Subsystems +@unnumberedsubsec Q5.4.5: XEmacs complains "No such file or directory, diff" or "ispell" or other commands that seem related to whatever you just tried to do (M-x ediff or M-$, for example). @@ -5531,10 +5319,10 @@ MinGW (@uref{http://www.mingw.org/msys.shtml}). If you know of others, please let us know! -@unnumberedsec 4.5: Multiple Device Support - -@node Q4.5.1, Q4.5.2, Q4.4.5, External Subsystems -@unnumberedsubsec Q4.5.1: How do I open a frame on another screen of my multi-headed display? +@unnumberedsec 5.5: Multiple Device Support + +@node Q5.5.1, Q5.5.2, Q5.4.5, External Subsystems +@unnumberedsubsec Q5.5.1: How do I open a frame on another screen of my multi-headed display? Use the command @kbd{M-x make-frame-on-display}. This command is also on the File menu in the menubar. @@ -5543,16 +5331,15 @@ connection to any tty-like device. Opening the TTY devices should be left to @code{gnuclient}, though. -@node Q4.5.2, Q4.5.3, Q4.5.1, External Subsystems -@unnumberedsubsec Q4.5.2: Can I really connect to a running XEmacs after calling up over a modem? How? - -Yes. Use @code{gnuclient -nw}. (Prior to 20.3, use the @code{gnuattach} -program supplied with XEmacs instead.) - -Also see @ref{Q4.5.3, How do I disable gnuserv from opening a new frame?}. - -@node Q4.5.3, Q4.5.4, Q4.5.2, External Subsystems -@unnumberedsubsec Q4.5.3: How do I disable gnuserv from opening a new frame? +@node Q5.5.2, Q5.5.3, Q5.5.1, External Subsystems +@unnumberedsubsec Q5.5.2: Can I really connect to a running XEmacs after calling up over a modem? How? + +Yes. Use @code{gnuclient -nw}. + +Also see @ref{Q5.5.3, How do I disable gnuserv from opening a new frame?}. + +@node Q5.5.3, Q5.5.4, Q5.5.2, External Subsystems +@unnumberedsubsec Q5.5.3: How do I disable gnuserv from opening a new frame? If you set the @code{gnuserv-frame} variable to the frame that should be used to display buffers that are pulled up, a new frame will not be @@ -5574,8 +5361,8 @@ @kbd{M-x customize @key{RET} gnuserv @key{RET}}. -@node Q4.5.4, Q4.5.5, Q4.5.3, External Subsystems -@unnumberedsubsec Q4.5.4: How do I start gnuserv so that each subsequent XEmacs is a client? +@node Q5.5.4, Q5.5.5, Q5.5.3, External Subsystems +@unnumberedsubsec Q5.5.4: How do I start gnuserv so that each subsequent XEmacs is a client? Put the following in your @file{init.el} file to start the server: @@ -5596,8 +5383,8 @@ See also man page of gnuclient. -@node Q4.5.5, Q4.6.1, Q4.5.4, External Subsystems -@unnumberedsubsec Q4.5.5: Is there a way to start a new XEmacs if there's no gnuserv running, and otherwise use gnuclient? +@node Q5.5.5, , Q5.5.4, External Subsystems +@unnumberedsubsec Q5.5.5: Is there a way to start a new XEmacs if there's no gnuserv running, and otherwise use gnuclient? @email{vroonhof@@math.ethz.ch, Jan Vroonhof} writes: @quotation @@ -5622,21 +5409,1283 @@ -nw' on the same TTY. @end quotation -@unnumberedsec 4.6: TeX - -@node Q4.6.1, Q4.6.2, Q4.5.5, External Subsystems -@unnumberedsubsec Q4.6.1: Is there something better than LaTeX mode? +@node Internet, Advanced, External Subsystems, Top +@unnumbered 6 Connecting to the Internet + +This is part 6 of the XEmacs Frequently Asked Questions list. This +section is devoted connecting to the Internet. + +@menu +6.0: General Mail and News +* Q6.0.1:: What are the various packages for reading mail? +* Q6.0.2:: How can I send mail? +* Q6.0.3:: How do I get my outgoing mail archived? +* Q6.0.4:: How can I read and/or compose MIME messages? +* Q6.0.5:: How do I customize the From line? +* Q6.0.6:: How do I get my MUA to filter mail for me? +* Q6.0.7:: Remote mail reading with an MUA. +* Q6.0.8:: An MUA gets an error incorporating new mail. +* Q6.0.9:: Why isn't @file{movemail} working? +* Q6.0.10:: How do I make my MUA display graphical smilies? +* Q6.0.11:: How can I get those oh-so-neat X-Face lines? + +6.1: Reading Mail with VM +* Q6.1.1:: How do I set up VM to retrieve mail from a remote site using POP? +* Q6.1.2:: How can I get VM to automatically check for new mail? +* Q6.1.3:: I have various addresses at which I receive mail. How can I tell VM to ignore them when doing a "reply-all"? +* Q6.1.4:: Is there a mailing list or FAQ for VM? +* Q6.1.5:: How do I make VM stay in a single frame? +* Q6.1.6:: Customization of VM not covered in the manual, or here. + +6.2: Reading Netnews and Mail with Gnus +* Q6.2.1:: GNUS, (ding) Gnus, Gnus 5, September Gnus, Red Gnus, Quassia Gnus, argh! +* Q6.2.2:: How do I make Gnus stay within a single frame? + +6.3: FTP Access +* Q6.3.1:: Can I edit files on other hosts? +* Q6.3.2:: What is EFS? + +6.4: Web Browsing with W3 +* Q6.4.1:: What is W3? +* Q6.4.2:: How do I run W3 from behind a firewall? +* Q6.4.3:: Is it true that W3 supports style sheets and tables? +@end menu + +@unnumberedsec 6.0: General Mail and News + +@node Q6.0.1, Q6.0.2, Internet, Internet +@unnumberedsubsec Q6.0.1: What are the various packages for reading mail? + +#### Write me. + +@node Q6.0.2, Q6.0.3, Q6.0.1, Internet +@unnumberedsubsec Q6.0.2: How can I send mail? + +Under Unix and Mac OS X, the @samp{sendmail} package is normally used +for this. +#### Write me. + +Under Windows, you need to use @samp{smtpmail}, which communicates +directly with the mail server, as there is no @file{sendmail} program +running. To get it working, use code like the following in your +@file{init.el} file: + +@lisp + ;; Get mail working under Windows. + (setq message-send-mail-function 'smtpmail-send-it) ; for message/Gnus + (setq send-mail-function 'smtpmail-send-it) ; for C-x m, etc. + ;; the following ensures that mail problems can be debugged: it logs a trace + ;; of the SMTP conversation to *trace of SMTP session to <somewhere>*. + (setq smtpmail-debug-info t) + ;; Substitute your info here. + ;(setq user-mail-address "ben@@xemacs.org") + ;(setq user-full-name "Ben Wing") + ;(setq smtpmail-default-smtp-server "smtp.myserver.myisp.com") + ;; The following two aren't completely necessary but may help. + ;(setq smtpmail-local-domain "666.com") + ;(setq smtpmail-sendto-domain "666.com") + ;; If your SMTP server requires a username/password to authenticate, as + ;; many do nowadays, set them like this: + ;(setq smtpmail-auth-credentials ; or use ~/.authinfo + ; '(("smtp.myserver.myisp.com" 25 "USER@@SOMEWHERE" "PASSWORD"))) + + ;; Other possibilities for getting smtpmail to work: + ;; + ;; If for some reason you need to authenticate using the STARTTLS protocol + ;; (don't look into this unless you know what it is), use + ;; (setq smtpmail-starttls-credentials + ;; '(("YOUR SMTP HOST" 25 "~/.my_smtp_tls.key" "~/.my_smtp_tls.cert"))) + ;; Requires external program + ;; ftp://ftp.opaopa.org/pub/elisp/starttls-*.tar.gz. + ;; See http://www.ietf.org/rfc/rfc2246.txt, + ;; http://www.ietf.org/rfc/rfc2487.txt +@end lisp + +The lines you need to care about are those that set +@code{user-mail-address}, @code{user-full-name}, +@code{smtpmail-default-smtp-server}, and +@code{smtpmail-auth-credentials}. You need to set these with, +respectively, your email address, your full name, the SMTP server you +use for outgoing mail, and the username and password you need to log +in to your SMTP server. (If for some reason your SMTP server doesn't +require logging in to send mail, don't uncomment this last line.) + +The other settings may be useful in specific cases, but you should know what +you're doing before enabling them. + +@node Q6.0.3, Q6.0.4, Q6.0.2, Internet +@unnumberedsubsec Q6.0.3: How do I get my outgoing mail archived? + +@lisp +(setq mail-archive-file-name "~/outbox") +@end lisp + +@node Q6.0.4, Q6.0.5, Q6.0.3, Internet +@unnumberedsubsec Q6.0.4: How can I read and/or compose MIME messages? + +VM, MH-E and GNUS support MIME natively. Other MUAs may or may not +have MIME support; refer to their documentation and other resources, +such as web pages and mailing lists. Packages like SEMI/WEMI may be +useful in connection with MUAs like mew and Wanderlust. + +@node Q6.0.5, Q6.0.6, Q6.0.4, Internet +@unnumberedsubsec Q6.0.5: How do I customize the From line? + +How do I change the @samp{From:} line? I have set gnus-user-from-line +to +@example +Gail Gurman <gail.gurman@@sybase.com> +@end example +@noindent , but XEmacs Gnus doesn't use +it. [This should apply to all MUA's. --ed] Instead it uses +@example +Gail Mara Gurman @email{gailg@@deall} +@end example +@noindent and then complains +that it's incorrect. Also, as you perhaps can see, my Message-ID is +screwy. How can I change that? + +@email{larsi@@ifi.uio.no, Lars Magne Ingebrigtsen} writes: + +@quotation +Set @code{user-mail-address} to @samp{gail.gurman@@sybase.com} or +@code{mail-host-address} to @samp{sybase.com}. +@end quotation + +@node Q6.0.6, Q6.0.7, Q6.0.5, Internet +@unnumberedsubsec Q6.0.6: How do I get my MUA to filter mail for me? + +One possibility is to use procmail to split your mail before it gets to +the MUA. I prefer this personally, since there are many strange and +wonderful things one can do with procmail. Procmail may be found at +@uref{http://www.procmail.org/}. + +Also see the Mail Filtering FAQ at: +@iftex +@* +@end iftex +@uref{http://www.faqs.org/faqs/mail/filtering-faq/}. + +@node Q6.0.7, Q6.0.8, Q6.0.6, Internet +@unnumberedsubsec Q6.0.7: Remote mail reading with an MUA. + +My mailbox lives at the office on a big honkin server. My regular INBOX +lives on my honkin desktop machine. I now can PPP to the office from +home which is far from honking... I'd like to be able to read mail at +home without storing it here and I'd like to use xemacs and the MUA at +home... Is there a recommended setup? + +@email{nuspl@@nvwls.cc.purdue.edu, Joseph J. Nuspl Jr.} writes: + +@quotation +There are several ways to do this. + +@enumerate +@item +Set your display to your home machine and run dxpc or one of the other X +compressors. + +@item +NFS mount your desktop machine on your home machine and modify your pop +command on your home machine to rsh to your desktop machine and actually +do the pop get's. + +@item +Run a POP server on your desktop machine as well and do a sort of two +tiered POP get. +@end enumerate +@end quotation + +@email{wmperry@@monolith.spry.com, William Perry} adds: + +@quotation +Or you could run a pop script periodically on your desktop machine, and +just use ange-ftp or NFS to get to your mailbox. I used to do this all +the time back at IU. +@end quotation + +@node Q6.0.8, Q6.0.9, Q6.0.7, Internet +@unnumberedsubsec Q6.0.8: An MUA gets an error incorporating new mail. + +rmail and VM, and probably other MUA's as well, get new mail from +your mailbox (called @file{/var/mail/$USER} or @file{/var/spool/mail/$USER} +or something similar) using a program called @code{movemail}. +This program interlocks with @code{/bin/mail} using the protocol +defined by @code{/bin/mail}. + +There are various different protocols in general use, which you need to +specify using the @samp{--mail-locking} option to @file{configure}: + +@table @samp +@item lockf +POSIX file locking with @code{lockf()} +@item flock +BSD file locking with @code{flock()} +@item dot +To manipulate mail file @file{foo}, first create file @file{foo.lock} +@item locking +Use @code{locking()}, Microsoft's renamed @code{flock()} +@item mmdf +Use @code{lk_open()} and @code{lk_close()} as defined by the Multi-channel +Memo Distribution Facility +@item pop +Retrieve mail using POP (the Post Office Protocol). This is the +default for Cygwin/MinGW. +@end table + +@strong{IF YOU DON'T USE THE FORM OF INTERLOCKING THAT IS NORMAL ON YOUR +SYSTEM, YOU CAN LOSE MAIL!} + +Usually the value is correctly determined automatically: +@file{configure} tries to detect the method in use, and defaults exist +on systems for which this doesn't work. + +However, if you run into problems incorporating new mail, it may be +because an incorrect method is being used. + +If your system uses the lock file protocol, and permissions are set +so that ordinary users cannot write lock files in the mail spool +directory, you may need to make @file{movemail} setgid to a +suitable group such as @samp{mail}. You can use these commands (as +root): + +@example +chgrp mail movemail +chmod 2755 movemail +@end example + +If you are using the @samp{pop} locking method, @file{movemail} must +be setuid root. + +Installation normally copies movemail from the build directory to an +installation directory which is usually under @file{/usr/local/lib}. +The installed copy of @file{movemail} is usually in the directory +@file{/usr/local/lib/xemacs-VERSION/TARGET} (for example, +@file{/usr/local/lib/xemacs-21.4.15/i686-pc-cygwin}). You must change +the group and mode of the installed copy; changing the group and mode +of the build directory copy is ineffective. + +@node Q6.0.9, Q6.0.10, Q6.0.8, Internet +@unnumberedsubsec Q6.0.9: Why isn't @file{movemail} working? + +@xref{Q6.0.8}. + +Note also that older versions of Mozilla came with a @file{movemail} +program that is @strong{not} compatible with XEmacs. Do not use it. +Always use the @file{movemail} installed with your XEmacs. Failure to +do so can result in lost mail. + +@node Q6.0.10, Q6.0.11, Q6.0.9, Internet +@unnumberedsubsec Q6.0.10: How do I make my MUA display graphical smilies? +For mh-e use the following: + +@lisp +(add-hook 'mh-show-mode-hook '(lambda () + (smiley-region (point-min) + (point-max)))) +@end lisp + +@email{bill@@carpenter.ORG, WJCarpenter} writes: +For VM use the following: +@lisp + (autoload 'smiley-region "smiley" nil t) + (add-hook 'vm-select-message-hook + '(lambda () + (smiley-region (point-min) + (point-max)))) +@end lisp + +For tm use the following: +@lisp +(autoload 'smiley-buffer "smiley" nil t) +(add-hook 'mime-viewer/plain-text-preview-hook 'smiley-buffer) +@end lisp + +@node Q6.0.11, Q6.1.1, Q6.0.10, Internet +@unnumberedsubsec Q6.0.11: How can I get those oh-so-neat X-Face lines? + +Firstly there is an ftp site which describes X-faces and has the +associated tools mentioned below, at +@uref{http://ftp.cs.indiana.edu/pub/faces/}. + +Then the steps are + +@enumerate +@item +Create 48x48x1 bitmap with your favorite tool + +@item +Convert to "icon" format using one of xbm2ikon, pbmtoicon, etc., +and then compile the face. + +@item +@example +cat file.xbm | xbm2ikon |compface > file.face +@end example + +@item +Then be sure to quote things that are necessary for emacs strings: + +@example +cat ./file.face | sed 's/\\/\\\\/g' +@iftex +\ @* +@end iftex +| sed 's/\"/\\\"/g' > ./file.face.quoted +@end example + +@item +Then set up emacs to include the file as a mail header - there were a +couple of suggestions here---either something like: + +@lisp +(setq mail-default-headers + "X-Face: @email{Ugly looking text string here}") +@end lisp + +Or, alternatively, as: + +@lisp +(defun mail-insert-x-face () + (save-excursion + (goto-char (point-min)) + (search-forward mail-header-separator) + (beginning-of-line) + (insert "X-Face:") + (insert-file-contents "~/.face"))) + +(add-hook 'mail-setup-hook 'mail-insert-x-face) +@end lisp +@end enumerate + +However, 2 things might be wrong: + +Some versions of pbmtoicon produces some header lines that is not +expected by the version of compface that I grabbed. So I found I had to +include a @code{tail +3} in the pipeline like this: + +@example +cat file.xbm | xbm2ikon | tail +3 |compface > file.face +@end example + +Some people have also found that if one uses the @code{(insert-file)} +method, one should NOT quote the face string using the sed script . + +It might also be helpful to use @email{stig@@hackvan.com, Stig's} script +xbm2face (included in the compface distribution at XEmacs.org) to do the +conversion. + +Contributors for this item: + +Paul Emsley, +Ricardo Marek, +Amir J. Katz, +Glen McCort, +Heinz Uphoff, +Peter Arius, +Paul Harrison, and +Vegard Vesterheim + +@unnumberedsec 6.1: Reading Mail with VM + +@node Q6.1.1, Q6.1.2, Q6.0.11, Internet +@unnumberedsubsec Q6.1.1: How do I set up VM to retrieve mail from a remote site using POP? + +Use @code{vm-spool-files}, like this for example: + +@lisp +(setq vm-spool-files '("/var/spool/mail/wing" + "netcom23.netcom.com:110:pass:wing:MYPASS")) +@end lisp + +Of course substitute your actual password for MYPASS. + +@node Q6.1.2, Q6.1.3, Q6.1.1, Internet +@unnumberedsubsec Q6.1.2: How can I get VM to automatically check for new mail? + +@email{turner@@lanl.gov, John Turner} writes: + +@quotation +Use the following: + +@lisp +(setq vm-auto-get-new-mail 60) +@end lisp +@end quotation + +@node Q6.1.3, Q6.1.4, Q6.1.2, Internet +@unnumberedsubsec Q6.1.3: I have various addresses at which I receive mail. How can I tell VM to ignore them when doing a "reply-all"? + +Set @code{vm-reply-ignored-addresses} to a list, like + +@lisp +(setq vm-reply-ignored-addresses + '("wing@@nuspl@@nvwls.cc.purdue.edu,netcom[0-9]*.netcom.com" + "wing@@netcom.com" "wing@@xemacs.org")) +@end lisp + +Note that each string is a regular expression. + +@node Q6.1.4, Q6.1.5, Q6.1.3, Internet +@unnumberedsubsec Q6.1.4: Is there a mailing list or FAQ for VM? + +A FAQ for VM exists at @uref{http://www.wonderworks.com/vm/FAQ.html}. + +VM has its own newsgroups gnu.emacs.vm.info and gnu.emacs.vm.bug. + +@node Q6.1.5, Q6.1.6, Q6.1.4, Internet +@unnumberedsubsec Q6.1.5: How do I make VM stay in a single frame? + +John.@email{Cooper@@Eng.Sun.COM, John S Cooper} writes: + +@quotation +@lisp + ; Don't use multiple frames +(setq vm-frame-per-composition nil) +(setq vm-frame-per-folder nil) +(setq vm-frame-per-edit nil) +(setq vm-frame-per-summary nil) +@end lisp +@end quotation + +@node Q6.1.6, Q6.2.1, Q6.1.5, Internet +@unnumberedsubsec Q6.1.6: Customization of VM not covered in the manual, or here. + +@email{boffi@@hp735.stru.polimi.it, giacomo boffi} writes: + +@quotation +The meta-answer is to look into the file @file{vm-vars.el}, in the vm +directory of the lisp library. + +@file{vm-vars.el} contains, initializes and carefully describes, with +examples of usage, the plethora of user options that @emph{fully} +control VM's behavior. + +Enter vm-vars, @code{forward-search} for toolbar, find the variables +that control the toolbar placement, appearance, existence, copy to your +@file{init.el} or @file{.vm} and modify according to the +detailed instructions. + +The above also applies to all the various features of VM: search for +some keywords, maybe the first you conjure isn't appropriate, find the +appropriate variables, copy and experiment. +@end quotation + +@unnumberedsec 6.2: Reading Netnews and Mail with Gnus + +@node Q6.2.1, Q6.2.2, Q6.1.6, Internet +@unnumberedsubsec Q6.2.1: GNUS, (ding) Gnus, Gnus 5, September Gnus, Red Gnus, Quassia Gnus, argh! + +The Gnus numbering issues are not meant for mere mortals to know them. +If you feel you @emph{must} enter the muddy waters of Gnus, visit the +excellent FAQ, maintained by Justin Sheehy, at: + +@example +@uref{http://my.gnus.org/FAQ/} +@end example + +See also Gnus home page +@example +@uref{http://www.gnus.org/} +@end example + +@node Q6.2.2, Q6.3.1, Q6.2.1, Internet +@unnumberedsubsec Q6.2.2: How do I make Gnus stay within a single frame? + +The toolbar code to start Gnus opens the new frame---and it's a feature +rather than a bug. If you don't like it, but would still like to click +on the seemly icon, use the following code: + +@lisp +(defun toolbar-news () + (gnus)) +@end lisp + +It will redefine the callback function of the icon to just call +@code{gnus}, without all the fancy frame stuff. + +@unnumberedsec 6.3: FTP Access + +@node Q6.3.1, Q6.3.2, Q6.2.2, Internet +@unnumberedsubsec Q6.3.1: Can I edit files on other hosts? + +Yes. Of course XEmacs can use any network file system (such as NFS or +Windows file sharing) you have available, and includes some +optimizations and safety features appropriate to those environments. + +It is also possible to transparently edit files via FTP, ssh, or rsh. That +is, XEmacs makes a local copy using the transport in the background, and +automatically refreshes the remote original from that copy when you save +it. XEmacs also is capable of doing file system manipulations like +creating and removing directories and files. The FTP interface is +provided by the standard @samp{efs} package @ref{Top, EFS, , efs}. The +ssh/rsh interface is provided by the optional @samp{tramp} package +@ref{Top, TRAMP, , tramp}. + +@node Q6.3.2, Q6.4.1, Q6.3.1, Internet +@unnumberedsubsec Q6.3.2: What is EFS? + +#### Write me. + +@unnumberedsec 6.4: Web Browsing with W3 + +@node Q6.4.1, Q6.4.2, Q6.3.2, Internet +@unnumberedsubsec Q6.4.1: What is W3? + +W3 is an advanced graphical browser written in Emacs lisp that runs on +XEmacs. It has full support for cascaded style sheets, and more... + +It has a home web page at +@uref{http://www.cs.indiana.edu/elisp/w3/docs.html}. + +@node Q6.4.2, Q6.4.3, Q6.4.1, Internet +@unnumberedsubsec Q6.4.2: How do I run W3 from behind a firewall? + +There is a long, well-written, detailed section in the W3 manual that +describes how to do this. Look in the section entitled "Firewalls". + +@node Q6.4.3, , Q6.4.2, Internet +@unnumberedsubsec Q6.4.3: Is it true that W3 supports style sheets and tables? + +Yes, and much more. W3, as distributed with the latest XEmacs is a +full-featured web browser. + +@node Advanced, Other Packages, Internet, Top +@unnumbered 7 Advanced Customization Using XEmacs Lisp + +This is part 7 of the XEmacs Frequently Asked Questions list. This +section is devoted to advanced customization using XEmacs Lisp. + +@menu +7.0: Online Help +* Q7.0.1:: How can I get two instances of info? +* Q7.0.2:: How do I add new Info directories? + +7.1: Emacs Lisp and @file{init.el} +* Q7.1.1:: What version of Emacs am I running? +* Q7.1.2:: How can I evaluate Emacs-Lisp expressions? +* Q7.1.3:: @code{(setq tab-width 6)} behaves oddly. +* Q7.1.4:: How can I add directories to the @code{load-path}? +* Q7.1.5:: How to check if a lisp function is defined? +* Q7.1.6:: Can I force the output of @code{(face-list)} to a buffer? + +7.2: Emacs Lisp Programming Techniques +* Q7.2.1:: What is the difference in key sequences between XEmacs and GNU Emacs? +* Q7.2.2:: Can I generate "fake" keyboard events? +* Q7.2.3:: Could you explain @code{read-kbd-macro} in more detail? +* Q7.2.4:: What is the performance hit of @code{let}? +* Q7.2.5:: What is the recommended use of @code{setq}? +* Q7.2.6:: What is the typical misuse of @code{setq}? +* Q7.2.7:: I like the @code{do} form of cl, does it slow things down? +* Q7.2.8:: I like recursion, does it slow things down? +* Q7.2.9:: How do I put a glyph as annotation in a buffer? +* Q7.2.10:: @code{map-extents} won't traverse all of my extents! +* Q7.2.11:: My elisp program is horribly slow. Is there an easy way to find out where it spends time? + +7.3: Mathematics +* Q7.3.1:: What are bignums, ratios, and bigfloats in Lisp? +* Q7.3.2:: XEmacs segfaults when I use very big numbers! +* Q7.3.3:: Bignums are really slow! +* Q7.3.4:: Equal bignums don't compare as equal! What gives? +@end menu + +@unnumberedsec 7.0: Online Help + +@node Q7.0.1, Q7.0.2, Advanced, Advanced +@unnumberedsubsec Q7.0.1: How can I get two instances of info? + +Before 21.4, you can't. The @code{info} package does not provide for +multiple info buffers. In 21.4, this should be fixed. #### how? + +@node Q7.0.2, Q7.1.1, Q7.0.1, Advanced +@unnumberedsubsec Q7.0.2: How do I add new Info directories? + +You use something like: + +@lisp +(setq Info-directory-list (cons + (expand-file-name "~/info") + Info-default-directory-list)) +@end lisp + +@email{davidm@@prism.kla.com, David Masterson} writes: + +@quotation +Emacs Info and XEmacs Info do many things differently. If you're trying to +support a number of versions of Emacs, here are some notes to remember: + +@enumerate +@item +Emacs Info scans @code{Info-directory-list} from right-to-left while +XEmacs Info reads it from left-to-right, so append to the @emph{correct} +end of the list. + +@item +Use @code{Info-default-directory-list} to initialize +@code{Info-directory-list} @emph{if} it is available at startup, but not +all Emacsen define it. + +@item +Emacs Info looks for a standard @file{dir} file in each of the +directories scanned from #1 and magically concatenates them together. + +@item +XEmacs Info looks for a @file{localdir} file (which consists of just the +menu entries from a @file{dir} file) in each of the directories scanned +from #1 (except the first), does a simple concatenation of them, and +magically attaches the resulting list to the end of the menu in the +@file{dir} file in the first directory. +@end enumerate + +Another alternative is to convert the documentation to HTML with +texi2html and read it from a web browser like Lynx or W3. +@end quotation + +@unnumberedsec 7.1: Emacs Lisp and @file{init.el} + +@node Q7.1.1, Q7.1.2, Q7.0.2, Advanced +@unnumberedsubsec Q7.1.1: What version of Emacs am I running? + +How can @file{init.el} determine which of the family of +Emacsen I am using? + +To determine if you are currently running GNU Emacs 18, GNU Emacs 19, +XEmacs 19, XEmacs 20, or Epoch, and use appropriate code, check out the +example given in @file{etc/sample.init.el} (@file{etc/sample.emacs} in +XEmacs versions prior to 21.4). There are other nifty things in there +as well! + +For all new code, all you really need to do is: + +@lisp +(defvar running-xemacs (string-match "XEmacs\\|Lucid" emacs-version)) +@end lisp + +@node Q7.1.2, Q7.1.3, Q7.1.1, Advanced +@unnumberedsubsec Q7.1.2: How can I evaluate Emacs-Lisp expressions? + +I know I can evaluate Elisp expressions from @code{*scratch*} buffer +with @kbd{C-j} after the expression. How do I do it from another +buffer? + +Press @kbd{M-:} (the default binding of @code{eval-expression}), and +enter the expression to the minibuffer. + +@node Q7.1.3, Q7.1.4, Q7.1.2, Advanced +@unnumberedsubsec Q7.1.3: @code{(setq tab-width 6)} behaves oddly. + +If you put @code{(setq tab-width 6)} in your +@file{init.el} file it does not work! Is there a reason +for this? If you do it at the EVAL prompt it works fine!! How strange. + +Use @code{setq-default} instead, since @code{tab-width} is +all-buffer-local. + +@node Q7.1.4, Q7.1.5, Q7.1.3, Advanced +@unnumberedsubsec Q7.1.4: How can I add directories to the @code{load-path}? + +Here are two ways to do that, one that puts your directories at the +front of the load-path, the other at the end: + +@lisp +;;; Add things at the beginning of the load-path, do not add +;;; duplicate directories: +(pushnew "bar" load-path :test 'equal) + +(pushnew "foo" load-path :test 'equal) + +;;; Add things at the end, unconditionally +(setq load-path (nconc load-path '("foo" "bar"))) +@end lisp + +@email{keithh@@nortel.ca, keith (k.p.) hanlan} writes: + +@quotation +To add directories using Unix shell metacharacters use +@file{expand-file-name} like this: + +@lisp +(push (expand-file-name "~keithh/.emacsdir") load-path) +@end lisp +@end quotation + +@node Q7.1.5, Q7.1.6, Q7.1.4, Advanced +@unnumberedsubsec Q7.1.5: How to check if a lisp function is defined? + +Use the following elisp: + +@lisp +(fboundp 'foo) +@end lisp + +It's almost always a mistake to test @code{emacs-version} or any similar +variables. + +Instead, use feature-tests, such as @code{featurep}, @code{boundp}, +@code{fboundp}, or even simple behavioral tests, eg.: + +@lisp +(defvar foo-old-losing-code-p + (condition-case nil (progn (losing-code t) nil) + (wrong-number-of-arguments t))) +@end lisp + +There is an incredible amount of broken code out there which could work +much better more often in more places if it did the above instead of +trying to divine its environment from the value of one variable. + +@node Q7.1.6, Q7.2.1, Q7.1.5, Advanced +@unnumberedsubsec Q7.1.6: Can I force the output of @code{(face-list)} to a buffer? + +It would be good having it in a buffer, as the output of +@code{(face-list)} is too wide to fit to a minibuffer. + +Evaluate the expression in the @samp{*scratch*} buffer with point after +the rightmost paren and typing @kbd{C-j}. + +If the minibuffer smallness is the only problem you encounter, you can +simply press @kbd{C-h l} to get the former minibuffer contents in a +buffer. + +@unnumberedsec 7.2: Emacs Lisp Programming Techniques + +@node Q7.2.1, Q7.2.2, Q7.1.6, Advanced +@unnumberedsubsec Q7.2.1: What is the difference in key sequences between XEmacs and GNU Emacs? + +@email{clerik@@naggum.no, Erik Naggum} writes; + +@quotation +Emacs has a legacy of keyboards that produced characters with modifier +bits, and therefore map a variety of input systems into this scheme even +today. XEmacs is instead optimized for X events. This causes an +incompatibility in the way key sequences are specified, but both Emacs +and XEmacs will accept a key sequence as a vector of lists of modifiers +that ends with a key, e.g., to bind @kbd{M-C-a}, you would say +@code{[(meta control a)]} in both Emacsen. XEmacs has an abbreviated +form for a single key, just (meta control a). Emacs has an abbreviated +form for the Control and the Meta modifiers to string-characters (the +ASCII characters), as in @samp{\M-\C-a}. XEmacs users need to be aware +that the abbreviated form works only for one-character key sequences, +while Emacs users need to be aware that the string-character is rather +limited. Specifically, the string-character can accommodate only 256 +different values, 128 of which have the Meta modifier and 128 of which +have not. In each of these blocks, only 32 characters have the Control +modifier. Whereas @code{[(meta control A)]} differs from @code{[(meta +control a)]} because the case differs, @samp{\M-\C-a} and @samp{\M-\C-A} +do not. Programmers are advised to use the full common form, both +because it is more readable and less error-prone, and because it is +supported by both Emacsen. +@end quotation + +Another (even safer) way to be sure of the key-sequences is to use the +@code{read-kbd-macro} function, which takes a string like @samp{C-c +<up>}, and converts it to the internal key representation of the Emacs +you use. The function is available both on XEmacs and GNU Emacs. + +@node Q7.2.2, Q7.2.3, Q7.2.1, Advanced +@unnumberedsubsec Q7.2.2: Can I generate "fake" keyboard events? + +I wonder if there is an interactive function that can generate +@dfn{fake} keyboard events. This way, I could simply map them inside +XEmacs. + +This seems to work: + +@lisp +(defun cg--generate-char-event (ch) + "Generate an event, as if ch has been typed" + (dispatch-event (character-to-event ch))) + +;; Backspace and Delete stuff +(global-set-key [backspace] + (lambda () (interactive) (cg--generate-char-event 127))) +(global-set-key [unknown_keysym_0x4] + (lambda () (interactive) (cg--generate-char-event 4))) +@end lisp + +@node Q7.2.3, Q7.2.4, Q7.2.2, Advanced +@unnumberedsubsec Q7.2.3: Could you explain @code{read-kbd-macro} in more detail? + +The @code{read-kbd-macro} function returns the internal Emacs +representation of a human-readable string (which is its argument). +Thus: + +@lisp +(read-kbd-macro "C-c C-a") +@result{} [(control ?c) (control ?a)] + +(read-kbd-macro "C-c C-. <up>") +@result{} [(control ?c) (control ?.) up] +@end lisp + +In GNU Emacs the same forms will be evaluated to what GNU Emacs +understands internally---the sequences @code{"\C-x\C-c"} and @code{[3 +67108910 up]}, respectively. + +The exact @dfn{human-readable} syntax is defined in the docstring of +@code{edmacro-mode}. I'll repeat it here, for completeness. + +@quotation +Format of keyboard macros during editing: + +Text is divided into @dfn{words} separated by whitespace. Except for +the words described below, the characters of each word go directly as +characters of the macro. The whitespace that separates words is +ignored. Whitespace in the macro must be written explicitly, as in +@kbd{foo @key{SPC} bar @key{RET}}. + +@itemize @bullet +@item +The special words @kbd{RET}, @kbd{SPC}, @kbd{TAB}, @kbd{DEL}, @kbd{LFD}, +@kbd{ESC}, and @kbd{NUL} represent special control characters. The +words must be written in uppercase. + +@item +A word in angle brackets, e.g., @code{<return>}, @code{<down>}, or +@code{<f1>}, represents a function key. (Note that in the standard +configuration, the function key @code{<return>} and the control key +@key{RET} are synonymous.) You can use angle brackets on the words +@key{RET}, @key{SPC}, etc., but they are not required there. + +@item +Keys can be written by their @sc{ascii} code, using a backslash followed +by up to six octal digits. This is the only way to represent keys with +codes above \377. + +@item +One or more prefixes @kbd{M-} (meta), @kbd{C-} (control), @kbd{S-} +(shift), @kbd{A-} (alt), @kbd{H-} (hyper), and @kbd{s-} (super) may +precede a character or key notation. For function keys, the prefixes +may go inside or outside of the brackets: @code{C-<down>} @equiv{} +@code{<C-down>}. The prefixes may be written in any order: @kbd{M-C-x} +@equiv{} @kbd{C-M-x}. + +Prefixes are not allowed on multi-key words, e.g., @kbd{C-abc}, except +that the Meta prefix is allowed on a sequence of digits and optional +minus sign: @kbd{M--123} @equiv{} @kbd{M-- M-1 M-2 M-3}. + +@item +The @code{^} notation for control characters also works: @kbd{^M} +@equiv{} @kbd{C-m}. + +@item +Double angle brackets enclose command names: @code{<<next-line>>} is +shorthand for @kbd{M-x next-line @key{RET}}. + +@item +Finally, @code{REM} or @code{;;} causes the rest of the line to be +ignored as a comment. +@end itemize + +Any word may be prefixed by a multiplier in the form of a decimal number +and @code{*}: @code{3*<right>} @equiv{} @code{<right> <right> <right>}, +and @code{10*foo} @equiv{} +@iftex +@* +@end iftex +@code{foofoofoofoofoofoofoofoofoofoo}. + +Multiple text keys can normally be strung together to form a word, but +you may need to add whitespace if the word would look like one of the +above notations: @code{; ; ;} is a keyboard macro with three semicolons, +but @code{;;;} is a comment. Likewise, @code{\ 1 2 3} is four keys but +@code{\123} is a single key written in octal, and @code{< right >} is +seven keys but @code{<right>} is a single function key. When in doubt, +use whitespace. +@end quotation + +@node Q7.2.4, Q7.2.5, Q7.2.3, Advanced +@unnumberedsubsec Q7.2.4: What is the performance hit of @code{let}? + +In most cases, not noticeable. Besides, there's no avoiding +@code{let}---you have to bind your local variables, after all. Some +pose a question whether to nest @code{let}s, or use one @code{let} per +function. I think because of clarity and maintenance (and possible +future implementation), @code{let}-s should be used (nested) in a way to +provide the clearest code. + +@node Q7.2.5, Q7.2.6, Q7.2.4, Advanced +@unnumberedsubsec Q7.2.5: What is the recommended use of @code{setq}? + +@itemize @bullet +@item Global variables + +You will typically @code{defvar} your global variable to a default +value, and use @code{setq} to set it later. + +It is never a good practice to @code{setq} user variables (like +@code{case-fold-search}, etc.), as it ignores the user's choice +unconditionally. Note that @code{defvar} doesn't change the value of a +variable if it was bound previously. If you wish to change a +user-variable temporarily, use @code{let}: + +@lisp +(let ((case-fold-search nil)) + ... ; code with searches that must be case-sensitive + ...) +@end lisp + +You will notice the user-variables by their docstrings beginning with an +asterisk (a convention). + +@item Local variables + +Bind them with @code{let}, which will unbind them (or restore their +previous value, if they were bound) after exiting from the @code{let} +form. Change the value of local variables with @code{setq} or whatever +you like (e.g. @code{incf}, @code{setf} and such). The @code{let} form +can even return one of its local variables. + +Typical usage: + +@lisp +;; iterate through the elements of the list returned by +;; `hairy-function-that-returns-list' +(let ((l (hairy-function-that-returns-list))) + (while l + ... do something with (car l) ... + (setq l (cdr l)))) +@end lisp + +Another typical usage includes building a value simply to work with it. + +@lisp +;; Build the mode keymap out of the key-translation-alist +(let ((inbox (file-truename (expand-file-name box))) + (i 0)) + ... code dealing with inbox ... + inbox) +@end lisp + +This piece of code uses the local variable @code{inbox}, which becomes +unbound (or regains old value) after exiting the form. The form also +returns the value of @code{inbox}, which can be reused, for instance: + +@lisp +(setq foo-processed-inbox + (let .....)) +@end lisp +@end itemize + +@node Q7.2.6, Q7.2.7, Q7.2.5, Advanced +@unnumberedsubsec Q7.2.6: What is the typical misuse of @code{setq}? + +A typical misuse is probably @code{setq}ing a variable that was meant to +be local. Such a variable will remain bound forever, never to be +garbage-collected. For example, the code doing: + +@lisp +(defun my-function (whatever) + (setq a nil) + ... build a large list ... + ... and exit ...) +@end lisp + +does a bad thing, as @code{a} will keep consuming memory, never to be +unbound. The correct thing is to do it like this: + +@lisp +(defun my-function (whatever) + (let (a) ; default initialization is to nil + ... build a large list ... + ... and exit, unbinding `a' in the process ...) +@end lisp + +Not only is this prettier syntactically, but it makes it possible for +Emacs to garbage-collect the objects which @code{a} used to reference. + +Note that even global variables should not be @code{setq}ed without +@code{defvar}ing them first, because the byte-compiler issues warnings. +The reason for the warning is the following: + +@lisp +(defun flurgoze nil) ; ok, global internal variable +... + +(setq flurghoze t) ; ops! a typo, but semantically correct. + ; however, the byte-compiler warns. + +While compiling toplevel forms: +** assignment to free variable flurghoze +@end lisp + +@node Q7.2.7, Q7.2.8, Q7.2.6, Advanced +@unnumberedsubsec Q7.2.7: I like the @code{do} form of cl, does it slow things down? + +It shouldn't. Here is what Dave Gillespie has to say about cl.el +performance: + +@quotation +Many of the advanced features of this package, such as @code{defun*}, +@code{loop}, and @code{setf}, are implemented as Lisp macros. In +byte-compiled code, these complex notations will be expanded into +equivalent Lisp code which is simple and efficient. For example, the +forms + +@lisp +(incf i n) +(push x (car p)) +@end lisp + +are expanded at compile-time to the Lisp forms + +@lisp +(setq i (+ i n)) +(setcar p (cons x (car p))) +@end lisp + +which are the most efficient ways of doing these respective operations +in Lisp. Thus, there is no performance penalty for using the more +readable @code{incf} and @code{push} forms in your compiled code. + +@emph{Interpreted} code, on the other hand, must expand these macros +every time they are executed. For this reason it is strongly +recommended that code making heavy use of macros be compiled. (The +features labelled @dfn{Special Form} instead of @dfn{Function} in this +manual are macros.) A loop using @code{incf} a hundred times will +execute considerably faster if compiled, and will also garbage-collect +less because the macro expansion will not have to be generated, used, +and thrown away a hundred times. + +You can find out how a macro expands by using the @code{cl-prettyexpand} +function. +@end quotation + +@node Q7.2.8, Q7.2.9, Q7.2.7, Advanced +@unnumberedsubsec Q7.2.8: I like recursion, does it slow things down? + +Yes. The Emacs byte-compiler cannot do much to optimize recursion. But +think well whether this is a real concern in Emacs. Much of the Emacs +slowness comes from internal mechanisms such as redisplay, or from the +fact that it is an interpreter. + +Please try not to make your code much uglier to gain a very small speed +gain. It's not usually worth it. + +@node Q7.2.9, Q7.2.10, Q7.2.8, Advanced +@unnumberedsubsec Q7.2.9: How do I put a glyph as annotation in a buffer? + +Here is a solution that will insert the glyph annotation at the +beginning of buffer: + +@lisp +(make-annotation (make-glyph '([FORMAT :file FILE] + [string :data "fallback-text"])) + (point-min) + 'text + (current-buffer)) +@end lisp + +Replace @samp{FORMAT} with an unquoted symbol representing the format of +the image (e.g. @code{xpm}, @code{xbm}, @code{gif}, @code{jpeg}, etc.) +Instead of @samp{FILE}, use the image file name +(e.g. +@iftex +@* +@end iftex +@file{/usr/local/lib/xemacs-21.4/etc/recycle.xpm}). + +You can turn this to a function (that optionally prompts you for a file +name), and inserts the glyph at @code{(point)} instead of +@code{(point-min)}. + +@node Q7.2.10, Q7.2.11, Q7.2.9, Advanced +@unnumberedsubsec Q7.2.10: @code{map-extents} won't traverse all of my extents! + +I tried to use @code{map-extents} to do an operation on all the extents +in a region. However, it seems to quit after processing a random number +of extents. Is it buggy? + +No. The documentation of @code{map-extents} states that it will iterate +across the extents as long as @var{function} returns @code{nil}. +Unexperienced programmers often forget to return @code{nil} explicitly, +which results in buggy code. For instance, the following code is +supposed to delete all the extents in a buffer, and issue as many +@samp{fubar!} messages. + +@lisp +(map-extents (lambda (ext ignore) + (delete-extent ext) + (message "fubar!"))) +@end lisp + +Instead, it will delete only the first extent, and stop right there -- +because @code{message} will return a non-nil value. The correct code +is: + +@lisp +(map-extents (lambda (ext ignore) + (delete-extent ext) + (message "fubar!") + nil)) +@end lisp + +@node Q7.2.11, Q7.3.1, Q7.2.10, Advanced +@unnumberedsubsec Q7.2.11: My elisp program is horribly slow. Is there an easy way to find out where it spends time? +@c New + +@email{hniksic@@xemacs.org, Hrvoje Niksic} writes: +@quotation +Under XEmacs 20.4 and later you can use @kbd{M-x profile-key-sequence}, +press a key (say @key{RET} in the Gnus Group buffer), and get the +results using @kbd{M-x profile-results}. It should give you an idea of +where the time is being spent. +@end quotation + +@unnumberedsec 7.3: Mathematics + +@node Q7.3.1, Q7.3.2, Q7.2.11, Advanced +@unnumberedsubsec Q7.3.1: What are bignums, ratios, and bigfloats in Lisp? + +Thanks to @email{james@@xemacs.org, Jerry James}, XEmacs 21.5.18 and +later can use the capabilities of multiple-precision libraries that may +be available for your platform. The GNU Multiple Precision (GMP) and +BSD Multiple Precision (MP) libraries are partially supported. GMP +gives you @dfn{bignums} (arbitrary precision integers), @dfn{ratios} +(arbitrary precision fractions), and @dfn{bigfloats} (arbitrary +precision floating point numbers). GNU MP is better-supported by XEmacs +at the time of writing (2004-04-06). BSD MP support does not include +ratios or bigfloats, and it throws errors that aren't understood. + +In most cases, bignum support should be transparent to users and Lisp +programmers. A bignum-enabled XEmacs will automatically convert from +fixnums to bignums and back in pure integer arithmetic, and for GNU MP, +from floats to bigfloats. (Bigfloats must be explicitly coerced to +other types, even if they are exactly representable by less precise +types.) The Lisp reader and printer have been enhanced to handle +bignums, as have the mathematical functions. Rationals (fixnums, +bignums, and ratios) are printed using the @samp{%d}, @samp{%o}, +@samp{%x}, and @samp{%u} format conversions. The read syntax for ratios +is @samp{3/5}. + +User-visible changes in behavior include (in probable order of annoyance) + +@itemize +@item +Arithmetic can cause a segfault, depending on your MP library +@ref{Q7.3.2, XEmacs segfaults when I use very big numbers!}. + +@item +Terminology is not Common-Lisp-conforming. For example, ``integer'' for +Emacs Lisp means what Common Lisp calls ``fixnum''. This issue is being +investigated, but the use of ``integer'' for fixnum is pervasive and may +cause backward-compatibility and GNU-Emacs-compatibility problems. + +@item +Many operations that used to cause a range error now succeed, with +intermediate results and return values coerced to bignums as needed. + +@item +An atom with ratio read syntax now returns a number, not a symbol. + +@item +The @samp{%u} format conversion will now give an error if its argument +is negative. (Without MP, it prints a number which Lisp can't read.) +@end itemize + +@emph{Surgeon General's Warning}: The automatic conversions cannot be +disabled at runtime. New functions have been added which produce +ratios, so there should be few surprises with type conflicts, but they +can't be ruled out. ``Arbitrary'' precision means precisely what it +says. If you work with extremely large numbers, your machine may +arbitrarily decide to hand you an unpleasant surprise rather than a +bignum @ref{Q7.3.2, XEmacs segfaults when I use very big numbers!}. + +To configure with GNU MP, add +@samp{--use-number-lib=gmp} +to your invocation of @file{configure}. For BSD MP, use +@samp{--use-number-lib=mp}. + +If you would like to help with bignum support, especially on BSD MP, +please subscribe to the @uref{http://www.xemacs.org/Lists/#xemacs-beta, +XEmacs Beta mailing list}, and book up on @file{number-gmp.h} and +@file{number-mp.h}. Jerry has promised to write internals documentation +eventually, but if your skills run more to analysis and documentation +than to writing new code, feel free to fill in the gap! + + +@node Q7.3.2, Q7.3.3, Q7.3.1, Advanced +@unnumberedsubsec Q7.3.2: XEmacs segfaults when I use very big numbers! + +GMP by default allocates temporaries on the stack. If you run out of +stack space, you're dead; there is no way that we know of to reliably +detect this condition, because @samp{alloca} is typically implemented to +be @emph{fast} rather than robust. If you just need a little more +oomph, use a bigger stack (@emph{e.g.}, the @file{ulimit -s} command in +bash(1)). If you want robustness at the cost of speed, configure GMP +with @samp{--disable-alloca} and rebuild the GMP library. + +We do not know whether BSD MP uses @samp{alloca} or not. Please send +any information you have as a bug report (@kbd{M-x report-xemacs-bug +@key{RET}}), which will give us platform information. (We do know that +BSD MP implementations vary across vendors, but how much, we do not know +yet.) + + +@node Q7.3.3, Q7.3.4, Q7.3.2, Advanced +@unnumberedsubsec Q7.3.3: Bignums are really slow! + +Many Linux distributions compile all their packages for the i386, and +this is costly. An optimized version can give you two or three orders +of magnitude better performance for a Pentium III or IV. (Yes, really. +See @uref{http://www.swox.com/gmp/gmp-speed.html}.) + + +@node Q7.3.4, , Q7.3.3, Advanced +@unnumberedsubsec Q7.3.4: Equal bignums don't compare as equal! What gives? + +Ah, Grasshopper, I see you are using @code{(eq x y)}. The Bodhisattva +CLTL2 warned of the illusion that equal numbers would be @samp{eq}! +Meditate on the deeper truths of @samp{eql}, in which numbers of the same +type which have equal values compare equal, and @samp{=}, which does any +necessary type coercions before comparing for equality. + +Yeah, yeah, it has always worked for integer types, because fixnums and +characters have an immediate representation. Sorry about that; +arbitrary precision obviously requires consing new objects because the +objects are ``large'' and of variable size, and the definition of +@samp{eq} does not permit different objects to compare as equal. + +@node Other Packages, Current Events, Advanced, Top +@unnumbered 8 Other External Packages + +This is part 8 of the XEmacs Frequently Asked Questions list. This +section is devoted to miscellaneous external packages not covered +elsewhere in XEmacs. + +@menu +* Q8.0.1:: Is there something better than LaTeX mode? +* Q8.0.2:: What is AUCTeX? Where do you get it? +* Q8.0.3:: Problems installing AUCTeX. +* Q8.0.4:: How do I turn off current chapter from AUCTeX modeline? + +8.1: Other Unbundled Packages +* Q8.1.1:: Is there a reason for an Emacs package not to be included in XEmacs? +* Q8.1.2:: Are there any Emacs Lisp Spreadsheets? +* Q8.1.3:: Is there a MatLab mode? + +8.2: Environments Built Around XEmacs +* Q8.2.1:: What are SPARCworks, EOS, and WorkShop? +* Q8.2.2:: How do I start the Sun Workshop support in XEmacs 21? +* Q8.2.3:: What is/was Energize? +* Q8.2.4:: What is Infodock? +@end menu + +@unnumberedsec 8.0: TeX + +@node Q8.0.1, Q8.0.2, Other Packages, Other Packages +@unnumberedsubsec Q8.0.1: Is there something better than LaTeX mode? @email{dak@@fsnif.neuroinformatik.ruhr-uni-bochum.de, David Kastrup} writes: @quotation The standard TeX modes leave much to be desired, and are somewhat -leniently maintained. Serious TeX users use AUCTeX (@pxref{Q4.6.2, +leniently maintained. Serious TeX users use AUCTeX (@pxref{Q8.0.2, What is AUCTeX? Where do you get it?}). @end quotation -@node Q4.6.2, Q4.6.3, Q4.6.1, External Subsystems -@unnumberedsubsec Q4.6.2: What is AUCTeX? Where do you get it? +@node Q8.0.2, Q8.0.3, Q8.0.1, Other Packages +@unnumberedsubsec Q8.0.2: What is AUCTeX? Where do you get it? AUCTeX is a complex and sophisticated editing package dedicated to TeX and related text formatting languages, including LaTeX and Texinfo. @@ -5655,8 +6704,8 @@ these, you may be better off getting the most recent versions from the GNU AUCTeX project on @uref{http://savannah.gnu.org}. -@node Q4.6.3, Q4.6.4, Q4.6.2, External Subsystems -@unnumberedsubsec Q4.6.3: Problems installing AUCTeX. +@node Q8.0.3, Q8.0.4, Q8.0.2, Other Packages +@unnumberedsubsec Q8.0.3: Problems installing AUCTeX. @email{vroonhof@@math.ethz.ch, Jan Vroonhof} writes: @@ -5683,8 +6732,8 @@ @strong{only} finds the one that came with XEmacs. @end itemize -@node Q4.6.4, Q4.7.1, Q4.6.3, External Subsystems -@unnumberedsubsec Q4.6.4: How do I turn off current chapter from AUCTeX modeline? +@node Q8.0.4, Q8.1.1, Q8.0.3, Other Packages +@unnumberedsubsec Q8.0.4: How do I turn off current chapter from AUCTeX modeline? With AUCTeX, fast typing is hard because the current chapter, section etc. are given in the modeline. How can I turn this off? @@ -5718,10 +6767,10 @@ @end lisp @end quotation -@unnumberedsec 4.7: Other Unbundled Packages - -@node Q4.7.1, Q4.7.2, Q4.6.4, External Subsystems -@unnumberedsubsec Q4.7.1: Is there a reason for an Emacs package not to be included in XEmacs? +@unnumberedsec 8.1: Other Unbundled Packages + +@node Q8.1.1, Q8.1.2, Q8.0.4, Other Packages +@unnumberedsubsec Q8.1.1: Is there a reason for an Emacs package not to be included in XEmacs? The reason for an Emacs package not to be included in XEmacs is usually one or more of the following: @@ -5759,26 +6808,25 @@ appreciated. @end enumerate -@node Q4.7.2, Q4.7.3, Q4.7.1, External Subsystems -@unnumberedsubsec Q4.7.2: Are there any Emacs Lisp Spreadsheets? +@node Q8.1.2, Q8.1.3, Q8.1.1, Other Packages +@unnumberedsubsec Q8.1.2: Are there any Emacs Lisp Spreadsheets? Yes. Check out @dfn{dismal} (which stands for Dis' Mode Ain't Lotus) at @iftex @* @end iftex -@uref{ftp://cs.nyu.edu/pub/local/fox/dismal/}. - -@node Q4.7.3, Q4.8.1, Q4.7.2, External Subsystems -@unnumberedsubsec Q4.7.3: Is there a MatLab mode? +@uref{http://acs.ist.psu.edu/dismal/dismal.html}. + +@node Q8.1.3, Q8.2.1, Q8.1.2, Other Packages +@unnumberedsubsec Q8.1.3: Is there a MatLab mode? Yes, a matlab mode and other items are available at the -@uref{ftp://ftp.mathworks.com/pub/contrib/emacs_add_ons, -MathWorks' emacs_add_ons ftp directory}. - -@unnumberedsec 4.8: Environments Built Around XEmacs - -@node Q4.8.1, Q4.8.2, Q4.7.3, External Subsystems -@unnumberedsubsec Q4.8.1: What are SPARCworks, EOS, and WorkShop? +@uref{http://www.mathworks.com/matlabcentral/files/104/matlab.el}. + +@unnumberedsec 8.2: Environments Built Around XEmacs + +@node Q8.2.1, Q8.2.2, Q8.1.3, Other Packages +@unnumberedsubsec Q8.2.1: What are SPARCworks, EOS, and WorkShop? SPARCworks was a development environment from Sun (circa 1993-1996) and consisted of compilers (C, C++, FORTRAN 77, Fortran 90, Ada, and @@ -5799,8 +6847,8 @@ environment called Sun WorkShop. The current status of this is unknown. -@node Q4.8.2, Q4.8.3, Q4.8.1, External Subsystems -@unnumberedsubsec Q4.8.2: How do I start the Sun Workshop support in XEmacs 21? +@node Q8.2.2, Q8.2.3, Q8.2.1, Other Packages +@unnumberedsubsec Q8.2.2: How do I start the Sun Workshop support in XEmacs 21? Add the switch ---with-workshop to the configure command when building XEmacs and put the following in one of your startup files @@ -5835,8 +6883,8 @@ (setq running-emacs t)) @end format -@node Q4.8.3, Q4.8.4, Q4.8.2, External Subsystems -@unnumberedsubsec Q4.8.3: What is/was Energize? +@node Q8.2.3, Q8.2.4, Q8.2.2, Other Packages +@unnumberedsubsec Q8.2.3: What is/was Energize? The "Energize Programming System" was a C and C++ development environment sold by Lucid, Inc. It was the reason why Lucid Emacs, now XEmacs, was @@ -5848,8 +6896,8 @@ world. However, INS is not selling Energize at this point and may or may not have ever done so; Tartan certainly never did. -@node Q4.8.4, , Q4.8.3, External Subsystems -@unnumberedsubsec Q4.8.4: What is Infodock? +@node Q8.2.4, , Q8.2.3, Other Packages +@unnumberedsubsec Q8.2.4: What is Infodock? @uref{http://sourceforge.net/projects/infodock/, InfoDock} is an integrated productivity toolset, mainly aimed at technical people, @@ -5943,1253 +6991,10 @@ list. Always include your InfoDock version number when sending help requests. -@node Internet, Advanced, External Subsystems, Top -@unnumbered 5 Connecting to the Internet - -This is part 5 of the XEmacs Frequently Asked Questions list. This -section is devoted connecting to the Internet. - -@menu -5.0: General Mail and News -* Q5.0.1:: What are the various packages for reading mail? -* Q5.0.2:: How can I send mail? -* Q5.0.3:: How do I get my outgoing mail archived? -* Q5.0.4:: How can I read and/or compose MIME messages? -* Q5.0.5:: How do I customize the From line? -* Q5.0.6:: How do I get my MUA to filter mail for me? -* Q5.0.7:: Remote mail reading with an MUA. -* Q5.0.8:: An MUA gets an error incorporating new mail. -* Q5.0.9:: Why isn't @file{movemail} working? -* Q5.0.10:: How do I make my MUA display graphical smilies? -* Q5.0.11:: How can I get those oh-so-neat X-Face lines? - -5.1: Reading Mail with VM -* Q5.1.1:: How do I set up VM to retrieve mail from a remote site using POP? -* Q5.1.2:: How can I get VM to automatically check for new mail? -* Q5.1.3:: I have various addresses at which I receive mail. How can I tell VM to ignore them when doing a "reply-all"? -* Q5.1.4:: Is there a mailing list or FAQ for VM? -* Q5.1.5:: How do I make VM stay in a single frame? -* Q5.1.6:: Customization of VM not covered in the manual, or here. - -5.2: Reading Netnews and Mail with Gnus -* Q5.2.1:: GNUS, (ding) Gnus, Gnus 5, September Gnus, Red Gnus, Quassia Gnus, argh! -* Q5.2.2:: How do I make Gnus stay within a single frame? - -5.3: FTP Access -* Q5.3.1:: Can I edit files on other hosts? -* Q5.3.2:: What is EFS? - -5.4: Web Browsing with W3 -* Q5.4.1:: What is W3? -* Q5.4.2:: How do I run W3 from behind a firewall? -* Q5.4.3:: Is it true that W3 supports style sheets and tables? -@end menu - -@unnumberedsec 5.0: General Mail and News - -@node Q5.0.1, Q5.0.2, Internet, Internet -@unnumberedsubsec Q5.0.1: What are the various packages for reading mail? - -#### Write me. - -@node Q5.0.2, Q5.0.3, Q5.0.1, Internet -@unnumberedsubsec Q5.0.2: How can I send mail? - -Under Unix and Mac OS X, the @samp{sendmail} package is normally used -for this. -#### Write me. - -Under Windows, you need to use @samp{smtpmail}, which communicates -directly with the mail server, as there is no @file{sendmail} program -running. To get it working, use code like the following in your -@file{init.el} file: - -@lisp - ;; Get mail working under Windows. - (setq message-send-mail-function 'smtpmail-send-it) ; for message/Gnus - (setq send-mail-function 'smtpmail-send-it) ; for C-x m, etc. - ;; the following ensures that mail problems can be debugged: it logs a trace - ;; of the SMTP conversation to *trace of SMTP session to <somewhere>*. - (setq smtpmail-debug-info t) - ;; Substitute your info here. - ;(setq user-mail-address "ben@@xemacs.org") - ;(setq user-full-name "Ben Wing") - ;(setq smtpmail-default-smtp-server "smtp.myserver.myisp.com") - ;; The following two aren't completely necessary but may help. - ;(setq smtpmail-local-domain "666.com") - ;(setq smtpmail-sendto-domain "666.com") - ;; If your SMTP server requires a username/password to authenticate, as - ;; many do nowadays, set them like this: - ;(setq smtpmail-auth-credentials ; or use ~/.authinfo - ; '(("smtp.myserver.myisp.com" 25 "USER@@SOMEWHERE" "PASSWORD"))) - - ;; Other possibilities for getting smtpmail to work: - ;; - ;; If for some reason you need to authenticate using the STARTTLS protocol - ;; (don't look into this unless you know what it is), use - ;; (setq smtpmail-starttls-credentials - ;; '(("YOUR SMTP HOST" 25 "~/.my_smtp_tls.key" "~/.my_smtp_tls.cert"))) - ;; Requires external program - ;; ftp://ftp.opaopa.org/pub/elisp/starttls-*.tar.gz. - ;; See http://www.ietf.org/rfc/rfc2246.txt, - ;; http://www.ietf.org/rfc/rfc2487.txt -@end lisp - -The lines you need to care about are those that set -@code{user-mail-address}, @code{user-full-name}, -@code{smtpmail-default-smtp-server}, and -@code{smtpmail-auth-credentials}. You need to set these with, -respectively, your email address, your full name, the SMTP server you -use for outgoing mail, and the username and password you need to log -in to your SMTP server. (If for some reason your SMTP server doesn't -require logging in to send mail, don't uncomment this last line.) - -The other settings may be useful in specific cases, but you should know what -you're doing before enabling them. - -@node Q5.0.3, Q5.0.4, Q5.0.2, Internet -@unnumberedsubsec Q5.0.3: How do I get my outgoing mail archived? - -@lisp -(setq mail-archive-file-name "~/outbox") -@end lisp - -@node Q5.0.4, Q5.0.5, Q5.0.3, Internet -@unnumberedsubsec Q5.0.4: How can I read and/or compose MIME messages? - -VM, MH-E and GNUS support MIME natively. Other MUAs may or may not -have MIME support; refer to their documentation and other resources, -such as web pages and mailing lists. Packages like SEMI/WEMI may be -useful in connection with MUAs like mew and Wanderlust. - -@node Q5.0.5, Q5.0.6, Q5.0.4, Internet -@unnumberedsubsec Q5.0.5: How do I customize the From line? - -How do I change the @samp{From:} line? I have set gnus-user-from-line -to -@example -Gail Gurman <gail.gurman@@sybase.com> -@end example -@noindent , but XEmacs Gnus doesn't use -it. [This should apply to all MUA's. --ed] Instead it uses -@example -Gail Mara Gurman @email{gailg@@deall} -@end example -@noindent and then complains -that it's incorrect. Also, as you perhaps can see, my Message-ID is -screwy. How can I change that? - -@email{larsi@@ifi.uio.no, Lars Magne Ingebrigtsen} writes: - -@quotation -Set @code{user-mail-address} to @samp{gail.gurman@@sybase.com} or -@code{mail-host-address} to @samp{sybase.com}. -@end quotation - -@node Q5.0.6, Q5.0.7, Q5.0.5, Internet -@unnumberedsubsec Q5.0.6: How do I get my MUA to filter mail for me? - -One possibility is to use procmail to split your mail before it gets to -the MUA. I prefer this personally, since there are many strange and -wonderful things one can do with procmail. Procmail may be found at -@uref{ftp://ftp.informatik.rwth-aachen.de/pub/packages/procmail/}. - -Also see the Mail Filtering FAQ at: -@iftex -@* -@end iftex -@uref{ftp://rtfm.mit.edu/pub/usenet/news.answers/mail/filtering-faq}. -@c Link above, -@c <URL:http://www.cis.ohio-state.edu/hypertext/faq/usenet/mail/filtering-faq/faq.html> -@c was dead. - -@node Q5.0.7, Q5.0.8, Q5.0.6, Internet -@unnumberedsubsec Q5.0.7: Remote mail reading with an MUA. - -My mailbox lives at the office on a big honkin server. My regular INBOX -lives on my honkin desktop machine. I now can PPP to the office from -home which is far from honking... I'd like to be able to read mail at -home without storing it here and I'd like to use xemacs and the MUA at -home... Is there a recommended setup? - -@email{nuspl@@nvwls.cc.purdue.edu, Joseph J. Nuspl Jr.} writes: - -@quotation -There are several ways to do this. - -@enumerate -@item -Set your display to your home machine and run dxpc or one of the other X -compressors. - -@item -NFS mount your desktop machine on your home machine and modify your pop -command on your home machine to rsh to your desktop machine and actually -do the pop get's. - -@item -Run a POP server on your desktop machine as well and do a sort of two -tiered POP get. -@end enumerate -@end quotation - -@email{wmperry@@monolith.spry.com, William Perry} adds: - -@quotation -Or you could run a pop script periodically on your desktop machine, and -just use ange-ftp or NFS to get to your mailbox. I used to do this all -the time back at IU. -@end quotation - -@node Q5.0.8, Q5.0.9, Q5.0.7, Internet -@unnumberedsubsec Q5.0.8: An MUA gets an error incorporating new mail. - -rmail and VM, and probably other MUA's as well, get new mail from -your mailbox (called @file{/var/mail/$USER} or @file{/var/spool/mail/$USER} -or something similar) using a program called @code{movemail}. -This program interlocks with @code{/bin/mail} using the protocol -defined by @code{/bin/mail}. - -There are various different protocols in general use, which you need to -specify using the @samp{--mail-locking} option to @file{configure}: - -@table @samp -@item lockf -POSIX file locking with @code{lockf()} -@item flock -BSD file locking with @code{flock()} -@item dot -To manipulate mail file @file{foo}, first create file @file{foo.lock} -@item locking -Use @code{locking()}, Microsoft's renamed @code{flock()} -@item mmdf -Use @code{lk_open()} and @code{lk_close()} as defined by the Multi-channel -Memo Distribution Facility -@item pop -Retrieve mail using POP (the Post Office Protocol). This is the -default for Cygwin/MinGW. -@end table - -@strong{IF YOU DON'T USE THE FORM OF INTERLOCKING THAT IS NORMAL ON YOUR -SYSTEM, YOU CAN LOSE MAIL!} - -Usually the value is correctly determined automatically: -@file{configure} tries to detect the method in use, and defaults exist -on systems for which this doesn't work. - -However, if you run into problems incorporating new mail, it may be -because an incorrect method is being used. - -If your system uses the lock file protocol, and permissions are set -so that ordinary users cannot write lock files in the mail spool -directory, you may need to make @file{movemail} setgid to a -suitable group such as @samp{mail}. You can use these commands (as -root): - -@example -chgrp mail movemail -chmod 2755 movemail -@end example - -If you are using the @samp{pop} locking method, @file{movemail} must -be setuid root. - -Installation normally copies movemail from the build directory to an -installation directory which is usually under @file{/usr/local/lib}. -The installed copy of @file{movemail} is usually in the directory -@file{/usr/local/lib/xemacs-VERSION/TARGET} (for example, -@file{/usr/local/lib/xemacs-21.4.15/i686-pc-cygwin}). You must change -the group and mode of the installed copy; changing the group and mode -of the build directory copy is ineffective. - -@node Q5.0.9, Q5.0.10, Q5.0.8, Internet -@unnumberedsubsec Q5.0.9: Why isn't @file{movemail} working? - -@xref{Q5.0.8}. - -Note also that older versions of Mozilla came with a @file{movemail} -program that is @strong{not} compatible with XEmacs. Do not use it. -Always use the @file{movemail} installed with your XEmacs. Failure to -do so can result in lost mail. - -@node Q5.0.10, Q5.0.11, Q5.0.9, Internet -@unnumberedsubsec Q5.0.10: How do I make my MUA display graphical smilies? -For mh-e use the following: - -@lisp -(add-hook 'mh-show-mode-hook '(lambda () - (smiley-region (point-min) - (point-max)))) -@end lisp - -@email{bill@@carpenter.ORG, WJCarpenter} writes: -For VM use the following: -@lisp - (autoload 'smiley-region "smiley" nil t) - (add-hook 'vm-select-message-hook - '(lambda () - (smiley-region (point-min) - (point-max)))) -@end lisp - -For tm use the following: -@lisp -(autoload 'smiley-buffer "smiley" nil t) -(add-hook 'mime-viewer/plain-text-preview-hook 'smiley-buffer) -@end lisp - -@node Q5.0.11, Q5.1.1, Q5.0.10, Internet -@unnumberedsubsec Q5.0.11: How can I get those oh-so-neat X-Face lines? - -Firstly there is an ftp site which describes X-faces and has the -associated tools mentioned below, at -@uref{ftp://ftp.cs.indiana.edu:/pub/faces/}. - -Then the steps are - -@enumerate -@item -Create 48x48x1 bitmap with your favorite tool - -@item -Convert to "icon" format using one of xbm2ikon, pbmtoicon, etc., -and then compile the face. - -@item -@example -cat file.xbm | xbm2ikon |compface > file.face -@end example - -@item -Then be sure to quote things that are necessary for emacs strings: - -@example -cat ./file.face | sed 's/\\/\\\\/g' -@iftex -\ @* -@end iftex -| sed 's/\"/\\\"/g' > ./file.face.quoted -@end example - -@item -Then set up emacs to include the file as a mail header - there were a -couple of suggestions here---either something like: - -@lisp -(setq mail-default-headers - "X-Face: @email{Ugly looking text string here}") -@end lisp - -Or, alternatively, as: - -@lisp -(defun mail-insert-x-face () - (save-excursion - (goto-char (point-min)) - (search-forward mail-header-separator) - (beginning-of-line) - (insert "X-Face:") - (insert-file-contents "~/.face"))) - -(add-hook 'mail-setup-hook 'mail-insert-x-face) -@end lisp -@end enumerate - -However, 2 things might be wrong: - -Some versions of pbmtoicon produces some header lines that is not -expected by the version of compface that I grabbed. So I found I had to -include a @code{tail +3} in the pipeline like this: - -@example -cat file.xbm | xbm2ikon | tail +3 |compface > file.face -@end example - -Some people have also found that if one uses the @code{(insert-file)} -method, one should NOT quote the face string using the sed script . - -It might also be helpful to use @email{stig@@hackvan.com, Stig's} script -(included in the compface distribution at XEmacs.org) to do the -conversion. -@comment For convenience xbm2xface is available for anonymous FTP at -@comment @uref{ftp://ftp.miranova.com/pub/xemacs/xbm2xface.pl}. - -Contributors for this item: - -Paul Emsley, -Ricardo Marek, -Amir J. Katz, -Glen McCort, -Heinz Uphoff, -Peter Arius, -Paul Harrison, and -Vegard Vesterheim - -@unnumberedsec 5.1: Reading Mail with VM - -@node Q5.1.1, Q5.1.2, Q5.0.11, Internet -@unnumberedsubsec Q5.1.1: How do I set up VM to retrieve mail from a remote site using POP? - -Use @code{vm-spool-files}, like this for example: - -@lisp -(setq vm-spool-files '("/var/spool/mail/wing" - "netcom23.netcom.com:110:pass:wing:MYPASS")) -@end lisp - -Of course substitute your actual password for MYPASS. - -@node Q5.1.2, Q5.1.3, Q5.1.1, Internet -@unnumberedsubsec Q5.1.2: How can I get VM to automatically check for new mail? - -@email{turner@@lanl.gov, John Turner} writes: - -@quotation -Use the following: - -@lisp -(setq vm-auto-get-new-mail 60) -@end lisp -@end quotation - -@node Q5.1.3, Q5.1.4, Q5.1.2, Internet -@unnumberedsubsec Q5.1.3: I have various addresses at which I receive mail. How can I tell VM to ignore them when doing a "reply-all"? - -Set @code{vm-reply-ignored-addresses} to a list, like - -@lisp -(setq vm-reply-ignored-addresses - '("wing@@nuspl@@nvwls.cc.purdue.edu,netcom[0-9]*.netcom.com" - "wing@@netcom.com" "wing@@xemacs.org")) -@end lisp - -Note that each string is a regular expression. - -@node Q5.1.4, Q5.1.5, Q5.1.3, Internet -@unnumberedsubsec Q5.1.4: Is there a mailing list or FAQ for VM? - -A FAQ for VM exists at @uref{http://www.wonderworks.com/vm/FAQ.html}. - -VM has its own newsgroups gnu.emacs.vm.info and gnu.emacs.vm.bug. - -@node Q5.1.5, Q5.1.6, Q5.1.4, Internet -@unnumberedsubsec Q5.1.5: How do I make VM stay in a single frame? - -John.@email{Cooper@@Eng.Sun.COM, John S Cooper} writes: - -@quotation -@lisp - ; Don't use multiple frames -(setq vm-frame-per-composition nil) -(setq vm-frame-per-folder nil) -(setq vm-frame-per-edit nil) -(setq vm-frame-per-summary nil) -@end lisp -@end quotation - -@node Q5.1.6, Q5.2.1, Q5.1.5, Internet -@unnumberedsubsec Q5.1.6: Customization of VM not covered in the manual, or here. - -@email{boffi@@hp735.stru.polimi.it, giacomo boffi} writes: - -@quotation -The meta-answer is to look into the file @file{vm-vars.el}, in the vm -directory of the lisp library. - -@file{vm-vars.el} contains, initializes and carefully describes, with -examples of usage, the plethora of user options that @emph{fully} -control VM's behavior. - -Enter vm-vars, @code{forward-search} for toolbar, find the variables -that control the toolbar placement, appearance, existence, copy to your -@file{init.el} or @file{.vm} and modify according to the -detailed instructions. - -The above also applies to all the various features of VM: search for -some keywords, maybe the first you conjure isn't appropriate, find the -appropriate variables, copy and experiment. -@end quotation - -@unnumberedsec 5.2: Reading Netnews and Mail with Gnus - -@node Q5.2.1, Q5.2.2, Q5.1.6, Internet -@unnumberedsubsec Q5.2.1: GNUS, (ding) Gnus, Gnus 5, September Gnus, Red Gnus, Quassia Gnus, argh! - -The Gnus numbering issues are not meant for mere mortals to know them. -If you feel you @emph{must} enter the muddy waters of Gnus, visit the -excellent FAQ, maintained by Justin Sheehy, at: - -@example -@uref{http://www.ccs.neu.edu/software/contrib/gnus/} -@end example - -See also Gnus home page -@example -@uref{http://www.gnus.org/} -@end example - -@node Q5.2.2, Q5.3.1, Q5.2.1, Internet -@unnumberedsubsec Q5.2.2: How do I make Gnus stay within a single frame? - -The toolbar code to start Gnus opens the new frame---and it's a feature -rather than a bug. If you don't like it, but would still like to click -on the seemly icon, use the following code: - -@lisp -(defun toolbar-news () - (gnus)) -@end lisp - -It will redefine the callback function of the icon to just call -@code{gnus}, without all the fancy frame stuff. - -@unnumberedsec 5.3: FTP Access - -@node Q5.3.1, Q5.3.2, Q5.2.2, Internet -@unnumberedsubsec Q5.3.1: Can I edit files on other hosts? - -Yes. Of course XEmacs can use any network file system (such as NFS or -Windows file sharing) you have available, and includes some -optimizations and safety features appropriate to those environments. - -It is also possible to transparently edit files via FTP, ssh, or rsh. That -is, XEmacs makes a local copy using the transport in the background, and -automatically refreshes the remote original from that copy when you save -it. XEmacs also is capable of doing file system manipulations like -creating and removing directories and files. The FTP interface is -provided by the standard @samp{efs} package @ref{Top, EFS, , efs}. The -ssh/rsh interface is provided by the optional @samp{tramp} package -@ref{Top, TRAMP, , tramp}. - -@node Q5.3.2, Q5.4.1, Q5.3.1, Internet -@unnumberedsubsec Q5.3.2: What is EFS? - -#### Write me. - -@unnumberedsec 5.4: Web Browsing with W3 - -@node Q5.4.1, Q5.4.2, Q5.3.2, Internet -@unnumberedsubsec Q5.4.1: What is W3? - -W3 is an advanced graphical browser written in Emacs lisp that runs on -XEmacs. It has full support for cascaded style sheets, and more... - -It has a home web page at -@uref{http://www.cs.indiana.edu/elisp/w3/docs.html}. - -@node Q5.4.2, Q5.4.3, Q5.4.1, Internet -@unnumberedsubsec Q5.4.2: How do I run W3 from behind a firewall? - -There is a long, well-written, detailed section in the W3 manual that -describes how to do this. Look in the section entitled "Firewalls". - -@node Q5.4.3, , Q5.4.2, Internet -@unnumberedsubsec Q5.4.3: Is it true that W3 supports style sheets and tables? - -Yes, and much more. W3, as distributed with the latest XEmacs is a -full-featured web browser. - -@node Advanced, Current Events, Internet, Top -@unnumbered 6 Advanced Customization Using XEmacs Lisp - -This is part 6 of the XEmacs Frequently Asked Questions list. This -section is devoted to advanced customization using XEmacs Lisp. - -@menu -6.0: Online Help -* Q6.0.1:: How can I get two instances of info? -* Q6.0.2:: How do I add new Info directories? - -6.1: Emacs Lisp and @file{init.el} -* Q6.1.1:: What version of Emacs am I running? -* Q6.1.2:: How can I evaluate Emacs-Lisp expressions? -* Q6.1.3:: @code{(setq tab-width 6)} behaves oddly. -* Q6.1.4:: How can I add directories to the @code{load-path}? -* Q6.1.5:: How to check if a lisp function is defined? -* Q6.1.6:: Can I force the output of @code{(face-list)} to a buffer? - -6.2: Emacs Lisp Programming Techniques -* Q6.2.1:: What is the difference in key sequences between XEmacs and GNU Emacs? -* Q6.2.2:: Can I generate "fake" keyboard events? -* Q6.2.3:: Could you explain @code{read-kbd-macro} in more detail? -* Q6.2.4:: What is the performance hit of @code{let}? -* Q6.2.5:: What is the recommended use of @code{setq}? -* Q6.2.6:: What is the typical misuse of @code{setq}? -* Q6.2.7:: I like the @code{do} form of cl, does it slow things down? -* Q6.2.8:: I like recursion, does it slow things down? -* Q6.2.9:: How do I put a glyph as annotation in a buffer? -* Q6.2.10:: @code{map-extents} won't traverse all of my extents! -* Q6.2.11:: My elisp program is horribly slow. Is there - -6.3: Mathematics -* Q6.3.1:: What are bignums, ratios, and bigfloats in Lisp? -* Q6.3.2:: XEmacs segfaults when I use very big numbers! -* Q6.3.3:: Bignums are really slow! -* Q6.3.4:: Equal bignums don't compare as equal! What gives? -@end menu - -@unnumberedsec 6.0: Online Help - -@node Q6.0.1, Q6.0.2, Advanced, Advanced -@unnumberedsubsec Q6.0.1: How can I get two instances of info? - -Before 21.4, you can't. The @code{info} package does not provide for -multiple info buffers. In 21.4, this should be fixed. #### how? - -@node Q6.0.2, Q6.1.1, Q6.0.1, Advanced -@unnumberedsubsec Q6.0.2: How do I add new Info directories? - -You use something like: - -@lisp -(setq Info-directory-list (cons - (expand-file-name "~/info") - Info-default-directory-list)) -@end lisp - -@email{davidm@@prism.kla.com, David Masterson} writes: - -@quotation -Emacs Info and XEmacs Info do many things differently. If you're trying to -support a number of versions of Emacs, here are some notes to remember: - -@enumerate -@item -Emacs Info scans @code{Info-directory-list} from right-to-left while -XEmacs Info reads it from left-to-right, so append to the @emph{correct} -end of the list. - -@item -Use @code{Info-default-directory-list} to initialize -@code{Info-directory-list} @emph{if} it is available at startup, but not -all Emacsen define it. - -@item -Emacs Info looks for a standard @file{dir} file in each of the -directories scanned from #1 and magically concatenates them together. - -@item -XEmacs Info looks for a @file{localdir} file (which consists of just the -menu entries from a @file{dir} file) in each of the directories scanned -from #1 (except the first), does a simple concatenation of them, and -magically attaches the resulting list to the end of the menu in the -@file{dir} file in the first directory. -@end enumerate - -Another alternative is to convert the documentation to HTML with -texi2html and read it from a web browser like Lynx or W3. -@end quotation - -@unnumberedsec 6.1: Emacs Lisp and @file{init.el} - -@node Q6.1.1, Q6.1.2, Q6.0.2, Advanced -@unnumberedsubsec Q6.1.1: What version of Emacs am I running? - -How can @file{init.el} determine which of the family of -Emacsen I am using? - -To determine if you are currently running GNU Emacs 18, GNU Emacs 19, -XEmacs 19, XEmacs 20, or Epoch, and use appropriate code, check out the -example given in @file{etc/sample.init.el} (@file{etc/sample.emacs} in -XEmacs versions prior to 21.4). There are other nifty things in there -as well! - -For all new code, all you really need to do is: - -@lisp -(defvar running-xemacs (string-match "XEmacs\\|Lucid" emacs-version)) -@end lisp - -@node Q6.1.2, Q6.1.3, Q6.1.1, Advanced -@unnumberedsubsec Q6.1.2: How can I evaluate Emacs-Lisp expressions? - -I know I can evaluate Elisp expressions from @code{*scratch*} buffer -with @kbd{C-j} after the expression. How do I do it from another -buffer? - -Press @kbd{M-:} (the default binding of @code{eval-expression}), and -enter the expression to the minibuffer. - -@node Q6.1.3, Q6.1.4, Q6.1.2, Advanced -@unnumberedsubsec Q6.1.3: @code{(setq tab-width 6)} behaves oddly. - -If you put @code{(setq tab-width 6)} in your -@file{init.el} file it does not work! Is there a reason -for this? If you do it at the EVAL prompt it works fine!! How strange. - -Use @code{setq-default} instead, since @code{tab-width} is -all-buffer-local. - -@node Q6.1.4, Q6.1.5, Q6.1.3, Advanced -@unnumberedsubsec Q6.1.4: How can I add directories to the @code{load-path}? - -Here are two ways to do that, one that puts your directories at the -front of the load-path, the other at the end: - -@lisp -;;; Add things at the beginning of the load-path, do not add -;;; duplicate directories: -(pushnew "bar" load-path :test 'equal) - -(pushnew "foo" load-path :test 'equal) - -;;; Add things at the end, unconditionally -(setq load-path (nconc load-path '("foo" "bar"))) -@end lisp - -@email{keithh@@nortel.ca, keith (k.p.) hanlan} writes: - -@quotation -To add directories using Unix shell metacharacters use -@file{expand-file-name} like this: - -@lisp -(push (expand-file-name "~keithh/.emacsdir") load-path) -@end lisp -@end quotation - -@node Q6.1.5, Q6.1.6, Q6.1.4, Advanced -@unnumberedsubsec Q6.1.5: How to check if a lisp function is defined? - -Use the following elisp: - -@lisp -(fboundp 'foo) -@end lisp - -It's almost always a mistake to test @code{emacs-version} or any similar -variables. - -Instead, use feature-tests, such as @code{featurep}, @code{boundp}, -@code{fboundp}, or even simple behavioral tests, eg.: - -@lisp -(defvar foo-old-losing-code-p - (condition-case nil (progn (losing-code t) nil) - (wrong-number-of-arguments t))) -@end lisp - -There is an incredible amount of broken code out there which could work -much better more often in more places if it did the above instead of -trying to divine its environment from the value of one variable. - -@node Q6.1.6, Q6.2.1, Q6.1.5, Advanced -@unnumberedsubsec Q6.1.6: Can I force the output of @code{(face-list)} to a buffer? - -It would be good having it in a buffer, as the output of -@code{(face-list)} is too wide to fit to a minibuffer. - -Evaluate the expression in the @samp{*scratch*} buffer with point after -the rightmost paren and typing @kbd{C-j}. - -If the minibuffer smallness is the only problem you encounter, you can -simply press @kbd{C-h l} to get the former minibuffer contents in a -buffer. - -@unnumberedsec 6.2: Emacs Lisp Programming Techniques - -@node Q6.2.1, Q6.2.2, Q6.1.6, Advanced -@unnumberedsubsec Q6.2.1: What is the difference in key sequences between XEmacs and GNU Emacs? - -@email{clerik@@naggum.no, Erik Naggum} writes; - -@quotation -Emacs has a legacy of keyboards that produced characters with modifier -bits, and therefore map a variety of input systems into this scheme even -today. XEmacs is instead optimized for X events. This causes an -incompatibility in the way key sequences are specified, but both Emacs -and XEmacs will accept a key sequence as a vector of lists of modifiers -that ends with a key, e.g., to bind @kbd{M-C-a}, you would say -@code{[(meta control a)]} in both Emacsen. XEmacs has an abbreviated -form for a single key, just (meta control a). Emacs has an abbreviated -form for the Control and the Meta modifiers to string-characters (the -ASCII characters), as in @samp{\M-\C-a}. XEmacs users need to be aware -that the abbreviated form works only for one-character key sequences, -while Emacs users need to be aware that the string-character is rather -limited. Specifically, the string-character can accommodate only 256 -different values, 128 of which have the Meta modifier and 128 of which -have not. In each of these blocks, only 32 characters have the Control -modifier. Whereas @code{[(meta control A)]} differs from @code{[(meta -control a)]} because the case differs, @samp{\M-\C-a} and @samp{\M-\C-A} -do not. Programmers are advised to use the full common form, both -because it is more readable and less error-prone, and because it is -supported by both Emacsen. -@end quotation - -Another (even safer) way to be sure of the key-sequences is to use the -@code{read-kbd-macro} function, which takes a string like @samp{C-c -<up>}, and converts it to the internal key representation of the Emacs -you use. The function is available both on XEmacs and GNU Emacs. - -@node Q6.2.2, Q6.2.3, Q6.2.1, Advanced -@unnumberedsubsec Q6.2.2: Can I generate "fake" keyboard events? - -I wonder if there is an interactive function that can generate -@dfn{fake} keyboard events. This way, I could simply map them inside -XEmacs. - -This seems to work: - -@lisp -(defun cg--generate-char-event (ch) - "Generate an event, as if ch has been typed" - (dispatch-event (character-to-event ch))) - -;; Backspace and Delete stuff -(global-set-key [backspace] - (lambda () (interactive) (cg--generate-char-event 127))) -(global-set-key [unknown_keysym_0x4] - (lambda () (interactive) (cg--generate-char-event 4))) -@end lisp - -@node Q6.2.3, Q6.2.4, Q6.2.2, Advanced -@unnumberedsubsec Q6.2.3: Could you explain @code{read-kbd-macro} in more detail? - -The @code{read-kbd-macro} function returns the internal Emacs -representation of a human-readable string (which is its argument). -Thus: - -@lisp -(read-kbd-macro "C-c C-a") -@result{} [(control ?c) (control ?a)] - -(read-kbd-macro "C-c C-. <up>") -@result{} [(control ?c) (control ?.) up] -@end lisp - -In GNU Emacs the same forms will be evaluated to what GNU Emacs -understands internally---the sequences @code{"\C-x\C-c"} and @code{[3 -67108910 up]}, respectively. - -The exact @dfn{human-readable} syntax is defined in the docstring of -@code{edmacro-mode}. I'll repeat it here, for completeness. - -@quotation -Format of keyboard macros during editing: - -Text is divided into @dfn{words} separated by whitespace. Except for -the words described below, the characters of each word go directly as -characters of the macro. The whitespace that separates words is -ignored. Whitespace in the macro must be written explicitly, as in -@kbd{foo @key{SPC} bar @key{RET}}. - -@itemize @bullet -@item -The special words @kbd{RET}, @kbd{SPC}, @kbd{TAB}, @kbd{DEL}, @kbd{LFD}, -@kbd{ESC}, and @kbd{NUL} represent special control characters. The -words must be written in uppercase. - -@item -A word in angle brackets, e.g., @code{<return>}, @code{<down>}, or -@code{<f1>}, represents a function key. (Note that in the standard -configuration, the function key @code{<return>} and the control key -@key{RET} are synonymous.) You can use angle brackets on the words -@key{RET}, @key{SPC}, etc., but they are not required there. - -@item -Keys can be written by their @sc{ascii} code, using a backslash followed -by up to six octal digits. This is the only way to represent keys with -codes above \377. - -@item -One or more prefixes @kbd{M-} (meta), @kbd{C-} (control), @kbd{S-} -(shift), @kbd{A-} (alt), @kbd{H-} (hyper), and @kbd{s-} (super) may -precede a character or key notation. For function keys, the prefixes -may go inside or outside of the brackets: @code{C-<down>} @equiv{} -@code{<C-down>}. The prefixes may be written in any order: @kbd{M-C-x} -@equiv{} @kbd{C-M-x}. - -Prefixes are not allowed on multi-key words, e.g., @kbd{C-abc}, except -that the Meta prefix is allowed on a sequence of digits and optional -minus sign: @kbd{M--123} @equiv{} @kbd{M-- M-1 M-2 M-3}. - -@item -The @code{^} notation for control characters also works: @kbd{^M} -@equiv{} @kbd{C-m}. - -@item -Double angle brackets enclose command names: @code{<<next-line>>} is -shorthand for @kbd{M-x next-line @key{RET}}. - -@item -Finally, @code{REM} or @code{;;} causes the rest of the line to be -ignored as a comment. -@end itemize - -Any word may be prefixed by a multiplier in the form of a decimal number -and @code{*}: @code{3*<right>} @equiv{} @code{<right> <right> <right>}, -and @code{10*foo} @equiv{} -@iftex -@* -@end iftex -@code{foofoofoofoofoofoofoofoofoofoo}. - -Multiple text keys can normally be strung together to form a word, but -you may need to add whitespace if the word would look like one of the -above notations: @code{; ; ;} is a keyboard macro with three semicolons, -but @code{;;;} is a comment. Likewise, @code{\ 1 2 3} is four keys but -@code{\123} is a single key written in octal, and @code{< right >} is -seven keys but @code{<right>} is a single function key. When in doubt, -use whitespace. -@end quotation - -@node Q6.2.4, Q6.2.5, Q6.2.3, Advanced -@unnumberedsubsec Q6.2.4: What is the performance hit of @code{let}? - -In most cases, not noticeable. Besides, there's no avoiding -@code{let}---you have to bind your local variables, after all. Some -pose a question whether to nest @code{let}s, or use one @code{let} per -function. I think because of clarity and maintenance (and possible -future implementation), @code{let}-s should be used (nested) in a way to -provide the clearest code. - -@node Q6.2.5, Q6.2.6, Q6.2.4, Advanced -@unnumberedsubsec Q6.2.5: What is the recommended use of @code{setq}? - -@itemize @bullet -@item Global variables - -You will typically @code{defvar} your global variable to a default -value, and use @code{setq} to set it later. - -It is never a good practice to @code{setq} user variables (like -@code{case-fold-search}, etc.), as it ignores the user's choice -unconditionally. Note that @code{defvar} doesn't change the value of a -variable if it was bound previously. If you wish to change a -user-variable temporarily, use @code{let}: - -@lisp -(let ((case-fold-search nil)) - ... ; code with searches that must be case-sensitive - ...) -@end lisp - -You will notice the user-variables by their docstrings beginning with an -asterisk (a convention). - -@item Local variables - -Bind them with @code{let}, which will unbind them (or restore their -previous value, if they were bound) after exiting from the @code{let} -form. Change the value of local variables with @code{setq} or whatever -you like (e.g. @code{incf}, @code{setf} and such). The @code{let} form -can even return one of its local variables. - -Typical usage: - -@lisp -;; iterate through the elements of the list returned by -;; `hairy-function-that-returns-list' -(let ((l (hairy-function-that-returns-list))) - (while l - ... do something with (car l) ... - (setq l (cdr l)))) -@end lisp - -Another typical usage includes building a value simply to work with it. - -@lisp -;; Build the mode keymap out of the key-translation-alist -(let ((inbox (file-truename (expand-file-name box))) - (i 0)) - ... code dealing with inbox ... - inbox) -@end lisp - -This piece of code uses the local variable @code{inbox}, which becomes -unbound (or regains old value) after exiting the form. The form also -returns the value of @code{inbox}, which can be reused, for instance: - -@lisp -(setq foo-processed-inbox - (let .....)) -@end lisp -@end itemize - -@node Q6.2.6, Q6.2.7, Q6.2.5, Advanced -@unnumberedsubsec Q6.2.6: What is the typical misuse of @code{setq}? - -A typical misuse is probably @code{setq}ing a variable that was meant to -be local. Such a variable will remain bound forever, never to be -garbage-collected. For example, the code doing: - -@lisp -(defun my-function (whatever) - (setq a nil) - ... build a large list ... - ... and exit ...) -@end lisp - -does a bad thing, as @code{a} will keep consuming memory, never to be -unbound. The correct thing is to do it like this: - -@lisp -(defun my-function (whatever) - (let (a) ; default initialization is to nil - ... build a large list ... - ... and exit, unbinding `a' in the process ...) -@end lisp - -Not only is this prettier syntactically, but it makes it possible for -Emacs to garbage-collect the objects which @code{a} used to reference. - -Note that even global variables should not be @code{setq}ed without -@code{defvar}ing them first, because the byte-compiler issues warnings. -The reason for the warning is the following: - -@lisp -(defun flurgoze nil) ; ok, global internal variable -... - -(setq flurghoze t) ; ops! a typo, but semantically correct. - ; however, the byte-compiler warns. - -While compiling toplevel forms: -** assignment to free variable flurghoze -@end lisp - -@node Q6.2.7, Q6.2.8, Q6.2.6, Advanced -@unnumberedsubsec Q6.2.7: I like the @code{do} form of cl, does it slow things down? - -It shouldn't. Here is what Dave Gillespie has to say about cl.el -performance: - -@quotation -Many of the advanced features of this package, such as @code{defun*}, -@code{loop}, and @code{setf}, are implemented as Lisp macros. In -byte-compiled code, these complex notations will be expanded into -equivalent Lisp code which is simple and efficient. For example, the -forms - -@lisp -(incf i n) -(push x (car p)) -@end lisp - -are expanded at compile-time to the Lisp forms - -@lisp -(setq i (+ i n)) -(setcar p (cons x (car p))) -@end lisp - -which are the most efficient ways of doing these respective operations -in Lisp. Thus, there is no performance penalty for using the more -readable @code{incf} and @code{push} forms in your compiled code. - -@emph{Interpreted} code, on the other hand, must expand these macros -every time they are executed. For this reason it is strongly -recommended that code making heavy use of macros be compiled. (The -features labelled @dfn{Special Form} instead of @dfn{Function} in this -manual are macros.) A loop using @code{incf} a hundred times will -execute considerably faster if compiled, and will also garbage-collect -less because the macro expansion will not have to be generated, used, -and thrown away a hundred times. - -You can find out how a macro expands by using the @code{cl-prettyexpand} -function. -@end quotation - -@node Q6.2.8, Q6.2.9, Q6.2.7, Advanced -@unnumberedsubsec Q6.2.8: I like recursion, does it slow things down? - -Yes. The Emacs byte-compiler cannot do much to optimize recursion. But -think well whether this is a real concern in Emacs. Much of the Emacs -slowness comes from internal mechanisms such as redisplay, or from the -fact that it is an interpreter. - -Please try not to make your code much uglier to gain a very small speed -gain. It's not usually worth it. - -@node Q6.2.9, Q6.2.10, Q6.2.8, Advanced -@unnumberedsubsec Q6.2.9: How do I put a glyph as annotation in a buffer? - -Here is a solution that will insert the glyph annotation at the -beginning of buffer: - -@lisp -(make-annotation (make-glyph '([FORMAT :file FILE] - [string :data "fallback-text"])) - (point-min) - 'text - (current-buffer)) -@end lisp - -Replace @samp{FORMAT} with an unquoted symbol representing the format of -the image (e.g. @code{xpm}, @code{xbm}, @code{gif}, @code{jpeg}, etc.) -Instead of @samp{FILE}, use the image file name -(e.g. -@iftex -@* -@end iftex -@file{/usr/local/lib/xemacs-21.4/etc/recycle.xpm}). - -You can turn this to a function (that optionally prompts you for a file -name), and inserts the glyph at @code{(point)} instead of -@code{(point-min)}. - -@node Q6.2.10, Q6.2.11, Q6.2.9, Advanced -@unnumberedsubsec Q6.2.10: @code{map-extents} won't traverse all of my extents! - -I tried to use @code{map-extents} to do an operation on all the extents -in a region. However, it seems to quit after processing a random number -of extents. Is it buggy? - -No. The documentation of @code{map-extents} states that it will iterate -across the extents as long as @var{function} returns @code{nil}. -Unexperienced programmers often forget to return @code{nil} explicitly, -which results in buggy code. For instance, the following code is -supposed to delete all the extents in a buffer, and issue as many -@samp{fubar!} messages. - -@lisp -(map-extents (lambda (ext ignore) - (delete-extent ext) - (message "fubar!"))) -@end lisp - -Instead, it will delete only the first extent, and stop right there -- -because @code{message} will return a non-nil value. The correct code -is: - -@lisp -(map-extents (lambda (ext ignore) - (delete-extent ext) - (message "fubar!") - nil)) -@end lisp - -@node Q6.2.11, Q6.3.1, Q6.2.10, Advanced -@unnumberedsubsec Q6.2.11: My elisp program is horribly slow. Is there -an easy way to find out where it spends time? -@c New - -@email{hniksic@@xemacs.org, Hrvoje Niksic} writes: -@quotation -Under XEmacs 20.4 and later you can use @kbd{M-x profile-key-sequence}, -press a key (say @key{RET} in the Gnus Group buffer), and get the -results using @kbd{M-x profile-results}. It should give you an idea of -where the time is being spent. -@end quotation - -@unnumberedsec 6.3: Mathematics - -@node Q6.3.1, Q6.3.2, Q6.2.11, Advanced -@unnumberedsubsec Q6.3.1: What are bignums, ratios, and bigfloats in Lisp? - -Thanks to @email{james@@xemacs.org, Jerry James}, XEmacs 21.5.18 and -later can use the capabilities of multiple-precision libraries that may -be available for your platform. The GNU Multiple Precision (GMP) and -BSD Multiple Precision (MP) libraries are partially supported. GMP -gives you @dfn{bignums} (arbitrary precision integers), @dfn{ratios} -(arbitrary precision fractions), and @dfn{bigfloats} (arbitrary -precision floating point numbers). GNU MP is better-supported by XEmacs -at the time of writing (2004-04-06). BSD MP support does not include -ratios or bigfloats, and it throws errors that aren't understood. - -In most cases, bignum support should be transparent to users and Lisp -programmers. A bignum-enabled XEmacs will automatically convert from -fixnums to bignums and back in pure integer arithmetic, and for GNU MP, -from floats to bigfloats. (Bigfloats must be explicitly coerced to -other types, even if they are exactly representable by less precise -types.) The Lisp reader and printer have been enhanced to handle -bignums, as have the mathematical functions. Rationals (fixnums, -bignums, and ratios) are printed using the @samp{%d}, @samp{%o}, -@samp{%x}, and @samp{%u} format conversions. The read syntax for ratios -is @samp{3/5}. - -User-visible changes in behavior include (in probable order of annoyance) - -@itemize -@item -Arithmetic can cause a segfault, depending on your MP library -@ref{Q6.3.2, XEmacs segfaults when I use very big numbers!}. - -@item -Terminology is not Common-Lisp-conforming. For example, ``integer'' for -Emacs Lisp means what Common Lisp calls ``fixnum''. This issue is being -investigated, but the use of ``integer'' for fixnum is pervasive and may -cause backward-compatibility and GNU-Emacs-compatibility problems. - -@item -Many operations that used to cause a range error now succeed, with -intermediate results and return values coerced to bignums as needed. - -@item -An atom with ratio read syntax now returns a number, not a symbol. - -@item -The @samp{%u} format conversion will now give an error if its argument -is negative. (Without MP, it prints a number which Lisp can't read.) -@end itemize - -@emph{Surgeon General's Warning}: The automatic conversions cannot be -disabled at runtime. New functions have been added which produce -ratios, so there should be few surprises with type conflicts, but they -can't be ruled out. ``Arbitrary'' precision means precisely what it -says. If you work with extremely large numbers, your machine may -arbitrarily decide to hand you an unpleasant surprise rather than a -bignum @ref{Q6.3.2, XEmacs segfaults when I use very big numbers!}. - -To configure with GNU MP, add -@samp{--use-number-lib=gmp} -to your invocation of @file{configure}. For BSD MP, use -@samp{--use-number-lib=mp}. - -If you would like to help with bignum support, especially on BSD MP, -please subscribe to the @uref{http://www.xemacs.org/Lists/#xemacs-beta, -XEmacs Beta mailing list}, and book up on @file{number-gmp.h} and -@file{number-mp.h}. Jerry has promised to write internals documentation -eventually, but if your skills run more to analysis and documentation -than to writing new code, feel free to fill in the gap! - - -@node Q6.3.2, Q6.3.3, Q6.3.1, Advanced -@unnumberedsubsec Q6.3.2: XEmacs segfaults when I use very big numbers! - -GMP by default allocates temporaries on the stack. If you run out of -stack space, you're dead; there is no way that we know of to reliably -detect this condition, because @samp{alloca} is typically implemented to -be @emph{fast} rather than robust. If you just need a little more -oomph, use a bigger stack (@emph{e.g.}, the @file{ulimit -s} command in -bash(1)). If you want robustness at the cost of speed, configure GMP -with @samp{--disable-alloca} and rebuild the GMP library. - -We do not know whether BSD MP uses @samp{alloca} or not. Please send -any information you have as a bug report (@kbd{M-x report-xemacs-bug -@key{RET}}), which will give us platform information. (We do know that -BSD MP implementations vary across vendors, but how much, we do not know -yet.) - - -@node Q6.3.3, Q6.3.4, Q6.3.2, Advanced -@unnumberedsubsec Q6.3.3: Bignums are really slow! - -Many Linux distributions compile all their packages for the i386, and -this is costly. An optimized version can give you two or three orders -of magnitude better performance for a Pentium III or IV. (Yes, really. -See @uref{http://www.swox.com/gmp/gmp-speed.html}.) - - -@node Q6.3.4, , Q6.3.3, Advanced -@unnumberedsubsec Q6.3.4: Equal bignums don't compare as equal! What gives? - -Ah, Grasshopper, I see you are using @code{(eq x y)}. The Bodhisattva -CLTL2 warned of the illusion that equal numbers would be @samp{eq}! -Meditate on the deeper truths of @samp{eql}, in which numbers of the same -type which have equal values compare equal, and @samp{=}, which does any -necessary type coercions before comparing for equality. - -Yeah, yeah, it has always worked for integer types, because fixnums and -characters have an immediate representation. Sorry about that; -arbitrary precision obviously requires consing new objects because the -objects are ``large'' and of variable size, and the definition of -@samp{eq} does not permit different objects to compare as equal. - -@node Current Events, Legacy Versions, Advanced, Top -@unnumbered 7 What the Future Holds - -This is part 7 of the XEmacs Frequently Asked Questions list. This +@node Current Events, Legacy Versions, Other Packages, Top +@unnumbered 9 What the Future Holds + +This is part 9 of the XEmacs Frequently Asked Questions list. This section will change frequently, and (in theory) should contain any interesting items that have transpired recently. (But in practice it's not getting updated like this.) @@ -7204,26 +7009,24 @@ Information on older versions of XEmacs can be find in @file{ONEWS} in the same directory, or @file{OONEWS} for really old versions. - @menu -7.0: Changes -* Q7.0.1:: What new features will be in XEmacs soon? -* Q7.0.2:: What's new in XEmacs 21.4? -* Q7.0.3:: What's new in XEmacs 21.1? -* Q7.0.4:: What's new in XEmacs 20.4? -* Q7.0.5:: What's new in XEmacs 20.3? -* Q7.0.6:: What's new in XEmacs 20.2? +* Q9.0.1:: What new features will be in XEmacs soon? +* Q9.0.2:: What's new in XEmacs 21.4? +* Q9.0.3:: What's new in XEmacs 21.1? +* Q9.0.4:: What's new in XEmacs 20.4? +* Q9.0.5:: What's new in XEmacs 20.3? +* Q9.0.6:: What's new in XEmacs 20.2? @end menu -@unnumberedsec 7.0: Changes - -@node Q7.0.1, Q7.0.2, Current Events, Current Events -@unnumberedsubsec Q7.0.1: What new features will be in XEmacs soon? +@unnumberedsec 9.0: Changes + +@node Q9.0.1, Q9.0.2, Current Events, Current Events +@unnumberedsubsec Q9.0.1: What new features will be in XEmacs soon? #### Write me. -@node Q7.0.2, Q7.0.3, Q7.0.1, Current Events -@unnumberedsubsec Q7.0.2: What's new in XEmacs 21.4? +@node Q9.0.2, Q9.0.3, Q9.0.1, Current Events +@unnumberedsubsec Q9.0.2: What's new in XEmacs 21.4? 21.4 was the "stable" version of the 21.2 series, which was considered "experimental" throughout its life; thus there were no "official" @@ -7344,11 +7147,11 @@ @c @itemize @bullet @c @end itemize -@node Q7.0.3, Q7.0.4, Q7.0.2, Current Events -@unnumberedsubsec Q7.0.3: What's new in XEmacs 21.1? +@node Q9.0.3, Q9.0.4, Q9.0.2, Current Events +@unnumberedsubsec Q9.0.3: What's new in XEmacs 21.1? 21.1 was the "stable" version of "experimental" 21.0 series. -@xref{Q7.0.2, What's new in XEmacs 21.4?}. +@xref{Q9.0.2, What's new in XEmacs 21.4?}. The following lists summarizes the essential changes made in this version. For a fuller list, see the @file{NEWS} in the @file{etc} @@ -7360,7 +7163,7 @@ @itemize @bullet @item -XEmacs is now supported under Microsoft Windows 95/98/ME and Windows +XEmacs is now supported under Microsoft Windows 95/98 and Windows NT/2000/XP operating systems. To discuss Windows-specific issues, subscribe to the mailing list at @email{xemacs-winnt-request@@xemacs.org}. @@ -7483,14 +7286,14 @@ @end itemize -@node Q7.0.4, Q7.0.5, Q7.0.3, Current Events -@unnumberedsubsec Q7.0.4: What's new in XEmacs 20.4? +@node Q9.0.4, Q9.0.5, Q9.0.3, Current Events +@unnumberedsubsec Q9.0.4: What's new in XEmacs 20.4? XEmacs 20.4 is a bugfix release with no user-visible changes. @c Filled in from NEWS file of 20.5-b33 -@node Q7.0.5, Q7.0.6, Q7.0.4, Current Events -@unnumberedsubsec Q7.0.5: What's new in XEmacs 20.3? +@node Q9.0.5, Q9.0.6, Q9.0.4, Current Events +@unnumberedsubsec Q9.0.5: What's new in XEmacs 20.3? XEmacs 20.3 was released in November 1997. It contains many bugfixes, and a number of new features, including Autoconf 2 based configuration, @@ -7509,8 +7312,8 @@ XEmacs 20.3 is the first non-beta v20 release, and will be the basis for all further development. -@node Q7.0.6, , Q7.0.5, Current Events -@unnumberedsubsec Q7.0.6: What's new in XEmacs 20.2? +@node Q9.0.6, , Q9.0.5, Current Events +@unnumberedsubsec Q9.0.6: What's new in XEmacs 20.2? The biggest changes in 20.2 include integration of EFS (the next generation of ange-ftp) and AUC Tex (the Emacs subsystem that includes a @@ -7526,9 +7329,9 @@ the XEmacs distribution. @node Legacy Versions, , Current Events, Top -@unnumbered 8 New information about old XEmacsen - -This is part 8 of the XEmacs Frequently Asked Questions list. It will +@unnumbered 10 New information about old XEmacsen + +This is part 10 of the XEmacs Frequently Asked Questions list. It will occasionally be updated to reflect new information about versions which are no longer being revised by the XEmacs Project. The primary purpose is advice on compatibility of older XEmacsen with new packages and @@ -7536,13 +7339,13 @@ to released XEmacsen, but users can apply themselves) are also accepted. @menu -* Q8.0.1:: Gnus 5.10 won't display smileys in XEmacs 21.1. +* Q10.0.1:: Gnus 5.10 won't display smileys in XEmacs 21.1. @end menu -@unnumberedsec 8.0: XEmacs 21.1 - -@node Q8.0.1, , Legacy Versions, Legacy Versions -@unnumberedsubsec Q8.0.1: Gnus 5.10 won't display smileys in XEmacs 21.1. +@unnumberedsec 10.0: XEmacs 21.1 + +@node Q10.0.1, , Legacy Versions, Legacy Versions +@unnumberedsubsec Q10.0.1: Gnus 5.10 won't display smileys in XEmacs 21.1. @email{eeide@@cs.utah.edu, Eric Eide} wrote: