All settings are default ones. Anki-editor works fine.
Error reproduced with file like
#+ANKI_DECK: attestation-2021
* Test
lalala
Debugger entered--Lisp error: (wrong-type-argument numberp ((result) (error . "cannot create note because it is empty")))
number-to-string(((result) (error . "cannot create note because it is empty")))
(org-set-property org-anki-prop-note-id (number-to-string result))
(save-excursion (goto-char (progn (or (progn (and (memq (type-of note) cl-struct-org-anki--note-tags) t)) (signal 'wrong-type-argument (list 'org-anki--note note))) (aref note 6))) (org-set-property org-anki-prop-note-id (number-to-string result)))
(cond ((equal "addNote" (assoc-default "action" action)) (save-excursion (goto-char (progn (or (progn (and (memq (type-of note) cl-struct-org-anki--note-tags) t)) (signal 'wrong-type-argument (list 'org-anki--note note))) (aref note 6))) (org-set-property org-anki-prop-note-id (number-to-string result)))) ((equal "updateNoteFields" (assoc-default "action" action)) (message "org-anki: note succesfully updated: %s" (progn (or (progn (and (memq (type-of note) cl-struct-org-anki--note-tags) t)) (signal 'wrong-type-argument (list 'org-anki--note note))) (aref note 1)))))
(let* ((note-with-action (car pair)) (note (car note-with-action)) (action (cdr note-with-action)) (result (car (cdr pair)))) (cond ((equal "addNote" (assoc-default "action" action)) (save-excursion (goto-char (progn (or (progn ...) (signal ... ...)) (aref note 6))) (org-set-property org-anki-prop-note-id (number-to-string result)))) ((equal "updateNoteFields" (assoc-default "action" action)) (message "org-anki: note succesfully updated: %s" (progn (or (progn (and ... t)) (signal 'wrong-type-argument (list ... note))) (aref note 1))))))
org-anki--handle-pair(((#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck"))))) ((result) (error . "cannot create note because it is empty"))))
-map(org-anki--handle-pair (((#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck"))))) ((result) (error . "cannot create note because it is empty")))))
(let* ((result-list (append the-result nil)) (pairs (-zip-lists note-action-pairs result-list)) (sorted (-sort #'(lambda (a b) (> (org-anki--get-point a) (org-anki--get-point b))) pairs))) (-map 'org-anki--handle-pair sorted))
(closure ((actions (("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (note-action-pairs (#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (notes-and-tag-actions2) (notes-and-tag-actions) (updates) (adds (#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (notes-and-actions ((#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck"))))))) (existing-tags) (promise . #<promise-class promise-class-15912d977270>) (notes #s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32)) cl-struct-org-anki--note-tags t) (the-result) (let* ((result-list (append the-result nil)) (pairs (-zip-lists note-action-pairs result-list)) (sorted (-sort #'(lambda (a b) (> (org-anki--get-point a) (org-anki--get-point b))) pairs))) (-map 'org-anki--handle-pair sorted)))([((result) (error . "cannot create note because it is empty"))])
funcall((closure ((actions (("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (note-action-pairs (#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (notes-and-tag-actions2) (notes-and-tag-actions) (updates) (adds (#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (notes-and-actions ((#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck"))))))) (existing-tags) (promise . #<promise-class promise-class-15912d977270>) (notes #s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32)) cl-struct-org-anki--note-tags t) (the-result) (let* ((result-list (append the-result nil)) (pairs (-zip-lists note-action-pairs result-list)) (sorted (-sort #'(lambda (a b) (> (org-anki--get-point a) (org-anki--get-point b))) pairs))) (-map 'org-anki--handle-pair sorted))) [((result) (error . "cannot create note because it is empty"))])
(if the-error (if on-error (funcall on-error the-error) (error "Unhandled error: %s" the-error)) (funcall on-result the-result))
(let ((the-error (assoc-default 'error data)) (the-result (assoc-default 'result data))) (if the-error (if on-error (funcall on-error the-error) (error "Unhandled error: %s" the-error)) (funcall on-result the-result)))
(let* ((data (car (cdr (plist-member --cl-rest-- ':data))))) (let ((the-error (assoc-default 'error data)) (the-result (assoc-default 'result data))) (if the-error (if on-error (funcall on-error the-error) (error "Unhandled error: %s" the-error)) (funcall on-result the-result))))
(closure ((json . "{\"version\":6,\"action\":\"multi\",\"params\":{\"actions\":[{\"action\":\"addNote\",\"params\":{\"note\":{\"deckName\":\"attestation-2021\",\"modelName\":\"Basic\",\"fields\":{\"Front\":\"<p>\\nTest</p>\\n\",\"Back\":\"<p>\\nlalala</p>\\n\"},\"tags\":\"\",\"options\":{\"allowDuplicate\":false,\"duplicateScope\":\"deck\"}}}}]}}") (on-error closure ((actions (("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (note-action-pairs (#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (notes-and-tag-actions2) (notes-and-tag-actions) (updates) (adds (#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (notes-and-actions ((#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck"))))))) (existing-tags) (promise . #<promise-class promise-class-15912d977270>) (notes #s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32)) cl-struct-org-anki--note-tags t) (the-error) (org-anki--report-error "Couldn't update note, received: %s" the-error)) (on-result closure ((actions (("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (note-action-pairs (#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (notes-and-tag-actions2) (notes-and-tag-actions) (updates) (adds (#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (notes-and-actions ((#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck"))))))) (existing-tags) (promise . #<promise-class promise-class-15912d977270>) (notes #s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32)) cl-struct-org-anki--note-tags t) (the-result) (let* ((result-list (append the-result nil)) (pairs (-zip-lists note-action-pairs result-list)) (sorted (-sort #'(lambda (a b) (> (org-anki--get-point a) (org-anki--get-point b))) pairs))) (-map 'org-anki--handle-pair sorted))) (body ("action" . "multi") ("params" ("actions" (("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))))) t) (&rest --cl-rest--) "\n\n(fn &key DATA &allow-other-keys)" (let* ((data (car (cdr (plist-member --cl-rest-- ':data))))) (let ((the-error (assoc-default 'error data)) (the-result (assoc-default 'result data))) (if the-error (if on-error (funcall on-error the-error) (error "Unhandled error: %s" the-error)) (funcall on-result the-result)))))(:data ((result . [((result) (error . "cannot create note because it is empty"))]) (error)) :symbol-status success :error-thrown nil :response #s(request-response :status-code 200 :history nil :data ((result . [((result) (error . "cannot create note because it is empty"))]) (error)) :error-thrown nil :symbol-status success :url "http://localhost:8765/" :done-p nil :settings (:type "GET" :data "{\"version\":6,\"action\":\"multi\",\"params\":{\"actions\":[{\"action\":\"addNote\",\"params\":{\"note\":{\"deckName\":\"attestation-2021\",\"modelName\":\"Basic\",\"fields\":{\"Front\":\"<p>\\nTest</p>\\n\",\"Back\":\"<p>\\nlalala</p>\\n\"},\"tags\":\"\",\"options\":{\"allowDuplicate\":false,\"duplicateScope\":\"deck\"}}}}]}}" :headers (("Content-Type" . "application/json")) :parser json-read :error (closure ((json . "{\"version\":6,\"action\":\"multi\",\"params\":{\"actions\":[{\"action\":\"addNote\",\"params\":{\"note\":{\"deckName\":\"attestation-2021\",\"modelName\":\"Basic\",\"fields\":{\"Front\":\"<p>\\nTest</p>\\n\",\"Back\":\"<p>\\nlalala</p>\\n\"},\"tags\":\"\",\"options\":{\"allowDuplicate\":false,\"duplicateScope\":\"deck\"}}}}]}}") (on-error closure ((actions (("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (note-action-pairs (#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (notes-and-tag-actions2) (notes-and-tag-actions) (updates) (adds (#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (notes-and-actions ((#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck"))))))) (existing-tags) (promise . #<promise-class promise-class-15912d977270>) (notes #s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32)) cl-struct-org-anki--note-tags t) (the-error) (org-anki--report-error "Couldn't update note, received: %s" the-error)) (on-result closure ((actions (("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (note-action-pairs (#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (notes-and-tag-actions2) (notes-and-tag-actions) (updates) (adds (#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (notes-and-actions ((#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck"))))))) (existing-tags) (promise . #<promise-class promise-class-15912d977270>) (notes #s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32)) cl-struct-org-anki--note-tags t) (the-result) (let* ((result-list (append the-result nil)) (pairs (-zip-lists note-action-pairs result-list)) (sorted (-sort #'(lambda (a b) (> (org-anki--get-point a) (org-anki--get-point b))) pairs))) (-map 'org-anki--handle-pair sorted))) (body ("action" . "multi") ("params" ("actions" (("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))))) t) (&rest _args) "\n\n(fn &rest ARGS)" (debug "Error response in variable '_args'")) :success (closure ((json . "{\"version\":6,\"action\":\"multi\",\"params\":{\"actions\":[{\"action\":\"addNote\",\"params\":{\"note\":{\"deckName\":\"attestation-2021\",\"modelName\":\"Basic\",\"fields\":{\"Front\":\"<p>\\nTest</p>\\n\",\"Back\":\"<p>\\nlalala</p>\\n\"},\"tags\":\"\",\"options\":{\"allowDuplicate\":false,\"duplicateScope\":\"deck\"}}}}]}}") (on-error closure ((actions (("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (note-action-pairs (#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (notes-and-tag-actions2) (notes-and-tag-actions) (updates) (adds (#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (notes-and-actions ((#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck"))))))) (existing-tags) (promise . #<promise-class promise-class-15912d977270>) (notes #s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32)) cl-struct-org-anki--note-tags t) (the-error) (org-anki--report-error "Couldn't update note, received: %s" the-error)) (on-result closure ((actions (("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (note-action-pairs (#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (notes-and-tag-actions2) (notes-and-tag-actions) (updates) (adds (#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (notes-and-actions ((#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck"))))))) (existing-tags) (promise . #<promise-class promise-class-15912d977270>) (notes #s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32)) cl-struct-org-anki--note-tags t) (the-result) (let* ((result-list (append the-result nil)) (pairs (-zip-lists note-action-pairs result-list)) (sorted (-sort #'(lambda (a b) (> (org-anki--get-point a) (org-anki--get-point b))) pairs))) (-map 'org-anki--handle-pair sorted))) (body ("action" . "multi") ("params" ("actions" (("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))))) t) (&rest --cl-rest--) "\n\n(fn &key DATA &allow-other-keys)" (let* ((data (car (cdr (plist-member --cl-rest-- ':data))))) (let ((the-error (assoc-default 'error data)) (the-result (assoc-default 'result data))) (if the-error (if on-error (funcall on-error the-error) (error "Unhandled error: %s" the-error)) (funcall on-result the-result))))) :url "http://localhost:8765" :response #8 :encoding utf-8) :-buffer #<killed buffer> :-raw-header "HTTP/1.1 200 OK\nContent-Type: text/json\nAccess-Control-Allow-Origin: http://localhost\nAccess-Control-Allow-Headers: *\nContent-Length: 96\n" :-timer nil :-backend curl))
apply((closure ((json . "{\"version\":6,\"action\":\"multi\",\"params\":{\"actions\":[{\"action\":\"addNote\",\"params\":{\"note\":{\"deckName\":\"attestation-2021\",\"modelName\":\"Basic\",\"fields\":{\"Front\":\"<p>\\nTest</p>\\n\",\"Back\":\"<p>\\nlalala</p>\\n\"},\"tags\":\"\",\"options\":{\"allowDuplicate\":false,\"du...") (on-error closure ((actions (("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (note-action-pairs (#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (notes-and-tag-actions2) (notes-and-tag-actions) (updates) (adds (#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (notes-and-actions ((#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck"))))))) (existing-tags) (promise . #<promise-class promise-class-15912d977270>) (notes #s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32)) cl-struct-org-anki--note-tags t) (the-error) (org-anki--report-error "Couldn't update note, received: %s" the-error)) (on-result closure ((actions (("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (note-action-pairs (#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (notes-and-tag-actions2) (notes-and-tag-actions) (updates) (adds (#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (notes-and-actions ((#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck"))))))) (existing-tags) (promise . #<promise-class promise-class-15912d977270>) (notes #s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32)) cl-struct-org-anki--note-tags t) (the-result) (let* ((result-list (append the-result nil)) (pairs (-zip-lists note-action-pairs result-list)) (sorted (-sort #'(lambda (a b) (> (org-anki--get-point a) (org-anki--get-point b))) pairs))) (-map 'org-anki--handle-pair sorted))) (body ("action" . "multi") ("params" ("actions" (("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))))) t) (&rest --cl-rest--) "\n\n(fn &key DATA &allow-other-keys)" (let* ((data (car (cdr (plist-member --cl-rest-- ':data))))) (let ((the-error (assoc-default 'error data)) (the-result (assoc-default 'result data))) (if the-error (if on-error (funcall on-error the-error) (error "Unhandled error: %s" the-error)) (funcall on-result the-result))))) (:data ((result . [((result) (error . "cannot create note because it is empty"))]) (error)) :symbol-status success :error-thrown nil :response #s(request-response :status-code 200 :history nil :data ((result . [((result) (error . "cannot create note because it is empty"))]) (error)) :error-thrown nil :symbol-status success :url "http://localhost:8765/" :done-p nil :settings (:type "GET" :data "{\"version\":6,\"action\":\"multi\",\"params\":{\"actions\":[{\"action\":\"addNote\",\"params\":{\"note\":{\"deckName\":\"attestation-2021\",\"modelName\":\"Basic\",\"fields\":{\"Front\":\"<p>\\nTest</p>\\n\",\"Back\":\"<p>\\nlalala</p>\\n\"},\"tags\":\"\",\"options\":{\"allowDuplicate\":false,\"du..." :headers (("Content-Type" . "application/json")) :parser json-read :error (closure ((json . "{\"version\":6,\"action\":\"multi\",\"params\":{\"actions\":[{\"action\":\"addNote\",\"params\":{\"note\":{\"deckName\":\"attestation-2021\",\"modelName\":\"Basic\",\"fields\":{\"Front\":\"<p>\\nTest</p>\\n\",\"Back\":\"<p>\\nlalala</p>\\n\"},\"tags\":\"\",\"options\":{\"allowDuplicate\":false,\"du...") (on-error closure ((actions (("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (note-action-pairs (#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (notes-and-tag-actions2) (notes-and-tag-actions) (updates) (adds (#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (notes-and-actions ((#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck"))))))) (existing-tags) (promise . #<promise-class promise-class-15912d977270>) (notes #s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32)) cl-struct-org-anki--note-tags t) (the-error) (org-anki--report-error "Couldn't update note, received: %s" the-error)) (on-result closure ((actions (("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (note-action-pairs (#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (notes-and-tag-actions2) (notes-and-tag-actions) (updates) (adds (#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (notes-and-actions ((#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck"))))))) (existing-tags) (promise . #<promise-class promise-class-15912d977270>) (notes #s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32)) cl-struct-org-anki--note-tags t) (the-result) (let* ((result-list (append the-result nil)) (pairs (-zip-lists note-action-pairs result-list)) (sorted (-sort #'(lambda (a b) (> (org-anki--get-point a) (org-anki--get-point b))) pairs))) (-map 'org-anki--handle-pair sorted))) (body ("action" . "multi") ("params" ("actions" (("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))))) t) (&rest _args) "\n\n(fn &rest ARGS)" (debug "Error response in variable '_args'")) :success (closure ((json . "{\"version\":6,\"action\":\"multi\",\"params\":{\"actions\":[{\"action\":\"addNote\",\"params\":{\"note\":{\"deckName\":\"attestation-2021\",\"modelName\":\"Basic\",\"fields\":{\"Front\":\"<p>\\nTest</p>\\n\",\"Back\":\"<p>\\nlalala</p>\\n\"},\"tags\":\"\",\"options\":{\"allowDuplicate\":false,\"du...") (on-error closure ((actions (("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (note-action-pairs (#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (notes-and-tag-actions2) (notes-and-tag-actions) (updates) (adds (#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (notes-and-actions ((#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck"))))))) (existing-tags) (promise . #<promise-class promise-class-15912d977270>) (notes #s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32)) cl-struct-org-anki--note-tags t) (the-error) (org-anki--report-error "Couldn't update note, received: %s" the-error)) (on-result closure ((actions (("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (note-action-pairs (#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (notes-and-tag-actions2) (notes-and-tag-actions) (updates) (adds (#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (notes-and-actions ((#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck"))))))) (existing-tags) (promise . #<promise-class promise-class-15912d977270>) (notes #s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32)) cl-struct-org-anki--note-tags t) (the-result) (let* ((result-list (append the-result nil)) (pairs (-zip-lists note-action-pairs result-list)) (sorted (-sort #'(lambda (a b) (> (org-anki--get-point a) (org-anki--get-point b))) pairs))) (-map 'org-anki--handle-pair sorted))) (body ("action" . "multi") ("params" ("actions" (("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))))) t) (&rest --cl-rest--) "\n\n(fn &key DATA &allow-other-keys)" (let* ((data (car (cdr (plist-member --cl-rest-- ':data))))) (let ((the-error (assoc-default 'error data)) (the-result (assoc-default 'result data))) (if the-error (if on-error (funcall on-error the-error) (error "Unhandled error: %s" the-error)) (funcall on-result the-result))))) :url "http://localhost:8765" :response #10 :encoding utf-8) :-buffer #<killed buffer> :-raw-header "HTTP/1.1 200 OK\nContent-Type: text/json\nAccess-Control-Allow-Origin: http://localhost\nAccess-Control-Allow-Headers: *\nContent-Length: 96\n" :-timer nil :-backend curl)))
request--callback(#<killed buffer> :type "GET" :data "{\"version\":6,\"action\":\"multi\",\"params\":{\"actions\":[{\"action\":\"addNote\",\"params\":{\"note\":{\"deck..." :headers (("Content-Type" . "application/json")) :parser json-read :error (closure ((json . "{\"version\":6,\"action\":\"multi\",\"params\":{\"actions\":[{\"action\":\"addNote\",\"params\":{\"note\":{\"deck...") (on-error closure ((actions (("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (note-action-pairs (#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (notes-and-tag-actions2) (notes-and-tag-actions) (updates) (adds (#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (notes-and-actions ((#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck"))))))) (existing-tags) (promise . #<promise-class promise-class-15912d977270>) (notes #s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32)) cl-struct-org-anki--note-tags t) (the-error) (org-anki--report-error "Couldn't update note, received: %s" the-error)) (on-result closure ((actions (("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (note-action-pairs (#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (notes-and-tag-actions2) (notes-and-tag-actions) (updates) (adds (#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (notes-and-actions ((#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck"))))))) (existing-tags) (promise . #<promise-class promise-class-15912d977270>) (notes #s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32)) cl-struct-org-anki--note-tags t) (the-result) (let* ((result-list (append the-result nil)) (pairs (-zip-lists note-action-pairs result-list)) (sorted (-sort #'(lambda (a b) (> (org-anki--get-point a) (org-anki--get-point b))) pairs))) (-map 'org-anki--handle-pair sorted))) (body ("action" . "multi") ("params" ("actions" (("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))))) t) (&rest _args) "\n\n(fn &rest ARGS)" (debug "Error response in variable '_args'")) :success (closure ((json . "{\"version\":6,\"action\":\"multi\",\"params\":{\"actions\":[{\"action\":\"addNote\",\"params\":{\"note\":{\"deck...") (on-error closure ((actions (("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (note-action-pairs (#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (notes-and-tag-actions2) (notes-and-tag-actions) (updates) (adds (#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (notes-and-actions ((#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck"))))))) (existing-tags) (promise . #<promise-class promise-class-15912d977270>) (notes #s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32)) cl-struct-org-anki--note-tags t) (the-error) (org-anki--report-error "Couldn't update note, received: %s" the-error)) (on-result closure ((actions (("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (note-action-pairs (#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (notes-and-tag-actions2) (notes-and-tag-actions) (updates) (adds (#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (notes-and-actions ((#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck"))))))) (existing-tags) (promise . #<promise-class promise-class-15912d977270>) (notes #s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32)) cl-struct-org-anki--note-tags t) (the-result) (let* ((result-list (append the-result nil)) (pairs (-zip-lists note-action-pairs result-list)) (sorted (-sort #'(lambda (a b) (> (org-anki--get-point a) (org-anki--get-point b))) pairs))) (-map 'org-anki--handle-pair sorted))) (body ("action" . "multi") ("params" ("actions" (("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))))) t) (&rest --cl-rest--) "\n\n(fn &key DATA &allow-other-keys)" (let* ((data (car (cdr (plist-member --cl-rest-- ':data))))) (let ((the-error (assoc-default 'error data)) (the-result (assoc-default 'result data))) (if the-error (if on-error (funcall on-error the-error) (error "Unhandled error: %s" the-error)) (funcall on-result the-result))))) :url "http://localhost:8765" :response #s(request-response :status-code 200 :history nil :data ((result . [((result) (error . "cannot create note because it is empty"))]) (error)) :error-thrown nil :symbol-status success :url "http://localhost:8765/" :done-p nil :settings (:type "GET" :data "{\"version\":6,\"action\":\"multi\",\"params\":{\"actions\":[{\"action\":\"addNote\",\"params\":{\"note\":{\"deck..." :headers (("Content-Type" . "application/json")) :parser json-read :error (closure ((json . "{\"version\":6,\"action\":\"multi\",\"params\":{\"actions\":[{\"action\":\"addNote\",\"params\":{\"note\":{\"deck...") (on-error closure ((actions (("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (note-action-pairs (#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (notes-and-tag-actions2) (notes-and-tag-actions) (updates) (adds (#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (notes-and-actions ((#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck"))))))) (existing-tags) (promise . #<promise-class promise-class-15912d977270>) (notes #s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32)) cl-struct-org-anki--note-tags t) (the-error) (org-anki--report-error "Couldn't update note, received: %s" the-error)) (on-result closure ((actions (("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (note-action-pairs (#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (notes-and-tag-actions2) (notes-and-tag-actions) (updates) (adds (#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (notes-and-actions ((#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck"))))))) (existing-tags) (promise . #<promise-class promise-class-15912d977270>) (notes #s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32)) cl-struct-org-anki--note-tags t) (the-result) (let* ((result-list (append the-result nil)) (pairs (-zip-lists note-action-pairs result-list)) (sorted (-sort #'(lambda (a b) (> (org-anki--get-point a) (org-anki--get-point b))) pairs))) (-map 'org-anki--handle-pair sorted))) (body ("action" . "multi") ("params" ("actions" (("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))))) t) (&rest _args) "\n\n(fn &rest ARGS)" (debug "Error response in variable '_args'")) :success (closure ((json . "{\"version\":6,\"action\":\"multi\",\"params\":{\"actions\":[{\"action\":\"addNote\",\"params\":{\"note\":{\"deck...") (on-error closure ((actions (("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (note-action-pairs (#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (notes-and-tag-actions2) (notes-and-tag-actions) (updates) (adds (#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (notes-and-actions ((#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck"))))))) (existing-tags) (promise . #<promise-class promise-class-15912d977270>) (notes #s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32)) cl-struct-org-anki--note-tags t) (the-error) (org-anki--report-error "Couldn't update note, received: %s" the-error)) (on-result closure ((actions (("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (note-action-pairs (#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (notes-and-tag-actions2) (notes-and-tag-actions) (updates) (adds (#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (notes-and-actions ((#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck"))))))) (existing-tags) (promise . #<promise-class promise-class-15912d977270>) (notes #s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32)) cl-struct-org-anki--note-tags t) (the-result) (let* ((result-list (append the-result nil)) (pairs (-zip-lists note-action-pairs result-list)) (sorted (-sort #'(lambda (a b) (> (org-anki--get-point a) (org-anki--get-point b))) pairs))) (-map 'org-anki--handle-pair sorted))) (body ("action" . "multi") ("params" ("actions" (("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))))) t) (&rest --cl-rest--) "\n\n(fn &key DATA &allow-other-keys)" (let* ((data (car (cdr (plist-member --cl-rest-- ':data))))) (let ((the-error (assoc-default 'error data)) (the-result (assoc-default 'result data))) (if the-error (if on-error (funcall on-error the-error) (error "Unhandled error: %s" the-error)) (funcall on-result the-result))))) :url "http://localhost:8765" :response #17 :encoding utf-8) :-buffer #<killed buffer> :-raw-header "HTTP/1.1 200 OK\nContent-Type: text/json\nAccess-Control-Allow-Origin: http://localhost\nAccess-C..." :-timer nil :-backend curl) :encoding utf-8)
apply(request--callback #<killed buffer> (:type "GET" :data "{\"version\":6,\"action\":\"multi\",\"params\":{\"actions\":[{\"action\":\"addNote\",\"params\":{\"note\":{\"deckName\":\"attestation-2021\",\"modelName\":\"Basic\",\"fields\":{\"..." :headers (("Content-Type" . "application/json")) :parser json-read :error (closure ((json . "{\"version\":6,\"action\":\"multi\",\"params\":{\"actions\":[{\"action\":\"addNote\",\"params\":{\"note\":{\"deckName\":\"attestation-2021\",\"modelName\":\"Basic\",\"fields\":{\"...") (on-error closure ((actions (("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (note-action-pairs (#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (notes-and-tag-actions2) (notes-and-tag-actions) (updates) (adds (#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (notes-and-actions ((#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck"))))))) (existing-tags) (promise . #<promise-class promise-class-15912d977270>) (notes #s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32)) cl-struct-org-anki--note-tags t) (the-error) (org-anki--report-error "Couldn't update note, received: %s" the-error)) (on-result closure ((actions (("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (note-action-pairs (#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (notes-and-tag-actions2) (notes-and-tag-actions) (updates) (adds (#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (notes-and-actions ((#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck"))))))) (existing-tags) (promise . #<promise-class promise-class-15912d977270>) (notes #s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32)) cl-struct-org-anki--note-tags t) (the-result) (let* ((result-list (append the-result nil)) (pairs (-zip-lists note-action-pairs result-list)) (sorted (-sort #'(lambda (a b) (> (org-anki--get-point a) (org-anki--get-point b))) pairs))) (-map 'org-anki--handle-pair sorted))) (body ("action" . "multi") ("params" ("actions" (("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))))) t) (&rest _args) "\n\n(fn &rest ARGS)" (debug "Error response in variable '_args'")) :success (closure ((json . "{\"version\":6,\"action\":\"multi\",\"params\":{\"actions\":[{\"action\":\"addNote\",\"params\":{\"note\":{\"deckName\":\"attestation-2021\",\"modelName\":\"Basic\",\"fields\":{\"...") (on-error closure ((actions (("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (note-action-pairs (#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (notes-and-tag-actions2) (notes-and-tag-actions) (updates) (adds (#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (notes-and-actions ((#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck"))))))) (existing-tags) (promise . #<promise-class promise-class-15912d977270>) (notes #s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32)) cl-struct-org-anki--note-tags t) (the-error) (org-anki--report-error "Couldn't update note, received: %s" the-error)) (on-result closure ((actions (("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (note-action-pairs (#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (notes-and-tag-actions2) (notes-and-tag-actions) (updates) (adds (#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))) (notes-and-actions ((#s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32) ("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck"))))))) (existing-tags) (promise . #<promise-class promise-class-15912d977270>) (notes #s(org-anki--note :maybe-id nil :front "<p>\nTest</p>\n" :back "<p>\nlalala</p>\n" :tags nil :deck "attestation-2021" :point 32)) cl-struct-org-anki--note-tags t) (the-result) (let* ((result-list (append the-result nil)) (pairs (-zip-lists note-action-pairs result-list)) (sorted (-sort #'(lambda (a b) (> (org-anki--get-point a) (org-anki--get-point b))) pairs))) (-map 'org-anki--handle-pair sorted))) (body ("action" . "multi") ("params" ("actions" (("action" . "addNote") ("params" ("note" ("deckName" . "attestation-2021") ("modelName" . "Basic") ("fields" ("Front" . "<p>\nTest</p>\n") ("Back" . "<p>\nlalala</p>\n")) ("tags" . "") ("options" ("allowDuplicate" . :json-false) ("duplicateScope" . "deck")))))))) t) (&rest --cl-rest--) "\n\n(fn &key DATA &allow-other-keys)" (let* ((data (car (cdr (plist-member --cl-rest-- ':data))))) (let ((the-error (assoc-default 'error data)) (the-result (assoc-default 'result data))) (if the-error (if on-error (funcall on-error the-error) (error "Unhandled error: %s" the-error)) (funcall on-result the-result))))) :url "http://localhost:8765" :response #s(request-response :status-code 200 :history nil :data ((result . [((result) (error . "cannot create note because it is empty"))]) (error)) :error-thrown nil :symbol-status success :url "http://localhost:8765/" :done-p nil :settings #3 :-buffer #<killed buffer> :-raw-header "HTTP/1.1 200 OK\nContent-Type: text/json\nAccess-Control-Allow-Origin: http://localhost\nAccess-Control-Allow-Headers: *\nContent-Length: 96\n" :-timer nil :-backend curl) :encoding utf-8))
request--curl-callback("http://localhost:8765" #<process request curl> "finished\n")
apply(request--curl-callback ("http://localhost:8765" #<process request curl> "finished\n"))
#f(compiled-function (&rest args2) #<bytecode 0xb6dd103294c196f>)(#<process request curl> "finished\n")