Integrate eros for better display of evaluation
Now when I evaluate an s-expression, I get a message near the code instead of down below.
This commit is contained in:
parent
9178f08903
commit
911b2ef4ce
3 changed files with 8 additions and 10 deletions
|
@ -32,6 +32,7 @@ This creates [[file:~/.emacs.d/init.el][~/.emacs.d/init.el]] that starts the pro
|
|||
- [[file:ha-irc.org][irc]] :: connection to IRC servers using rcirc and bitlbee.
|
||||
- [[file:ha-passwords.org][passwords]] :: code for generating passwords.
|
||||
- [[file:ha-programming.org][programming]] :: configuration for /all/ programming languages, or at least, the simple ones.
|
||||
- [[file:ha-programming-elisp.org][programming-elisp]] :: additions to Emacs Lisp programming.
|
||||
- [[file:ha-programming-python.org][programming-python]] :: configuration for working with Python and LSP.
|
||||
- [[file:ha-programming-scheme.org][programming-scheme]] :: configuration for Racket.
|
||||
- [[file:ha-aux-apps.org][aux-apps]] :: additional application configuration.
|
||||
|
|
|
@ -169,6 +169,12 @@ Other nifty keybindings that I need to commit to muscle memory include:
|
|||
| ~M-r~ | =sp-raise-sexp= |
|
||||
|
||||
** Eval Current Expression
|
||||
The [[https://github.com/xiongtx/eros][eros]] package stands for Evaluation Result OverlayS for Emacs Lisp, and basically shows what each s-expression is near the cursor position instead of in the mini-buffer at the bottom of the window.
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package eros
|
||||
:hook (emacs-lisp-mode . eros-mode))
|
||||
#+END_SRC
|
||||
|
||||
A feature I enjoyed from Spacemacs is the ability to evaluate the s-expression currently containing the point. Not sure how they made it, but [[help:evil-cp-next-closing ][evil-cp-next-closing]] from cleverparens can help:
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
|
|
|
@ -83,10 +83,6 @@ Let’s test it out by defining a variable:
|
|||
And simply using it:
|
||||
#+BEGIN_SRC scheme :var b=8
|
||||
(+ a b)
|
||||
|
||||
|
||||
|
||||
|
||||
#+END_SRC
|
||||
|
||||
#+RESULTS:
|
||||
|
@ -106,14 +102,9 @@ Let’s get the book available as an Info page:
|
|||
(use-package sicp)
|
||||
#+END_SRC
|
||||
|
||||
And does this work?
|
||||
#+BEGIN_SRC scheme
|
||||
(inc 42)
|
||||
#+END_SRC
|
||||
|
||||
Still having difficulty getting the Scheme REPL to output the results back into this document. Let’s try Racket...
|
||||
|
||||
If we want to read the [[file:~/.emacs.d/straight/build/sicp/sicp.info][sicp.info]] file, looks like we need this, at least, temporarily:
|
||||
Normally, I would just [[info:SICP][read the book]], however, if we want to read the [[file:~/.emacs.d/straight/build/sicp/sicp.info][sicp.info]] file, we need this, at least, temporarily:
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(add-to-list 'auto-mode-alist '("\\.info\\'" . Info-mode))
|
||||
#+END_SRC
|
||||
|
|
Loading…
Reference in a new issue