Skip to content

fix: add Emacs 30 compatibility for closql - #7

Open
ArthurHeymans wants to merge 1 commit into
doomelpa:masterfrom
ArthurHeymans:Emacs30ClosqlCompat
Open

fix: add Emacs 30 compatibility for closql#7
ArthurHeymans wants to merge 1 commit into
doomelpa:masterfrom
ArthurHeymans:Emacs30ClosqlCompat

Conversation

@ArthurHeymans

Copy link
Copy Markdown

In Emacs 30, closql--coerce may return an eieio--class struct instead
of a class symbol in slot 0 when converting objects to lists. This
causes closql--abbrev-class to fail with 'wrong-type-argument sequencep'.

Add advice to convert the class struct to its symbol name before
closql--abbrev-class processes it. The fix only applies on Emacs 30+.

In Emacs 30, closql--coerce may return an eieio--class struct instead
of a class symbol in slot 0 when converting objects to lists. This
causes closql--abbrev-class to fail with 'wrong-type-argument sequencep'.

Add advice to convert the class struct to its symbol name before
closql--abbrev-class processes it. The fix only applies on Emacs 30+.
@spahijajakov

Copy link
Copy Markdown

Tested manually, it works for me. @ArthurHeymans

@mikeshulman

Copy link
Copy Markdown

I don't think this fixes the problem for me. Please tell me if I'm doing something wrong. I'm loading this branch with

(use-package code-review
  :vc (:url "https://github.com/ArthurHeymans/code-review" :branch "Emacs30ClosqlCompat" :rev :newest)
  :after forge
  :bind (:map forge-topic-mode-map
              ("C-c r" . code-review-forge-pr-at-point)))

and I've checked that ~/.emacs.d/elpa/code-review/code-review-db.el contains the defadvice, and with C-h f that closql--abbrev-class is in fact advised. But I still get the wrong-type-argument sequencep error when calling code-review-forge-pr-at-point.

I'm using Emacs 30.2 installed from snap in Ubuntu.

ykoor pushed a commit to ykoor/code-review that referenced this pull request Aug 7, 2026
…elpa#5, doomelpa#7)

- doomelpa#10: load ghub-legacy when ghub-graphql is not already defined,
  restoring compatibility with ghub 5.1 while keeping older releases
  working.
- doomelpa#8 and doomelpa#5: fix the payload structure in code-review-send-labels
  (vector of label names, correct post/put choice).
- doomelpa#7 (amended): instead of advising closql--abbrev-class, advise
  closql--coerce and closql--remake-instance to replicate closql
  2.4.0's Emacs 30 handling of EIEIO records.  The original advice
  only covered one call site of the same root cause.  Verified on
  Emacs 30.2 with closql 2.3.2 and 2.4.1, with
  eieio-backward-compatibility both enabled and disabled.
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.

3 participants