in pursuit of the zotero integration I discussed in other threads, I am trying to write one simple little function to extend Erik's code, and failing. Since I'm flailing and going to bed soon: can anyone see what's wrong with this function?
The results are generated perfectly well, but the return value of hte function is [cl-struct-deferred deferred:default-callback deferred:default-errorback deferred:default-cancel nil nil nil] [2 times] whereas I want something like: "<div style=\"line-height: 1.35; padding-left: 2em; text-indent:-2em;\" class=\"csl-bib-body\"> <div class=\"csl-entry\">Suchman, Lucy. “Subject Objects.” <i>Feminist Theory</i> 12, no. 2 (August 1, 2011): 119–45. http://resolver.scholarsportal.info/resolve/14647001/v12i0002/119_so.xml .</div> <span class=\"Z3988\" title=\"url_ver=Z39.88-2004&ctx_ver=Z39.88-2004&rfr_id=info%3Asid%2Fzotero.org%3A2&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.atitle=Subject%20objects&rft.jtitle=Feminist%20Theory&rft.volume=12&rft.issue=2&rft.aufirst=Lucy&rft.aulast=Suchman&rft.au=Lucy%20Suchman&rft.date=2011-08-01&rft.pages=119-145&rft.spage=119&rft.epage=145&rft.issn=14647001\"></span> </div>" ------- (defun org-zotxt-get-html-bib (key) ;; (with-output-to-temp-buffer "*help2*" ;; (print key)) (lexical-let ((d (deferred:new))) (request (format "%s/items" zotxt-url-base) :params `(("key" . ,key) ("format" . "bibliography")) :parser 'json-read :success (function* (lambda (&key data &allow-other-keys) ;; (with-output-to-temp-buffer "*debug*" ;; (print data)) (let* ((results (mapcar (lambda (e) (cdr (assq 'html e)) ) data)) ) (with-output-to-temp-buffer "*debug*" (print results)) (results) (deferred:callback-post d (if (null results) nil ;; `((:key ,key :citation ,results)) (results) )) )) ) ) d)) ------------------- thanks again! Matt