syl20bnr / spacemacs

A community-driven Emacs distribution - The best editor is neither Emacs nor Vim, it's Emacs *and* Vim!
http://spacemacs.org
GNU General Public License v3.0
23.69k stars 4.89k forks source link

org-mode cannot be invoked for .org files - "File mode specification error: (invalid-function org-assert-version)" #15869

Closed 2FO closed 1 year ago

2FO commented 1 year ago

Steps to Reproduce Error

  1. Start spacemacs
  2. Open .org file
  3. org file opens as plain text file

System


#### System Info :computer:
- OS: gnu/linux
- Emacs: 28.2
- Spacemacs: 0.999.0
- Spacemacs branch: develop (rev. e71a68633)
- Graphic display: t
- Running in daemon: nil
- Distribution: spacemacs
- Editing style: vim
- Completion: helm
- Layers:
elisp
(auto-completion clojure csv emacs-lisp epub git helm html javascript json
                 (lsp :variables lsp-lens-enable nil)
                 (keyboard-layout :variables kl-layout 'colema)
                 multiple-cursors
                 (org :variables org-want-todo-bindings t)
                 prettier
                 (ranger :variables ranger-show-preview t ranger-show-hidden t ranger-cleanup-eagerly t ranger-cleanup-on-disable t ranger-ignored-extensions
                         '("mkv" "flv" "iso" "mp4"))
                 (shell :variables shell-default-height 45 shell-default-position 'bottom shell-default-shell 'ansi-term)
                 spell-checking treemacs)

- System configuration features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM XWIDGETS GTK3 ZLIB

Stack trace

Debugger entered--Lisp error: (invalid-function org-assert-version)
  org-assert-version()
  byte-code("\300\301!\210\302 \210\300\303!\210\300\304!\207" [require org-macs org-assert-version cl-lib oc] 2)
  require(org-keys)
  load-with-code-conversion("/home/2fo/.emacs.d/elpa/28.2/develop/org-9.6/org.el" "/home/2fo/.emacs.d/elpa/28.2/develop/org-9.6/org.el" nil t)
  org-mode()
  set-auto-mode-0(org-mode nil)
  set-auto-mode--apply-alist((("\\.djhtml\\'" . web-mode) ("\\.ctp\\'" . web-mode) ("\\.svelte\\'" . web-mode) ("\\.ejs\\'" . web-mode) ("\\.eco\\'" . web-mode) ("\\.hbs\\'" . web-mode) ("\\.handlebars\\'" . web-mode) ("\\.mustache\\'" . web-mode) ("\\.erb\\'" . web-mode) ("\\.eex\\'" . web-mode) ("\\.as[cp]x?\\'" . web-mode) ("\\.[gj]sp\\'" . web-mode) ("\\.htm\\'" . web-mode) ("\\.html\\'" . web-mode) ("\\.xml\\'" . web-mode) ("\\.twig\\'" . web-mode) ("\\.tpl\\.php\\'" . web-mode) ("\\.phtml\\'" . web-mode) ("\\.pug$" . pug-mode) ("\\.epub\\'" . nov-mode) ("Cask\\'" . emacs-lisp-mode) ("\\*.el\\'" . emacs-lisp-mode) ("\\.[cm]?js\\'" . js2-mode) ("\\.boot\\'" . clojure-mode) ("\\.slim\\'" . slim-mode) ("\\.sass\\'" . sass-mode) ("\\.\\(?:jade\\|pug\\)\\'" . pug-mode) ("\\(?:\\(?:\\.\\(?:b\\(?:\\(?:abel\\|ower\\)rc\\)\\|json\\(?:l..." . json-mode) ("/git-rebase-todo$" . helm-ls-git-rebase-todo-mode) ("/COMMIT_EDITMSG$" . helm-ls-git-commit-mode) ("\\.haml\\'" . haml-mode) ("/git/ignore\\'" . gitignore-mode) ("/info/exclude\\'" . gitignore-mode) ("/\\.gitignore\\'" . gitignore-mode) ("/etc/gitconfig\\'" . gitconfig-mode) ("/\\.gitmodules\\'" . gitconfig-mode) ("/git/config\\'" . gitconfig-mode) ("/modules/.*/config\\'" . gitconfig-mode) ("/\\.git/config\\'" . gitconfig-mode) ("/\\.gitconfig\\'" . gitconfig-mode) ("/git/attributes\\'" . gitattributes-mode) ("/info/attributes\\'" . gitattributes-mode) ("/\\.gitattributes\\'" . gitattributes-mode) ("\\.\\(?:md\\|markdown\\|mkd\\|mdown\\|mkdn\\|mdwn\\)\\'" . markdown-mode) ("/git-rebase-todo\\'" . git-rebase-mode) ("\\.editorconfig\\'" . editorconfig-conf-mode) ("\\.tsv\\'" . tsv-mode) ("\\.[Cc][Ss][Vv]\\'" . csv-mode) ("\\(?:build\\|profile\\)\\.boot\\'" . clojure-mode) ("\\.cljs\\'" . clojurescript-mode) ...) nil nil)
  set-auto-mode()
  normal-mode(t)
  after-find-file(nil t)
  find-file-noselect-1(#<buffer notes.org> #("~/Sync/ORG/notes.org" 1 20 (match-part "/home/2fo/Sync/ORG/notes.org")) nil nil "~/Sync/ORG/notes.org" (2036952 39))
  #<subr find-file-noselect>(#("/home/2fo/Sync/ORG/notes.org" 0 27 (match-part "/home/2fo/Sync/ORG/notes.org")))
  apply(#<subr find-file-noselect> #("/home/2fo/Sync/ORG/notes.org" 0 27 (match-part "/home/2fo/Sync/ORG/notes.org")) nil)
  editorconfig--advice-find-file-noselect(#<subr find-file-noselect> #("/home/2fo/Sync/ORG/notes.org" 0 27 (match-part "/home/2fo/Sync/ORG/notes.org")))
  apply(editorconfig--advice-find-file-noselect #<subr find-file-noselect> #("/home/2fo/Sync/ORG/notes.org" 0 27 (match-part "/home/2fo/Sync/ORG/notes.org")))
  find-file-noselect(#("/home/2fo/Sync/ORG/notes.org" 0 27 (match-part "/home/2fo/Sync/ORG/notes.org")))
  mapcar(find-file-noselect (#("/home/2fo/Sync/ORG/notes.org" 0 27 (match-part "/home/2fo/Sync/ORG/notes.org"))))
  (let* ((files (helm-marked-candidates)) (buffers (mapcar 'find-file-noselect files))) (spacemacs//helm-open-buffers-in-windows buffers))
  (lambda (candidate) (let* ((files (helm-marked-candidates)) (buffers (mapcar 'find-file-noselect files))) (spacemacs//helm-open-buffers-in-windows buffers)))(#("/home/2fo/Sync/ORG/notes.org" 0 27 (match-part "/home/2fo/Sync/ORG/notes.org")))
  helm-execute-selection-action-1()
  helm-execute-selection-action()
  helm-internal((helm-source-buffers-list helm-source-recentf helm-source-buffer-not-found) nil nil nil nil "*helm mini*" nil nil nil)
  helm((helm-source-buffers-list helm-source-recentf helm-source-buffer-not-found) nil nil nil nil "*helm mini*" nil nil nil)
  helm(:sources (helm-source-buffers-list helm-source-recentf helm-source-buffer-not-found) :buffer "*helm mini*" :ff-transformer-show-only-basename nil :truncate-lines t :left-margin-width 0)
  helm-mini()
  funcall-interactively(helm-mini)
  call-interactively(helm-mini)
  lazy-helm/helm-mini()
  funcall-interactively(lazy-helm/helm-mini)
  command-execute(lazy-helm/helm-mini)
sunlin7 commented 1 year ago

Remove the /home/2fo/.emacs.d/elpa/28.2/develop/org-9.6 then restart the Spacemacs again?

2FO commented 1 year ago

Issue fixed, many thanks @sunlin7

RidaAyed commented 1 year ago

Even deleting rm -r ~/.emacs.d/elpa + disabling every org-related layer doesn't help. After re-adding the org layer the problem remains. Any further ideas?

Re-opened as new issue here #15934

tanju commented 1 year ago

I cannot confirm this issue as fixed by the workaround to delete local package dir rm -r ~/.emacs.d/elpa. Even after re-installing all packages issue still exists: File mode specification error: (void-function org-assert-version) @lebensterben

lebensterben commented 1 year ago

@tanju see #15896