From 40a8d8474ba6220d3dcbbaa4e90c65bbcdf1c908 Mon Sep 17 00:00:00 2001 From: ermanno Date: Sat, 24 Sep 2022 14:19:57 +0200 Subject: [PATCH] Fix issues with org-anki This patch: - updates the local deps - adds an advice from: https://github.com/louietan/anki-editor/issues/76 to address the problem when pushing notes to Anki (notes were successfully pushed, however we didn't get the id of the note, which is necessary to be able to later update the note --- custom-settings.el | 3 ++- init.el | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/custom-settings.el b/custom-settings.el index fcdf9c1..a48fb6d 100644 --- a/custom-settings.el +++ b/custom-settings.el @@ -5,7 +5,8 @@ ;; If there is more than one, they won't work right. '(package-selected-packages '(rustic lsp-ui lsp-mode org-roam-ui org-roam web-mode company tide git-gutter-fringe flycheck-plantuml plantuml-mode yasnippet-snippets yasnippet vs-light-theme anki-editor smartparens geiser-mit geiser unfill perspective ox-hugo magit multiple-cursors transpose-frame markdown-mode yaml-mode expand-region neotree counsel smex swiper ivy undo-tree projectile auto-compile use-package)) - '(python-shell-interpreter "python3")) + '(python-shell-interpreter "python3") + '(warning-suppress-types '((comp)))) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. diff --git a/init.el b/init.el index d104f9e..2deb9da 100644 --- a/init.el +++ b/init.el @@ -387,6 +387,13 @@ ;; TODO Implement function where you push the "Dispatch Shelf" tree and refile the entries under the Exported tree +(defun anki-editor--anki-connect-invoke! (orig-fun &rest args) + (let ((request--curl-callback + (lambda (proc event) (request--curl-callback "localhost" proc event)))) + (apply orig-fun args))) + +(advice-add 'anki-editor--anki-connect-invoke :around #'anki-editor--anki-connect-invoke!) + ;; Allow Emacs to access content from clipboard. (setq x-select-enable-clipboard t x-select-enable-primary t)