This page documents the patches made in SzSzI to JOE 3.5 ( The patches were made by Péter Szabó.

Download i386 binary package for Debian Sarge starting from

How to apply the patches and recompile joe

$ wget
$ wget
$ wget
$ tar xzvf joe-3.5.tar.gz
$ (cd joe-3.5 && patch -p1 <../pts-joe-3.5-01-misc.patch)
$ (cd joe-3.5 && patch -p1 <../pts-joe-3.5-02-preprocessor.patch)
$ (cd joe-3.5 && ./configure)
$ (cd joe-3.5 && make)
$ su -c 'cd joe-3.5 && make install'


Download from

This patch fixes a few bugs and quirks, and also adds a few small features. If necessary, we can split this patch to several smaller patches.


New or improved features:

Implementation improvements:


Download from

This patch adds a preprocessor to the .joerc configuration files. Preprocessing is done separately on one each line read from configuration files. Only lines starting with $ are affected (others are left unchanged). The affected lines are replaced by the string returned by the preprocessor, and the replaced line is parsed by JOE as a regular configuration file line.

The rationale for a preprocessor is to allow JOE's configuration depend on the environment variables. For example, the following configuration lines turns off syntax highlighting for the terminal types xterm and rxvt, and turn it on for all other terminals:


The first line (-highlight) turns on syntax highlighting, and the other two lines conditionally turn it off (with --highlight) if the value of the TERM environment variable is rxvt or xterm, respectively.

Here is a more compact solution:


Both solutions demonstrate that the preprocessor syntax is quite ugly. A nicer syntax would be:

  ((t=joe.getenv("TERM"))=="xterm" || t=="rxvt") ? false : true

Adding scripting support (e.g. lua) for both the configuration file and runtime macros would be a proper solution to avoid this ugliness. This patch focuses on easy-to-implement and yet powerful-enough configuration file preprocessing.

Definition of the preprocessor syntax:

Definition of the preprocessor expression syntax:

Evaluation of expressions:

Rá hivatkozók: