Chapters:
1: Introduction
2: Simple example
3: Invocation
4: Finer Control
5: X-Y Plots
6: Contour Plots
7: Image Plots
8: Examples
9: Gri Commands
10: Programming
11: Environment
12: Emacs Mode
13: History
14: Installation
15: Gri Bugs
16: Test Suite
17: Gri in Press
18: Acknowledgments
19: License
Indices:
Concepts
Commands
Variables

### 12.4.5: Editing the syntax output by gri-complete

You might wonder what to do with all the bracketed code left behind by ``gri-complete`'. It certainly won't go through the gri parser without error, so you have to edit it out. The tools provided in gri-mode are ``gri-option-select`' (``C-C C-o`') and ``gri-kill-option`' (``C-C C-k`') to narrow in on a particular gri command, given a syntax description left on the line by ``gri-complete`'. The cursor location is used to decide which gri command(s) to narrow to.

For example, if ``gri-complete`' is used on the line `dr x a', the result will be a line like

    draw x axis [at bottom|top|{.y. [cm]} [lower|upper]]

This is the gri way of describing many commands at once. The above syntax description is a shortcut formulation for all of:

    draw x axis
    draw x axis at bottom
    draw x axis at bottom top
    draw x axis at bottom bottom
    draw x axis at top
    draw x axis at top top
    draw x axis at top bottom
    draw x axis at .y. cm
    draw x axis at .y. cm lower
    draw x axis at .y. cm upper

The ``gri-option-select`' (``C-C C-o`') command provides easy navigation to select one of these commands. The narrowing process is governed by the cursor position. For example, to get the command narrowed down to

    draw x axis at bottom [lower|upper]

place the cursor somewhere in the word `bottom' and invoke ``gri-option-select`'. To complete the narrowing process, selecting

    draw x axis at bottom lower

move the cursor to some place in the word `lower' and invoke ``gri-option-select again`'. On the other hand, to get

    draw x axis at bottom

you would have put the cursor over either the word `lower' or `upper', and invoke ``gri-kill-option`' (``C-C C-k`') instead.

NOTE: you might want to practice using this example to learn how to do it. If you make a mistake, note that the normal Emacs undo works.