diff --git a/anki-editor.el b/anki-editor.el index a7a58d4..49b9d54 100644 --- a/anki-editor.el +++ b/anki-editor.el @@ -523,11 +523,7 @@ Where the subtree is created depends on PREFIX." :notes (list (string-to-number (anki-editor-note-id note)))) (anki-editor-api-enqueue 'updateNoteFields - :note (anki-editor-api--note note)) - (anki-editor-api-enqueue 'changeDeck - :cards (list (string-to-number (anki-editor-note-id note))) - :deck (anki-editor-note-deck note)) - ))) + :note (anki-editor-api--note note))))) (tagsadd (cl-set-difference (anki-editor-note-tags note) (alist-get 'tags oldnote) :test 'string=)) @@ -535,6 +531,10 @@ Where the subtree is created depends on PREFIX." (cl-set-difference (anki-editor-note-tags note) :test 'string=) (cl-set-difference anki-editor-protected-tags :test 'string=)))) (anki-editor-api-with-multi + (anki-editor-api-enqueue 'changeDeck + :cards (alist-get 'cards oldnote) + :deck (anki-editor-note-deck note)) + (when tagsadd (anki-editor-api-enqueue 'addTags :notes (list (string-to-number