Closed Knusper closed 4 years ago
(advice-add 'request :around (lambda (orig-fun &rest args)
"Always start curl from local directory."
(let ((default-directory "~"))
(apply orig-fun args))))
Thanks for the quick answer. I saw in the meantime also another code, where default-directory
is set like this for each request.
I noticed that when I run functions that use request in a tramp buffer, it does call curl on the machine where the file is that is visited in tramp. While I can envision many scenarios where this is extremely usefull, in my case the remote machine has limited access to the outside world - so the requests naturally fail. My workaround is to run the functions from a local buffer - but this is a bit inconvenient. How can I enforce request to use the curl from the machine in which I have emacs running?