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.68k stars 4.89k forks source link

File mode specification error: (error Selecting deleted buffer) #16577

Closed RaghuNaik closed 4 weeks ago

RaghuNaik commented 1 month ago

I am getting this error after a package update.

File mode specification error: (error Selecting deleted buffer) Error during redisplay: (jit-lock-function 1) signaled (error "Selecting deleted buffer")

Now emacs freezes on start-up and I have to kill the process and start it up again. Org fontification is gone and cdlatex commands are not working now.

Not sure if anyone else is also experiencing this.

Would appreciate any help.

My system details are as below: `

System Info :computer:

`

fnussbaum commented 1 month ago

I have noticed on my system that every time Org-related packages are updated, I get an "Org version mismatch" warning, i.e. the built-in Org version (9.6.15 for me) is loaded during the update and used for byte-compilation. When loading the byte-compiled packages with Org 9.7 later this can cause errors.

So we should probably ensure that the correct Org version is loaded when updating packages.

Could you try recompiling or reinstalling all Org-related packages (or just those that were updated) while Spacemacs is running with org-version >= 9.7?

smile13241324 commented 1 month ago

Since org has moved into emacs itself its becoming more and more critical to update the org version we want to use. I think if we updating org we need to make sure that this package is updated first and afterwards all org related features are unloaded and then loaded again to make sure we get the new version and not the build in one not even partially.

Ok with this being said here is a workaround:

I will put this into my project planning.

@RaghuNaik can you try one of the two workarounds and report back? If it does not work I would like to know which package is malfunctioning and would require a stack trace.

fnussbaum commented 1 month ago

I have noticed on my system that every time Org-related packages are updated, I get an "Org version mismatch" warning, i.e. the built-in Org version (9.6.15 for me) is loaded during the update and used for byte-compilation.

I spent some time bisecting package updates, and this actually seems to only be the case when a package contains Org macros or functions but does not explicitly depend on Org.

I can reproduce the "Org version mismatch" warning for example by (using the compleseus layer) uninstalling consult and restarting, which will install consult again but seems to load the built-in Org version during byte-compilation. So perhaps we can do something like setting the load-path for Org before installing packages on startup.

RaghuNaik commented 1 month ago

Since org has moved into emacs itself its becoming more and more critical to update the org version we want to use. I think if we updating org we need to make sure that this package is updated first and afterwards all org related features are unloaded and then loaded again to make sure we get the new version and not the build in one not even partially.

Ok with this being said here is a workaround:

* Either go into elpa/version/ and search for all packages with org in the name, except org mode itself and remove them then restart emacs. This should load the updated org version and then byte compile all related packages accordingly.

* Alternatively you can run `(spacemacs/recompile-elpa t)` and let spacemacs recompile all elpa packages for you, beware this may take a while.

I will put this into my project planning.

@RaghuNaik can you try one of the two workarounds and report back? If it does not work I would like to know which package is malfunctioning and would require a stack trace.

Tried the first option. It did not work. Same issues as highlighted earlier.

Going to try the second option.

Cheers.

RaghuNaik commented 1 month ago

Tried to recompile the packages withSPC f e c.

Get the following compile log:

Leaving directory ‘/home/XXX/.emacs.d/elpa/29.3/develop/’

Compiling file /home/XXX/.emacs.d/elpa/29.3/develop/multi-vterm-20221031.610/multi-vterm.el at Sat Sep 14 08:48:30 2024
Entering directory ‘/home/XXX/.emacs.d/elpa/29.3/develop/multi-vterm-20221031.610/’
multi-vterm.el:34:2: Error: Cannot open load file: No such file or directory, vterm-module
Leaving directory ‘/home/XXX/.emacs.d/elpa/29.3/develop/multi-vterm-20221031.610/’

Compiling file /home/XXX/.emacs.d/elpa/29.3/develop/noctilux-theme-20161113.1442/noctilux-theme.el at Sat Sep 14 08:48:31 2024
Entering directory ‘/home/XXX/.emacs.d/elpa/29.3/develop/noctilux-theme-20161113.1442/’

