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

haskell-yas causes issues when loading other modes #364

Closed
diogo149 opened this issue Oct 23, 2014 · 3 comments
Closed

haskell-yas causes issues when loading other modes #364

diogo149 opened this issue Oct 23, 2014 · 3 comments

Comments

@diogo149
Copy link

When opening a file that loads a mode which requires yasnippet, yasnippet just breaks because an invalid path is added to yas-snippet-dirs (eg. if the file name is /some/path/foo.clj, /some/path/snippets is added), and this is caused by haskell-yas. When loading yasnippet, haskell-yas is loaded as well, and (buffer-file-name) is called with the current file, thus leading to the wrong relative path being loaded. This only occurs when yasnippet is loaded lazily.

My understanding is that switching the order of (buffer-file-name) and load-file-name in haskell-snippets-dir should fix the issue. I could submit a pull request if that's the right thing to do and you wouldn't rather do it yourself.

@purcell
Copy link
Member

purcell commented Oct 23, 2014

Right, I think I've fixed this now, by not using buffer-file-name at all: let me know if not!

@diogo149
Copy link
Author

It indeed does work, thanks! I assumed that buffer-file-name was used for development though (re-evaluating the file).

@purcell
Copy link
Member

purcell commented Oct 23, 2014

I assumed that buffer-file-name was used for development though (re-evaluating the file).

Yes, but better to simply avoid it, I think, unless a developer complains. :-)

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