0

EDIT: Error is not present with Emacs 26.3. I will revist when Emacs 27 becomes a release.

Emacs 27.0.50

This error occurs when I load a .java file or read java code in an org-mode src block. How may I prevent this error from occuring? Thank you. :)

Screenshot of error

My jvm.el config might be the culprit.

;;; package --- Summary:
;;; Commentary:
;;; JVM Languages & Support
;;;; Java
;;;; https://blog.jmibanez.com/2019/03/31/emacs-as-java-ide-revisited.html
(use-package lsp-java
  :after lsp
  :config
  (add-hook 'java-mode-hook 'lsp)
  (add-hook 'java-mode-hook 'flycheck-mode)
  (require 'dap-java))
;;;; Kotlin
;;;; Groovy & Gradle
(use-package groovy-mode)

;;;; Scala
(use-package scala-mode)
;;;; Clojure
(use-package cider
  :after lsp
  :init
  (setq lsp-enable-indentation nil)
  (add-to-list 'lsp-language-id-configuration '(clojure-mode . "clojure-mode"))
  :config
  (add-hook 'clojure-mode-hook 'lsp)
  (add-hook 'clojurec-mode-hook 'lsp)
  (add-hook 'clojurescript-mode-hook 'lsp))
(use-package cider-hydra)

;;;; Add Java to Org-babel
(org-babel-do-load-languages
 'org-babel-load-languages
   (append org-babel-load-languages
           '((java . t))))

;;;; Maven
(setq nxml-child-indent 4)

(provide 'jvm)
;;; jvm.el ends here
  • That's very weird. You have a badly-formed load-history. The car of each element should be a string (the path to the library), and evidentially here you've ended up with a (require . info) element in that position. I can't explain that, but maybe this still helps a little. – phils Mar 20 at 12:15
  • Which version of Emacs are you using? This looks like reddit.com/r/emacs/comments/flnp5v/… which suggests you're likewise using an unstable build, but didn't say so in your question. It's always very useful information to include version details in a question, but especially so when you're not using a stable release. – phils Mar 20 at 12:44
  • @phils I have downgraded to Emacs 26.3 and the error is no longer present. I forgot why I upgraded to Emacs 27. I think it was because it has native JSON, but I do not recall. I will revisit this once Emacs 27 because a stable release. Thank you! :) – danbanta Mar 20 at 16:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.