Skip to content
This repository has been archived by the owner on Apr 17, 2024. It is now read-only.

Emacs >= 26.2 required for restclient-jq #259

Open
josterpi opened this issue Apr 29, 2021 · 1 comment
Open

Emacs >= 26.2 required for restclient-jq #259

josterpi opened this issue Apr 29, 2021 · 1 comment

Comments

@josterpi
Copy link
Contributor

restclient-jq.el calls restclient-remove-var which uses assoc-delete-all which wasn't introduced until Emacs 26.2.

I haven't been paying attention to releases and am still on 26.1. I should probably just upgrade, but it might be worth a note in the Known Issues that the jq hook won't work on Emacs < 26.2. I would be happy to submit a pull request for this.

Before I got to the bottom of this, I ended up defining assoc-delete-all myself instead of modifying the source of restclient.el. It doesn't actually delete all, but I think it works for this.

(defun assoc-delete-all (key a-list)
  (setq a-list (delq (assoc key a-list) a-list)))

If you want to support older versions, it shouldn't be too hard to avoid assoc-delete-all, but it doesn't really matter to me. I'm happy to just upgrade.

After I got it all working, using jq-set-var really streamlined my OAuth authentication. Very slick!

@texaco
Copy link

texaco commented Jul 28, 2021

I am running emacs from debian repository and they still ship it on version 26.1.

It would be appreciated if it is updated for a more compatible version. If not, update documentation could help.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants