Skip to content

org-anki can't make ANKI_NOTE_ID property correctly with with-current-buffer #55

@hwiorn

Description

@hwiorn
  • Emacs version: 28.2
  • org version: Org mode version 9.6 (9.6-??-bed47b437)
  • org-anki version: 1.0.4 and latest (1.0.5)

test.org

#+ANKI_DECK: TestDeck
org-anki Batch Test

* Front
Back

Test code

(with-current-buffer (find-file-noselect "~/test.org")
  (org-mode)
  (save-excursion
    (goto-char (point-max))
    (org-anki-sync-entry))
  (save-buffer))

The code makes an anki card but can't make ANKI_NOTE_ID property at the heading. Emacs shows the org-fold-region: Calling ‘org-fold-core-region’ with missing SPEC error. And :PROPERTY:\n:END: is printed in the beginning of scratch buffer. I'm not sure. But My guess is that the message is that org seems to try parsing Users' current buffer which is scratch-buffer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions