Three weeks ago I released a kit with Emacs 19.28 and 21.2 for OpenVMS VAX 7.3. Today’s kit adds GNU Emacs 22.3 – the last Emacs with any VMS support in it – and makes it the default. All three versions install side by side from one kit, and all three are tested on VAXstations 4000/96, 4000/60 and 4000/90 and a simulated MicroVAX 3900. 22.3 also runs on a VAXstation 3100 M38.
Claude Code assisted again, which is to say, did much of the hard work.
Update, 21 October 2026: a new kit. In 22.3, opening any file now
takes 0.3 seconds on a 4000/96 (it was 1.1) and 1.7 on a 4000 VLC (5.2);
M-x grep no longer waits two and a half seconds before it shows
anything; and M-x shell, dired, M-x diff, DCL mode for .COM files
and C-h f, C-h v, C-h a and M-x apropos are now built into the
dump, so the first use of each no longer reads its Lisp from the disk
(M-x shell 0.3 seconds instead of 2.1 on a 4000/96, 1.5 instead of 13.0
on a 4000 VLC). This kit is tested on a VAXstation 4000/96, a 4000 VLC
and the simulator.
What is new in it is below; the
17-OCT kit stays available beside it.
Update, 17 October 2026: a new kit. 22.3 now opens the first C file
of a session in about 2 seconds on a 4000/96 (it was 16), 5 on a 4000/60
(52) and 10 on a 4000 VLC (98); the first file-name completion is two to
four times quicker; the first M-x compile no longer reads its Lisp from
the disk; a garbage collection costs a quarter to a third less; and the
slowest step of a reinstall takes half the time it did. This kit is
tested on VAXstations 4000/96, 4000/90 and 4000 VLC and the simulator; on
the 4000/60 one account was tested before a power failure took it down.
What was new in it is below.
Downloads, with SHA-256 sums in SHA256SUMS.TXT:
- Binary kit
(73 MB): three
BACKUP savesets, the installer, the test suite and a
README.TXT. - Source kit (196 MB): the complete source of all three versions as built, plus the three unmodified upstream archives they came from.
- README.TXT and SHA256SUMS.TXT.
What is new on 18 to 21 October
- Opening a file is three times quicker. Every
C-x C-fasked all ten of Emacs’s version-control back ends (Git, Mercurial, RCS, CVS and the rest) whether the file belonged to them, one after another; none of them works on VMS.vc-handled-backendsis now empty on VMS: opening a file takes 0.33 seconds on a 4000/96 instead of 1.07, and 1.66 on a 4000 VLC instead of 5.17. A line in your.emacsturns it back on. M-x grepno longer waits. It sent its search an end of file at once, and on VMS the first write to a command started by Emacs waits for the command to start reading; a search that prints more than a line was waiting for Emacs to read it, so both sat for 2.5 seconds. On VMS no end of file is sent now (a command that reads its input still gets one from Emacs’s VMS layer). The firstM-x greptakes 1.3 seconds on a 4000/96 instead of 3.3, the next ones 0.3 instead of 2.3.- More is ready at start-up. DCL mode, the help commands,
M-x shell, dired andM-x diffare now in 22.3’s dump. Their first use, on a 4000/96 (4000 VLC): a.COMfile 0.37 seconds instead of 2.00 (1.88 instead of 11.27),M-x shell0.28 instead of 2.13 (1.50 instead of 12.99),M-x dired0.09 instead of 1.46 (0.46 instead of 9.18),M-x diff0.18 instead of 1.56 (0.90 instead of 9.04),C-h f0.39 instead of 0.70 (2.17 instead of 3.81). The dump grew from 12,153 to 12,537 blocks. - The price: these libraries bring 25 more faces, and every interactive start sets them all up, so a start with no file costs about half a second more on a 4000/96 and 2.6 seconds on a 4000 VLC. A start that is given a file is still quicker than with the last kit, because of the first point.
- The test suite has 396 checks for 22.3 (360 in the last kit). The 19.28 and 21.2 programs are the same as in the 11-OCT kit.
What is new on 16 and 17 October
M-x compileis ready at once. compile is now in 22.3’s dump as well, so the firstM-x compileof a session no longer loads it: the part before the compiler starts takes 0.3 seconds on a 4000/96 instead of 1.2, and 1.3 on a 4000 VLC instead of 7.2. The dump is the same size, and a start costs about the same.C files open at once. cc-mode (with view and help-mode) is now built into 22.3’s dump, so the first C file of a session no longer loads it from the disk: 1.9 seconds on a 4000/96 instead of 16.2, 5.3 on a 4000/60 instead of 51.6, 10.1 on a 4000 VLC instead of 97.9. The dump grew from 11,385 to 12,153 blocks, and a start is about 5% slower (6.8 seconds with a terminal on a 4000/96, against 6.4).
The first file-name completion is quicker: 1.5 seconds on a 4000/96 (was 3.3), 3.6 on a 4000/60 (8.9) and 3.5 on a 4000 VLC (13.5).
Fewer garbage collections.
gc-cons-thresholdis 2,000,000 bytes on VMS, five times GNU’s default: a mixed session on a 4000/96 collected once instead of 11 times, 1.9 seconds of collecting instead of 14.1. Each collection takes a little longer, and on a machine short of memory one line in your.emacsputs GNU’s value back. This is also what the last kit’s “slowM-!in some accounts” was: a collection that happened to land in that command.Each garbage collection is cheaper: 0.8 seconds of CPU on a 4000/96 instead of 1.1, 2.2 on a 4000/60 instead of 3.0, 3.9 on a 4000 VLC instead of 5.3. 22.3 found its free memory cell by cell, with costly arithmetic on every cell’s address; it now reads the marks of 32 cells at once. Collecting while Emacs sat idle was tried as well and left out: on the 4000 VLC the idle collection landed in the middle of an
M-x shellcommand and made it 5 seconds slower.A line sent to a new DCL subprocess the moment it starts could reach DCL as its first character only (seen on a simulator with 16 MB under load). The first write now waits until DCL has started to read, at most half a second;
M-x shelldoes not wait at all.Language environments have their descriptions again:
C-h L Englishand ten others showed none, because the dump turned every string that starts with a backslash and a newline into 0, taking it for a documentation string.*scratch*says when the full dump check was skipped at start-up, and namesM-x vms-verify-dump-file, which runs it.The installer sets protections in half the time on a reinstall (110 seconds instead of 219 on a 4000/60, 226 instead of 448 on a 4000 VLC: it now purges the old versions first), no longer re-dates every installed file (which made the next incremental backup copy all of them), takes
NOTESTto skip its self-test, lists the optional kit files it found underCHECK, asks its Y/N questions on a line of their own, and no longer leaves two empty directories behind after a 19.28-only install.On a slow machine, make 19.28 the default. On a VAXstation 3100 M38, 22.3 takes about 42 seconds to start with a terminal and 19.28 under 7.
DEFINE/SYSTEM/EXECUTIVE GNU_EMACS_DEFAULT 19, and the same at boot.The 19.28 and 21.2 programs are the same as in the 11-OCT kit. The 3100 M38 still runs the 11-OCT kit.
What the first 22.3 kits brought
- Emacs 22.3, from Eric Brown’s OpenVMS x86-64 port of 22.3 (which
itself carries Thien-Thi Nguyen’s 21.2 VMS layer forward). Plain
EMACSnow starts it;EMACS19andEMACS21still start the others, and a site can pick the default with the logical nameGNU_EMACS_DEFAULT. - 22.3 is fast enough to live in. The first build started in 12 seconds on a 4000/96 and took 12 seconds for a file-name completion; this one starts in 2.5 seconds in batch and 6 with a terminal, and completes in about 3 (just over a second the second time). Most of the old time was a GNU 22.3 bug in VMS file names that made 76 start-up probes each search the whole load path, and a check that read every page of the 5.8 MB dump file at every start.
- The dump check is now on demand. Emacs checks at start only that its
dump file belongs to the image being run (and refuses a mismatched one
with a clear message). The full check of every byte is still there:
DEFINE EMACS_DUMP_CHECK FULLat start-up, orM-x vms-verify-dump-filein a running Emacs. - Font lock is off by default in 22.3 on the VAX: paging through a C
file is about twice as fast without it. One line in your
.emacs,(global-font-lock-mode 1), turns it back on. - 21.2 got faster and saner subprocesses.
M-x shellof a 600-fileDIRECTORYwent from 11 seconds to under 2 on a 4000/96; a subprocess that runs one command now actually exits, so its sentinel runs; a failing command reports its VMS status instead of “user defined signal 1”;delete-processno longer hangs on an idle DCL;INQUIREin a subprocess command no longer hangs it. All of these are in 22.3 too. M-x vms-resizeasks the terminal its size and redraws; the kept editor asks the terminal before it attaches, so a resized window is picked up when you come back to Emacs.- Fits in 32 MB, measured for the first time: with 22.3 and a shell running on a 32 MB VAXstation 3100 there are still 13 MB free. On a simulator with 16 MB, 22.3 still passes its built-in test suite.
Installing
Exactly as before: the savesets in binary, the
.COM, .EL and .TXT files in ASCII (or unzip on the VAX, which gets
both right), then as SYSTEM:
$ @EMACS_KIT_INSTALL CHECK
$ @EMACS_KIT_INSTALL
It installs 22.3 under SYS$SYSDEVICE:[GNU.EMACS22] beside the other two,
offers to add the login lines to SYLOGIN.COM (it asks first), and runs
the regression suite for all three. Installing over the previous kit is
safe: every file ends up as exactly one version.
@SYS$SYSDEVICE:[GNU]EMACSTEST ALL from any account runs the suite
yourself: 360 checks for 22.3, with its one known bug named in the
output rather than hidden.
Porting 22.3 to the VAX
Eric Brown’s 22.3 port targets VSI C on x86-64. The VAX has Compaq C V6.4 from 2000 and VMS 7.3’s C library. It took 47 commits on top of his tree; the interesting ones:
- The compiler took 22.3’s portable C without a single language
error. Everything that broke was configuration, the build, or a C
library entry point x86-64 has and VAX 7.3 does not (
lstat,symlink,readlink,fchmod). alloca. In 21.2, Compaq C for VAX inlined a function that calls itsallocabuiltin and then kept using stack-relative addresses after the stack had moved – every file-name completion crashed. For 22.3 the VAX build uses Emacs’s ownalloca.cinstead, as 19.28 always did. The whole class is gone: all 66 optimised modules were listed in machine code and scanned, and the scanner was first shown to find the old bug in 21.2’s listing.- The first dump failed loading
files.el: “Wrong type argument: listp”, then a crash printing the error. One bug, found in the machine listing: Emacs’scall2passes the address of its first argument as an array of all three, which is only true of a real VAXCALLSargument list – and the compiler had inlinedcall2intodefmacro, where the “array” was two unrelated stack words. Emacs has a switch for exactly this,NO_ARG_ARRAY; the VAX needed it and nobody had needed it before. - The installed tree found three more that a build tree never showed:
dired dropped the first two characters of every file name (so
RETopened a “new” file), an installed 22.3 looked for its terminal descriptions in/etc/termcap, and the kept editor corrupted the heap at everyC-zby freeing a string it did not own. Each is one small commit now.
Fixes that are not VAX-specific are on their way to Eric Brown for his x86-64 port.
Rebuilding
The source kit has each version’s complete tree. For 22.3, unzip it under your own account on a VAX with Compaq C and MMS, then
$ SUBMIT/NOPRINT/LOG_FILE=SYS$LOGIN:E22.LOG -
/PARAMETERS=(CONFIGURE) dev:[dir]BUILD_EMACS22.COM
configures, builds and dumps it (about 25 minutes on a 4000/96, 6 on a
simulator), and /PARAMETERS=(INSTALL) as SYSTEM installs it. The dump
is 12,153 blocks, with cc-mode in it.
Known limitations
- Terminal only; no DECwindows.
- A 4000/60 is about two and a half times slower than a 4000/96: 22.3 starts there in about 16 seconds with a terminal, and the first completion in a big directory takes about 4.
- In 21.2, text sent to a subprocess the instant it starts can arrive cut to its first character; send once the program has prompted. (22.3 waits for the program to read.)
- In a
-batchscript, 22.3 runs process sentinels only in waits that redisplay. - Now and then a short command in 22.3 (
M-!,M-x shell, the first completion) takes a second or two longer than usual: a garbage collection landed in it. They are rarer and shorter in this kit. - A VAXstation 3100 M38 is about 2.5 times slower than a 4000/60: 22.3 starts there in about 42 seconds with a terminal, so make 19.28 the default there (above).
- 19.28 is frozen as it is:
run-at-timedoes not fire in batch mode, and in batch mode a finished subprocess now and then never gets its sentinel run, so one of its test checks fails now and then (1 run in 8 on a 4000/60); run it again. C-c C-kdoes not stop a long-running DCL command thatM-x greporM-x compilestarted;M-: (delete-process (get-buffer-process (current-buffer)))in its buffer does.- Pressing
C-gseveral times quickly while Emacs is busy can set off Emacs’s emergency escape, which leaves Emacs for DCL and asks “Auto-save?” and “Abort?”; on a slow machine, press it once and wait. - The full list is in
README.TXT, section 8.
How this was done
The same way as last time: a Claude session that plans and reviews, and a fresh Claude Code session for each run with a written brief, on two VAXstations and a simulator – with the rule that nothing counts until a script fails without the fix and passes with it, on the simulator and on real hardware, with the transcripts kept. This round, the lesson was to test the installed tree interactively before calling a version the default: three real bugs lived only there.
Credits: Eric Brown for the OpenVMS x86-64 ports of 21.2 and 22.3 this builds on, Thien-Thi Nguyen for the 21.2 VMS port, Richard Levitte for the 19.28 VMS port, and Claude Code (Anthropic’s Claude models) for much of the porting, testing and writing.
