Commit graph

14 commits

Author SHA1 Message Date
Henrik Lissner
14d341530a tools/eval: always eval elisp in current session
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.
2021-02-24 18:06:30 -05:00
Henrik Lissner
8bbac4bfb3
Minor refactors 2020-08-08 03:06:26 -04:00
Henrik Lissner
345479c29e
Always display evaluated result in popup buffer
If +eval isn't enabled
2020-01-07 14:27:02 -05:00
Henrik Lissner
7ef3bee851
Consider eval output width when deciding how to display it
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,
2019-12-28 13:53:13 -05:00
Henrik Lissner
318754c4d2
Prevent eval results from consuming > half the frame 2019-12-05 20:48:53 -05:00
Henrik Lissner
26c8f5c6ef
Bytecompiler bytecompiler, won't you shut up 2019-11-23 01:21:25 -05:00
Henrik Lissner
c2db4a8708
tools/eval: add REPL support for +eval/buffer 2019-11-15 00:17:10 -05:00
Henrik Lissner
762c374198
Rename +eval-overlay-max-lines -> +eval-popup-min-lines
Generalize variable.
2019-10-29 18:19:02 -04:00
Henrik Lissner
d2fe021bd9
tools/eval: display in minibuffer if below threshold
If it's just a couple lines, display in minibuffer instead.
2019-10-26 03:54:09 -04:00
Henrik Lissner
36c9f7c333
tools/eval: fix popup when +overlay is disabled 2019-10-26 03:53:54 -04:00
Henrik Lissner
84a063ca78
tools/eval: add +overlay feature
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).
2019-10-26 02:12:58 -04:00
Henrik Lissner
a940d07e4b
tools/eval: minor refactors 2019-10-24 19:23:17 -04:00
Henrik Lissner
2214c3175e
Minor tweaks across the board 2019-05-21 00:34:32 -04:00
Henrik Lissner
77e4cc4d58
💥 Remove :feature category
: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.
2019-04-24 18:16:04 -04:00
Renamed from modules/feature/eval/autoload/eval.el (Browse further)