The Emacs RIS mode
Prev | Chapter 7. Data input | Next

## The Emacs RIS mode

If your editor of choice should be Emacs or XEmacs, the RIS mode (`ris.el`) will make editing RIS datasets a little bit more comfortable. RIS mode is part of the separately available refdb-elisp package. Please see the installation instructions contained in the source archive. This major mode is still in its infancy, so it will currently do only a few things for you:

- Font-locking will help you to spot syntax errors in the tags. Especially the end tag (ER - ) is prone to lack the trailing space if you're not careful. The ris-mode displays regular tags in blue and the special type (TY - ) and end (ER - ) tags in red. Tags will be displayed in the default foreground color if anything is wrong with them, like invalid specifiers, lowercase specifiers, missing or additional spaces.

- ris-mode provides three commands to insert datasets ("references") and individual tags as described shortly. All of these commands have in common that they always start a new line after the current line if the cursor is not at the start of a line. Thus you can run these commands from any position of the current line and still get something that makes sense as a RIS dataset.

- Run the command insert-set (C-c C-s) to insert a new skeleton dataset (a "reference"). The function will prompt you to enter the publication type. You can use either the auto-completion feature of the minibuffer to enter a valid type or the history feature to select a previously entered type. The function will create a newline, a type tag with the type you selected, and an end tag.

- You can insert a new tag at the beginning of a line with the command insert-tag which is bound to C-c C-t. Use either the auto-completion feature of the minibuffer to enter a valid tag or the history feature to select a previously entered tag.

- You can insert a new line below the current line with the same tag as the current line with the command duplicate-tag. This is bound to M-RET. This command is convenient if you add multiple keywords or authors, each of which have to go on separate tag lines.

- You can move between RIS datasets with the commands backward-set (C-x[) and forward-set (C-x]). You can narrow the buffer to the current RIS set with the command narrow-to-set (C-xns). To widen to the full buffer contents again use C-xnwas usual.

### Note

ris-mode does not attempt to validate the buffer contents. You can create invalid tags, leave out the essential type or end tags, forget about the newline preceeding each dataset and ris-mode will not complain. However, you can spot most errors by looking at the font colors: If the first and the last line of a dataset are not displayed in red, you have a problem (you might be using a monochrome display but that's not what I mean). If any tag (except TY and ER) is displayed in the default foreground color (usually black on X displays), you have a problem as well.

Prev | Up | Next
Chapter 7. Data input | Home | Input filters