doomemacs / doomemacs

An Emacs framework for the stubborn martian hacker
MIT License
19.27k stars 3.04k forks source link

Start log: Error (doom-init-ui-hook): Error running hook "persp-mode" because: (file-missing Cannot open load file no such file or directory persp-mode) #6727

Closed thyecust closed 2 years ago

thyecust commented 2 years ago

What did you expect to happen?

Start emacs, see DOOM logo and starting page.

What actually happened?

when I start emacs, I got error log

Error running hook "persp-mode" because: (file-missing Cannot open load file 没有那个文件或目录 persp-mode)

没有那个文件或目录 is the Chinese for no such file or directory in English.

Describe your attempts to resolve the issue

No response

Steps to reproduce

Open emacs, get one this log. Type any key will get another one.

System Information

https://pastebin.com/ghikbmqt

thyecust commented 2 years ago

I tried doom build and doom clean; doom purge; doom build. But this problem is not resolved.

thyecust commented 2 years ago

Doom debug mode

Explain-pause-mode: please report this bug by creating a Github
issue at https://github.com/lastquestion/explain-pause-mode. Explain-pause-mode
is now _disabled_ so you can continue to hopefully use Emacs. Info follows:

explain-pause version: 0.1
emacs version: 28.1

not top level in wrap-native for #<subr recursive-edit>
current
#s(explain-pause-command-record root-emacs nil nil 0 nil nil nil nil nil 0)

