Warning: this is an htmlized version!
The original is here, and
the conversion rules are here.
% (find-LATEX "2021emacsconf.tex")
% (defun c () (interactive) (find-LATEXsh "lualatex -record 2021emacsconf.tex" :end))
% (defun C () (interactive) (find-LATEXSH "lualatex 2021emacsconf.tex" "Success!!!"))
% (defun D () (interactive) (find-pdf-page      "~/LATEX/2021emacsconf.pdf"))
% (defun d () (interactive) (find-pdftools-page "~/LATEX/2021emacsconf.pdf"))
% (defun e () (interactive) (find-LATEX "2021emacsconf.tex"))
% (defun u () (interactive) (find-latex-upload-links "2021emacsconf"))
% (defun v () (interactive) (find-2a '(e) '(d)))
% (defun cv () (interactive) (C) (ee-kill-this-buffer) (v) (g))
% (defun d0 () (interactive) (find-ebuffer "2021emacsconf.pdf"))
%          (code-eec-LATEX "2021emacsconf")
% (find-pdf-page   "~/LATEX/2021emacsconf.pdf")
% (find-sh0 "cp -v  ~/LATEX/2021emacsconf.pdf /tmp/")
% (find-sh0 "cp -v  ~/LATEX/2021emacsconf.pdf /tmp/pen/")
%   file:///home/edrx/LATEX/2021emacsconf.pdf
%               file:///tmp/2021emacsconf.pdf
%           file:///tmp/pen/2021emacsconf.pdf
% http://angg.twu.net/LATEX/2021emacsconf.pdf
% (find-LATEX "2019.mk")
% (find-lualatex-links "2021emacsconf")

% «.screenshotdimens»		(to "screenshotdimens")
% «.defs»			(to "defs")
%   «.geometries»		(to "geometries")
%   «.screenshotgeometry»	(to "screenshotgeometry")
% «.title»			(to "title")
% «.what»			(to "what")
% «.how-to-create»		(to "how-to-create")
% «.find-eeit-links»		(to "find-eeit-links")
% «.etc»			(to "etc")

% (find-ssr-links     "eev2021" "emacsconf2021" "{hash}")
% (code-eevvideo      "eev2021" "emacsconf2021" "{hash}")
% (code-eevlinksvideo "eev2021" "emacsconf2021" "{hash}")
% (find-eev2021video "0:00")

