help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do I pass a variable defined in a wrapping let, to a lambda?


From: Steinar Bang
Subject: Re: How do I pass a variable defined in a wrapping let, to a lambda?
Date: Sat, 12 Mar 2022 10:34:18 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (windows-nt)

>>>>> Steinar Bang <sb@dod.no>:

> But then this may be fixable after all.

Ok, fixed!

I created this file in a directory in load-path, and byte compiled it.
 https://gist.github.com/steinarb/655b632c5f453f0d92bf346a1ac3f96a

Then I changed the .emacs settings to this:

;; restclient from git to get restclient-jq
(add-to-list 'load-path (expand-file-name "~/git/restclient.el"))
(when (locate-library "restclient")
  (require 'restclient)
  (require 'restclient-jq)
  (require 'sb-restclient)
  (restclient-register-result-func "save-body" #'restclient-save-body "Save 
body to filename given as arg"))

And then C-c C-c on this restclient rule, fetched the URL with GET and
saved the body to the file ~/.stinkyAuthtoken:

# -*-restclient-*-
# Fetch token
GET http://lorenzo.hjemme.lan/api/authorize
X-CSRF: 1
-> save-body ~/.stinkyAuthtoken

Thanks again to all that responded!

(and I can highly recommend restclient.el to all who are weary of postman)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]