
Testing Emacs Packages: surprisingly non-awful - luu
http://jamesporter.me/2014/05/15/testing-elisp.html
======
broodbucket
Slightly off-topic, I'm an Emacs user and interested in learning Lisp for not-
just-Emacs reasons. Can anyone suggest a good learning resource? It doesn't
really matter what Lisp it's for, as long as the concepts apply to all
implementations of my brackety confusion.

~~~
eru
Just be aware that Emacs Lisp is a rather ugly and (nowadays) non-conventional
Lisp.

Good modern Lisps are Racket and Clojure. SICP is good, but if that's too
hard, you can try "How to design programs" which starts from scratch.

~~~
lispm
Emacs Lisp is a relatively standard Lisp, slightly oldish.

> Lisps are Racket and Clojure

Racket and Clojure are languages derived from Scheme or Lisp . They are mostly
incompatible to other Lisp dialects. Racket and Clojure are completely
incompatible with each other or even Emacs Lisp.

~~~
eru
Emacs Lisp used to be close to `the' standard Lisp. But since a few decades
all Lisp have static scoping by default now.

Racket and Clojure are both Lisps, and, yes, they are incompatible. They are
different, if related, languages.

Our local guru, Paul Graham, has his own (incompatible!) Lisp dialect, Arc,
loosely based on and implemented in Racket.

~~~
lispm
> Emacs Lisp used to be close to `the' standard Lisp. But since a few decades
> all Lisp have static scoping by default now.

Static scoping is nowadays supported in Emacs Lisp.

------
Expez
There is also Ecukes[1] which lets you write Cucumber style integration tests
for emacs. We use these exclusively when writing the elisp part of clj-
refactor[2]. These are so high level, and readable, that they can often double
as documentation.

The only real gripe I have with Ecukes is that the diff of the actual and
expected output could be better. Turning on whitespace-mode while writing
these scenarios have often solved an otherwise inexplicable test failure.

[1] [https://github.com/ecukes/ecukes](https://github.com/ecukes/ecukes) [2]
[https://github.com/clojure-emacs/clj-refactor.el](https://github.com/clojure-
emacs/clj-refactor.el)

------
cheez
I always wondered why unwind-protect required a progn for multiple forms for
the first argument when in most cases, you would end up with a single form for
the handler and nearly always need a progn for the first argument.

Maybe it's just me?

~~~
rcthompson
You can't use progn for the handlers, because they need to be separate forms.
So there's no other good way to do it.

