Yet Another Graham's Homepage Revision

Emacs Lisp major mode: gle-mode.el

What is GLE?

GLE is a scripting language for Linux and Windows. Follow the link above for the Linux version, and a link to the website of the Windows one. GLE allows the user to create a very simple script with a syntax similar to BASIC, from which a Postscript or Encapsulated Postscript image can be created. It includes graphing functions such as plotting from data or from user-defined functions, and allows you to add error bars to data.

What is gle-mode?

gle-mode was written in Emacs Lisp as a major mode for the Emacs text editor. It currently contains fontification bindings, so that Emacs can pick out certain of GLE's key words and highlight them accordingly. There are functions that automate creation of postscript and EPS files. It is freely distributable under terms of the GNU Public Licence.

How do I install it?

Initially you need to download the source code. Right-click on gle-mode.el and select Save File. Put it somewhere in your Emacs' load-path (on a Linux machine, putting it in /usr/share/emacs/site-lisp will let everyone on your machine use gle-mode), then edit ~/.emacs in your favourite text editor (such as vi ;-). Add the following lines:

(autoload 'gle-mode "gle-mode")
(add-to-list 'auto-mode-alist '("\\.gle\\'" . gle-mode))
and then save the .emacs file. Restart Emacs (or evaluate .emacs), gle-mode should be called automatically whenever you load a .gle file, or if you type "M-x gle-mode" whilst in Emacs.

What does it work with?

The gle-mode mode has been tested on GNU Emacs 20.7.1 on a few i386 Linux machines, and on GNU EMacs 20.5.(0 I think) on a SunSPARC system. It is currently unknown whether it works on XEmacs/Lucid Emacs, but I can't see why it shouldn't. Please let me know by e-mail if you find out one way or the other, or test it on GNU on any other machine.

How do I use it to create Postscripts?

Once you have installed gle-mode.el and loaded a GLE file into emacs, you will have two new functions available. "M-x gle-create-postscript <RET>" will create a PostScript file with the same filename as the buffer, and temporarily one called emacsgle.ps which it will attempt to open in GhostView. "M-x gle-create-encapsulated <RET>" will do the same but with EPS files. These new functions are lightly tested, so e-mail me using the above link if any problems are discovered.

Any plans to develop gle-mode?

Automatic indentation is currently on the agenda, check the commentary at the top of the source code for the latest developments.

BACK