Closed gsingh93 closed 1 year ago
Thanks! Pushed a fix and bumped the version here 4c3b27efe8eed9a9c8b5636fb15b86975ef7e00e.
I wonder if the more better fix would be to launch pandoc directly -- it would be more efficient as going through a shell isn't required, and also there wouldn't be any fear of not escaping the input html properly.
Yea, I think that's a good idea. I like the org-anki-import-deck
feature but it's a little slow, and I think executing it directly will help.
And a minor improvement suggestion while you're working on this, it would be good if you can gracefully handle when pandoc doesn't exist and report this to the user. Currently it will fill your buffer with a "pandoc command not found" message for every card it tries to import.
@gsingh93 Is there a good public deck to test performance on and how long does it take at the moment?
If a card in Anki has a single quote in it, running
org-anki-import-deck
results in the following error message being inserted into the buffer:I think we need to add
shell-quote-argument
here: https://github.com/eyeinsky/org-anki/blob/master/org-anki.el#L680