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

Bad interaction with yasnippet #51

Open
rsbowman opened this issue Nov 30, 2016 · 3 comments
Open

Bad interaction with yasnippet #51

rsbowman opened this issue Nov 30, 2016 · 3 comments

Comments

@rsbowman
Copy link

What a cool package, thank you for your work on this!

When I try your python example I have some trouble with yasnippet. If I go to the python-mode buffer and insert a snippet (say if), the default snippet text is never removed from the org-mode buffer. For example, if the default text is cond, after inserting the snippet I see this in both buffers:

if cond:

When I type v, say, to replace the default text, I see

if v:

in the python-mode buffer, but

if vcond:

in the org-mode buffer. This is with GNU Emacs 26.0.50.2, and I can reproduce it with a config consisting only of

(use-package lentic)

(use-package yasnippet
  :init
  (yas-global-mode)

  :config
  (setq yas-snippet-dirs `(,(locate-user-emacs-file "snippets"))))

Thanks for any help you can offer!

@phillord
Copy link
Owner

phillord commented Dec 4, 2016

Thanks for the report, and the nice reproduction!

The problem (as you can probably see) is that the deletion of "cond" is not being percolated between buffers. It happens because yasnippet is disabling the modification hooks that I am using -- the deletion never signalled so lentic doesn't copy it.

I'll see if yasnippet folks can help. If not I can think of a nasty workaround...

@phillord
Copy link
Owner

phillord commented Dec 4, 2016

Turns out, it's not yasnippet but Emacs itself which is disabling the modification hooks....

@npostavs
Copy link

@rsbowman this should be fixed with yasnippet 0.12.0 or later (released Jul 17, 2017).

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

3 participants