\usepackage[colorlinks,citecolor=DarkRed,urlcolor=DarkRed]{hyperref} % (find-es "tex" "hyperref")
\usepackage[x11names,svgnames]{xcolor} % (find-es "tex" "xcolor")
\usepackage{colorweb}                  % (find-es "tex" "colorweb")
\usepackage{edrx21}               % (find-LATEX "edrx21.sty")
\input edrxaccents.tex            % (find-LATEX "edrxaccents.tex")
\input edrx21chars.tex            % (find-LATEX "edrx21chars.tex")
\input edrxheadfoot.tex           % (find-LATEX "edrxheadfoot.tex")
\input edrxgac2.tex               % (find-LATEX "edrxgac2.tex")
% «screenshotdimens»  (to ".screenshotdimens")
% (find-es "x" "screen-dimensions")
% (find-sh "xdpyinfo | grep 'dimensions:'")
% (find-sh "xdpyinfo | grep 'dimensions:'" "1280x800")
% (/ 800 1280.0)
% (find-es "tex" "geometry")
\usepackage[%a6paper, landscape,
            %top=1.5cm, bottom=.25cm, left=1cm, right=1cm, includefoot
            top=1cm, bottom=.25cm, left=1cm, right=1cm, includefoot

\directlua{dofile "dednat6load.lua"}  % (find-LATEX "dednat6load.lua")

\def\draftfooter{\tiny \href{\drafturl}{\jobname{}} \ColorBrown{\shorttoday{} \hours}}

%  ____        __     
% |  _ \  ___ / _|___ 
% | | | |/ _ \ |_/ __|
% | |_| |  __/  _\__ \
% |____/ \___|_| |___/
% «defs»  (to ".defs")
% «geometries»  (to ".geometries")
% «screenshotgeometry»  (to ".screenshotgeometry")
\newgeometry{top=0cm, left=0cm, right=0cm, ignoreheadfoot, bottom=0cm}

% (find-LATEX "2019emacsconf.tex" "co")
% (find-es "tex" "co")
% \co: a low-level way to typeset code; a poor man's "\verb"

\def\fnu#1{{\footnotesize \url{#1}}}

%  _____ _ _   _      
% |_   _(_) |_| | ___ 
%   | | | | __| |/ _ \
%   | | | | |_| |  __/
%   |_| |_|\__|_|\___|
% «title»  (to ".title")



  {\bf \Huge Test blocks} \\
  \scalebox{1.1}{A new feature of eev} \\
  \scalebox{0.9}{Eduardo Ochs} \\
    \url{http://angg.twu.net/emacsconf2021.html} \\
    \url{http://angg.twu.net/\#eev} \\


% __        ___           _   
% \ \      / / |__   __ _| |_ 
%  \ \ /\ / /| '_ \ / _` | __|
%   \ V  V / | | | | (_| | |_ 
%    \_/\_/  |_| |_|\__,_|\__|
% «what»  (to ".what")
% (e21p 2 "what")
% (e21a   "what")

{\bf Contents}


% (find-es "tex" "list")

\item How to use a test block \\ (with \qco{<f8>}s)

\item How to insert a test block \\ (with \qco{M-x eeit})

\item How \qco{eeit} is implemented

\item How to add support for a new language \\ (with \qco{M-x find-eeit-links})

\item Etc












% «how-to-create»  (to ".how-to-create")
% (e21p 7 "how-to-create")
% (e21a   "how-to-create")


{\bf How to create a test block:}

Type \qco{M-x eeit},

or \qco{M-x ee-insert-test},

or \qco{M-x ee-insert-test-block}.


The result depends on the language ---

\qco{eeit} uses the major mode to detect it.

For example, if the major mode is

\qco{lua-mode} then \qco{M-x eeit} runs












% «find-eeit-links»  (to ".find-eeit-links")
% (e21p 11 "find-eeit-links")
% (e21a    "find-eeit-links")


{\bf How to add (or change)}

{\bf the support for a language}


Type \qco{M-x find-eeit-links}.


If the current mode is \qco{python-mode},

this will let you (re)write the function



It will create a temporary buffer like this:





% «etc»  (to ".etc")
% (e21p 13 "etc")
% (e21a    "etc")


For more info, a real-world example, etc, see:






By the way:


If you hate the red stars

because they are `char 15's

you can use red bullets

instead -- `char 8226's.


Run \qco{M-x find-red-star-links}

for instructions.

\GenericWarning{Success:}{Success!!!}  % Used by `M-x cv'




Hi! My name is Eduardo Ochs and I'm the author of an Emacs package
called eev. This talk is about a new feature of eev called Test
Blocks. It's a 5-minute talk, so I'll have to be very concise -- and
hurry a bit.


Several things will be just shown as links at the end, here in the
Etc. Besides that, here is the structure of this talk: how to use an
existing test block - we just need to type f8 several times in the
right places; how to create a new test block with M-x
ee-insert-test-block or M-x eeit; how eeit is implemented - it's just
6 lines of lisp; and to make eeit support new languages.


This is an example of a test block in Lua. This is a Lua file, as you
can see here, in the file extension and in the major mode, and this
thing here, that Lua treats as a comment, for us is a test block. Eev
mode is active, so the f8 works in the right way. Let's see a demo.

If I type f8s here the first three f8s create a target buffer running
a Lua repl, and the other f8s send these lines here to the repl here.
The dofile tells the repl to load the file square-cube.lua and the
other lines test the functions in square-cube.lua.

That's a lot of information, so let's organize it in a more visual
way. These three lines set up the this target buffer here in the right
window. It is running a Lua repl in comint mode. These other lines are
sent to the repl. The repl thinks that the user had typed them
character by character.

Let's now decypher what f8 does. When we type f8 in a line that starts
with a red star Emacs executes the rest of the line as Lisp, and moves

When we type f8 on a line that does not start with a red star then
Emacs send that line to the target buffer, and moves down. This line
with the dofile makes the repl load the file square-cube.lua and these
other lines test the functions that were defined in square-cube.lua.

So this is how to use an existing test blocks. We can edit this thing
here, change the tests, and run the new tests.


How do we create a test block in a file that doesn't have one? We type
M-x eeit, or M-x ee-insert-test-block. It will insert something, and
this something depends on the major mode.

More precisely, here is how eeit is defined. It builds the name of a
function using the major mode, and it calls that other function. The
other function does all the hard word.

Most of these functions that insert test blocks are very similar to
one another, but a few of them have extra features. I'm not showing
them here, though.

And here are some examples of what these functions can do, or what
they usually do. In these seven windows we have buffers in seven
different major modes. The first line in each indicates the language,
and I've just run M-x eeit in each one. Note that the syntax for
multi-line comments change according to the language. The setup block
also changes, because it needs to specify which repl to run, and the
line that loads the current file also has a syntax that depends on the
language - and it usually mentions the filename, that the function for
that major mode deduced from the buffer name.

In some languages writing a multi-line comment is a bit tricky - see
here, in shell, and here, in Tcl - and default test block for Org mode
is weird - just runs a shell, it doesn't load the current file. But
this is easy to change.

My first

To change the function that inserts tests blocks in a given major mode
we just need to run M-x find-eev-links

M-x ee-insert-test-block


\GenericWarning{Success:}{Success!!!}  % Used by `M-x cv'


%  __  __       _        
% |  \/  | __ _| | _____ 
% | |\/| |/ _` | |/ / _ \
% | |  | | (_| |   <  __/
% |_|  |_|\__,_|_|\_\___|
% <make>
% (find-es "tex" "pdfcrop")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cp ~/INKSCAPE/square-cube-4.pdf ~/LATEX/2021emacsconf/

% Local Variables:
% coding: utf-8-unix
% ee-tla: "e21"
% End: