chenyanming / paw

Emacs Annotation and Language Learning tool.
68 stars 3 forks source link

error invoking paw-annotation-mode #6

Closed emacsbliss closed 1 month ago

emacsbliss commented 1 month ago

I have evil package installed. When I opened an epub file and invoke M-x annotation-mode, it triggered error:

Debugger entered--Lisp error: (invalid-function evil-define-key)
  evil-define-key(normal (keymap (3 keymap (11 . paw-note-quit) (3 . paw-send-edited-note))) "&" paw-find-origin-in-note "q" paw-note-quit)
  byte-code("\301\302!\203\20\0\302\303\10\304\305\306\307&\6\210\301\207" [paw-note-mode-map fboundp evil-define-key normal "&" paw-find-origin-in-note "q" paw-note-quit] 7)
  require(paw-note)
  byte-code("\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\210\300\306!\210\300\307!\210\300\310!\207" [require paw-vars paw-kagome paw-ecdict paw-jlpt paw-note paw-org paw-svg focus] 2)
  require(paw-focus)
  byte-code("\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\210\300\306!\210\300\307!\210\300\310!\210\300\311!\210\300\312!\210\300\313!\210\300\314!\210\300\315..." [require paw-vars paw-db paw-util paw-faces paw-svg paw-gptel paw-request paw-focus paw-search org s dash focus thingatpt evil-core nil t custom-declare-variable paw-annotation-mode-supported-modes funcall function #f(compiled-function () #<bytecode 0xa9baee47981694>) "Supported modes for paw-annotation-mode." :group paw :type list] 8)
  command-execute(paw-annotation-mode record)
  #<subr execute-extended-command>(nil "paw-annotation-mode" "pa")
  ad-Advice-execute-extended-command(#<subr execute-extended-command> nil "paw-annotation-mode" "pa")
  apply(ad-Advice-execute-extended-command #<subr execute-extended-command> (nil "paw-annotation-mode" "pa"))
  execute-extended-command(nil "paw-annotation-mode" "pa")
  funcall-interactively(execute-extended-command nil "paw-annotation-mode" "pa")
  command-execute(execute-extended-command)

I'm using Emacs 29.4 (from emacs-plus) and MacOS 14.3.1 (23D60) (with M1 chip)

chenyanming commented 1 month ago

It seems evil issue. Try to upgrade or reinstall evil.

emacsbliss commented 1 month ago

the evil version is 1.15.0 which is latest already. I tried reinstall few times, does not seem to help.

I'm using elpaca (rather than straight) as my package manager, if that has anything to do with this error..

chenyanming commented 1 month ago

Just updated and tried to replace evil-define-key with evil-define-key*, please check the update.

emacsbliss commented 1 month ago

Awesome, it works now!!

Thanks a lot!!