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

Remove yasnippet hidden files from haskell-mode/snippets/haskell-mode #305

Closed
jfeltz opened this issue Jul 16, 2014 · 11 comments
Closed

Remove yasnippet hidden files from haskell-mode/snippets/haskell-mode #305

jfeltz opened this issue Jul 16, 2014 · 11 comments

Comments

@jfeltz
Copy link

jfeltz commented Jul 16, 2014

I'm going to suggest either documenting their function, or removing the yasnippet hidden files. (e.g. .yas-ignore-filenames-as-triggers). Those can cause a train wreck of time-waste and frustration for users new to yasnippets. I eventually by accident figured out that my snippet additions weren't working due to spotting that hidden file. Thanks for the consideration.

@joaotavora
Copy link

Users shouldn't be using snippets files names as triggers, as that feature is deprecated and is going away.

The documentation to the latest version that you vociferously complain about in joaotavora/yasnippet#490 states this very clearly:

# key: snippet abbrev

This is the probably the most important directive, it's the abbreviation you type 
to expand a snippet just before hitting the key that runs yas-expand. 

If you don't specify this, the snippet will not be expandable through the 
trigger mechanism.

If you have read otherwise, it must have been in a version of the documentation that also mentions .yas-ignore-filenames-as-triggers. I would recommend haskell-mode keeps .yas-ignore-filenames-as-triggers precisely so users are discouraged from using the previous deprecated behaviour.

@jfeltz
Copy link
Author

jfeltz commented Jul 17, 2014

@capitaomorte,
Either via doc, or debugging services, your project (yasnippet) isn't informing new users about yas-expand failures, and thus forces them into a pointless trial-and-error ordeal. That's a contributing problem here (#305). And one that I was clear about in #490, despite what damage it may have inflicted on your pristine ego. I offered to submit a pull request for doc additions, but oh that's right you banned me. It's pretty obvious that the snippet you've given has nothing to do with the original problem of this post, nor with #490, and I suspect it's a straw-man or some sort of rhetorical slandering (since you've also linked to this from #490). Asinine, Condescending, Pathetic.

@joaotavora
Copy link

It's pretty obvious that the snippet you've given has nothing to do with the original problem of this post

This is incorrect. According to this report and to a post that the OP has since deleted on joaotavora/yasnippet#490 his keyless snippets (missing the #key directive) are not being expanded. The snippet of the documentation posted warns about that very case.

Nonetheless, I have also analysed yasnippet's current code base and have come to conclusions that I regret not presenting early on.

  • yasnippet stopped considering that special hidden file .yas-ignore-filenames-as-triggers and the associated variable yas/ignore-filenames-as-triggers since 10/2011.
  • using filenames as triggers in fact still works, although it is deprecated and undocumented

Therefore, to the maintainer of haskell-mode, the file can safely be deleted.

@jfeltz, consider carefully if you want you can explain yourself again in the yasnippet issue. I have unbanned you in hopes that any insults will be left out, but will redo the ban if you insist.

@gracjan
Copy link
Contributor

gracjan commented Feb 17, 2015

yas-snippets causing issues, solution is to use them outside of haskell-mode: #435

@joaotavora
Copy link

@gracjan, I don't understand what you mean. Are you sure your comment relates to this issue #305?? I read your linked discussion but didn't understand where yasnippet may be at fault.

If it doesn't, open a new issue and be sure to be clear about it. Otherwise time might be wasted.

@gracjan
Copy link
Contributor

gracjan commented Feb 17, 2015

For more info please read: #361

@joaotavora
Copy link

@gracjan, you typed:

yas-snippets causing issues

Do you by yas-snippets mean the project "Yasnippet"?

@gracjan
Copy link
Contributor

gracjan commented Feb 17, 2015

By 'yas-snippets causing issues' I mean 'haskell-yas causing issues in context of haskell-mode'. Or to put it even more clear: 'haskell-mode is causing issues due to how haskell-yas snippets are packaged and used'. jfeltz described issues caused by haskell-yas perfectly so I'll not repeat it here.

I'll repeat again: this issue is caused by haskell-mode yas embedding. The solution is to use separate haskell-yas package as reported here: #361.

Discussion about haskell-yas should be taken over to the original shnippet repo that is here: https://github.com/LukeHoersten/shnippet.

EDIT: use real code names.

@joaotavora
Copy link

I don't understand

  • what "haskell-mode yas embedding" is.
  • what haskell-yas is.

Do you mean any snippets stored in the snippets/haskell-mode subdirectory when you clone Yasnippet with submodules. If you mean this, and if those snippts do exist (I didn't check), then they are maintained by the yasnippet-snippets project, and not Yasnippet.

The issue that @jfeltz described had to do with snippets without explicit trigger keys, a behaviour that still works but is deprecated and undocumented. I don't know how it relates to your issue, but I haven't understood your issue either.

Anyway, it's good to hear that this discussion I don't understand is being taken somewhere else. Good luck!

@gracjan
Copy link
Contributor

gracjan commented Feb 17, 2015

Thanks for the hint about https://github.com/AndreaCrotti/yasnippet-snippets!

@gracjan gracjan changed the title remove yasnippet hidden files from haskell-mode/snippets/haskell-mode Remove yasnippet hidden files from haskell-mode/snippets/haskell-mode Mar 9, 2015
@lukehoersten
Copy link
Member

.yas-ignore-filenames-as-triggers is included because this is recommended by the YAS author and YAS will evidently stop supporting name triggers as a deprecated feature anyway.

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

4 participants