In noctilux-color-definitions:
noctilux-theme.el:125:29: Warning: ‘case’ is an obsolete alias (as of 27.1);
    use ‘cl-case’ instead.
noctilux-theme.el:157:19: Warning: ‘rotatef’ is an obsolete alias (as of
    27.1); use ‘cl-rotatef’ instead.
noctilux-theme.el:274:17: Warning: ‘case’ is an obsolete alias (as of 27.1);
    use ‘cl-case’ instead.
noctilux-theme.el:690:2: Error: Symbol’s function definition is void: noctilux-color-definitions
Leaving directory ‘/home/XXX/.emacs.d/elpa/29.3/develop/noctilux-theme-20161113.1442/’

Compiling file /home/XXX/.emacs.d/elpa/29.3/develop/org-ref-20240802.1213/org-ref-helm.el at Sat Sep 14 08:48:32 2024
Entering directory ‘/home/XXX/.emacs.d/elpa/29.3/develop/org-ref-20240802.1213/’
org-ref-helm.el:33:2: Error: Cannot open load file: No such file or directory, helm-bibtex

Compiling file /home/XXX/.emacs.d/elpa/29.3/develop/org-ref-20240802.1213/org-ref-ivy.el at Sat Sep 14 08:48:33 2024
org-ref-ivy.el:33:2: Error: Cannot open load file: No such file or directory, ivy-bibtex

Compiling file /home/XXX/.emacs.d/elpa/29.3/develop/org-ref-20240802.1213/org-ref-pdf.el at Sat Sep 14 08:48:33 2024
org-ref-pdf.el:35:2: Error: Cannot open load file: No such file or directory, pdf-tools
fnussbaum commented 1 month ago

The log seems okay to me. Do the errors still occur?

Error during redisplay: (jit-lock-function 1) signaled (error "Selecting deleted buffer")

To obtain a backtrace for such an error with toggle-debug-on-error you can enable jit-lock-debug-mode I think.

fnussbaum commented 1 month ago

If the error occurs only on startup you can try starting from the command line with emacs --debug-init and putting

(jit-lock-debug-mode 1)
(setq debug-on-error t)

into your dotspacemacs/user-init function.

RaghuNaik commented 1 month ago

Here is what I tried.

After recompiling, emacs starts with the file mode specification error: (error selecting deleted buffer) error and freezes.

I kill emacs and start it again.

No error message from the get go.

I enable Jit-Lock-Debug mode and open an org file. I get the file mode specification error: (error selecting deleted buffer) error.

I close the org file and enable 'toggle-debug-on-error' and then open the org file again.

