summaryrefslogtreecommitdiffstats
path: root/en_US
diff options
context:
space:
mode:
authorPaul W. Frields <stickster@gmail.com>2007-07-01 18:17:29 +0000
committerPaul W. Frields <stickster@gmail.com>2007-07-01 18:17:29 +0000
commit13a8999e5f95686111ec85dc2357a5d9ef58ea2c (patch)
treebc183c1a6246721d1c8da3ac2fb28ed892e165bb /en_US
parent95d4043fb5df68c1b92ad408a319c4e7b8465421 (diff)
downloaddocumentation-guide-13a8999e5f95686111ec85dc2357a5d9ef58ea2c.tar.gz
documentation-guide-13a8999e5f95686111ec85dc2357a5d9ef58ea2c.tar.xz
documentation-guide-13a8999e5f95686111ec85dc2357a5d9ef58ea2c.zip
Clean up the chapter but good!
Diffstat (limited to 'en_US')
-rw-r--r--en_US/emacs.xml495
1 files changed, 251 insertions, 244 deletions
diff --git a/en_US/emacs.xml b/en_US/emacs.xml
index e8a175d..f5670d5 100644
--- a/en_US/emacs.xml
+++ b/en_US/emacs.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- $Id: emacs.xml,v 1.7 2007/07/01 17:49:52 pfrields Exp $ -->
+<!-- $Id: emacs.xml,v 1.8 2007/07/01 18:17:29 pfrields Exp $ -->
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
@@ -9,53 +9,52 @@
]>
- <chapter id="ch-emacs">
- <title>Emacs and PSGML Mode</title>
-
- <indexterm>
- <primary>PSGML</primary>
- </indexterm>
-
- <indexterm>
- <primary>Emacs</primary>
- </indexterm>
+<chapter id="ch-emacs">
+ <title>Emacs and PSGML Mode</title>
- <indexterm>
- <primary>Emacs</primary>
- <secondary>PSGML mode</secondary>
- </indexterm>
+ <indexterm>
+ <primary>PSGML</primary>
+ </indexterm>
- <para>
- You can use the PSGML mode available for Emacs to make it easier to write
- in XML format. PSGML mode provides syntax-highlighting, tag completion,
- and more.
- </para>
+ <indexterm>
+ <primary>Emacs</primary>
+ </indexterm>
+
+ <indexterm>
+ <primary>Emacs</primary>
+ <secondary>PSGML mode</secondary>
+ </indexterm>
+
+ <para>
+ You can use the PSGML mode available for Emacs to make it easier to
+ write in XML format. PSGML mode provides syntax-highlighting, tag
+ completion, and more.
+ </para>
<section id="sn-installing-psgml">
<title>Installing PSGML</title>
<para>To install PSGML, use the <command>yum</command> command:</para>
<screen><userinput>yum install psgml</userinput></screen>
</section>
- <section id="sn-emacs-file">
- <title>Setting Up Your <filename>.emacs</filename> File</title>
+ <section id="sn-emacs-file">
+ <title>Setting Up Your <filename>.emacs</filename> File</title>
- <indexterm>
- <primary>Emacs</primary>
- <secondary>configuration file</secondary>
- </indexterm>
+ <indexterm>
+ <primary>Emacs</primary>
+ <secondary>configuration file</secondary>
+ </indexterm>
- <indexterm>
- <primary><filename>.emacs</filename></primary>
- </indexterm>
+ <indexterm>
+ <primary><filename>.emacs</filename></primary>
+ </indexterm>
- <para>
- For Emacs to parse your DocBook documents correctly, you must have a
- <filename>.emacs</filename> file. Cut and paste the following into your
- existing <filename>.emacs</filename> file or create a new one that
- contains the following lines:
-
- <screen><computeroutput><![CDATA[
-;; turn on auto-fill in `text-mode' and derived modes
+ <para>
+ For Emacs to parse your DocBook documents correctly, you must have
+ a <filename>.emacs</filename> file. Cut and paste the following
+ into your existing <filename>.emacs</filename> file or create a
+ new one that contains the following lines:
+ </para>
+ <screen><![CDATA[;; turn on auto-fill in `text-mode' and derived modes
;;(mail, news, etc)
(add-hook 'text-mode-hook 'turn-on-auto-fill)
@@ -177,33 +176,26 @@
(global-set-key [(f1)] (lambda () (interactive) (manual-
- entry (current-word))))
-]]></computeroutput></screen>
-
- </para>
+ entry (current-word))))]]></screen>
<para>
- If you have a wheel mouse and are using Emacs version 21, you can add the
- following to your <filename>.emacs</filename> file so your wheel will work
- in <application>Emacs</application>:
+ If you have a wheel mouse and are using Emacs version 21, you can
+ add the following to your <filename>.emacs</filename> file so your
+ wheel will work in <application>Emacs</application>:
</para>
- <screen><computeroutput><![CDATA[
-;; Enable wheelmouse support by default for emacs 21
+ <screen><![CDATA[;; Enable wheelmouse support by default for emacs 21
(cond (window-system
(mwheel-install)
-))
-]]></computeroutput></screen>
+))]]></screen>
- <para>
- If you are using the older version 20 of
- <application>Emacs</application>, add the following instead:
- </para>
+ <para>
+ If you are using the older version 20 of
+ <application>Emacs</application>, add the following instead:
+ </para>
- <screen><computeroutput><![CDATA[
-;; Enable wheelmouse support by default
-(require 'mwheel)
-]]></computeroutput></screen>
+ <screen><![CDATA[;; Enable wheelmouse support by default
+(require 'mwheel)]]></screen>
<!-- bug #125757 in NEEDINFO state
<para>
@@ -222,74 +214,68 @@
-->
- </section>
+ </section>
- <section id="sn-emacs-colors">
- <title>Customizing Emacs</title>
+ <section id="sn-emacs-colors">
+ <title>Customizing Emacs</title>
- <indexterm>
- <primary>Emacs</primary>
- <secondary>customizing</secondary>
- </indexterm>
+ <indexterm>
+ <primary>Emacs</primary>
+ <secondary>customizing</secondary>
+ </indexterm>
- <indexterm>
- <primary><filename>.Xresources</filename></primary>
- </indexterm>
+ <indexterm>
+ <primary><filename>.Xresources</filename></primary>
+ </indexterm>
- <indexterm>
- <primary>Emacs</primary>
- <secondary>colors</secondary>
- </indexterm>
+ <indexterm>
+ <primary>Emacs</primary>
+ <secondary>colors</secondary>
+ </indexterm>
- <indexterm>
- <primary>Emacs</primary>
- <secondary>font</secondary>
- </indexterm>
+ <indexterm>
+ <primary>Emacs</primary>
+ <secondary>font</secondary>
+ </indexterm>
- <indexterm>
- <primary>Emacs</primary>
- <secondary>geometry</secondary>
- </indexterm>
+ <indexterm>
+ <primary>Emacs</primary>
+ <secondary>geometry</secondary>
+ </indexterm>
- <para>
- The colors, font, and geometry (default size of window) for Emacs in your
- <filename>~/.Xresources</filename> file. The format for the settings is
- <computeroutput>emacs.keyword:value</computeroutput>
- </para>
+ <para>
+ The colors, font, and geometry (default size of window) for Emacs
+ in your <filename>~/.Xresources</filename> file. The format for
+ the settings is <userinput>emacs.keyword:value</userinput>.
+ </para>
- <para>
- The following is a sample <filename>~/.Xresources</filename> file.
+ <para>
+ The following is a sample <filename>~/.Xresources</filename> file.
+ </para>
+ <note>
+ <title>Note</title>
+ <para>If you have other settings in your
+ <filename>~/.Xresources</filename>, add the following to the end
+ of the file.
</para>
- <note>
- <title>Note</title>
- <para>If you have other settings in your
- <filename>~/.Xresources</filename>, add the following to the end of
- the file.
- </para>
- </note>
-
- <screen><userinput><![CDATA[
-emacs.background: light gray
+ <screen><![CDATA[emacs.background: light gray
emacs.foreground: black
emacs.pointerColor: blue
emacs.cursorColor: blue
emacs.bitmapIcon: on
emacs.font: fixed
-emacs.geometry: 90x25
-]]></userinput></screen>
-
- <para>
- After modifying this file, you must execute the command
- </para>
-
+emacs.geometry: 90x25]]></screen>
+ </note>
+ <para>
+ After modifying this file, execute the following command:
+ </para>
<screen><command>xrdb -merge ~/.Xresources</command></screen>
- <para>
- and restart <application>Emacs</application> for the changes to take
- place.
- </para>
-
- </section>
+ <para>
+ Then restart <application>Emacs</application> to apply the
+ changes.
+ </para>
+ </section>
<!-- This is not required if your DTD is correct. [PWF 2007-06-23]
@@ -405,14 +391,15 @@ emacs.geometry: 90x25
</section>
-->
- <section id="sn-emacs-basic-commands">
- <title>Basic Emacs Commands</title>
+ <section id="sn-emacs-basic-commands">
+ <title>Basic Emacs Commands</title>
- <para>
- The <keycap>Meta</keycap> key is usually the <keycap>Alt</keycap> key.
- </para>
+ <para>
+ The <keycap>Meta</keycap> key is usually the <keycap>Alt</keycap>
+ key.
+ </para>
- <segmentedlist id="tb-emacs-commands">
+ <segmentedlist id="tb-emacs-commands">
<title>Emacs Commands</title>
<segtitle>Shortcut</segtitle>
<segtitle>Description</segtitle>
@@ -551,166 +538,186 @@ emacs.geometry: 90x25
</keycombo></seg>
<seg>Exit edit attributes</seg>
</seglistitem>
- </segmentedlist>
-
- </section>
+ </segmentedlist>
+ </section>
- <section id="sn-emacs-examples">
- <title>Examples</title>
+ <section id="sn-emacs-examples">
+ <title>Examples</title>
- <para>
- The table or reference card of Emacs and PSGML commands can be confusing
- for beginners. This section provides some examples of how to use them.
- </para>
+ <para>
+ The table or reference card of Emacs and PSGML commands can be
+ confusing for beginners. This section provides some examples of
+ how to use them.
+ </para>
- <section id="sn-emacs-tag-completion">
- <title>Tag Completion</title>
+ <section id="sn-emacs-tag-completion">
+ <title>Tag Completion</title>
- <note>
- <title>Note</title>
- <para>This section assumes that you have already parsed the
- DTD file.</para>
- </note>
+ <note>
+ <title>Note</title>
+ <para>This section assumes that you have already parsed the DTD
+ file.</para>
+ </note>
- <para>
- Instead of typing a tag each time you need to use it, use
- the key combination <keycap>Ctrl</keycap>-<keycap>c</keycap>,
- followed by <keycap>&lt;</keycap>. At the bottom of the
- <application>Emacs</application> window, the following prompt
- appears:
- </para>
-<screen>
-<computeroutput>Tag: &lt;</computeroutput>
-</screen>
+ <para>
+ To avoid having to type a tag repeatedly, use the key
+ combination <keycap>Ctrl</keycap>-<keycap>c</keycap>, followed
+ by <keycap>&lt;</keycap>. At the bottom of the
+ <application>Emacs</application> window, the following prompt
+ appears:
+ </para>
+ <screen><prompt>Tag: &lt;</prompt></screen>
- <para>
- To view a list of available tags, use either the <keycap>Tab</keycap>
- or <keycap>?</keycap>. Or, if you know the first few letters of a tag,
- you can enter them followed by <keycap>Tab</keycap> for a complete
- list of available tags beginning with those letters or for a tag
- completion.
+ <para>
+ To view a list of available tags, use either the
+ <keycap>Tab</keycap> or <keycap>?</keycap>. If you know the
+ first few letters of a tag, enter them, followed by
+ <keycap>Tab</keycap>. If the letters uniquely identify a tag,
+ that tag appears. If more than one completion exists, a
+ complete list of possible tags appears.
</para>
- <para>
- Try the following: Type <keycap>Ctrl</keycap>-<keycap>c</keycap>
- followed by <keycap>&lt;</keycap>. Then enter the letter
- <keycap>k</keycap>, followed by <keycap>Tab</keycap>. You may have to
- use the <keycap>Tab</keycap> key several times to get a complete list.
- </para>
-
<para>
- The output should look similar to the example below:
+ If you hit <keycombo>
+ <keycap>Ctrl</keycap>
+ <keycap>c</keycap>
+ </keycombo>, <keycap>&lt;</keycap>, <keycap>k</keycap>, a prompt
+ appears similar to the example below:
</para>
-<screen>
-<computeroutput>
-Click mouse-2 on a completion to select it.
+ <screen><![CDATA[Click mouse-2 on a completion to select it.
In this buffer, type RET to select the completion near point.
Possible completions are:
-&lt;keycap&gt; &lt;keycode&gt;
-&lt;keycombo&gt; &lt;keysym&gt;
-</computeroutput>
-</screen>
+<keycap> <keycode>
+<keycombo> <keysym>]]></screen>
- </section>
- <section id="sn-emacs-tag-closing">
- <title>Tag Closure</title>
+ </section>
+ <section id="sn-emacs-tag-closing">
+ <title>Tag Closure</title>
- <para>
- Once you have started the tag of choice, you must close it. The easiest
- way to close an open tag is to use the keycombo
- <keycap>Ctrl</keycap>-<keycap>c</keycap>, followed by
- <keycap>/</keycap>. This will close the closest open tag you have.
+ <para>
+ After you open a tag, you must close it. The easiest way to
+ close an open tag is to use the key sequence
+ <keycombo>
+ <keycap>Ctrl</keycap>
+ <keycap>c</keycap>
+ </keycombo>, <keycap>/</keycap>. This sequence closes the most
+ recently opened tag.
</para>
-
- </section>
-
- <section id="sn-emacs-other">
- <title>Other Emacs Tasks</title>
+ </section>
- <para>
- <guilabel>Working with one window</guilabel>: Sometimes in
- <application>Emacs</application> the window becomes split (with tags
- completions or other text in the bottom window). The easiest way to
- get it back so that only your XML and text appear on one screen is to
- use the keycombo <keycap>Ctrl</keycap>-<keycap>x</keycap>, followed by
- <keycap>1</keycap>.
- </para>
+ <section id="sn-emacs-other">
+ <title>Other Emacs Tasks</title>
+
+ <section id="sn-emacs-other-one-window">
+ <title>Working with One Window</title>
+ <para>Sometimes in <application>Emacs</application>, the window
+ becomes split, with tags completions or other text in an
+ alternate window. To return to a single window, use the key
+ sequence <keycombo>
+ <keycap>Ctrl</keycap>
+ <keycap>x</keycap>
+ </keycombo>, <keycap>1</keycap>.</para>
+ </section>
- <para>
- <guilabel>Saving your work</guilabel>: To save your work, use the
- following keycombo, <keycap>Ctrl</keycap>-<keycap>x</keycap> followed by
- <keycap>Ctrl</keycap>-<keycap>s</keycap>.
- </para>
+ <section id="sn-emacs-other-save">
+ <title>Saving Work</title>
+ <para>To save your work, use the key sequence
+ <keycombo>
+ <keycap>Ctrl</keycap>
+ <keycap>x</keycap>
+ </keycombo>, <keycombo>
+ <keycap>Ctrl</keycap>
+ <keycap>s</keycap>
+ </keycombo>.</para>
+ </section>
- <para>
- <guilabel>The "clear/quit" command</guilabel>: I have found on some
- occasions that I have gotten too far into the tag completion process and
- need to just exit back out to my text. The easiest way to do this is the
- keycombo <keycap>Ctrl</keycap>-<keycap>g</keycap>. This command quits
- what you have been doing within the file, without quitting the file
- itself.
- </para>
+ <section id="sn-emacs-other-clearquit">
+ <title>The "Clear/Quit" Command</title>
+ <para>If the tag completion process becomes unwieldy or
+ confusing, use the keysequence <keycombo>
+ <keycap>Ctrl</keycap>
+ <keycap>g</keycap>
+ </keycombo> to exit back to the text.
+ <application>Emacs</application> clears any prompts and returns
+ to the buffer text.</para>
+ </section>
- <para>
- <guilabel>Opening a new file</guilabel>: To open a new file, use the
- keycombo <keycap>Ctrl</keycap>-<keycap>x</keycap> followed by
- <keycap>Ctrl</keycap>-<keycap>f</keycap>. At the bottom of the emacs
- window, you will be able to enter in the file name (using
- <keycap>Tab</keycap> completion if needed) of the file you wish to
- open.
- </para>
+ <section id="sn-emacs-other-open">
+ <title>Opening a new file</title>
+ <para>To open a new file, use the key sequence
+ <keycombo>
+ <keycap>Ctrl</keycap>
+ <keycap>x</keycap>
+ </keycombo>, <keycombo>
+ <keycap>Ctrl</keycap>
+ <keycap>f</keycap>
+ </keycombo>. A prompt appears at the bottom of the
+ <application>Emacs</application> window. Enter the file name,
+ using <keycap>Tab</keycap> completion if desired, of the file
+ you wish to open.</para>
+ </section>
- <para>
- <guilabel>Closing emacs</guilabel>: The easiest way to close
- <application>emacs</application> is to use the keycombo
- <keycap>Ctrl</keycap>-<keycap>x</keycap> followed by
- <keycap>Ctrl</keycap>-<keycap>c</keycap>. If you have not saved your work,
- it will prompt you to save the file, otherwise it will just quit the
- current emacs session you have been working with.
- </para>
+ <section id="sn-emacs-other-close">
+ <title>Closing <application>Emacs</application></title>
+ <para>To close <application>Emacs</application> use the key
+ sequence
+ <keycombo>
+ <keycap>Ctrl</keycap>
+ <keycap>x</keycap>
+ </keycombo>, <keycombo>
+ <keycap>Ctrl</keycap>
+ <keycap>c</keycap>
+ </keycombo>. If you have not saved your work,
+ <application>Emacs</application> prompts you to save any
+ changed files.</para>
</section>
-
+
</section>
+
+ </section>
- <section id="sn-emacs-additional-resources">
- <title>Additional Resources</title>
+ <section id="sn-emacs-additional-resources">
+ <title>Additional Resources</title>
- <para> Additional Emacs and PSGML references are available at the
- following locations:
- </para>
+ <para> Additional Emacs and PSGML references are available at the
+ following locations:
+ </para>
- <itemizedlist>
- <listitem>
- <para><ulink
- url="http://wks.uts.ohio-state.edu/unix_course/intro-135.html">http://wks.uts.ohio-state.edu/unix_course/intro-135.html</ulink>
+ <itemizedlist>
+ <listitem>
+ <para><ulink
+ url="http://wks.uts.ohio-state.edu/unix_course/intro-135.html"/>
&mdash; <citetitle>Emacs Quick Reference Guide</citetitle>
- </para>
- </listitem>
- <listitem> <para>Emacs reference card that comes with the
+ </para>
+ </listitem>
+ <listitem>
+ <para>Emacs reference card that comes with the
<filename>emacs</filename> package. You can print it out as a
reference. &mdash;
- <filename>/usr/share/emacs/<replaceable>&lt;version&gt;</replaceable>/etc/refcard.ps</filename>
- </para>
- </listitem>
- <listitem>
- <para>Read <citetitle>Editing XML with Emacs and PSGML</citetitle>
- in <filename>/usr/share/doc/psgml-<replaceable>&lt;version&gt;</replaceable>/psgml.ps</filename>. </para>
- </listitem>
- <listitem>
- <para><ulink
- url="http://www.snee.com/bob/sgmlfree/psgmqref.html">http://www.snee.com/bob/sgmlfree/psgmqref.html</ulink>
- &mdash; <citetitle>Emacs/PSGML Quick Reference</citetitle> is a
- reference table of Emacs commands for PSGML mode.
- </para>
- </listitem>
- <listitem>
- <para><ulink
- url="http://www.snee.com/bob/sgmlfree/emcspsgm.html">http://www.snee.com/bob/sgmlfree/emcspsgm.html</ulink>
- &mdash; <citetitle>PSGML Tricks</citetitle></para>
- </listitem>
- </itemizedlist>
+ <filename>/usr/share/emacs/<replaceable>version</replaceable>/etc/refcard.ps</filename>
+ </para>
+ </listitem>
+ <listitem>
+ <para>Read <citetitle>Editing XML with Emacs and
+ PSGML</citetitle> in
+ <filename>/usr/share/doc/psgml-<replaceable>version</replaceable>/psgml.ps</filename>.
+ </para>
+ </listitem>
+ <listitem>
+ <para><ulink
+ url="http://www.snee.com/bob/sgmlfree/psgmqref.html"/>
+ &mdash; <citetitle>Emacs/PSGML Quick Reference</citetitle> is
+ a reference table of Emacs commands for PSGML mode.
+ </para>
+ </listitem>
+ <listitem>
+ <para><ulink
+ url="http://www.snee.com/bob/sgmlfree/emcspsgm.html"/>
+ &mdash; <citetitle>PSGML Tricks</citetitle></para>
+ </listitem>
+ </itemizedlist>
</section>
</chapter>