📄 faq
字号:
This is a list of frequently asked questions (FAQ) about GNU Emacs withanswers. This list is designed to cut down on the noise in thegnu.emacs.help newsgroup (which is also the help-gnu-emacs mailing list)that results from people repeatedly asking many of the same questions.This list is maintained by me, Joe Wells. My e-mail address isjbw@bu.edu. If jbw@bu.edu doesn't work try jbw@bucsf.bu.edu.Feel free to contribute text for the answers that I haven't written yet,to suggest new questions, to suggest changes in the wording, to suggestdeletions, etc. Please include either "FAQ" or "frequently askedquestions" in the subject of messages you send to me to help keep me fromaccidentally filing your message in the wrong mail folder.Here is a short list of new questions and questions that are now answered:New questions: Why doesn't "C-c C-c" interrupt subprocesses under HP/UX? How do I make Emacs send 8-bit characters to my terminal? Why does ispell sometimes ignore the local dictionary? Where can I get Emacs with NeWS support?Questions with improved answers: Has someone written an GNU Emacs Lisp package that does XXX? How do I get Emacs running on VMS under DECwindows? Why does Emacs crash from a bus error in XLookupString under OpenLook? Why does Emacs hang with message "Unknown XMenu" with X11R4? How do I use regexps (regular expressions) in Emacs? How do I make Emacs "typeover" or "overwrite" when I type instead of always inserting? How do I get Emacs for my PC? How can I highlight a region? Where can I get GNU Emacs Lisp packages that don't come with Emacs? Where can I get the latest VM, Supercite, GNUS, Calc, Calendar, or Patch?Minor changes: Where does the name "Emacs" come from? In C mode, can I show just the lines that will be left after #ifdef commands are handled by the compiler? What does "M-x command" mean? How do I get a printed copy of the GNU Emacs manual? What do things like this mean: C-h, M-C-a, RET, etc.? Why doesn't GNUS work anymore via NNTP? What does Emacs do every time it starts up? Enjoy,-- Joe Wells <jbw@bu.edu>-------------------------------------------------GNU Emacs Frequently Asked Questions with Answers (part 1 of 2)Sat Dec 8 01:30:53 1990If you are viewing this file in a GNU Emacs Buffer, you can type "M-2 C-x$" to get an overview of just the questions. Then, when you want to lookat the text of the answers, just type "C-x $".To search for a question numbered XXX, type "M-C-s ^XXX:", followed by aC-r if that doesn't work, then type ESC to end the search.Notation Used in the Answers (READ THIS SECTION FIRST!) You may skip this section if you are reasonably familiar with GNU Emacs. Some of these are not actually frequently asked questions, but knowing them is important for understanding the answers to the rest of the questions.1: What do things like this mean: C-h, M-C-a, RET, etc.? C-a means while holding down the "Control" key press the "a" key. The ASCII code this sends will generally be the value that would be sent by pressing just "a" minus 96 or 64. Either way it will be a number from 0 to 31. M-a means while holding down the "Meta" key press the "a" key. The ASCII code this sends is the sum of the ASCII code that would be sent by pressing just "a" and 128. M-C-a means while holding down both the "Control" key and the "Meta" key press the "a" key. C-M-a is a synonym for M-C-a. RET means press the "Return" key. RET is the same as C-m. This sends ASCII code 13. LFD means press the "Linefeed" key. LFD is also the same as C-j. This sends ASCII code 10. Under Unix, ASCII code 10 is more often called "Newline". DEL means press the "Delete" key. DEL is the same as C-?. This sends ASCII code 127. ESC means press the "Escape" key. ESC is the same as C-[. This sends ASCII code 27. SPC means press the "Space" key. This send ASCII code 32. TAB means press the "Tab" key. TAB is the same as C-i. This send ASCII code 9. To read more about this online, type "C-h i m emacs RET m characters RET", and also "C-h i m emacs RET m keys RET". 2: What do you mean when you write things like this: type "ESC a"? I will enclose key sequences that are longer than one key inside double quotes. These notations refer to single keys (some with modifiers): C-x, M-x, M-C-x RET, LFD, DEL, ESC, SPC, TAB I separate these from other keys within double quotes by spaces. Any real spaces that I write inside double quotes can be ignored, only SPC means press the space key. All other characters within double quotes represent single keys (some shifted). 3: What if I don't have a Meta key? Instead of typing M-a, you can type "ESC a" instead. In fact, Emacs converts M-a internally into "ESC a" anyway. 4: What if I don't have an Escape key? Type C-[ instead. This should send ASCII code 27 just like an Escape key would. 5: What does "M-x command" mean? "M-x command" means type M-x, then type the name of the command, then type RET. M-x is simply the default key sequence that invokes the command "execute-extended-command". This command allows you to run any Emacs command if you can remember the command's name. If you can't remember the command's name, you can type TAB and SPC for completion, and ? for a list of possibilities. An Emacs "command" is any "interactive" Emacs function. NOTE: Your system administrator may have bound other key sequences to invoke execute-extended-command. A function key labeled "Do" is a good candidate for this. To run non-interactive Emacs functions, use M-ESC instead and type a Lisp form. 6: What do things like this mean: etc/SERVICE, src/config.h, lisp/default.el? These are the names of files that are part of the GNU Emacs distribution. The GNU Emacs distribution is so big that it is divided into several subdirectories; the important subdirectories are named "etc", "lisp", and "src". If you use GNU Emacs, but don't know where it is kept on your system, start Emacs, then type "C-h v exec-directory RET". The directory name that is displayed by this will be the full pathname of the "etc" directory of your installed GNU Emacs distribution. Some of these files are available individually via FTP or e-mail, see question 16. 7: What are FSF, LPF, OSF, GNU, RMS, FTP, BTW, and GPL? FSF == Free Software Foundation LPF == League for Programming Freedom OSF == Open Software Foundation GNU == GNU's Not Unix RMS == Richard M. Stallman FTP == File Transfer Protocol BTW == By the way GPL == GNU General Public Licence NOTE: Avoid confusing the FSF, the LPF, and the OSF. The LPF only opposes look-and-feel copyrights and software patents. The FSF aims to make high quality free software available for everyone. The OSF is a commercial organization which wants to provide an alternative, standardized version of Unix not controlled by AT&T. Sources of Information and Help8: I'm just starting GNU Emacs; how do I do basic editing? Type "C-h t" to invoke the self-paced tutorial. Typing just C-h is how to enter the help system. WARNING: your system administrator may have changed C-h to act like DEL. You can use M-x help-for-help instead to invoke help. To discover what key (if any) invokes help on your system, type "M-x where-is RET help-for-help RET". This will print a comma-separated list of key sequences in the echo area. Ignore the last character in each key sequence listed. Each of the resulting key sequences invokes help. NOTE: Emacs's help facility works best if help is invoked by a single key. The variable help-char should hold the value of this character. 9: How do I find out how to do something in GNU Emacs? There are several methods for finding out how to do things in Emacs. You should become familiar with the online documentation for Emacs. The complete text of the Emacs manual is available online in a hypertext format via the "Info" manual reader. Type "C-h i" to invoke Info. You can order a hardcopy of the manual from the FSF. See question 12. You can list all of the commands whose names contain a certain word (actually which match a regular expression) using the "command-apropos" command. Type "C-h a" to invoke this command. You can list all of the functions and variables whose names contain a certain word using the "apropos" command. M-x apropos invokes this command. You may find that command-apropos and apropos are extremely slow on your system. This will be fixed in Emacs 19. If you can't wait that long, I can send you the "fast-apropos.el" file that contains the fix. This file also contains a "super-apropos" command that will list all the functions and variables whose documentation strings contain a certain word. There are many other commands in Emacs for getting help and information. To get a list of these commands, type "C-h C-h C-h". 10: Where can I get GNU Emacs on the net (or by snail mail)? Look in the files etc/DISTRIB and etc/FTP for information. If you don't already have GNU Emacs, see question 16. 11: Where can I get help in installing GNU Emacs? Look in the file etc/SERVICE for names of companies and individuals who will sell you this type of service. This file in the version 18.55 distribution is not completely up to date. The imminent release of 18.56 will help that. An up-to-date version of the SERVICE file is available on prep.ai.mit.edu. See question 16 for how to retrieve this file. 12: How do I get a printed copy of the GNU Emacs manual? You can order a printed copy of the GNU Emacs manual from the FSF for $15. A set of 6 manuals is $60. The full TeX source for the manual also comes with Emacs, if you're daring enough to try to print out this 300 page manual yourself. (We're talking about killing an entire tree here. This kind of printer usage can make you very unpopular. Besides, if you order it from the FSF, the price may be tax-deductible as a business expense.) If you absolutely have to print your own copy, and you don't have TeX, you can get a PostScript version from: Anonymous FTP: site: abcfd20.larc.nasa.gov file: /pub/docs/emacs-18.55.PS.Z (size: 472K) Carl Witty <cwitty@cs.stanford.edu> writes: The Emacs manual is also available online in the Info system, which is available by typing "C-h i". In this form, it has hypertext links and is very easy to browse or search; many people prefer it to the printed manual. 13: Has someone written an GNU Emacs Lisp package that does XXX? Probably. A listing of Emacs Lisp packages, called the Lisp Code Directory, is being maintained by Dave Brennan <brennan@dg-rtp.dg.com>. You can search through this list to find if someone has written something that fits your needs. This list is file "LCD-datafile.Z" in the Emacs Lisp Archive. (See question 14.) The files "lispdir.el.Z" and "lispdir.doc.Z" in the archive contain information to help you use the list. 14: Where can I get GNU Emacs Lisp packages that don't come with Emacs? First, check the Lisp Code Directory to find the name of the package you are looking for. (See question 13). Then check local archives and the Emacs Lisp Archive to find a copy of the relevant files. Then, if you still haven't found it, you can send e-mail to the author asking for a copy. You can access the Emacs Lisp Archive via: Anonymous FTP: site: tut.cis.ohio-state.edu directory: /pub/gnu/emacs/elisp-archive file: README.Z NOTE: Any files with names ending in ".Z" are compressed, and you should use "binary" mode in FTP to retrive them. You should also use binary mode whenever you retrieve any files with names ending in ".elc". Submissions for the archive should be sent to Dave Sill <de5@ornl.gov>. If you have ftp access, the submission can be deposited in the directory /pub/gnu/emacs/elisp-archive/incoming on tut.cis.ohio-state.edu. Whenever possible submissions should contain an LCD-datafile entry since this helps reduce administrative overhead for the maintainers. Before submitting anything, first read the file "guidelines.Z", which is available in the archive. 15: Where can I get documentation on GNU Emacs Lisp? Obtain the GNU Emacs Lisp Reference Manual for Emacs 18 under Unix. It is available from the FSF for $50. The latest revision is edition 1.02 dated July 1990. Within Emacs, you can type "C-h f" to get the documentation for a function, "C-h v" for a variable. Also, as a popular USENET saying goes, "Use the Force, Read the Source". You can also get the Texinfo source for the manual, if you are daring enough to try to print this 550 page manual out yourself. This is available in the Emacs Lisp Archive and also via: Anonymous FTP: site: prep.ai.mit.edu file: /pub/gnu/elisp.tar.Z A set of pregenerated Info files comes with the Texinfo source for the Emacs Lisp manual, so you don't have to format it yourself for online use. (You can create the Info files from the Texinfo source.) See question 21 for details on how to install these files online. 16: What informational files are available? This isn't a frequently asked question, but it should be! The following files are available in the "etc" directory of the GNU Emacs distribution, and also the latest versions are available individually via: Anonymous FTP: site: prep.ai.mit.edu directory: /pub/gnu/etc APPLE -- Special Report: Apple's New Look and Feel DISTRIB -- GNU Emacs Availability Information, including the popular "Free Software Foundation Order Form" FTP -- How to get GNU Software by Internet FTP or by UUCP GNU -- The GNU Manifesto INTERVIEW -- Richard Stallman discusses his public-domain UNIX-compatible software system with BYTE editors MACHINES -- Status of GNU Emacs on Various Machines and Systems MAILINGLISTS -- GNU Project Electronic Mailing Lists SERVICE -- GNU Service Directory SUN-SUPPORT -- includes the popular "Using Emacstool with GNU Emacs" These files are available in the "etc" directory of the GNU Emacs distribution: DIFF -- Differences between GNU Emacs and Twenex Emacs CCADIFF -- Differences between GNU Emacs and CCA Emacs GOSDIFF -- Differences between GNU Emacs and Gosling (Unipress??) Emacs
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -