0

I've experienced this issue for some time. It's not a blocker but it is a bit annoying.

Steps to reproduce:

Select a region that you want to extract into YASnippet snippet("foo bar"). Eval yas-new-snippet.

You are redirected to a new buffer +new-snippet+ with the following content:

# -*- mode: snippet -*-
# name: 
# key: 
# --
// foo bar
// foo bar

Expected behavior:

# -*- mode: snippet -*-
# name: 
# key: 
# --
// foo bar

pkg-info-package-version yasnippet 20200604.246

  • 1
    I'm using the same version of yas and have the correct behavior. You may need to find more about what in you config is causing this before anyone can give any advice. – PanJunjie潘俊杰 Oct 28 at 3:56
  • @PanJunjie潘俊杰 thanks for the input. I'll continue investigating it, it could probably be something that activates it twice in my emacs/spacemacs config. – Nikita Fedyashev Oct 28 at 10:31
  • 1
    You could edebug-defun function yas-new-snippet to find the reasons. On my config yas-new-snippet is working like expected. – jue Oct 28 at 19:36
  • Oh, and you can trace-function the function you suspect being running twice, should be easier than learning how to debug (which I never learned myself) – PanJunjie潘俊杰 Oct 30 at 3:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.