Backtrace:
  explain-pause-report-measuring-bug("not top level in wrap-native for #<subr recursive-..." "current" #s(explain-pause-command-record :command root-emacs :native nil :parent nil :executing-time 0 :entry-snap nil :too-slow nil :is-profiled nil :under-profile nil :profile nil :depth 0))
  explain-pause--wrap-native(#<subr recursive-edit>)
  apply(explain-pause--wrap-native #<subr recursive-edit> nil)
  recursive-edit()
  debug(error (file-missing "Cannot open load file" "没有那个文件或目录" "persp-mode"))
  apply(debug (error (file-missing "Cannot open load file" "没有那个文件或目录" "persp-mode")))
  (let ((backtrace (doom-backtrace))) (setq num-nonmacro-input-events (1+ num-nonmacro-input-events)) (apply #'debug args))
  doom-debugger(error (file-missing "Cannot open load file" "没有那个文件或目录" "persp-mode"))
  persp-mode()
  funcall(persp-mode)
  (condition-case e (funcall hook) ((debug error) (signal 'doom-hook-error (list hook e))))
  doom-run-hook(persp-mode)
  run-hook-wrapped(doom-run-hook persp-mode)
  (condition-case e (run-hook-wrapped hook #'doom-run-hook) ((debug doom-hook-error) (if debug-on-error nil (lwarn hook :error "Error running hook %S because: %s" (if (symbolp (car (cdr e))) (symbol-name (car (cdr e))) (car (cdr e))) (car (cdr (cdr e))))) (signal 'doom-hook-error (cons hook (cdr e)))))
  (let ((hook (car --dolist-tail--))) (condition-case e (run-hook-wrapped hook #'doom-run-hook) ((debug doom-hook-error) (if debug-on-error nil (lwarn hook :error "Error running hook %S because: %s" (if (symbolp (car ...)) (symbol-name (car ...)) (car (cdr e))) (car (cdr (cdr e))))) (signal 'doom-hook-error (cons hook (cdr e))))) (setq --dolist-tail-- (cdr --dolist-tail--)))
  (while --dolist-tail-- (let ((hook (car --dolist-tail--))) (condition-case e (run-hook-wrapped hook #'doom-run-hook) ((debug doom-hook-error) (if debug-on-error nil (lwarn hook :error "Error running hook %S because: %s" (if (symbolp ...) (symbol-name ...) (car ...)) (car (cdr ...)))) (signal 'doom-hook-error (cons hook (cdr e))))) (setq --dolist-tail-- (cdr --dolist-tail--))))
  (let ((--dolist-tail-- hooks)) (while --dolist-tail-- (let ((hook (car --dolist-tail--))) (condition-case e (run-hook-wrapped hook #'doom-run-hook) ((debug doom-hook-error) (if debug-on-error nil (lwarn hook :error "Error running hook %S because: %s" (if ... ... ...) (car ...))) (signal 'doom-hook-error (cons hook (cdr e))))) (setq --dolist-tail-- (cdr --dolist-tail--)))))
  doom-run-hooks(doom-init-ui-hook)
  doom-init-ui-h(#<frame *scratch* – Doom Emacs 0x55a4d2fd4c58>)
  redisplay_internal\ \(C\ function\)()
thyecust commented 2 years ago

I applied this https://github.com/doomemacs/doomemacs/issues/5207#issuecomment-1159040527 and ran doom install.

Now run emaces --debug-init could get

Debugger entered--Lisp error: (void-variable auto-minor-mode-alist)
  (member '("/test[/-].+\\.el$" . buttercup-minor-mode) auto-minor-mode-alist)
  (if (member '("/test[/-].+\\.el$" . buttercup-minor-mode) auto-minor-mode-alist) auto-minor-mode-alist (setq auto-minor-mode-alist (cons '("/test[/-].+\\.el$" . buttercup-minor-mode) auto-minor-mode-alist)))
  eval-buffer(#<buffer  *load*-286765> nil "/home/tianh/.emacs.d/modules/lang/emacs-lisp/confi..." nil t)  ; Reading at buffer position 9570
  load-with-code-conversion("/home/tianh/.emacs.d/modules/lang/emacs-lisp/confi..." "/home/tianh/.emacs.d/modules/lang/emacs-lisp/confi..." t t)
  load("/home/tianh/.emacs.d/modules/lang/emacs-lisp/confi..." t nomessage)
  (condition-case e (load (let (file-name-handler-alist) (expand-file-name file (plist-get plist :path))) t 'nomessage) ((debug doom-error) (signal (car e) (cdr e))) ((debug error) (doom--handle-load-error e (let (file-name-handler-alist) (expand-file-name file (plist-get plist :path))) (plist-get plist :path))))
  (let ((doom--current-module module) (doom--current-flags (plist-get plist :flags)) (inhibit-redisplay t)) (condition-case e (load (let (file-name-handler-alist) (expand-file-name file (plist-get plist :path))) t 'nomessage) ((debug doom-error) (signal (car e) (cdr e))) ((debug error) (doom--handle-load-error e (let (file-name-handler-alist) (expand-file-name file (plist-get plist :path))) (plist-get plist :path)))))
  (closure ((file . "config") t) (module plist) (let ((doom--current-module module) (doom--current-flags (plist-get plist :flags)) (inhibit-redisplay t)) (condition-case e (load (let (file-name-handler-alist) (expand-file-name file (plist-get plist :path))) t 'nomessage) ((debug doom-error) (signal (car e) (cdr e))) ((debug error) (doom--handle-load-error e (let (file-name-handler-alist) (expand-file-name file ...)) (plist-get plist :path))))))((:lang . emacs-lisp) (:flags nil :path "/home/tianh/.emacs.d/modules/lang/emacs-lisp/"))
  maphash((closure ((file . "config") t) (module plist) (let ((doom--current-module module) (doom--current-flags (plist-get plist :flags)) (inhibit-redisplay t)) (condition-case e (load (let (file-name-handler-alist) (expand-file-name file (plist-get plist :path))) t 'nomessage) ((debug doom-error) (signal (car e) (cdr e))) ((debug error) (doom--handle-load-error e (let (file-name-handler-alist) (expand-file-name file ...)) (plist-get plist :path)))))) #<hash-table equal 28/65 0x1566c3b3c96f>)
  (if no-config-p nil (maphash (doom-module-loader doom-module-config-file) doom-modules) (doom-run-hooks 'doom-init-modules-hook) (condition-case e (load (let (file-name-handler-alist) (expand-file-name "config" doom-user-dir)) t 'nomessage) ((debug doom-error) (signal (car e) (cdr e))) ((debug error) (doom--handle-load-error e (let (file-name-handler-alist) (expand-file-name "config" doom-user-dir)) doom-user-dir))) (if custom-file (progn (load custom-file 'noerror (not doom-debug-mode)))))
  (progn (doom-log "Initializing user config") (maphash (doom-module-loader doom-module-init-file) doom-modules) (doom-run-hooks 'doom-before-init-modules-hook) (if no-config-p nil (maphash (doom-module-loader doom-module-config-file) doom-modules) (doom-run-hooks 'doom-init-modules-hook) (condition-case e (load (let (file-name-handler-alist) (expand-file-name "config" doom-user-dir)) t 'nomessage) ((debug doom-error) (signal (car e) (cdr e))) ((debug error) (doom--handle-load-error e (let (file-name-handler-alist) (expand-file-name "config" doom-user-dir)) doom-user-dir))) (if custom-file (progn (load custom-file 'noerror (not doom-debug-mode))))))
  (if init-p (progn (doom-log "Initializing user config") (maphash (doom-module-loader doom-module-init-file) doom-modules) (doom-run-hooks 'doom-before-init-modules-hook) (if no-config-p nil (maphash (doom-module-loader doom-module-config-file) doom-modules) (doom-run-hooks 'doom-init-modules-hook) (condition-case e (load (let (file-name-handler-alist) (expand-file-name "config" doom-user-dir)) t 'nomessage) ((debug doom-error) (signal (car e) (cdr e))) ((debug error) (doom--handle-load-error e (let (file-name-handler-alist) (expand-file-name "config" doom-user-dir)) doom-user-dir))) (if custom-file (progn (load custom-file 'noerror (not doom-debug-mode)))))) nil)
  (let* ((init-p (and t (condition-case e (load (let (file-name-handler-alist) (expand-file-name doom-module-init-file doom-user-dir)) t 'nomessage) ((debug doom-error) (signal (car e) (cdr e))) ((debug error) (doom--handle-load-error e (let ... ...) doom-user-dir)))))) (if init-p (progn (doom-log "Initializing user config") (maphash (doom-module-loader doom-module-init-file) doom-modules) (doom-run-hooks 'doom-before-init-modules-hook) (if no-config-p nil (maphash (doom-module-loader doom-module-config-file) doom-modules) (doom-run-hooks 'doom-init-modules-hook) (condition-case e (load (let (file-name-handler-alist) (expand-file-name "config" doom-user-dir)) t 'nomessage) ((debug doom-error) (signal (car e) (cdr e))) ((debug error) (doom--handle-load-error e (let ... ...) doom-user-dir))) (if custom-file (progn (load custom-file 'noerror (not doom-debug-mode)))))) nil))
  (progn (setq doom-init-modules-p t) (if no-config-p nil (doom-log "Initializing core modules") (doom-initialize-core-modules)) (let* ((init-p (and t (condition-case e (load (let ... ...) t 'nomessage) ((debug doom-error) (signal ... ...)) ((debug error) (doom--handle-load-error e ... doom-user-dir)))))) (if init-p (progn (doom-log "Initializing user config") (maphash (doom-module-loader doom-module-init-file) doom-modules) (doom-run-hooks 'doom-before-init-modules-hook) (if no-config-p nil (maphash (doom-module-loader doom-module-config-file) doom-modules) (doom-run-hooks 'doom-init-modules-hook) (condition-case e (load (let ... ...) t 'nomessage) ((debug doom-error) (signal ... ...)) ((debug error) (doom--handle-load-error e ... doom-user-dir))) (if custom-file (progn (load custom-file ... ...))))) nil)))
  (if (or force-p (not doom-init-modules-p)) (progn (setq doom-init-modules-p t) (if no-config-p nil (doom-log "Initializing core modules") (doom-initialize-core-modules)) (let* ((init-p (and t (condition-case e (load ... t ...) (... ...) (... ...))))) (if init-p (progn (doom-log "Initializing user config") (maphash (doom-module-loader doom-module-init-file) doom-modules) (doom-run-hooks 'doom-before-init-modules-hook) (if no-config-p nil (maphash (doom-module-loader doom-module-config-file) doom-modules) (doom-run-hooks 'doom-init-modules-hook) (condition-case e (load ... t ...) (... ...) (... ...)) (if custom-file (progn ...)))) nil))))
  doom-initialize-modules()
  eval-buffer(#<buffer  *load*> nil "/home/tianh/.emacs.d/lisp/doom-start.el" nil t)  ; Reading at buffer position 8270
  load-with-code-conversion("/home/tianh/.emacs.d/lisp/doom-start.el" "/home/tianh/.emacs.d/lisp/doom-start.el" t t)
  load("/home/tianh/.emacs.d/lisp/doom-start" noerror nomessage)
  #f(compiled-function (filename-function &optional alternate-filename-function load-defaults) "Load a user init-file.\nFILENAME-FUNCTION is called with no arguments and should return\nthe name of the init-file to load.  If this file cannot be\nloaded, and ALTERNATE-FILENAME-FUNCTION is non-nil, then it is\ncalled with no arguments and should return the name of an\nalternate init-file to load.  If LOAD-DEFAULTS is non-nil, then\nload default.el after the init-file, unless `inhibit-default-init'\nis non-nil.\n\nThis function sets `user-init-file' to the name of the loaded\ninit-file, or to a default value if loading is not possible." #<bytecode 0x1f453046bdd62a3e>)((closure ((args #f(compiled-function () #<bytecode 0x1465ad871d0963aa>) #f(compiled-function () #<bytecode -0x1f3c686ddc0cdc35>) t) (init-file . "/home/tianh/.emacs.d/lisp/doom-start") t) nil (or init-file (expand-file-name "init.el" user-emacs-directory))) (closure ((args #f(compiled-function () #<bytecode 0x1465ad871d0963aa>) #f(compiled-function () #<bytecode -0x1f3c686ddc0cdc35>) t) (init-file . "/home/tianh/.emacs.d/lisp/doom-start") t) nil (expand-file-name "safe-mode@static/init.el" doom-profiles-dir)) t)
  apply(#f(compiled-function (filename-function &optional alternate-filename-function load-defaults) "Load a user init-file.\nFILENAME-FUNCTION is called with no arguments and should return\nthe name of the init-file to load.  If this file cannot be\nloaded, and ALTERNATE-FILENAME-FUNCTION is non-nil, then it is\ncalled with no arguments and should return the name of an\nalternate init-file to load.  If LOAD-DEFAULTS is non-nil, then\nload default.el after the init-file, unless `inhibit-default-init'\nis non-nil.\n\nThis function sets `user-init-file' to the name of the loaded\ninit-file, or to a default value if loading is not possible." #<bytecode 0x1f453046bdd62a3e>) ((closure ((args #f(compiled-function () #<bytecode 0x1465ad871d0963aa>) #f(compiled-function () #<bytecode -0x1f3c686ddc0cdc35>) t) (init-file . "/home/tianh/.emacs.d/lisp/doom-start") t) nil (or init-file (expand-file-name "init.el" user-emacs-directory))) (closure ((args #f(compiled-function () #<bytecode 0x1465ad871d0963aa>) #f(compiled-function () #<bytecode -0x1f3c686ddc0cdc35>) t) (init-file . "/home/tianh/.emacs.d/lisp/doom-start") t) nil (expand-file-name "safe-mode@static/init.el" doom-profiles-dir)) t))
  startup--load-user-init-file(#f(compiled-function () #<bytecode 0x1465ad871d0963aa>) #f(compiled-function () #<bytecode -0x1f3c686ddc0cdc35>) t)
  command-line()
  normal-top-level()
thyecust commented 2 years ago
$ ~/.emacs.d/bin/doom doctor                                       
The doctor will see you now...

> Checking your Emacs version...
> Checking for Doom's prerequisites...
> Checking for Emacs config conflicts...
> Checking for great Emacs features...
! Emacs was not built with native compilation support
  Users will see a substantial performance gain by building Emacs with
  native compilation support, availible in emacs 28+.  You must install
  a prebuilt Emacs binary with this included, or compile  Emacs with the
  --with-native-compilation option.
> Checking for private config conflicts...
> Checking for stale elc files...
! ~/.emacs.d/.local/straight/build-28.1/straight/straight-ert-print-hack.elc is out-of-date
! ~/.emacs.d/.local/straight/build-28.1/straight/straight-x.elc is out-of-date
! ~/.emacs.d/.local/straight/build-28.1/straight/straight.elc is out-of-date
> Checking for problematic git global settings...
> Checking Doom Emacs...
  x There was an unexpected runtime error
    Message: Symbol's value as variable is void
    Details: (auto-minor-mode-alist)
    Backtrace:
      (member '("/test[/-].+\\.el$" . buttercup-minor-mode) auto-minor-mode-alist)
      (if (member '("/test[/-].+\\.el$" . buttercup-minor-mode) auto-minor-mode-alist) auto-minor-mode-alist...
      (progn (eval-after-load 'buttercup #'(lambda nil (condition-case err (progn (set-popup-rule! "^\\*Butt...
      (condition-case err (progn (eval-after-load 'buttercup #'(lambda nil (condition-case err (progn (set-p...
      (eval-buffer #<buffer  *load*-992461> nil "/home/tianh/.emacs.d/modules/lang/emacs-lisp/config.el" nil t)
      (load-with-code-conversion "/home/tianh/.emacs.d/modules/lang/emacs-lisp/config.el" "/home/tianh/.emac...
      (load "/home/tianh/.emacs.d/modules/lang/emacs-lisp/config" t nomessage)
      (condition-case e (load (let (file-name-handler-alist) (expand-file-name file (plist-get plist :path))...
      (let ((doom--current-module module) (doom--current-flags (plist-get plist :flags)) (inhibit-redisplay ...
      ((closure ((file . "config") t) (module plist) (let ((doom--current-module module) (doom--current-flag...
      (maphash (closure ((file . "config") t) (module plist) (let ((doom--current-module module) (doom--curr...
      (if no-config-p nil (maphash (doom-module-loader doom-module-config-file) doom-modules) (doom-run-hook...
    ! Wrote extended backtrace to ~/.emacs.d/.local/logs/cli.doom.220827014722.47733.error
thyecust commented 2 years ago
$ doom sync -up
> Synchronizing "default" profile...
  > Regenerating envvars file
    ✓ Generated ~/.emacs.d/.local/env
  > Installing packages...
    - No packages need to be installed
  > (Re)building packages...
    - No packages need rebuilding
  > Updating recipe repos...
  > Updating packages (this may take a while)...
    > (6/150) Re-cloning use-package...
      > Cloning use-package...
    ✓ (6/150) use-package: e2d173b -> 0ad5d9d
    x The package manager threw an error
    x Last 16 lines of straight's error log:
      $ git reset --hard 0ad5d9d5d8a61517a207ab04bf69e71c081149eb
      HEAD is now at 0ad5d9d Add further notes to the README
      [Return code: 0]
      $ cd /home/tianh/.emacs.d/.local/straight/repos/use-package/
      $ git submodule update --init --recursive
      [Return code: 0]
      $ cd /home/tianh/.emacs.d/.local/straight/repos/use-package/
      $ git log --oneline --no-merges 0ad5d9d5d8a61517a207ab04bf69e71c081149eb \^e2d173b1200865a9efd5c2066831a230497582c0
      [Return code: 0]
      $ cd /home/tianh/.emacs.d/.local/straight/repos/auto-minor-mode/
      $ git rev-parse HEAD
      HEAD
      fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
      Use '--' to separate paths from revisions, like this:
      'git <command> [<revision>...] -- [<file>...]'
      [Return code: 128]
    ! Wrote extended straight log to ~/.emacs.d/.local/logs/cli.doom.220827014914.47873.error
    ! Script was abruptly aborted, leaving Doom in an incomplete state!
    - Run 'doom sync' to repair it.
    ✓ Finished in 24.17846s
thyecust commented 2 years ago

It seems that some packages are not installed yet. I'll try other methods.

thyecust commented 2 years ago

I will close this and create a new one with new debugs.