This commit is contained in:
gferg 2001-03-25 22:02:23 +00:00
parent f50eba91c5
commit 34f2dc452b
1 changed files with 35 additions and 42 deletions

View File

@ -3,11 +3,9 @@
<article> <article>
<title>Emacs Beginner's HOWTO</title> <title>Emacs Beginner's HOWTO</title>
<author> <author>
Jeremy D. Zawodny, <htmlurl url="mailto:jzawodn@wcnet.org" name="jzawodn@wcnet.org"> Jeremy D. Zawodny: <htmlurl url="mailto:Jeremy@Zawodny.com" name="Jeremy@Zawodny.com">
</author> </author>
<date> <date>v1.12, 2001-25-03</date>
v1.7, 14 October 1999
</date>
<abstract> <abstract>
@ -27,7 +25,7 @@ version of this document is usually available from <htmlurl url =
<sect1>Copyright <sect1>Copyright
<p>Copyright &copy; 1998 - 1999 Jeremy D. Zawodny. Permission to <p>Copyright &copy; 1998 - 2001 Jeremy D. Zawodny. Permission to
distribute and modify this document is granted under the GNU General distribute and modify this document is granted under the GNU General
Public License. An on-line copy is available at <htmlurl url = Public License. An on-line copy is available at <htmlurl url =
"http://www.gnu.org/copyleft/gpl.html" name = "http://www.gnu.org/copyleft/gpl.html" name =
@ -415,7 +413,7 @@ Keystrokes Function Description
------------------------------------------------------------------- -------------------------------------------------------------------
C-x C-s save-buffer Save the current buffer to disk C-x C-s save-buffer Save the current buffer to disk
C-x u undo Undo the last operation C-x u undo Undo the last operation
C-c C-f find-file Open a file from disk C-x C-f find-file Open a file from disk
C-s isearch-forward Search forward for a string C-s isearch-forward Search forward for a string
C-r isearch-backward Search backward for a string C-r isearch-backward Search backward for a string
replace-string Search & replace for a string replace-string Search & replace for a string
@ -526,8 +524,8 @@ form text like a README file. It understands how to identify words and
paragraphs and generally makes sure that it does what I expect when I paragraphs and generally makes sure that it does what I expect when I
use the normal navigation keystrokes. use the normal navigation keystrokes.
<p>When I'm writing text for human consumpiton, I typically want it <p>When I'm writing text for human consumption, I typically want it
to look good. It should be properly word-wrapped to a reasonble value to look good. It should be properly word-wrapped to a reasonable value
and so on. To enable word wrapping I just turn on the and so on. To enable word wrapping I just turn on the
<tt>auto-fill</tt> minor mode. This mode tries to do the Right Thing <tt>auto-fill</tt> minor mode. This mode tries to do the Right Thing
when I'm typing along and hit the end of the line. The fact that it is when I'm typing along and hit the end of the line. The fact that it is
@ -582,7 +580,7 @@ automatically adding comments to your code, creating Makefiles,
updating Change Logs and so on. updating Change Logs and so on.
<p>When you add all these modes together and consider the maturity and <p>When you add all these modes together and consider the maturity and
stability of the Emacs code, it compares quite nicely to commerically stability of the Emacs code, it compares quite nicely to commercially
marketed Integrated Development Environments (IDEs) for languages like marketed Integrated Development Environments (IDEs) for languages like
C++ and Java. And, of course, it's free. C++ and Java. And, of course, it's free.
@ -609,7 +607,7 @@ history and why there are two modes (the docs don't say), but it would
appear that <tt>perl-mode</tt> was the original mode for editing Perl appear that <tt>perl-mode</tt> was the original mode for editing Perl
code in Emacs. It seems to have fewer features than code in Emacs. It seems to have fewer features than
<tt>cperl-mode</tt> and is lacking the ability to recognize some of <tt>cperl-mode</tt> and is lacking the ability to recognize some of
Perl's fancier langugage constructs. Perl's fancier language constructs.
<p>Personally, I use and recommend <tt>cperl-mode</tt> which seems to <p>Personally, I use and recommend <tt>cperl-mode</tt> which seems to
be quite actively maintained and has just about every feature I could be quite actively maintained and has just about every feature I could
@ -671,7 +669,7 @@ while. If you have <bf>GNU ispell</bf> installed, you can type <tt>M-x
ispell</tt> and spell-check the current buffer. If ispell finds words ispell</tt> and spell-check the current buffer. If ispell finds words
that it doesn't know, it prompts you with a list of possible that it doesn't know, it prompts you with a list of possible
replacements and lets you select one (or none) of them. It's replacements and lets you select one (or none) of them. It's
functionally equivelant to the spell-checkers in many popular non-free functionally equivalent to the spell-checkers in many popular non-free
software packages. software packages.
</sect2> </sect2>
@ -694,7 +692,7 @@ fashioned way.
<p>When you're writing documents in TeX, it's often helpful to get <p>When you're writing documents in TeX, it's often helpful to get
Emacs to add some color and highlight the backslashes, braces and Emacs to add some color and highlight the backslashes, braces and
other charcters. <tt>tex-mode</tt> takes care of that for you. other characters. <tt>tex-mode</tt> takes care of that for you.
<p>Though I don't write much directly in TeX anymore, when I did this <p>Though I don't write much directly in TeX anymore, when I did this
mode proved to be quite helpful in making my TeX source a bit more mode proved to be quite helpful in making my TeX source a bit more
@ -814,7 +812,7 @@ find it documented in the Emacs documentation.
<p>Virtually all Emacs customization is done via Lisp code. You can <p>Virtually all Emacs customization is done via Lisp code. You can
modify variables which influence the way Emacs operates or you can add modify variables which influence the way Emacs operates or you can add
new functions to Emacs (or override existing functions--replacing them new functions to Emacs (or override existing functions--replacing them
with your own. with your own).
<sect1>Temporary Customization <sect1>Temporary Customization
@ -822,7 +820,7 @@ with your own.
to do it in a way that is temporary. If you do something horribly to do it in a way that is temporary. If you do something horribly
wrong, you can just <tt>C-x C-c</tt> to exit emacs and run it wrong, you can just <tt>C-x C-c</tt> to exit emacs and run it
again. Once you've figured out what changes you'd like to make again. Once you've figured out what changes you'd like to make
permenant, you can add them to your very own <tt>.emacs</tt> file so permanent, you can add them to your very own <tt>.emacs</tt> file so
that they take effect every time you start Emacs. This is discussed in that they take effect every time you start Emacs. This is discussed in
the next section. the next section.
@ -838,7 +836,7 @@ of a variable in Emacs. The list code to do this looks like this:
<p>Where <tt>variable-name</tt> is the name of the variable and <p>Where <tt>variable-name</tt> is the name of the variable and
<tt>new-value</tt> is the value you'd like to give the variable. (In <tt>new-value</tt> is the value you'd like to give the variable. (In
Lisp-speak, you're binding a variable to a value.) The <tt>setq</tt> Lisp-speak, you're binding a variable to a value.) The <tt>setq</tt>
function in lisp is analagous to the assignment operators (ususally function in lisp is analogous to the assignment operators (usually
<tt>=</tt>) in other programming languages. <tt>=</tt>) in other programming languages.
<p><bf>NOTE:</bf> I'm glossing over many details here for the sake of <p><bf>NOTE:</bf> I'm glossing over many details here for the sake of
@ -855,8 +853,8 @@ feel free to look them up in an Emacs Lisp reference.
<p>The variable <tt>transient-mark-mode</tt> controls whether or not a <p>The variable <tt>transient-mark-mode</tt> controls whether or not a
region becomes highlighted when I mark it. In many GUI applications, region becomes highlighted when I mark it. In many GUI applications,
if you click and drag the mouse to select a range of text it becomes if you click and drag the mouse to select a range of text it becomes
hilighted in reverse video or some other color. Emacs will do the same hi-lighted in reverse video or some other color. Emacs will do the same
thing it the <tt>transient-mark-mode</tt> varible is set (to a non-nil thing it the <tt>transient-mark-mode</tt> variable is set (to a non-nil
value). value).
<p>A <em>WHAT</em> value? <p>A <em>WHAT</em> value?
@ -888,11 +886,11 @@ set the value to something absurd, you could type:
(setq fill-column 20) (setq fill-column 20)
</verb> </verb>
<p>But that won't actaully do anything. You need to tell Emacs to <p>But that won't actually do anything. You need to tell Emacs to
<bf>evaluate</bf> the expression you typed. To do so, put the point <bf>evaluate</bf> the expression you typed. To do so, put the point
(cursor) at the end of the expression end then type <tt>C-x C-e</tt>, (cursor) at the end of the expression end then type <tt>C-x C-e</tt>,
which calls the function <tt>eval-last-sexp</tt> in case you which calls the function <tt>eval-last-sexp</tt> in case you
care. When you do that, noice that <tt>20</tt> (or whatever value you care. When you do that, notice that <tt>20</tt> (or whatever value you
used) is echoed back to you in the mini-buffer at the bottom of the used) is echoed back to you in the mini-buffer at the bottom of the
screen. That's just the return value from the expression you screen. That's just the return value from the expression you
evaluated. evaluated.
@ -929,7 +927,7 @@ pair contains a regular expression and an Emacs mode name. If a file
you open matches the regular expression (in this case, the string you open matches the regular expression (in this case, the string
<tt>README</tt>) Emacs starts the mode you specified. <tt>README</tt>) Emacs starts the mode you specified.
<p>The funny syntax above is because we're actaully adding another <p>The funny syntax above is because we're actually adding another
pair to that mode list. You wouldn't want to just assign to pair to that mode list. You wouldn't want to just assign to
<tt>auto-mode-alist</tt> without making sure the values that it <tt>auto-mode-alist</tt> without making sure the values that it
already contains aren't lost. already contains aren't lost.
@ -964,7 +962,7 @@ more software products don't let you do that.
<p>In case you haven't already guessed, every time you start Emacs, it <p>In case you haven't already guessed, every time you start Emacs, it
looks for a file named <tt>.emacs</tt> in your home directory. Your looks for a file named <tt>.emacs</tt> in your home directory. Your
<tt>.emacs</tt> file is where you should put any Lisp code that you <tt>.emacs</tt> file is where you should put any Lisp code that you
want run automatiaclly and that includes the sort of customization want run automatically and that includes the sort of customization
we've been dealing with here. we've been dealing with here.
<p>Another example from my <tt>.emacs</tt> file: <p>Another example from my <tt>.emacs</tt> file:
@ -993,8 +991,8 @@ file in order to make the mode or package work in a particular way.
<sect1>The Customize Package <sect1>The Customize Package
<p>As Emacs has grown in popularity and continuted to evolved, someone <p>As Emacs has grown in popularity and continued to evolved, someone
eventaully said ``there has to be a better way to let novice users eventually said ``there has to be a better way to let novice users
customize their Emacs.'' And <tt>customize</tt> was born. customize their Emacs.'' And <tt>customize</tt> was born.
<p>Customize provides a more intuitive method of customizing parts of <p>Customize provides a more intuitive method of customizing parts of
@ -1018,7 +1016,7 @@ about it.</em>.
<p>Like any well behaved X application, Emacs respects your X <p>Like any well behaved X application, Emacs respects your X
resources. That means you can control the initial colors, geometry, resources. That means you can control the initial colors, geometry,
and other X specfic things just as you could with an <tt>xterm</tt>, and other X specific things just as you could with an <tt>xterm</tt>,
<tt>nxterm</tt>, or whatever. <tt>nxterm</tt>, or whatever.
<p>Here's the relevant bit of my <tt>~/.Xdefaults</tt> file: <p>Here's the relevant bit of my <tt>~/.Xdefaults</tt> file:
@ -1108,9 +1106,9 @@ name="http://www.gnus.org/">.
</sect1> </sect1>
<sect1>BBDB (A rollodex) <sect1>BBDB (A rolodex)
<p>BBDB is an Insidious Big Brother Database, a rollodex-like program <p>BBDB is an Insidious Big Brother Database, a rolodex-like program
for Emacs that works with most of the popular Emacs Mail packages (VM for Emacs that works with most of the popular Emacs Mail packages (VM
and GNUS included). and GNUS included).
@ -1159,11 +1157,6 @@ books also contain a chapter or two about Emacs (and <tt>vi</tt>).
<p>Publisher: O'Reilly &amp; Associates - <htmlurl <p>Publisher: O'Reilly &amp; Associates - <htmlurl
url="http://www.ora.com/" name="http://www.ora.com/"> url="http://www.ora.com/" name="http://www.ora.com/">
<p>You can buy it at a discount from Amazon.com via their Associates
program: <htmlurl
url="http://www.amazon.com/exec/obidos/ASIN/1565921526/jeremydzawodny"
name="http://www.amazon.com/exec/obidos/ASIN/1565921526/">
<p><bf>Commentary:</bf> This is probably the best book to start <p><bf>Commentary:</bf> This is probably the best book to start
with. After you've read the HOWTO and looked through the FAQ this book with. After you've read the HOWTO and looked through the FAQ this book
serves as a comprehensive and very approachable tutorial. serves as a comprehensive and very approachable tutorial.
@ -1177,11 +1170,6 @@ serves as a comprehensive and very approachable tutorial.
<p>Publisher: O'Reilly &amp; Associates - <htmlurl <p>Publisher: O'Reilly &amp; Associates - <htmlurl
url="http://www.ora.com/" name="http://www.ora.com/"> url="http://www.ora.com/" name="http://www.ora.com/">
<p>You can buy it at a discount from Amazon.com via their Associates
program: <htmlurl
url="http://www.amazon.com/exec/obidos/ASIN/1565922611/jeremydzawodny/"
name="http://www.amazon.com/exec/obidos/ASIN/1565922611/">
<p><bf>Commentary:</bf> After you've used Emacs for a while and have <p><bf>Commentary:</bf> After you've used Emacs for a while and have
decided that you'd like to try writing your own mode or maybe try out decided that you'd like to try writing your own mode or maybe try out
some advanced customization, this is the book for you. While it some advanced customization, this is the book for you. While it
@ -1207,11 +1195,6 @@ environment.
the GNU FTP server: <htmlurl url="ftp://prep.ai.mit.edu/gnu/emacs/" the GNU FTP server: <htmlurl url="ftp://prep.ai.mit.edu/gnu/emacs/"
name="ftp://prep.ai.mit.edu/gnu/emacs/">. name="ftp://prep.ai.mit.edu/gnu/emacs/">.
<p>You can buy a nicely printed version from Amazon.com via their
Associates program: <htmlurl
url="http://www.amazon.com/exec/obidos/ASIN/1882114418/jeremydzawodny/"
name="http://www.amazon.com/exec/obidos/ASIN/1882114418/jeremydzawodny/">.
<p><bf>Commentary:</bf> This a good introductory manual for Emacs <p><bf>Commentary:</bf> This a good introductory manual for Emacs
Lisp--even if you're not a heavy-duty programmer. Lisp--even if you're not a heavy-duty programmer.
@ -1271,12 +1254,18 @@ are:
<sect1>Mailing Lists <sect1>Mailing Lists
<p>There is a mailing list for GNU Emacs which is hosted by the Free
Software Foundation. See the web site <htmlurl
url="http://mail.gnu.org/mailman/listinfo/help-gnu-emacs"
name="http://mail.gnu.org/mailman/listinfo/help-gnu-emacs"> for more
information.
<p>The only mailing list devoted to Emacs that I know of right now is <p>The only mailing list devoted to Emacs that I know of right now is
the NT-Emacs list. It is a list for folks who are using the Micro$oft the NT-Emacs list. It is a list for folks who are using the Micro$oft
Windows version of Emacs. See the NT-Emacs FAQ <htmlurl Windows version of Emacs. See the NT-Emacs FAQ <htmlurl
url="http://www.cs.washington.edu/homes/voelker/ntemacs.html" url="http://www.cs.washington.edu/homes/voelker/ntemacs.html"
name="http://www.cs.washington.edu/homes/voelker/ntemacs.html"> for name="http://www.cs.washington.edu/homes/voelker/ntemacs.html"> for
more. information. more information.
</sect1> </sect1>
@ -1321,6 +1310,9 @@ document.
<itemize> <itemize>
<item>Craig Lyons <htmlurl name = "Craig.Lyons@compaq.com"
url="mailto:Craig.Lyons@compaq.com">
<item>Robert Vollmert <htmlurl name = "rvollmer@gmx.net" <item>Robert Vollmert <htmlurl name = "rvollmer@gmx.net"
url="mailto:rvollmer@gmx.net" > url="mailto:rvollmer@gmx.net" >
@ -1358,3 +1350,4 @@ url="mailto:smoke@casema.net">
</sect> </sect>
</article> </article>