I'm trying to use request.el
but have no clue what I'm doing. What I want to do is create a request to Zotero
that uses their citation picker using the to get a 'Cite As You Write' capability using the Better Bibtex For Zotero
backend.
I have gotten this working with a do-applescript
function, but it sporadically just stops working, and I get the error Emacs is not allows to send keystrokes
. I have gone and reset the security preferences numerous times, and ensured the the Info.plist
has the proper permissions, but I still get this error sporadically.
Can anyone guide me through the process of what I need to do? The relevant url to call is "/usr/bin/curl 'http://localhost:23119/better-bibtex/cayw?format=pandoc' 2>/dev/null; exit 0"
. I have tested it in the scratch buffer and got the popup citation picker once (see picture). However, when I selected the references it changed focus to the Zotero
apps search box, and that's as far as I got.
Subsequent requests have failed, and I get the following error:
Debugger entered--Lisp error: (void-function request)
(request "http://localhost:23119/better-bibtex/cayw?format=pandoc 2>/dev/null; exit 0")
eval((request "http://localhost:23119/better-bibtex/cayw?format=pandoc 2>/dev/null; exit 0") nil)
elisp--eval-last-sexp(nil)
eval-last-sexp(nil)
funcall-interactively(eval-last-sexp nil)
#<subr call-interactively>(eval-last-sexp nil nil)
apply(#<subr call-interactively> eval-last-sexp (nil nil))
(let ((ido-cr+-current-command command)) (apply orig-fun command args))
call-interactively@ido-cr+-record-current-command(#<subr call-interactively> eval-last-sexp nil nil)
apply(call-interactively@ido-cr+-record-current-command #<subr call-interactively> (eval-last-sexp nil nil))
call-interactively(eval-last-sexp nil nil)
command-execute(eval-last-sexp)
I'm sorry, but this is coming across as very much a "can you do this for me" as I don't have a clue what I'm doing.
So I got it working again thanks to @lawlist, and the message I get is:
(fn &rest ARGS2)"] :url "http://localhost:23119/better-bibtex/cayw?format=pandoc 2>/dev/null; exit 0" :response #0 :encoding utf-8) #<buffer *request curl*> nil nil ...)
Any idea how to get this working?