drym-org / symex.el

An intuitive way to edit Lisp symbolic expressions ("symexes") structurally in Emacs
Other
271 stars 22 forks source link

Symex interface #136

Closed pbaille closed 2 months ago

pbaille commented 2 months ago

Summary of Changes

Following the discussion about symex interface extension, I leveraged the new symex-interface-extend construct to register builtin interfaces.

This is an experiment, mostly here to trigger discussions.

Public Domain Dedication

(Why: The freely released, copyright-free work in this repository represents an investment in a better way of doing things called attribution-based economics. Attribution-based economics is based on the simple idea that we gain more by giving more, not by holding on to things that, truly, we could only create because we, in our turn, received from others. As it turns out, an economic system based on attribution -- where those who give more are more empowered -- is significantly more efficient than capitalism while also being stable and fair (unlike capitalism, on both counts), giving it transformative power to elevate the human condition and address the problems that face us today along with a host of others that have been intractable since the beginning. You can help make this a reality by releasing your work in the same way -- freely into the public domain in the simple hope of providing value. Learn more about attribution-based economics at drym.org, tell your friends, do your part.)

countvajhula commented 2 months ago

@pbaille Are you planning on adding switch-to-scratch-buffer to the methods interface? (ref. this comment) That's the main remaining item if I am not mistaken.

pbaille commented 2 months ago

@pbaille Are you planning on adding switch-to-scratch-buffer to the methods interface? (ref. this comment) That's the main remaining item if I am not mistaken.

Yes it seems to be the last thing to do, I will take care of it now :) Thank you a lot for the careful review.

countvajhula commented 2 months ago

@dcostaras @anonimitoraf @markgdawson @doyougnu If you have a moment, we could use your help testing that the interface to Clojure, ClojureScript, Common Lisp SLIME and SLY still work as expected.

To test, you could follow these steps:

  1. Clone @pbaille 's fork and switch to the symex-interface branch
  2. Restart Emacs for Symex to be built with the new changes
  3. Try out e, d, r, t etc. in your favorite flavor of Lisp.
  4. Report back here

Thanks!

anonimitoraf commented 2 months ago

Hey @countvajhula, I'm going to be writing a bit of Clojure code soon, so will report back!

pbaille commented 2 months ago

On my side, I tried clojure, elisp and fennel.

anonimitoraf commented 2 months ago

Clojure seems fine! Btw, I'm using symex-hydra. Does that matter?

pbaille commented 2 months ago

thank you @anonimitoraf, it should not matter, the same actions are called hydra or not AFAICT.

countvajhula commented 2 months ago

Tested on ELisp and Racket, and LGTM. The only thing I noticed is that Rigpa uses symex-lisp-modes and was failing to load as a result. I wouldn't really consider this variable to be a supported public interface though. I will push a fix to Rigpa to use (symex-get-lisp-modes).

Merging. Thank you @pbaille ! And also thanks @anonimitoraf for testing!