I get the following backtrace log: ` Debugger entered--Lisp error: (error "Selecting deleted buffer") org-element--substring((src-block (:standard-properties [4 4 nil nil 86 1 nil planning element t nil nil nil nil # nil nil (section (:standard-properties [4 4 4 86 86 0 nil section element t nil 4 86 nil # nil nil (headline ...)]))] :language "R" :switches nil :parameters nil :number-lines nil :preserve-indent nil :retain-labels t :use-labels t :label-fmt nil :value [org-element-deferred org-element--unescape-substring (14 71) t])) 14 71) org-element--unescape-substring((src-block (:standard-properties [4 4 nil nil 86 1 nil planning element t nil nil nil nil # nil nil (section (:standard-properties [4 4 4 86 86 0 nil section element t nil 4 86 nil # nil nil (headline ...)]))] :language "R" :switches nil :parameters nil :number-lines nil :preserve-indent nil :retain-labels t :use-labels t :label-fmt nil :value [org-element-deferred org-element--unescape-substring (14 71) t])) 14 71) apply(org-element--unescape-substring (src-block (:standard-properties [4 4 nil nil 86 1 nil planning element t nil nil nil nil # nil nil (section (:standard-properties [4 4 4 86 86 0 nil section element t nil 4 86 nil # nil nil (headline ...)]))] :language "R" :switches nil :parameters nil :number-lines nil :preserve-indent nil :retain-labels t :use-labels t :label-fmt nil :value [org-element-deferred org-element--unescape-substring (14 71) t])) (14 71)) org-element--property(:value (src-block (:standard-properties [4 4 nil nil 86 1 nil planning element t nil nil nil nil # nil nil (section (:standard-properties [4 4 4 86 86 0 nil section element t nil 4 86 nil # nil nil (headline ...)]))] :language "R" :switches nil :parameters nil :number-lines nil :preserve-indent nil :retain-labels t :use-labels t :label-fmt nil :value [org-element-deferred org-element--unescape-substring (14 71) t])) nil nil) org-element-property(:value (src-block (:standard-properties [4 4 nil nil 86 1 nil planning element t nil nil nil nil # nil nil (section (:standard-properties [4 4 4 86 86 0 nil section element t nil 4 86 nil # nil nil (headline ...)]))] :language "R" :switches nil :parameters nil :number-lines nil :preserve-indent nil :retain-labels t :use-labels t :label-fmt nil :value [org-element-deferred org-element--unescape-substring (14 71) t]))) org-babel--normalize-body((src-block (:standard-properties [4 4 nil nil 86 1 nil planning element t nil nil nil nil # nil nil (section (:standard-properties [4 4 4 86 86 0 nil section element t nil 4 86 nil # nil nil (headline ...)]))] :language "R" :switches nil :parameters nil :number-lines nil :preserve-indent nil :retain-labels t :use-labels t :label-fmt nil :value [org-element-deferred org-element--unescape-substring (14 71) t]))) org-babel-get-src-block-info(light (src-block (:standard-properties [4 4 nil nil 86 1 nil planning element t nil nil nil nil # nil nil (section (:standard-properties [4 4 4 86 86 0 nil section element t nil 4 86 nil # nil nil (headline ...)]))] :language "R" :switches nil :parameters nil :number-lines nil :preserve-indent nil :retain-labels t :use-labels t :label-fmt nil :value [org-element-deferred org-element--unescape-substring (14 71) t]))) xenops-src-parse-at-point() funcall(xenops-src-parse-at-point) xenops-util-first-result(funcall (xenops-math-parse-block-element-at-point xenops-math-parse-inline-element-at-point xenops-math-parse-table-at-point xenops-image-parse-at-point xenops-footnote-parse-at-point xenops-minted-parse-at-point xenops-src-parse-at-point)) xenops-parse-any-element-at-point((xenops-math-parse-block-element-at-point xenops-math-parse-inline-element-at-point xenops-math-parse-table-at-point xenops-image-parse-at-point xenops-footnote-parse-at-point xenops-minted-parse-at-point xenops-src-parse-at-point)) xenops-apply-parse-next-element(653 (xenops-math-parse-block-element-at-point xenops-math-parse-inline-element-at-point xenops-math-parse-table-at-point xenops-image-parse-at-point xenops-footnote-parse-at-point xenops-minted-parse-at-point xenops-src-parse-at-point)) xenops-apply-handlers-over-region((xenops-math-render xenops-image-render xenops-footnote-render) 1 653 nil nil) xenops-apply-operations((render)) xenops-render() xenops-render-if-cached() xenops-mode() run-hooks(change-major-mode-after-body-hook text-mode-hook outline-mode-hook org-mode-hook) apply(run-hooks (change-major-mode-after-body-hook text-mode-hook outline-mode-hook org-mode-hook)) run-mode-hooks(org-mode-hook) org-mode() set-auto-mode-0(org-mode nil) set-auto-mode--apply-alist((("\.Rmd" . poly-quarto-mode) ("\.Rmd" . poly-markdown+r-mode) ("\.Rnw" . poly-noweb+r-mode) ("\.Snw" . poly-noweb+r-mode) ("\.md" . poly-markdown-mode) ("\.djhtml\'" . web-mode) ("\.ctp\'" . 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) ("\.twig\'" . web-mode) ("\.tpl\'" . web-mode) ("\.phtml\'" . web-mode) ("SConscript\'" . python-mode) ("SConstruct\'" . python-mode) ("\.pug$" . pug-mode) ("\.\(pum\|puml\)\'" . plantuml-mode) ("\.epub\'" . nov-mode) ("\.mdx\'" . markdown-mode) ("\.mdk\'" . markdown-mode) ("\.mkd\'" . markdown-mode) ("Cask\'" . emacs-lisp-mode) ("\.el\'" . emacs-lisp-mode) ("\.[Jj][Mm][Dd]\'" . ess-jags-mode) ("\.[Jj][Oo][Gg]\'" . ess-jags-mode) ("\.[Rr]out" . R-transcript-mode) ("\.Sout" . S-transcript-mode) ("\.ado\'" . STA-mode) ("\.do\'" . STA-mode) ("\.lsp\'" . XLS-mode) ("\.hat\'" . omegahat-mode) ("\.omg\'" . omegahat-mode) ("CITATION\'" . R-mode) ("NAMESPACE\'" . R-mode) ("\.[rR]profile\'" . R-mode) ("\.[sS]nw\'" . Snw-mode) ("\.[rR]nw\'" . Rnw-mode) ("\.[rR]\'" . R-mode) ("\.SSC\'" . S-mode) ("\.ssc\'" . S-mode) ("\.[qsS]\'" . S-mode) ("/R/.\.q\'" . R-mode) ...) nil nil) set-auto-mode() normal-mode(t) after-find-file(nil t) find-file-noselect-1(#<buffer 20240913T124523--impulse-response-from-johnston__cointegration_r_timeseries_vars.org> "/mnt/hgfs/r_projects/review/notes/20240913T124523-..." nil nil "/mnt/hgfs/r_projects/review/notes/20240913T124523-..." (28177 54))

("/mnt/hgfs/r_projects/review/notes/20240913T124523-..." nil nil nil)

apply(# "/mnt/hgfs/r_projects/review/notes/20240913T124523-..." (nil nil nil)) editorconfig--advice-find-file-noselect(# "/mnt/hgfs/r_projects/review/notes/20240913T124523-..." nil nil nil) apply(editorconfig--advice-find-file-noselect # ("/mnt/hgfs/r_projects/review/notes/20240913T124523-..." nil nil nil)) find-file-noselect("/mnt/hgfs/r_projects/review/notes/20240913T124523-..." nil nil nil) find-file("/mnt/hgfs/r_projects/review/notes/20240913T124523-...") find-file-existing("/mnt/hgfs/r_projects/review/notes/20240913T124523-...") (lambda (&rest ignore) (find-file-existing "/mnt/hgfs/r_projects/review/notes/20240913T124523-..."))((push-button :args nil :value "/mnt/hgfs/r_projects/review/notes/20240913T124523-..." :action (lambda (&rest ignore) (find-file-existing "/mnt/hgfs/r_projects/review/notes/20240913T124523-...")) :mouse-face highlight :follow-link "\15" :button-prefix "" :button-suffix "" :button-face nil :format "%[%t%]" :button-overlay #<overlay from 485 to 603 in spacemacs> :from #<marker (moves after insertion) at 485 in spacemacs> :to #<marker at 603 in spacemacs>) nil) widget-apply-action((push-button :args nil :value "/mnt/hgfs/r_projects/review/notes/20240913T124523-..." :action (lambda (&rest ignore) (find-file-existing "/mnt/hgfs/r_projects/review/notes/20240913T124523-...")) :mouse-face highlight :follow-link "\15" :button-prefix "" :button-suffix "" :button-face nil :format "%[%t%]" :button-overlay #<overlay from 485 to 603 in spacemacs> :from #<marker (moves after insertion) at 485 in spacemacs> :to #<marker at 603 in spacemacs>) nil) widget-button-press(485) (if (not (re-search-forward (concat "^ +" nr-string "[0-9] +. ") (save-excursion (goto-char (window-end)) (forward-line -1) (point)) 'noerror)) (progn (goto-char prev-point) (let (message-log-max) (message "Couldn't find startup list number: %s" spacemacs-buffer--startup-list-number))) (message "Opening file/dir: %s" (widget-value (widget-at (point)))) (widget-button-press (point))) (let ((prev-point (point))) (goto-char (window-start)) (if (not (re-search-forward (concat "^ +" nr-string "[0-9] +. ") (save-excursion (goto-char (window-end)) (forward-line -1) (point)) 'noerror)) (progn (goto-char prev-point) (let (message-log-max) (message "Couldn't find startup list number: %s" spacemacs-buffer--startup-list-number))) (message "Opening file/dir: %s" (widget-value (widget-at (point)))) (widget-button-press (point)))) spacemacs-buffer/jump-to-line-starting-with-nr-space("1") spacemacs-buffer/stop-waiting-for-additional-numbers() apply(spacemacs-buffer/stop-waiting-for-additional-numbers nil) timer-event-handler([t 0 0 400000 nil spacemacs-buffer/stop-waiting-for-additional-numbers nil idle 0 nil]) ` Thanks.

