Sams Teach Yourself Emacs in 24 Hours |  | ContentsIndex
Hour 13: Macros |  | Previous HourNext Hour
Sections in this Hour: |  |  |  |

## Exercises

  1. Develop a macro that you can use to copy paragraphs containing the word Emacs to another buffer. You might need the commands M-a (backward-sentence) to get to the beginning of a sentence and M-e (forward-sentence) to get to the end of a sentence.

  2. Hour 7 describes the bookmark feature and the command bookmark-jump. Unfortunately, no function called bookmark-jump-other-window exists, which would jump to a bookmark in another window. Develop a macro that splits your current window in two and jumps to the bookmark in one of the windows.

  3. Develop a macro that uses TAGS to search for a definition of the word before point and copy it to the next line of your current buffer. (This can be useful when you don't remember the number or types of arguments to a function when you program.)

  4. On the CD is a file called counter.el. This library lets you insert a series of numbers that are very useful in macros. Find this library and develop a macro that creates 10 numbered section headers (for example, Hour 1, Hour 2...Hour 10).

Sams Teach Yourself Emacs in 24 Hours |  | ContentsIndex
Hour 13: Macros |  | Previous HourNext Hour
Sections in this Hour: |  |  |  |

© Copyright Macmillan USA. All rights reserved.