Tim King <
kin...@gmail.com> writes:
> On Tue, Aug 28, 2012 at 9:43 AM, Hugo Duncan <
hu...@hugoduncan.org> wrote:
>
>>
>> I'm wondering if you have already given some thought to providing a
>> standard way of plugging elisp functionality into nrepl.el. Maybe
>> something related to swank-cloure's jack-in injection of elisp?
>>
> You are talking about the bootstrapping elisp that are sent from
> swank-clojure to emacs, right?
> Seems like we could take a similar approach.
jack-in works by having elisp launch the java process and then parse the
output for text marker guards around the elisp to load. This has the
advantage of isolating the point at which code injection can occur.
> Another idea off the top of my head is to use the eval-in-emacs approach
> that Sam Aaron was talking about in earlier post.
> I have started thinking about implementing that but I don't have anything
> working yet.
eval-in-emacs would probably be the simplest solution. There are perhaps
security implications on having that enabled by default though (in slime
it defaults to disabled).
One way might be to have a nrepl op that can request setup info
middleware. e.g. sending a "client-setup" op with "client" "nrepl.el"
key could cause a reply from every middleware with an "elisp" key with
code to eval. This would require pass-through of the op by every
middleware, so might require some support in the base nrepl server to
avoid the command being reported as unsupported.
Hugo