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

Disable global minor mode by default in hidden buffers #985

Closed
memeplex opened this issue Mar 26, 2019 · 2 comments
Closed

Disable global minor mode by default in hidden buffers #985

memeplex opened this issue Mar 26, 2019 · 2 comments

Comments

@memeplex
Copy link

memeplex commented Mar 26, 2019

Many major modes internally use hidden buffers (those starting with a space, as described here). Some modes use these buffers to font lock blocks of code using some major mode (for example, both python.el and org mode do that). When yasnippet is enabled in this kind of buffers bad things might happen while programatically inserting contents. In particular, I've seen the jit font locker complaining about args out of range when yas-mode was enabled. This kind of errors are really difficult to trace and I see no point in enabling snippets in buffers where nobody will type anything, anyway. Could you add something like (lambda () (string-prefix-p " " (buffer-name))) by default to yas-dont-activate-functions in order to play well with major modes?

@npostavs
Copy link
Collaborator

npostavs commented Apr 1, 2019

With org-mode there might still be some extra complications because there is some non-working code that attempts to transfer the snippet overlays into the temp buffer. So I'm not entirely sure what's going to happen there, but not enabling yas-minor-mode in temp buffers makes sense anyway.

@memeplex
Copy link
Author

Thanks, Noam!

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

2 participants