RaghuNaik commented 1 month ago

If the error occurs only on startup you can try starting from the command line with emacs --debug-init and putting

(jit-lock-debug-mode 1)
(setq debug-on-error t)

into your dotspacemacs/user-init function.

Also tried as you suggested.

I get the following error

Error during redisplay: (jit-lock-function 1) signaled (error "Selecting deleted buffer") .

Bactrace log:

`Debugger entered--Lisp error: (error "Selecting deleted buffer") org-element--substring((src-block (:standard-properties [4 4 nil nil 86 1 nil planning element t nil nil nil nil # nil nil (section (:standard-properties [4 4 4 86 86 0 nil section element t nil 4 86 nil # nil nil (headline ...)]))] :language "R" :switches nil :parameters nil :number-lines nil :preserve-indent nil :retain-labels t :use-labels t :label-fmt nil :value [org-element-deferred org-element--unescape-substring (14 71) t])) 14 71) org-element--unescape-substring((src-block (:standard-properties [4 4 nil nil 86 1 nil planning element t nil nil nil nil # nil nil (section (:standard-properties [4 4 4 86 86 0 nil section element t nil 4 86 nil # nil nil (headline ...)]))] :language "R" :switches nil :parameters nil :number-lines nil :preserve-indent nil :retain-labels t :use-labels t :label-fmt nil :value [org-element-deferred org-element--unescape-substring (14 71) t])) 14 71) apply(org-element--unescape-substring (src-block (:standard-properties [4 4 nil nil 86 1 nil planning element t nil nil nil nil # nil nil (section (:standard-properties [4 4 4 86 86 0 nil section element t nil 4 86 nil # nil nil (headline ...)]))] :language "R" :switches nil :parameters nil :number-lines nil :preserve-indent nil :retain-labels t :use-labels t :label-fmt nil :value [org-element-deferred org-element--unescape-substring (14 71) t])) (14 71)) org-element--property(:value (src-block (:standard-properties [4 4 nil nil 86 1 nil planning element t nil nil nil nil # nil nil (section (:standard-properties [4 4 4 86 86 0 nil section element t nil 4 86 nil # nil nil (headline ...)]))] :language "R" :switches nil :parameters nil :number-lines nil :preserve-indent nil :retain-labels t :use-labels t :label-fmt nil :value [org-element-deferred org-element--unescape-substring (14 71) t])) nil nil) org-element-property(:value (src-block (:standard-properties [4 4 nil nil 86 1 nil planning element t nil nil nil nil # nil nil (section (:standard-properties [4 4 4 86 86 0 nil section element t nil 4 86 nil # nil nil (headline ...)]))] :language "R" :switches nil :parameters nil :number-lines nil :preserve-indent nil :retain-labels t :use-labels t :label-fmt nil :value [org-element-deferred org-element--unescape-substring (14 71) t]))) org-babel--normalize-body((src-block (:standard-properties [4 4 nil nil 86 1 nil planning element t nil nil nil nil # nil nil (section (:standard-properties [4 4 4 86 86 0 nil section element t nil 4 86 nil # nil nil (headline ...)]))] :language "R" :switches nil :parameters nil :number-lines nil :preserve-indent nil :retain-labels t :use-labels t :label-fmt nil :value [org-element-deferred org-element--unescape-substring (14 71) t]))) org-babel-get-src-block-info(light (src-block (:standard-properties [4 4 nil nil 86 1 nil planning element t nil nil nil nil # nil nil (section (:standard-properties [4 4 4 86 86 0 nil section element t nil 4 86 nil # nil nil (headline ...)]))] :language "R" :switches nil :parameters nil :number-lines nil :preserve-indent nil :retain-labels t :use-labels t :label-fmt nil :value [org-element-deferred org-element--unescape-substring (14 71) t]))) xenops-src-parse-at-point() funcall(xenops-src-parse-at-point) xenops-util-first-result(funcall (xenops-math-parse-block-element-at-point xenops-math-parse-inline-element-at-point xenops-math-parse-table-at-point xenops-image-parse-at-point xenops-footnote-parse-at-point xenops-minted-parse-at-point xenops-src-parse-at-point)) xenops-parse-any-element-at-point((xenops-math-parse-block-element-at-point xenops-math-parse-inline-element-at-point xenops-math-parse-table-at-point xenops-image-parse-at-point xenops-footnote-parse-at-point xenops-minted-parse-at-point xenops-src-parse-at-point)) xenops-apply-parse-next-element(653 (xenops-math-parse-block-element-at-point xenops-math-parse-inline-element-at-point xenops-math-parse-table-at-point xenops-image-parse-at-point xenops-footnote-parse-at-point xenops-minted-parse-at-point xenops-src-parse-at-point)) xenops-apply-handlers-over-region((xenops-math-render xenops-image-render xenops-footnote-render) 1 653 nil nil) xenops-apply-operations((render)) xenops-render() xenops-render-if-cached() xenops-mode() run-hooks(change-major-mode-after-body-hook text-mode-hook outline-mode-hook org-mode-hook) apply(run-hooks (change-major-mode-after-body-hook text-mode-hook outline-mode-hook org-mode-hook)) run-mode-hooks(org-mode-hook) org-mode() set-auto-mode-0(org-mode nil) set-auto-mode--apply-alist((("\.Rmd" . poly-quarto-mode) ("\.Rmd" . poly-markdown+r-mode) ("\.Rnw" . poly-noweb+r-mode) ("\.Snw" . poly-noweb+r-mode) ("\.md" . poly-markdown-mode) ("\.djhtml\'" . web-mode) ("\.ctp\'" . 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) ("\.twig\'" . web-mode) ("\.tpl\'" . web-mode) ("\.phtml\'" . web-mode) ("SConscript\'" . python-mode) ("SConstruct\'" . python-mode) ("\.pug$" . pug-mode) ("\.\(pum\|puml\)\'" . plantuml-mode) ("\.epub\'" . nov-mode) ("\.mdx\'" . markdown-mode) ("\.mdk\'" . markdown-mode) ("\.mkd\'" . markdown-mode) ("Cask\'" . emacs-lisp-mode) ("\.el\'" . emacs-lisp-mode) ("\.[Jj][Mm][Dd]\'" . ess-jags-mode) ("\.[Jj][Oo][Gg]\'" . ess-jags-mode) ("\.[Rr]out" . R-transcript-mode) ("\.Sout" . S-transcript-mode) ("\.ado\'" . STA-mode) ("\.do\'" . STA-mode) ("\.lsp\'" . XLS-mode) ("\.hat\'" . omegahat-mode) ("\.omg\'" . omegahat-mode) ("CITATION\'" . R-mode) ("NAMESPACE\'" . R-mode) ("\.[rR]profile\'" . R-mode) ("\.[sS]nw\'" . Snw-mode) ("\.[rR]nw\'" . Rnw-mode) ("\.[rR]\'" . R-mode) ("\.SSC\'" . S-mode) ("\.ssc\'" . S-mode) ("\.[qsS]\'" . S-mode) ("/R/.\.q\'" . R-mode) ...) nil nil) set-auto-mode() normal-mode(t) after-find-file(nil t) find-file-noselect-1(#<buffer 20240913T124523--impulse-response-from-johnston__cointegration_r_timeseries_vars.org> "/mnt/hgfs/r_projects/review/notes/20240913T124523-..." nil nil "/mnt/hgfs/r_projects/review/notes/20240913T124523-..." (28177 54))

("/mnt/hgfs/r_projects/review/notes/20240913T124523-..." nil nil nil)

apply(# "/mnt/hgfs/r_projects/review/notes/20240913T124523-..." (nil nil nil)) editorconfig--advice-find-file-noselect(# "/mnt/hgfs/r_projects/review/notes/20240913T124523-..." nil nil nil) apply(editorconfig--advice-find-file-noselect # ("/mnt/hgfs/r_projects/review/notes/20240913T124523-..." nil nil nil)) find-file-noselect("/mnt/hgfs/r_projects/review/notes/20240913T124523-..." nil nil nil) find-file("/mnt/hgfs/r_projects/review/notes/20240913T124523-...") find-file-existing("/mnt/hgfs/r_projects/review/notes/20240913T124523-...") (lambda (&rest ignore) (find-file-existing "/mnt/hgfs/r_projects/review/notes/20240913T124523-..."))((push-button :args nil :value "/mnt/hgfs/r_projects/review/notes/20240913T124523-..." :action (lambda (&rest ignore) (find-file-existing "/mnt/hgfs/r_projects/review/notes/20240913T124523-...")) :mouse-face highlight :follow-link "\15" :button-prefix "" :button-suffix "" :button-face nil :format "%[%t%]" :button-overlay #<overlay from 507 to 625 in spacemacs> :from #<marker (moves after insertion) at 507 in spacemacs> :to #<marker at 625 in spacemacs>) nil) widget-apply-action((push-button :args nil :value "/mnt/hgfs/r_projects/review/notes/20240913T124523-..." :action (lambda (&rest ignore) (find-file-existing "/mnt/hgfs/r_projects/review/notes/20240913T124523-...")) :mouse-face highlight :follow-link "\15" :button-prefix "" :button-suffix "" :button-face nil :format "%[%t%]" :button-overlay #<overlay from 507 to 625 in spacemacs> :from #<marker (moves after insertion) at 507 in spacemacs> :to #<marker at 625 in spacemacs>) nil) widget-button-press(507) (if (not (re-search-forward (concat "^ +" nr-string "[0-9] +. ") (save-excursion (goto-char (window-end)) (forward-line -1) (point)) 'noerror)) (progn (goto-char prev-point) (let (message-log-max) (message "Couldn't find startup list number: %s" spacemacs-buffer--startup-list-number))) (message "Opening file/dir: %s" (widget-value (widget-at (point)))) (widget-button-press (point))) (let ((prev-point (point))) (goto-char (window-start)) (if (not (re-search-forward (concat "^ +" nr-string "[0-9] +. ") (save-excursion (goto-char (window-end)) (forward-line -1) (point)) 'noerror)) (progn (goto-char prev-point) (let (message-log-max) (message "Couldn't find startup list number: %s" spacemacs-buffer--startup-list-number))) (message "Opening file/dir: %s" (widget-value (widget-at (point)))) (widget-button-press (point)))) spacemacs-buffer/jump-to-line-starting-with-nr-space("2") spacemacs-buffer/stop-waiting-for-additional-numbers() apply(spacemacs-buffer/stop-waiting-for-additional-numbers nil) timer-event-handler([t 0 0 400000 nil spacemacs-buffer/stop-waiting-for-additional-numbers nil idle 0 nil])`

fnussbaum commented 1 month ago

Thanks, the error seems to come from xenops-mode, so it might be an upstream problem. I can try to reproduce it later.

fnussbaum commented 4 weeks ago

I can reproduce the problem by enabling xenops-mode in an Org buffer with source blocks. I don't actually use xenops-mode myself, so it is difficult for me to test, but the following attempted fix at least gets rid of the error for me:

(defun fn/xenops-src-parse-at-point ()
  (-if-let* ((element (xenops-parse-element-at-point 'src))
             (org-babel-info
              (xenops-src-do-in-org-mode
               (org-babel-get-src-block-info 'light (org-element-context)))))
      (xenops-util-plist-update
       element
       :type 'src
       :language (nth 0 org-babel-info)
       :org-babel-info org-babel-info)))

(advice-add 'xenops-src-parse-at-point :override 'fn/xenops-src-parse-at-point)

@RaghuNaik I think this should be reported upstream.

RaghuNaik commented 4 weeks ago

Ok thank you @fnussbaum and @smile13241324. I will close this issue and follow it upstream.

Much appreciated. I learnt a lot in this process.