Closed tillydray closed 4 weeks ago
Same issue here:
doom doctor: GNU Emacs v29.3 nil Doom core v3.0.0-pre grafted, HEAD -> master, origin/master, origin/HEAD 8b9168de 2024-10-03 02:26:28 -0400 Doom modules v24.11.0-pre grafted, HEAD -> master, origin/master, origin/HEAD 8b9168de 2024-10-03 02:26:28 -0400
Pls., help
@wolfangpauli
I didn't feel like troubleshooting the issue so if you just want Doom to work again, apply the below patch, or to do it manually
$ cd ~/.emacs.d/.local/straight/repos/org-ai
$ rm org-ai-evil-integrations.el
Then modify org-ai.el to remove these two lines
(when (featurep 'evil)
(require 'org-ai-evil-integrations))
Next time you update doom it will ask you about these changes and prompt you to undo the changes, stash, or keep them, just fyi
diff --git a/org-ai-evil-integrations.el b/org-ai-evil-integrations.el
deleted file mode 100644
index daa988c..0000000
--- a/org-ai-evil-integrations.el
+++ /dev/null
@@ -1,36 +0,0 @@
-;;; org-ai-evil-integrations.el --- Evil mode integration for org-ai package -*- lexical-binding: t; -*-
-
-(defgroup org-ai-evil nil
- "Customizable options for org-ai package Evil mode integrations."
- :group 'org-ai)
-
-(defcustom org-ai-evil-cmd-ar "ar"
- "Default Evil Ex command for querying a range in org-ai."
- :type 'string
- :group 'org-ai-evil)
-
-(defcustom org-ai-evil-cmd-cr "cr"
- "Default Evil Ex command for refactoring a range in org-ai."
- :type 'string
- :group 'org-ai-evil)
-
-(when (featurep 'evil)
- ;; Register custom commands with their customizable names
- (evil-ex-define-cmd org-ai-evil-cmd-ar 'evil-org-ai-on-region)
- (evil-define-command evil-org-ai-on-region (start end question)
- "Ask a QUESTION with `org-ai-on-region` for the region from START to END."
- :move-point nil
- (interactive "<r><a>")
- (let ((question (read-string "What do you want to know? ")))
- (org-ai-on-region start end question)))
-
- (evil-ex-define-cmd org-ai-evil-cmd-cr 'evil-org-ai-change-range)
- (evil-define-command evil-org-ai-change-range (start end question)
- "Ask a QUESTION with `org-ai-refactor-code` for the region from START to END."
- :move-point nil
- (interactive "<r><a>")
- (let ((question (read-string "How do you want to refactor the code? ")))
- (org-ai-refactor-code start end question))))
-
-(provide 'org-ai-evil-integrations)
-;;; org-ai-evil-integrations.el ends here
diff --git a/org-ai.el b/org-ai.el
index 9fc52e9..fb437c7 100644
--- a/org-ai.el
+++ b/org-ai.el
@@ -94,8 +94,6 @@
(require 'org-ai-sd)
(require 'org-ai-oobabooga)
;; Conditionally load Evil integrations if Evil is present
-(when (featurep 'evil)
- (require 'org-ai-evil-integrations))
;; -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Thanks a thousand times! It seems that org-ai has somehow affected my keymap for the evaluation of a #+begin_ai / #+end-Block from C-c C-c to blank-u C-c C-c It works perfectly and I can live with that.
My apologies, this seems to be a side effect of https://github.com/rksm/org-ai/pull/127. Reverting.
Not an evil user but this seems to be caused by this. Happy to accept fixes for a new version of #127.
@rksm to get rid of the error we just need (require 'evil)
at the top of the file. But when I do that and try to use o1-preview it seems to be stuck in an infinite loop and I have to force quit emacs. I'll report that as a separate issue
Scratch that, things are working just fine now that I've updated to the latest version of org-ai v0.5.3
I use Doom Emacs. I just updated to the latest org-ai and got this error when restarting emacs
Error caused by user's config or system: .doom.d/config.el, (void-variable evil-org-ai-on-region)
. Relevant output is below.Output of `doom doctor`
``` x There was an unexpected runtime error Message: Symbol's value as variable is void Details: (evil-org-ai-on-region) Backtrace: (byte-code "\306\307\310\311\312\313%\210\314\300\315\316\317DD\320\32... (require org-ai-evil-integrations) (progn (require 'org-ai-evil-integrations)) (if (featurep 'evil) (progn (require 'org-ai-evil-integrations))) (load-with-code-conversion "/Users/jason/.emacs.d/.local/straight/buil... (org-ai-global-mode) (progn (add-hook 'org-mode-hook #'org-ai-mode) (org-ai-global-mode)) (condition-case err (progn (add-hook 'org-mode-hook #'org-ai-mode) (or... (progn (if (fboundp 'org-ai-mode) nil (autoload #'org-ai-mode "org-ai"... (condition-case err (progn (if (fboundp 'org-ai-mode) nil (autoload #'... (load-with-code-conversion "/Users/jason/.doom.d/config.el" "/Users/ja... (load "/Users/jason/.doom.d/config" t nomessage) GNU Emacs v30.0.91 nil Doom core v3.0.0-pre HEAD -> master c8a5e6ec1 2024-09-17 17:30:57 -0400 Doom modules v24.10.0-pre HEAD -> master c8a5e6ec1 2024-09-17 17:30:57 -0400 ```Output of emacs --daemon="em2" --debug-init && emacsclient -nc -s "em2"
``` Debugger entered--Lisp error: (void-variable evil-org-ai-on-region) byte-code("\306\307\310\311\312\313%\210\314\300\315\316\317DD\320\321\322\312\307&\7\210\314\305\315\316\323DD\324\321\322\312\307&\7\210\325\326!\203e\0\327\10\301\"\210\330\11\304\n\13\"\331\332\310\211\333\334!\335\f\n\3#\262\1&\7\210\327\15\336\"\210\330\16\36\304\n\13\"\337\332\310\211\333\340!\341\f\n\3#\262\1&\7\210\342\343!\207" [org-ai-evil-cmd-ar evil-org-ai-on-region end question start org-ai-evil-cmd-cr custom-declare-group org-ai-evil nil "Customizable options for org-ai package Evil mode integrations." :group org-ai custom-declare-variable funcall function #f(compiled-function () #Related to https://github.com/rksm/org-ai/pull/127 and https://github.com/rksm/org-ai/issues/126