Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(wrong-type-argument listp #<subr org-agenda-files>) #15861

Closed
real-or-random opened this issue Jan 2, 2023 · 19 comments
Closed

(wrong-type-argument listp #<subr org-agenda-files>) #15861

real-or-random opened this issue Jan 2, 2023 · 19 comments

Comments

@real-or-random
Copy link
Contributor

real-or-random commented Jan 2, 2023

Description :octocat:

I get this error on startup:

(wrong-type-argument listp #<subr org-agenda-files>)

raised from

(eq 'autoload (car (symbol-function 'org-agenda-files))))

This was touched in #15851 by @sunlin7 yesterday. Checkout out 025e9f7e325ef2c71de1aee9ba0ef3d52c8dc5b21 seems to work.

And indeed, (symbol-function 'org-agenda-files) gives me just #<subr org-agenda-files>, so org-agenda-files is natively compiled here. This can be checked by (subr-native-elisp-p (symbol-function 'org-agenda-files)) or probably better, (subr (symbol-function 'org-agenda-files)), which both return t here.

This is org 9.6 on Emacs: 29.0.60.

Reproduction guide 🪲

  • Start Emacs (probably with org layer enabled)

System Info 💻

  • OS: gnu/linux
  • Emacs: 29.0.60
  • Spacemacs: 0.999.0
  • Spacemacs branch: develop (rev. 178a3ab)
  • Graphic display: t
  • Running in daemon: nil
  • Distribution: spacemacs
  • Editing style: vim
  • Completion: ivy
  • Layers:
(better-defaults
 (unicode-fonts :variables unicode-fonts-enable-ligatures t unicode-fonts-ligature-modes
                '(prog-mode text-mode)
                unicode-fonts-ligature-set
                '("<---" "<--" "<<-" "<-" "->" "-->" "--->" "<->" "<-->" "<--->" "<---->" "<!--" "<==" "<===" "<=" "=>" "=>>" "==>" "===>" ">=" "<=>" "<==>" "<===>" "<====>" "<!---" "<~~" "<~" "~>" "~~>" "::" ":::" "==" "!=" "===" "!==" ":=" ":-" ":+" "<*" "<*>" "*>" "<|" "<|>" "|>" "+:" "-:" "=:" "<******>" "++" "+++"))
 theming
 (ivy :variables ivy-enable-advanced-buffer-information t)
 (auto-completion :disabled-for org)
 spell-checking syntax-checking treemacs shell
 (ibuffer :variables ibuffer-group-buffers-by 'projects)
 (org :variables org-enable-github-support t org-enable-roam-support t org-enable-roam-ui t org-enable-sticky-header t org-want-todo-bindings t)
 deft
 (latex :variables latex-enable-auto-fill nil lsp-headerline-breadcrumb-enable nil lsp-enable-imenu nil lsp-ui-doc-enable nil lsp-eldoc-enable-hover nil)
 bibtex
 (languagetool :variables langtool-java-classpath "/usr/share/languagetool:/usr/share/java/languagetool/*")
 (lsp :variables lsp-rust-server 'rust-analyzer lsp-enable-indentation nil lsp-enable-on-type-formatting nil)
 (c-c++ :variables c-c++-backend 'lsp-ccls c-c++-lsp-enable-semantic-highlight t lsp-lens-enable nil)
 ansible csv html
 (shell-scripts :variables shell-scripts-backend nil)
 javascript systemd emacs-lisp git
 (version-control :variables version-control-diff-side 'left)
 markdown major-modes yaml lua rust php python)
  • System configuration features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PGTK PNG RSVG SECCOMP SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XIM GTK3 ZLIB

Backtrace 🐾

Debugger entered--Lisp error: (wrong-type-argument listp #<subr org-agenda-files>)
  car(#<subr org-agenda-files>)
  (eq 'autoload (car (symbol-function 'org-agenda-files)))
  (or (not (fboundp 'org-agenda-files)) (eq 'autoload (car (symbol-function 'org-agenda-files))))
  (if (or (not (fboundp 'org-agenda-files)) (eq 'autoload (car (symbol-function 'org-agenda-files)))) (and (boundp 'org-agenda-files) org-agenda-files) (org-agenda-files))
  (let ((default-directory (or (and (boundp 'org-directory) org-directory) default-directory)) (files (if (or (not (fboundp 'org-agenda-files)) (eq 'autoload (car (symbol-function ...)))) (and (boundp 'org-agenda-files) org-agenda-files) (org-agenda-files)))) (mapcar #'expand-file-name files))
  (let ((agenda-files (let ((default-directory (or (and ... org-directory) default-directory)) (files (if (or ... ...) (and ... org-agenda-files) (org-agenda-files)))) (mapcar #'expand-file-name files))) (ignore-directory (or (and (boundp 'org-directory) (expa
@sunlin7
Copy link
Contributor

sunlin7 commented Jan 2, 2023

I'll upgrade to org-9.6 and try to reproduce on my local.

@sunlin7
Copy link
Contributor

sunlin7 commented Jan 2, 2023

Hi @real-or-random
I can't reproduce this issue on my local side.
Could you help replace the
(eq 'autoload (car (symbol-function 'org-agenda-files))) to
(autoloadp 'org-agenda-files) and try it again? Thanks

@opie4624
Copy link
Contributor

opie4624 commented Jan 2, 2023

@sunlin7 The fix proposed in #15864 gives me a new error: Lisp error: (void-function org-assert-version)

@sunlin7
Copy link
Contributor

sunlin7 commented Jan 2, 2023

Hi @opie4624
Ithe org-assert-version maybe not related to current change. Current change will try to avoid loading the org mode.
Maybe your local configurations run into follow issue ?
https://www.reddit.com/r/emacs/comments/zd3l7p/org_mode_elpa_intall_invalid_function/

@opie4624
Copy link
Contributor

opie4624 commented Jan 2, 2023

No, I don't have package-archives set separately from what Spacemacs already sets. The org-assert-version issue only happens when I check out the fix-15861 branch from your fork of the repo, the one you've submitted as the PR.

@opie4624
Copy link
Contributor

opie4624 commented Jan 2, 2023

@smile13241324 This patch appears broken and without a good fix. Can we revert until a better tested PR comes along?

@sunlin7
Copy link
Contributor

sunlin7 commented Jan 2, 2023

Hi @opie4624
Could you debug out the root cause for why the org-assert-version is void-function? Thanks

The PR is moving toward to a correct way for Spacemacs, if we revert the PR, we maybe never have chance to get the truth.

@sunlin7
Copy link
Contributor

sunlin7 commented Jan 2, 2023

The latest comment on previouse reddit topic has a link:
https://www.reddit.com/r/emacs/comments/z7qulo/comment/iygt1xx/.
Dose it work on your local?

@sunlin7
Copy link
Contributor

sunlin7 commented Jan 2, 2023

I had update the #15864.
Please help try it again. Thanks.

@opie4624
Copy link
Contributor

opie4624 commented Jan 2, 2023

The PR is moving toward to a correct way for Spacemacs, if we revert the PR, we maybe never have chance to get the truth.

Reverting the PR unbreaks it for everyone while you continue to work on the solution. No one is asking you to stop working on it. We don't take all the cars off the road because you need to work on your car.

@sd44
Copy link

sd44 commented Jan 2, 2023

I had update the #15864. Please help try it again. Thanks.

It's fixed for me.thx.

@sunlin7
Copy link
Contributor

sunlin7 commented Jan 2, 2023

@sd44 Thank you for verify it.

@smile13241324
Copy link
Collaborator

The org mismatch comes from an loading order issue, frankly speaking the banner scale will load build-in org, layers however will load elpa org creating a mismatch depending on which version of emacs you are using. I am currently working on a fix but I am not yet finished, load order changes are difficult as hell.

A quick fix is to reduce the content of dotspacemacs start up list to an empty list this will prevent the issue for now.

I'll keep you posted.

@sunlin7
Copy link
Contributor

sunlin7 commented Jan 2, 2023

@smile13241324 Thanks for helping on investigate the root cause, that's really help a lot.
I saw several users turned from Spacemacs to Doom Emacs for Spacemacs are heavy and slow.
So what I'm doing is enhance Spacemacs to be more light and quick to compare with doom.

@smile13241324
Copy link
Collaborator

I have posted a hotfix to avoid the org version mismatch, please report how the behaviour changed for you.
One drawback for now is that the start buffer is not configurable, I plan to fix this later, but for now the version mismatch has priority.

@real-or-random
Copy link
Contributor Author

real-or-random commented Jan 3, 2023

I have posted a hotfix to avoid the org version mismatch, please report how the behaviour changed for you.

Well, everything works before your commit (but after #15864) and it works after your commit. :)

Is there anything specific you want us to test?

@opie4624
Copy link
Contributor

opie4624 commented Jan 3, 2023

Confirmed fixed for me as well. @sunlin7 It's definitely faster, too. Nice job.

@sunlin7
Copy link
Contributor

sunlin7 commented Jan 3, 2023

Thank you so much guys, no other testing requests now, @real-or-random @opie4624 .
And the commit e71a686 pushed by @smile13241324 should be a better.
Thank you all !

@lebensterben
Copy link
Contributor

fixed in #15864

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants