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

Loading only the most recently saved snippet after a restart? #1159

Open
rgri opened this issue Feb 3, 2023 · 0 comments
Open

Loading only the most recently saved snippet after a restart? #1159

rgri opened this issue Feb 3, 2023 · 0 comments

Comments

@rgri
Copy link

rgri commented Feb 3, 2023

On a fresh install of doom emacs, build 28.2, yasnippet refuses to load all but one of the custom snippets created in a major-mode subdirectory. To reproduce the issue:

  1. Create a new snippet for a major mode. In my case, I opened an org file, ran yas-new-snippet, and created a basic latex snippet. I entered "org-mode" as the table, and saved it in ~/.doom.d/snippets/org-mode/.
  2. Create a second snippet in the same mode. Save it in the same folder.
  3. Both snippets will function immediately upon visiting a buffer in the corresponding mode (my org file).
  4. Restart Emacs. Only the first snippet will load- as in, expand and be seen by yas-edit-snippets or yas-describe-tables.

If one were to re-save the second snippet, it will begin to function, but then the first snippet will stop functioning. I have also tested this with three snippets, and each time yasnippet will only load the one most recently saved.

Curiously, on another computer I have (which does not have a fresh install of doom, though I don't think I've made any changes to yasnippet), I have found some older custom snippets will persist and simultaneously work, yet if I create any more new snippets in my current session, this error will apply to only those. That is, I have a collection of "persistent" custom snippets which function normally across restarts, but when I create a new collection of custom snippets all in the same session, only one of them at a time will be loaded.

This the first issue I've written on github, so please be kind; and of course, if there is any further information which will be helpful I can try to provide it.

@rgri rgri changed the title Selectively loading newly created snippets Loading only the most recently saved snippets after a restart? Feb 3, 2023
@rgri rgri changed the title Loading only the most recently saved snippets after a restart? Loading only the most recently saved snippet after a restart? Feb 3, 2023
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

1 participant