-
Notifications
You must be signed in to change notification settings - Fork 311
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
Self references in .yas-parents breaks Emacs #318
Comments
This happens at least with the most recent git version and the 0.8.0 snapshot. I have had this issue since a long time so most versions since changing to the .yas-parents system might have the issue. Also happens if no other plugins/config gets loaded. I've also been running into this on Windows (but have not reproduced it or checked the fix there). Emacs version:
|
OK I understand, and marked this a bug. Your recipe has an error, you probably meant |
This fix introduces a new bug: [yas] Cyclic parenthood: mode text-mode has already seen as a parent of mode emacs-lisp-mode [yas] Loading for `emacs-lisp-mode', just-in-time: (yas--load-directory-1 /usr/share/emacs/site-lisp/snippets/emacs-lisp-mode (quote emacs-lisp-mode) (quote (text-mode)))! [yas] Loading compiled snippets from /usr/share/emacs/site-lisp/snippets/emacs-lisp-mode [yas] Loading for `text-mode', just-in-time: (yas--load-directory-1 /usr/share/emacs/site-lisp/snippets/text-mode (quote text-mode) (quote nil))! [yas] Loading compiled snippets from /usr/share/emacs/site-lisp/snippets/text-mode [yas] Loading for `text-mode', just-in-time: (yas--load-directory-1 /home/targzeta/.emacs.d/snippets/text-mode (quote text-mode) (quote (gpl)))! [yas] Loading compiled snippets from /home/targzeta/.emacs.d/snippets/text-mode And when I open a php file it shows again: [yas] Cyclic parenthood: mode text-mode has already seen as a parent of mode emacs-lisp-mode but the CPU grows to 100% and I have to kill emacs. Best regards, |
Thanks, I have just seen that happening. For now the workaround is not having cyclic dependencies in your snippet dirs. |
Is there a cycling dependencies in these code? $> grep . snippets/*/.yas-parents
snippets/sh-mode/.yas-parents:text-mode
snippets/text-mode/.yas-parents:gpl I think the problem is because I have written a .yas-parent for text-mode where text-mode exists also in your default snippets. What do you think? In effect, if I move my text-mode dir, I have:
and, when I open a PHP file:
but, all works good, however. Emanuele |
Now do
M-x sh-mode
or open any file insh-mode
. This will cause an error in the post-command-hook which makes it impossible to still execute most commands. After this many commands will cause errors due to the post-command-hook function failing which makes it very hard to recover.The issue is easily fixed by either deleting the .yas-parents file or fixing the invalid reference in the .yas-parents file. It would be a lot nicer to detect the error and issue an error message instead, though.
The text was updated successfully, but these errors were encountered: