Evaluating code (and :tools (eval +overlay) enabled) will do one of two
things with the return value:
If long, it will be displayed in a popup window on the bottom of the
frame. If short (<3-4 lines), it will be displayed in an overlay at the
end of the line.
If you happened to have scrolled horizontally (such that the BOL isn't
visible), the overlay would be displayed offscreen and unreadable. Any
attempt to scroll it into view will cause it to disappear (as per its
transient nature). This fix pads each newline in said overlay such that
the overlay is pushed into view.
doom-enlist is now a deprecated alias for ensure-list, which is built
into Emacs 28.1+ and is its drop-in replacement. We've already
backported it for 27.x users in doom-lib (in 4bf4978).
Ref: 4bf49785fd
Sending this form to a REPL (like ielm):
(defun test (n)
...)
Will yield:
(defun test (n
...))
Because our RET emulation doesn't take evil's off-by-one cursor
placement into account.
If you used an +eval/* command from a non-emacs-lisp-mode buffer,
quickrun would prompt you for a program to evaluate the code with. If
you selected "emacs" the code would evaluate in an external Emacs
process and return displayed output (stdout).
This commit changes +eval/buffer, +eval/region, and
+eval/region-and-replace (and all the other +eval commands that use
them) to evaluate code in the current session instead.
If ':tools (eval +overlay)' is enabled, eval commands display their
output in a floating overlay at EOL. If the output is longer than
+eval-popup-min-lines (5), it will display it in a popup window instead.
With this, it also will use a popup window if the output is longer than
the minibuffer can display in one line,
Now, inline evaluation will display results in an overlay next to the
cursor, rather than in the minibuffer (unless it gets too big, in which
case it'll use a popup buffer).
Also consolidates all REPLs (opened through the :tools eval module)
under one popup rule, which inhibits ESC from prematurely closing
them (#1944), and cleans up after their buffers *only* if their handlers
weren't specified to :persist, e.g.
(set-repl-handler! 'some-mode #'some-repl-handler :persist t)
Also standardized ESS's REPL commands.
Also:
- Refactors REPL logic
- Open-repl commands now copy selection to new REPL and select
them (without executing them).
- Send-to-repl now auto-executes by default. Prefix arg = don't auto
execute
:feature was a "catch-all" category. Many of its modules fit better in
other categories, so they've been moved:
- feature/debugger -> tools/debugger
- feature/evil -> editor/evil
- feature/eval -> tools/eval
- feature/lookup -> tools/lookup
- feature/snippets -> editor/snippets
- feature/file-templates -> editor/file-templates
- feature/workspaces -> ui/workspaces
More potential changes in the future:
- A new :term category for terminal emulation modules (eshell, term and
vterm).
- A new :os category for modules dedicated to os-specific functionality.
The :tools macos module would fit here, but so would modules for nixos
and arch.
- A new :services category for web-service integration, like wakatime,
twitter, elfeed, gist and pastebin services.