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

Error: byte-code: Recursive load #439

Open
hitswint opened this issue Feb 7, 2022 · 6 comments
Open

Error: byte-code: Recursive load #439

hitswint opened this issue Feb 7, 2022 · 6 comments

Comments

@hitswint
Copy link

hitswint commented Feb 7, 2022

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".

@sebhahn
Copy link

sebhahn commented May 10, 2022

Just stumbled upon the same issue!

@AndreaCrotti
Copy link
Owner

Mm odd I can't see the same issue, how are you loading yasnippet?

@AndreaCrotti
Copy link
Owner

Could it be possibly related to moving from one version to Emacs to another maybe?

@sten0
Copy link
Contributor

sten0 commented Aug 2, 2022

@hitswint @sebhahn, would you please provide the information AndreaCrotti requested as well as the steps to reproduce this warning? If this issue affects the Debian package then I'd like to fix it asap.

Thanks in advance!

@hitswint
Copy link
Author

hitswint commented Sep 20, 2022

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.

@lcstrang
Copy link

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.

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

No branches or pull requests

5 participants