Git Product home page Git Product logo

eros's Introduction

MELPA License GPL 3

Eros

Evaluation Result OverlayS for Emacs Lisp.

Overlay

Installation

Install via MELPA.

For general information on installing Emacs packages, see the Emacs Wiki.

Setup

In your init file, add the following to activate eros-mode and see Emacs Lisp evaluation results as inline overlays.

(eros-mode 1)

Use M-x eros-mode to turn the minor mode off, or call

(eros-mode -1)

Credits

The code is mostly taken from CIDER, and the idea came from Artur Malabarba's blog.

eros's People

Contributors

isamert avatar jcs090218 avatar xiongtx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

eros's Issues

eval-region

Hi, this package is great! Would it be possible also to create a wrapper for eval-region? It would work wonders with my evil-operator-eval which is based on this function. I did try to wrap it into the eros overlay function, but unfortunately the result was always nil - so it seems I'm doing something wrong. Thanks! :)

add cider-like shortcuts

As a person, who codes mostly in Clojure, I've got used to Cider commands bindings (well, some of them) and miss them very much when I code in Emacs lisp.

The thing is there are not so many elisp counterparts to keep them in a separate package (though I thought about this), but enough not to keep them in init.el.

So, do you think it's a good idea to add another minor mode with a cider-like keymap to EROS?

scan-error in eros--make-result-overlay

eros--make-result-overlay calls backward-sexp which calls (forward-sexp -1) whose documentation says:

If unable to move over a sexp, signal scan-error with three arguments: ...

This means when you try to use eros--make-result-overlay when the cursor is at the start of a sexp, you can get a scan error, for example:
With the cursor on the f of (function arg arg), it fails with scan-error.

I just wrapped backward-sexp in ignore-errors, I don't know if there's a better fix.
bo-tato@b255f9d

`eval-expression-print-level|length` are not respected

Eros captures the return value of the prin1 call made by elisp--eval-last-sexp-print-value. But the return value is not subject to e.g. eval-expression-print-level|length, only its printed value is. As a result, these variables have no effect on eros' overlay display.

A possible fix is to, e.g.:

(let* ((result (eval-last-sexp eval-last-sexp-arg-internal))
	 (print-level eval-expression-print-level)
	 (print-length eval-expression-print-length)
	 (ores (prin1-to-string result t)))
...
  (eros--eval-overlay ores (point))

in eros-eval-last-sexp, and, if a string is passed to eval-overlay, do not format it with %S but use directly:

 (eros--make-result-overlay (if (stringp value) value (format "%S" value)) ...

Happy to submit a PR if you would like.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.