The Emacs RIS mode

If your editor of choice should be Emacs or XEmacs, the RIS mode (ris.el) shipped with refdb will make editing RIS datasets a little bit more comfortable. This major mode is still in its infancy, so it will currently do only a few things for you:

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 not displayed in blue, you have a problem as well.

To install this mode on your system, follow these simple steps:

  1. Either copy ris.el into a directory which is in your load-path (/usr/local/share/emacs/site-lisp is a common place for such files), or include /usr/local/share/refdb/site-lisp in your load-path.

  2. If you're a speed fanatic, byte-compile ris.el with the Emacs command M-x byte-compile-file path/to/ris.el.

  3. Put the following code into your ~/.emacs or into the site-wide site-start.el:

    ;; Turn on syntax coloring
    (cond ((fboundp 'global-font-lock-mode)
          ;; Turn on font-lock in all modes that support it
          (global-font-lock-mode t)
          ;; maximum colors
          (setq font-lock-maximum-decoration t)))
    ;; ris mode
    (autoload 'ris-mode "ris" "Major mode for RIS bibliography files." t)
    (or (assoc "\\.ris$" auto-mode-alist)
        (setq auto-mode-alist (cons '("\\.ris$" . ris-mode)
                                    auto-mode-alist)))