From 13a8999e5f95686111ec85dc2357a5d9ef58ea2c Mon Sep 17 00:00:00 2001 From: "Paul W. Frields" Date: Sun, 1 Jul 2007 18:17:29 +0000 Subject: Clean up the chapter but good! --- en_US/emacs.xml | 495 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 251 insertions(+), 244 deletions(-) (limited to 'en_US') 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 @@ - + - - Emacs and PSGML Mode - - - PSGML - - - - Emacs - + + Emacs and PSGML Mode - - Emacs - PSGML mode - + + PSGML + - - 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. - + + Emacs + + + + Emacs + PSGML mode + + + + 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. +
Installing PSGML To install PSGML, use the yum command: yum install psgml
-
- Setting Up Your <filename>.emacs</filename> File +
+ Setting Up Your <filename>.emacs</filename> File - - Emacs - configuration file - + + Emacs + configuration file + - - .emacs - + + .emacs + - - For Emacs to parse your DocBook documents correctly, you must have a - .emacs file. Cut and paste the following into your - existing .emacs file or create a new one that - contains the following lines: - - + For Emacs to parse your DocBook documents correctly, you must have + a .emacs file. Cut and paste the following + into your existing .emacs file or create a + new one that contains the following lines: + + - - + entry (current-word))))]]> - If you have a wheel mouse and are using Emacs version 21, you can add the - following to your .emacs file so your wheel will work - in Emacs: + If you have a wheel mouse and are using Emacs version 21, you can + add the following to your .emacs file so your + wheel will work in Emacs: - +))]]> - - If you are using the older version 20 of - Emacs, add the following instead: - + + If you are using the older version 20 of + Emacs, add the following instead: + - + -
+
-
- Customizing Emacs +
+ Customizing Emacs - - Emacs - customizing - + + Emacs + customizing + - - .Xresources - + + .Xresources + - - Emacs - colors - + + Emacs + colors + - - Emacs - font - + + Emacs + font + - - Emacs - geometry - + + Emacs + geometry + - - The colors, font, and geometry (default size of window) for Emacs in your - ~/.Xresources file. The format for the settings is - emacs.keyword:value - + + The colors, font, and geometry (default size of window) for Emacs + in your ~/.Xresources file. The format for + the settings is emacs.keyword:value. + - - The following is a sample ~/.Xresources file. + + The following is a sample ~/.Xresources file. + + + Note + If you have other settings in your + ~/.Xresources, add the following to the end + of the file. - - Note - If you have other settings in your - ~/.Xresources, add the following to the end of - the file. - - - - - - - After modifying this file, you must execute the command - - +emacs.geometry: 90x25]]> + + + After modifying this file, execute the following command: + xrdb -merge ~/.Xresources - - and restart Emacs for the changes to take - place. - - -
+ + Then restart Emacs to apply the + changes. + +
-
- Basic Emacs Commands +
+ Basic Emacs Commands - - The Meta key is usually the Alt key. - + + The Meta key is usually the Alt + key. + - + Emacs Commands Shortcut Description @@ -551,166 +538,186 @@ emacs.geometry: 90x25 Exit edit attributes - - -
+ +
-
- Examples +
+ Examples - - 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. - + + 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. + -
- Tag Completion +
+ Tag Completion - - Note - This section assumes that you have already parsed the - DTD file. - + + Note + This section assumes that you have already parsed the DTD + file. + - - Instead of typing a tag each time you need to use it, use - the key combination Ctrl-c, - followed by <. At the bottom of the - Emacs window, the following prompt - appears: - - -Tag: < - + + To avoid having to type a tag repeatedly, use the key + combination Ctrl-c, followed + by <. At the bottom of the + Emacs window, the following prompt + appears: + + Tag: < - - To view a list of available tags, use either the Tab - or ?. Or, if you know the first few letters of a tag, - you can enter them followed by Tab for a complete - list of available tags beginning with those letters or for a tag - completion. + + To view a list of available tags, use either the + Tab or ?. If you know the + first few letters of a tag, enter them, followed by + Tab. If the letters uniquely identify a tag, + that tag appears. If more than one completion exists, a + complete list of possible tags appears. - - Try the following: Type Ctrl-c - followed by <. Then enter the letter - k, followed by Tab. You may have to - use the Tab key several times to get a complete list. - - - The output should look similar to the example below: + If you hit + Ctrl + c + , <, k, a prompt + appears similar to the example below: - - -Click mouse-2 on a completion to select it. + - + + ]]> -
-
- Tag Closure +
+
+ Tag Closure - - 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 - Ctrl-c, followed by - /. This will close the closest open tag you have. + + After you open a tag, you must close it. The easiest way to + close an open tag is to use the key sequence + + Ctrl + c + , /. This sequence closes the most + recently opened tag. - -
- -
- Other Emacs Tasks +
- - Working with one window: Sometimes in - Emacs 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 Ctrl-x, followed by - 1. - +
+ Other Emacs Tasks + +
+ Working with One Window + Sometimes in Emacs, the window + becomes split, with tags completions or other text in an + alternate window. To return to a single window, use the key + sequence + Ctrl + x + , 1. +
- - Saving your work: To save your work, use the - following keycombo, Ctrl-x followed by - Ctrl-s. - +
+ Saving Work + To save your work, use the key sequence + + Ctrl + x + , + Ctrl + s + . +
- - The "clear/quit" command: 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 Ctrl-g. This command quits - what you have been doing within the file, without quitting the file - itself. - +
+ The "Clear/Quit" Command + If the tag completion process becomes unwieldy or + confusing, use the keysequence + Ctrl + g + to exit back to the text. + Emacs clears any prompts and returns + to the buffer text. +
- - Opening a new file: To open a new file, use the - keycombo Ctrl-x followed by - Ctrl-f. At the bottom of the emacs - window, you will be able to enter in the file name (using - Tab completion if needed) of the file you wish to - open. - +
+ Opening a new file + To open a new file, use the key sequence + + Ctrl + x + , + Ctrl + f + . A prompt appears at the bottom of the + Emacs window. Enter the file name, + using Tab completion if desired, of the file + you wish to open. +
- - Closing emacs: The easiest way to close - emacs is to use the keycombo - Ctrl-x followed by - Ctrl-c. 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. - +
+ Closing <application>Emacs</application> + To close Emacs use the key + sequence + + Ctrl + x + , + Ctrl + c + . If you have not saved your work, + Emacs prompts you to save any + changed files.
- +
+ +
-
- Additional Resources +
+ Additional Resources - Additional Emacs and PSGML references are available at the - following locations: - + Additional Emacs and PSGML references are available at the + following locations: + - - - http://wks.uts.ohio-state.edu/unix_course/intro-135.html + + + Emacs Quick Reference Guide - - - Emacs reference card that comes with the + + + + Emacs reference card that comes with the emacs package. You can print it out as a reference. — - /usr/share/emacs/<version>/etc/refcard.ps - - - - Read Editing XML with Emacs and PSGML - in /usr/share/doc/psgml-<version>/psgml.ps. - - - http://www.snee.com/bob/sgmlfree/psgmqref.html - — Emacs/PSGML Quick Reference is a - reference table of Emacs commands for PSGML mode. - - - - http://www.snee.com/bob/sgmlfree/emcspsgm.html - — PSGML Tricks - - + /usr/share/emacs/version/etc/refcard.ps + + + + Read Editing XML with Emacs and + PSGML in + /usr/share/doc/psgml-version/psgml.ps. + + + + + — Emacs/PSGML Quick Reference is + a reference table of Emacs commands for PSGML mode. + + + + + — PSGML Tricks + +
-- cgit