Skip to content

Conversation

EugeneNeuron
Copy link

@EugeneNeuron EugeneNeuron commented Sep 25, 2025

  • Adjust lispy to changes in Emacs internals (cae6554).
  • Adjust lispy to changes in Org-mode (b41e407).
  • Remove hard dependency from counsel, use built-in functions instead.

Please, see more context in each commit message.

It makes all tests pass on Emacs 30.

EugeneNeuron and others added 6 commits September 25, 2025 14:43
* lispy.el (lispy--function-parse): Update function to a newer object
representation.  Fix `lispy-flatten'.

In Emacs 30, it began to use dedicated type to represent
interpreted-function values, `read' function now returns Closure
Function Type instead of simple lists for most types that
`lispy--function-parse' tries to handle (except macros, at least).

See:
- https://git.sv.gnu.org/cgit/emacs.git/commit/?id=f2bccae22bd47a2e7e0937b78ea06131711b935a
- (elisp) Closure Type
- (elisp) Closure Objects

Compare

    (defmacro test-macro (&rest body)
      ,@Body)
    (symbol-function 'test-macro)
    ;; (macro . #[(&rest body) ((\,@ body)) (t)])

with

(defun test-defun (x)
  (+ x 1))
(symbol-function 'test-defun)
;; #[(x) ((+ x 1)) (t)]

There's alternative way to mitigate it, by changing
end of `lispy--function-str' to:

        (error
         (let ((str (cl-prin1-to-string (symbol-function fun))))
           (if (string-prefix-p "#f" str)
               (substring str 2)
             str)))

But it hides the underlying change that needs to be addresed in the
future.

Partially fixes `lispy-let-flatten' as well, but keywords (&optional,
&rest) in function's signature are not recognized correctly.
* lispy.el (lispy--bounds-outline): Replace org-element function with
  the outline one.

In new version of Org mode `org-element-at-point' works only in
Org-like buffers
File can be outside of project (so no root) or may not use poetry/pyproject.toml.
* le-python.el (lispy--python-poetry-name): Fix
* le-python.el (lispy--python-poetry-name): Fix logic.
(lispy--python-proc): Replace counsel function with built-in project alternative.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants