Error: byte-code: Recursive load
Opened this issue · 6 comments
When i load the yasnippet, emacs warns "byte-code: Recursive load".
After some investigation, it seems to fix the problem by removing
(require 'yasnippet-snippets)
from "yasnippet-snippets/snippets/bibtex-mode/.yas-setup.el".
Just stumbled upon the same issue!
Mm odd I can't see the same issue, how are you loading yasnippet?
Could it be possibly related to moving from one version to Emacs to another maybe?
Nothing special.
(use-package yasnippet-snippets
:after yasnippet)
I have removed (require 'yasnippet-snippets) from snippets/bibtex-mode/.yas-setup.el to fix this. Then a few days later i realized that i upgraded the package, so all changes have gone. However there are not any issues anymore. So i cannot reproduced it now.
Same issue, running Emacs v. 28.2 on Ubuntu, trying to get yasnippet up and running on a new machine. I'm not sure if this is useful or relevant to anyone, but I thought I might as well write up what I've learnt just in case it's helpful.
I installed both yasnippet and yasnippet-snippets via melpa. The relevant section of my init.el reads:
(require 'yasnippet)
(setq yas-snippet-dirs
'("~/.emacs.d/snippets"
"~/.emacs.d/elpa/yasnippet-snippets-20230314.2056/snippets/"
))
and concludes with either
(yas-global-mode 1)
or
(yas-reload-all)
(add-hook 'python-mode-hook
(lambda ()
(yas-minor-mode 1)
))
I have tried with both python-mode-hook and LaTeX-mode-hook.
Upon editing the code and evaluating the relevant lines and/or the whole buffer, I get the following error message:
helm-M-x-execute-command: Recursive load: "/home/[name]/.emacs.d/elpa/yasnippet-snippets-20230314.2056/snippets/bibtex-mode/.yas-setup.elc", "/home/[name]/.emacs.d/elpa/yasnippet-snippets-20230314.2056/yasnippet-snippets.elc",
with the two listed files repeating several times over.
Following @hitswint's suggestion, I removed (require 'yasnippet-snippets)
from "bibtex-mode/yas-setup.elc". Re-evaluating the code without closing emacs does not fix the issue, but closing emacs and re-starting does appear to fix the issue, so there's clearly some internal variable being reset here that I'm missing.
For what it's worth, I took a peek in some of the other mode "yas-setup.elc" files, and none of the ones I checked had (require 'yasnippet-snippets)
present.