0

I'd like to use ERT with Emacs23. ERT is bundled with Emacs24. Latest version of ERT does not work with Emacs23 because of lack of define-error.

Is there an offical way of using ERT with Emacs23?

Gracjan Polak
  • 1,082
  • 6
  • 21

2 Answers2

1

You can obtain legacy ERT versions for use with Emacs 23 from the old repository of ERT, at commit fb3c278d. Note that this version significantly differs from recent ERT versions. Notably, it lacks test skipping, and many bug fixes.

I would not copy ERT from Emacs 24, though. In recent Emacs releases, ERT uses lexical-binding: t, so the code may easily depend on lexical binding to work correctly, which is simply not available on Emacs 23.

And generally, I'd not write new test suites for Emacs 23 anymore. It's just not worth the effort, imho. The last release of Emacs 23 was three years ago, and we are—albeit slowly—heading towards Emacs 25.

  • Meanwhile latest Mac OS X comes with preinstalled Emacs: GNU Emacs 22.1.1 (mac-apple-darwin) of 2014-04-18 on osx102.apple.com Copyright (C) 2007 Free Software Foundation, Inc. I'm trying to gauge how much effort is it to support Emacs23. Does not have to be 100% working, just should not horribly break. – Gracjan Polak Jan 22 '15 at 21:55
  • @GracjanPolak I don't think that anyone still uses this Emacs version on OS X. It's easy enough to install a decent one... –  Jan 22 '15 at 22:36
0

Answer for other lost souls:

mkdir compat
git clone git://git.savannah.gnu.org/emacs.git
cd emacs
git show bc715d67b3997988e2a48286410d45404e49342c:lisp/emacs-lisp/ert.el > ../compat/ert.el
cd ../compat
curl -L http://elpa.gnu.org/packages/cl-lib-0.5.el -o cl-lib.el

Now add compat to load-path either by using -L command line switch or by using (add-to-list 'load-path (expand-file-name "compat").

Gracjan Polak
  • 1,082
  • 6
  • 21