reddit / emacs

I'm lost trying to install anki-editor

navakelvin · 2022-09-25 17:07
I'm a vimmer on a daily basis, just got into emacs and I'm lost trying to get the [anki-editor](https://github.com/louietan/anki-editor) plugin to work. I'm on spacemacs and trying to install anki-editor following the manual: M-x -> package-install -> anki-editor. But all I get are installation failure messages. At the end of the plugin installation, this is the message I get: In toplevel form: anki-editor.el:84:1:Warning: defcustom for ‘anki-editor-break-consecutive-braces-in-latex’ fails to specify type anki-editor.el:84:1:Warning: defcustom for ‘anki-editor-break-consecutive-braces-in-latex’ fails to specify type anki-editor.el:89:1:Warning: defcustom for ‘anki-editor-create-decks’ fails to specify type anki-editor.el:89:1:Warning: defcustom for ‘anki-editor-create-decks’ fails to specify type anki-editor.el:93:1:Warning: defcustom for ‘anki-editor-org-tags-as-anki-tags’ fails to specify type anki-editor.el:93:1:Warning: defcustom for ‘anki-editor-org-tags-as-anki-tags’ fails to specify type anki-editor.el:107:1:Warning: defcustom for ‘anki-editor-anki-connect-listening-address’ fails to specify type anki-editor.el:107:1:Warning: defcustom for ‘anki-editor-anki-connect-listening-address’ fails to specify type anki-editor.el:111:1:Warning: defcustom for ‘anki-editor-anki-connect-listening-port’ fails to specify type anki-editor.el:111:1:Warning: defcustom for ‘anki-editor-anki-connect-listening-port’ fails to specify type anki-editor.el:115:1:Warning: defcustom for ‘anki-editor-use-math-jax’ fails to specify type anki-editor.el:115:1:Warning: defcustom for ‘anki-editor-use-math-jax’ fails to specify type In anki-editor--anki-connect-invoke: anki-editor.el:161:10:Warning: request--curl-callback called with 2 arguments, but requires 3 anki-editor.el:172:1:Warning: variable ‘_’ not left unused In anki-editor--enable-tag-completion: anki-editor.el:499:8:Warning: reference to free variable ‘anki-editor-mode’ In anki-editor--before-set-tags: anki-editor.el:506:51:Warning: assignment to free variable ‘anki-editor--anki-tags-cache’ anki-editor.el:506:22:Warning: reference to free variable ‘anki-editor--anki-tags-cache’ In anki-editor--get-buffer-tags: anki-editor.el:513:28:Warning: reference to free variable ‘anki-editor--anki-tags-cache’ In anki-editor--get-tags: anki-editor.el:543:23:Warning: ‘org-get-tags-at’ is an obsolete function (as of Org 9.2); use ‘org-get-tags’ instead. In anki-editor-fix-notes: fix-notes-0.3.el:24:67:Warning: ‘org-get-local-tags’ is an obsolete function (as of Org 9.2); use ‘org-get-tags’ instead. fix-notes-0.3.el:24:45:Warning: ‘org-get-local-tags’ is an obsolete function (as of Org 9.2); use ‘org-get-tags’ instead. fix-notes-0.3.el:32:11:Warning: ‘org-set-tags-to’ is an obsolete function (as of Org 9.2); use ‘org-set-tags’ instead. Why is this, or how can I make it work? Environment: * Ubuntu 22.04.1 * spacemacs
franburstall · 2022-09-25 17:20
These are compiler warnings and not an installation failure. What happens if you try to use `anki-editor`?
navakelvin · 2022-09-25 17:23
I guess to try to start it I should: M-x -> `anki-editor.` If so, it does not appear in the list of commands.
thatonelutenist · 2022-09-25 19:45
Have you inserted a ``` (use anki-editor) ``` Into your emacs configuration?
navakelvin · 2022-09-25 20:39
I'm using the per-folder configuration type that spacemacs uses: \~/.emacs.d/init.el This expression `(use anki-editor)` I suppose that I must place it in the file init.el, right? PS: So far I got it to work manually by cloning the anki-editor repository to \~/.emacs.d/ and into `init.el` file doing: (add-to-list 'load-path "~/.emacs.d/anki-editor/") (require 'anki-editor)
thatonelutenist · 2022-09-25 20:47
That PS seems like a correct solution, I've honestly never used spacemacs myself though, my only experience with it is the indirect "every time I try to help a spacemacs using friend out with something, the answer seems to always be 'oh yeah spacemacs just breaks this and you need to use an alternative spacemacs specific method'", so you might want to wait for someone else to chime in here
Sir4ur0n · 2022-09-26 08:11
First, please keep in mind that by default, Spacemacs uninstalls any packages not used by your `.spacemacs` file. So if you manually install with `M-x package-install anki-editor` then on the next Emacs start it will be uninstalled. Second, as u/franburstall correctly pointed out, these are warnings, not errors. The installation seems to have worked just fine. Third, I just tried `M-x package-install anki-editor` and it succeeded. After that, `M-x anki-editor-` returns a list of commands, including: - `anki-editor-mode` - `anki-editor-push-notes` - `anki-editor-insert-note` - etc. There is no `anki-editor` command though. But the Github Readme of that project makes no mention of such a command, so I guess that's normal. Did you check that e.g. `anki-editor-insert-note` is available?
navakelvin · 2022-09-26 08:25
The warnings appear right after the installation is finished, after that and without leaving emacs I look for the commands of the anki-editor package (any of them) and they don't appear.The installation method that i use is: M-x package-install. I was able to get it up and running by cloning repositories and referencing their .el files. What you mention about uninstalling packages when starting emacs again exactly happens. I tried to install packages like emacsql, emacsql-sqlite... and they were all removed. I'll check the documentation and that .spacemacs to see if I'm missing something.