Quick
index
main
eev
eepitch
maths
angg
blogme
dednat6
littlelangs
PURO
(C2,C3,C4,
 λ,ES,
 GA,MD,
 Caepro,
 textos,
 Chapa 1)

emacs
lua
(la)tex
maxima
 qdraw
git
lean4
agda
forth
squeak
icon
tcl
tikz
fvwm
debian
irc
contact

Trying eev with a sexp (2024)

Note: most of this page uses sexps for package.el, that is the default package manager for Emacs. If you use straight.el, go to this section.

Update: see the page of my presentation at the EmacsConf2024.

1. Two basic tutorials
2. Eepitch
3. `find-wget'
3.1. edebug
4. Straight.el
5. The video
6. Uninstalling eev


1. Two basic tutorials

In sep/2024 I started to answer people in the #emacs IRC channel who asked for elisp tutorials with this sexp,

(progn
  (package-initialize)
  ;;
  ;; See: http://anggtwu.net/2024-no-public-key.html
  (setq package-check-signature nil)
  (package-refresh-contents)
  (package-install 'gnu-elpa-keyring-update)
  (setq package-check-signature 'allow-unsigned)
  ;;
  (package-install 'eev)
  (eev-beginner)
  (find-2a ' (find-eev-quick-intro "2. Evaluating Lisp")
           ' (find-elisp-intro     "1. Introduction")
  )
)

abbreviated to this,

(progn
  (package-initialize)
  (package-refresh-contents)
  (package-install 'eev)
  (eev-beginner)
  (find-2a '(find-eev-quick-intro "\n2.")
           '(find-elisp-intro "1.")
  )
)

...and converted to a single long line (not shown). When someone executes that sexp with their favorite variant of C-x C-e it installs eev from ELPA, activates eev-mode, and displays the main eev tutorial - (find-eev-quick-intro) - at the window at the left, and displays its elisp tutorial - (find-elisp-intro) - at the window at the right, like this:


2. Eepitch

When someone is curious by eepitch - i.e., by:

then the sexp for trying it is this one, but usually converted to a single long line...

(progn
  (package-initialize)
  (package-refresh-contents)
  (package-install 'eev)
  (eev-beginner)
  (find-eev-quick-intro "6.1.")
  )

Here is a screenshot of what the person will see if she understands the demo in the section 6.1 and tries the demo in the part marked in blue below, that is in the section 6.2:


3. `find-wget'

Stranger sexps are possible. For example, I am learning SQLite, and people who are curious about how I am organizing my notes on it may find the sexp below interesting:

(progn
  (package-initialize)
  (package-refresh-contents)
  (package-install 'eev)
  (eev-beginner)
  (ee-rstdoc-default-defuns)
  (eval (ee-read (ee-dot-emacs-concat "angges")))
  (find-es "sqlite" "with-recursive")
  )

In my machine `find-es' is just a shorter hyperlink to an anchor in a local file, but most people redefine `find-es' to make it use `find-wget'. Usually that redefinition is done in the init file, but here we do it in another way.

Usually people use M-x find-dot-emacs-links to put configurations for eev in their init files, but in the big sexp above the ee-dot-emacs-concat returns a small lisp program - that redefines `find-es' - as a string, and the ee-read and the eval execute that small lisp program... we run it without putting it in the init file.

The

(find-es "sqlite" "with-recursive")

points to my notes on "WITH RECURSIVE". They look like this,

and note that they have lots of links to the manual of SQLite, like this one:

(find-sqlite3doc "lang_with#recursive_query_examples")

One of my presentations at the EmacsConf2022 was about that kind of link. See:

(find-eev2022pyhsubs "00:54" "Here is an example")
(find-eev2022pyvideo "00:54" "Here is an example")


3.1. edebug

The example below uses `find-wget-elisp' - that is similar to `find-wget', but puts the buffer in emacs-lisp-mode - to display a mini-tutorial for edebug at the window at the right.

(progn
  (package-initialize)
  ;;
  ;; See: http://anggtwu.net/2024-no-public-key.html
  (setq package-check-signature nil)
  (package-refresh-contents)
  (package-install 'gnu-elpa-keyring-update)
  (setq package-check-signature 'allow-unsigned)
  ;;
  (package-install 'eev)
  (eev-beginner)
  (eval (ee-read (ee-dot-emacs-concat "angges")))
  ;;
  (find-2a
   ' (find-eev-quick-intro "2. Evaluating Lisp")
   ' (find-wget-elisp "http://anggtwu.net/elisp/edebug-2024.el")
  )
)

It was inspired by this thread in help-gnu-emacs, and discussed in the eev mailing list. Here are two screenshots:

In the second screenshot I had just instrumented the function `ee-triangle-buggy', and I was running it in edebug mode; I had typed SPC a few times, and edebug was saying that it had just evaluated the variable `n', and the result was 4.


4. Straight.el

If you use straight.el then you need to replace the

(package-initialize)
(package-refresh-contents)
(package-install 'eev)

in each of the sexps above by one of these two sexps:

(straight-use-package 'eev)

or

(straight-use-package '(eev :type git :host github :repo "edrx/eev"))

The shorter one uses the version of eev from ELPA; the other one uses the version from the git repository.

So, for example, to open the main tutorial and the elisp tutorial you can use this sexp,

(progn
  (straight-use-package 'eev)
  (eev-beginner)
  (find-2a '(find-eev-quick-intro "\n2.")
           '(find-elisp-intro "1.")
  )
)

and to open the tutorial on eepitch you can use this one:

(progn
  (straight-use-package 'eev)
  (eev-beginner)
  (find-eev-quick-intro "6.1.")
  )


5. The video

The video about "Trying eev with a sexp" is here.


6. Uninstalling eev

Eev is not for adults - and if you're an adult then you will probably want to uninstall it after a few minutes. For most people just deactivating eev-mode with `M-x eev-mode' should be enough; see:

(find-eev-levels-intro "1. Installing")
(find-eev-levels-intro "2. Loading")
(find-eev-levels-intro "3. Activating")
(find-eev-levels-intro "4. Aliases")
(find-eev-levels-intro "5. Completion")

...because the eev-mode-map defines lots of keybindings - see the first screenshot below, and go here for more information on its main keys. If you really want to remove eev completely and you are using package.el then you can run `M-x find-epackages eev RET' and click on the uninstall button - see the second screenshot below (that was from my page about the other window).

A slightly less obvious way to uninstall eev is with `M-x package-delete RET eev'... and if you prefer to uninstall eev by running a sexp, use the uncommented `package-delete' below:

;; (find-epackage-links 'eev)
(package-delete (package-get-descriptor 'eev))


(Announcements: eev mailing list (video), Emacs News blog post and tangents)