[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Proposing elisp-eval-target for eval-last-sexp and related commands

From: Psionic K
Subject: Re: Proposing elisp-eval-target for eval-last-sexp and related commands
Date: Wed, 18 Aug 2021 13:19:42 +0800

Indeed ielm is my workflow for this use case.  When I shared a shortcut on Reddit for the `ielm-change-working-buffer` solution, it was obvious that many users have a strong preference for working in an elisp major mode buffer.  I can't provide a shortcut however because the `eval-last-sexp` style functions don't have any `working-buffer` concept like the ielm implementation.   The change I'm proposing will allow the extremely low friction of the ielm solution but with the freedom of an elisp major mode buffer.

On Wed, Aug 18, 2021 at 2:11 AM Stefan Monnier <monnier@iro.umontreal.ca> wrote:
Psionic K [2021-08-18 00:11:01] wrote:
> Proposing to patch the eslip module so that if a buffer-local
> `elisp-eval-target` has been set, `eval-last-sexp` and similar commands
> will execute lisp in the context of another buffer.
> The use case is when developing elisp to operate on non-elisp buffers,
> interacting with functionality for other languages such as when using LSP.

`M-x ielm` lets you do just that.

Having a dedicated buffer also lets it print the result more comfortably
and show the "target buffer" in the mode line.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]