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

Suggestion: use custom-set-variable #297

Open
Vonfry opened this issue Dec 2, 2018 · 2 comments
Open

Suggestion: use custom-set-variable #297

Vonfry opened this issue Dec 2, 2018 · 2 comments
Labels
seen PR was seen and initial feedback was given

Comments

@Vonfry
Copy link

Vonfry commented Dec 2, 2018

For someone, custom file may be loaded at last of all init code. The changing by yasnippet-snippets-initialize will be overwritten unless one edit custom file or load this package by after-init-hook.

@AndreaCrotti
Copy link
Owner

Thanks for the suggestion @Vonfry .
I didn't quite understand what you mean though, so the problem is that since yasnippet-snippets is loaded after yasnippet and before you call snippets-initialize, yasnippet is not picking up all the snippets correctly?

I actually haven't used yasnippet-snippets-initialize for a long time, they are just lazily loaded anyway.
Removing that would not solve your problem?

@AndreaCrotti AndreaCrotti added the seen PR was seen and initial feedback was given label Jan 14, 2019
@Vonfry
Copy link
Author

Vonfry commented Jan 14, 2019

Example:

(require 'yasnippet)
;; yas-snippet-dirs has a default value

(custom-set-variables '(yas-snippet-dirs some-list))
;; This will be saved in custom-file

(require 'yasnippet-snippets)
;; yasnippet-snippetsinitialize will overwrite yas-snippet-dirs, but not saving in custom-file

(load custom-file)
;; dirs edited by yasnippet-snippetsinitialize is lost.

One way to solve is calling (custom-save-all) before loading custom-file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
seen PR was seen and initial feedback was given
Projects
None yet
Development

No branches or pull requests

2 participants