abougouffa / minemacs

MinEmacs: an Emacs configuration framework for daily use
https://abougouffa.github.io/minemacs/
MIT License
140 stars 17 forks source link

[BUG] Bug with Corfu #150

Closed raylemon closed 7 months ago

raylemon commented 7 months ago

Describe the bug

Error running timer ‘corfu--auto-complete-deferred’: (error "ispell-lookup-words: No plain word-list found at systemdefault locations.  Customize ‘ispell-alternate-dictionary’ to set yours.") [3 times]

I use jinx, so, why it ask that ?

Emacs version Run M-x emacs-version and put its output here:

GNU Emacs 30.0.50 (build 1, x86_64-w64-mingw32)

Checkup list

To Reproduce Steps to reproduce the behavior:

  1. Open any file

Expected behavior

Backtrace None

Screenshots

None

Additional context None

abougouffa commented 7 months ago

Thanks for reporting this,

I didn't manage to reproduce this problem on Linux. Can you provide more details (a backtrace or more logs).

Edit: are you using the last commit or an older one?

raylemon commented 7 months ago

I’m on previous commit (85008d70c3e1467e79c6039e83d5051c36724401) I can’t provide any backtrace or log, the only message I have is ```Error running timer ‘corfu--auto-complete-deferred’: (error "ispell-lookup-words: No plain word-list found at systemdefault locations. Customize ‘ispell-alternate-dictionary’ to set yours.") [3 times]

At start, I see ```[Minemacs:LoadError] (void variable comp-async-buffer-name)```

```elisp
Debugger entered--Lisp error: (void-variable comp-async-buffer-name)
  (list comp-async-buffer-name comp-log-buffer-name)
  (append +kill-buffer-no-ask-list (list comp-async-buffer-name comp-log-buffer-name))
  (setq +kill-buffer-no-ask-list (append +kill-buffer-no-ask-list (list comp-async-buffer-name comp-log-buffer-name)))
  (progn (setq +kill-buffer-no-ask-list (append +kill-buffer-no-ask-list (list comp-async-buffer-name comp-log-buffer-name))))
  (if (featurep 'native-compile) (progn (setq +kill-buffer-no-ask-list (append +kill-buffer-no-ask-list (list comp-async-buffer-name comp-log-buffer-name)))))
  (closure (objdump-disassemble-mode-abbrev-table objdump-disassemble-mode-syntax-table tramp-root-id-string t) nil (if (featurep 'native-compile) (progn (setq +kill-buffer-no-ask-list (append +kill-buffer-no-ask-list (list comp-async-buffer-name comp-log-buffer-name))))))()
  eval-after-load-helper("e:/emacs30/share/emacs/30.0.50/lisp/emacs-lisp/comp.elc")
  do-after-load-evaluation("e:/emacs30/share/emacs/30.0.50/lisp/emacs-lisp/comp.elc")
  straight--build-native-compile((:type git :flavor melpa :files (:defaults (:exclude "doc/fdl.texi" "doc/gpl.texi") "emms-pkg.el") :repo "https://git.savannah.gnu.org/git/emms.git" :package "emms" :local-repo "emms"))
  straight--build-package((:type git :flavor melpa :files (:defaults (:exclude "doc/fdl.texi" "doc/gpl.texi") "emms-pkg.el") :repo "https://git.savannah.gnu.org/git/emms.git" :package "emms" :local-repo "emms") nil)
  #f(compiled-function () #<bytecode 0x1773efd54c1cc052>)()
  straight--transaction-exec(use-package-\"8ab73faac1c44f1d5a6f7a156985132a\"-nil-nil :now #f(compiled-function () #<bytecode 0x1773efd54c1cc052>))
  straight-use-package(emms)
  load-with-code-conversion("c:/Users/big04/.emacs.d/modules/me-media.el" "c:/Users/big04/.emacs.d/modules/me-media.el" nil nil)
  load("c:/Users/big04/.emacs.d/modules/me-media.el" nil)
  (if minemacs-debug-p (load filename nil) (condition-case err (load filename nil (not minemacs-verbose-p)) ((debug error) (message "[MinEmacs:LoadError] %s" err) nil)))
  (if (file-exists-p filename) (if minemacs-debug-p (load filename nil) (condition-case err (load filename nil (not minemacs-verbose-p)) ((debug error) (message "[MinEmacs:LoadError] %s" err) nil))) (message "[MinEmacs:Error] Cannot load \"%s\", the file doesn't exists." filename))
  (let ((filename (file-truename (apply #'concat filename-parts)))) (if (file-exists-p filename) (if minemacs-debug-p (load filename nil) (condition-case err (load filename nil (not minemacs-verbose-p)) ((debug error) (message "[MinEmacs:LoadError] %s" err) nil))) (message "[MinEmacs:Error] Cannot load \"%s\", the file doesn't exists." filename)))
  +load("~/.emacs.d/modules/me-media.el")
  (let ((module-file (car tail))) (+load module-file) (setq tail (cdr tail)))
  (while tail (let ((module-file (car tail))) (+load module-file) (setq tail (cdr tail))))
  (let ((tail (append (mapcar (apply-partially #'format "%s%s.el" minemacs-core-dir) minemacs-core-modules) (mapcar (apply-partially #'format "%s%s.el" minemacs-modules-dir) minemacs-modules)))) (while tail (let ((module-file (car tail))) (+load module-file) (setq tail (cdr tail)))))
  load-with-code-conversion("c:/Users/big04/.emacs.d/init.el" "c:/Users/big04/.emacs.d/init.el" t t)
  load("c:/Users/big04/.emacs.d/init" noerror nomessage)
  startup--load-user-init-file(#f(compiled-function () #<bytecode -0x1baf05e3c2994cfe>) #f(compiled-function () #<bytecode -0x1f3c61addc0abd75>) t)
  command-line()
  normal-top-level()
abougouffa commented 7 months ago

@raylemon

The (void-variable comp-async-buffer-name) error seems to be related to Emacs 30. ~I will push a fix later~ I've pushed a fix for this.


I think the ispell issue is related to cape-dict not spell-fu. Can you try to put this in your config.el and see if it fixes the issue ?

(with-eval-after-load 'cape 
  (remove-hook 'completion-at-point-functions 'cape-dict))
raylemon commented 7 months ago

With your code, it’s work fine.

abougouffa commented 7 months ago

@raylemon Thanks for the feedback, I will disable it by default as I'm not really using it!

raylemon commented 7 months ago

Update: when I have tested your code, I have not opened any file. So, this error remains :

Error running timer ‘corfu--auto-complete-deferred’: (error "ispell-lookup-words: No plain word-list found at systemdefault locations.  Customize ‘ispell-alternate-dictionary’ to set yours.")

This message are shown every times a press any key…

abougouffa commented 7 months ago

Can you test again please ? @raylemon

raylemon commented 7 months ago

With last commit (ed2bae5), this error still remains

Error running timer ‘corfu--auto-complete-deferred’: (error "ispell-lookup-words: No plain word-list found at systemdefault locations.  Customize ‘ispell-alternate-dictionary’ to set yours.")
abougouffa commented 7 months ago

To be sure we are using the same package versions, please run M-x minemacs-update-restore-locked. Wait for it to finish, then restart Emacs (maybe you need to wait a little bit for it to rebuild updated packages).

Then if you can try to run MINEMACS_DEBUG=1 emacs (or something similar on Windows, you need to set the environment variable MINEMACS_DEBUG. This way we might catch a traceback of the error.

abougouffa commented 7 months ago

@raylemon

I suspect also this to be caused by some old custom variable in ~/.minemacs.d/custom-vars.el, can you check if this file contains some ispell related config?

raylemon commented 7 months ago

I have this in custom-vars

(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(ignored-local-variable-values '((org-export-in-background)))
 '(safe-local-variable-values
   '((eglot-workspace-configuration . eglot-ltex-workspace-config-fn))))
(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(default ((t (:family "Cascadia Code" :height 120 :weight semi-light))))
 '(fixed-pitch ((t (:inherit default))))
 '(fixed-pitch-serif ((t (:inherit default))))
 '(mode-line ((t (:family "Lato" :weight regular))))
 '(mode-line-inactive ((t (:family "Lato" :weight regular))))
 '(variable-pitch ((t (:family "Lato")))))
abougouffa commented 7 months ago

Well it seems clean!

@raylemon Did you run these steps ?

To be sure we are using the same package versions, please run M-x minemacs-update-restore-locked. Wait for it to finish, then restart Emacs (maybe you need to wait a little bit for it to rebuild updated packages).

Then if you can try to run MINEMACS_DEBUG=1 emacs (or something similar on Windows, you need to set the environment variable MINEMACS_DEBUG. This way we might catch a traceback of the error.

raylemon commented 7 months ago

I’ll do this now.

raylemon commented 7 months ago

Error still remains

Debugger entered--Lisp error: (error "ispell-lookup-words: No plain word-list found at systemdefault locations. Customize 'ispell-alternate-dictionary’ to set yours.")
(error "ispell-lookup-words: No plain word-list found at systemdefault locations. Customize ’ispell-alternate-dictionary’ to set yours.")
ispell-lookup-words("title")
ispell-completion-at-point()
corfu-capf-wrapper(ispell-complation-at-point)
run-hook-wrapped(cofu--capf-wrapper ispell-completion-at-point)
corfu--auto-complete-deferred((#<window 3 on slides-intro.typ> #<buffer slides-intro.typ> 818 6419))
apply(corfu--auto-complete-deferred((#<window 3 on slides-intro.typ> #<buffer slides-intro.typ> 818 6419))
timer-event-handler([t 26013 54030 251719 nil corfu--auto-complete-deferred((#<window 3 on slides-intro.typ> #<buffer slides-intro.typ> 818 6419)) nil 0 nil ])
abougouffa commented 7 months ago

I see now.

The issue seems to be related to ispell-completion-at-point which is a new feature in Emacs 30.0.50.

I stopped using Emacs 30 for my daily work because it is unstable, at least, when taking into account that third party packages used in MinEmacs doesn't support Emacs 30 yet.

I highly recommend to use Emacs 29 instead (in my machines, I always compile the latest commit in emacs-29 branch.

abougouffa commented 7 months ago

@raylemon

You can try to temporary ignore errors in ispell-completion-at-point (until you compile Emacs 29 for example) by dropping this in your config.el

(with-eval-after-load 'ispell
  (advice-add 'ispell-completion-at-point :around (lambda (origfn &rest args) (ignore-errors (apply origfn args)))))
raylemon commented 7 months ago

I have both emacs 30 and emacs 29. v30 seems faster than v29, but I’ll wait for some stability. Thanks !