Using yasnippet, whenever I use the yas-expand function to expand a snippet, the result depends on whether the emacs session is in an X window or not. If I am in an in-terminal session of emacs, then the snippet is correctly expanded. If I am in an X window, on the other hand, I get an error message call-interactively: Wrong number of arguments: (2 . 2), 0.

Have others encountered this problem, and is there a solution to it?

I am using yasnippet, with the latest version 20170127.2128 installed from melpa, using emacs 24.4.1 installed from the emacs24 package on Debian 8 (Jessie).

Edit: With toggle-debug-on-error

Debugger entered--Lisp error: (wrong-number-of-arguments (2 . 2) 0) py-indent-region() call-interactively(py-indent-region nil nil) command-execute(py-indent-region)

It looks like I was entirely mistaken about which function was being run. I have yas-expand bound to C-c <tab>, but something else in my configuration overwrote that binding.

  • Can you M-x toggle-debug-on-error and post the backtrace? – npostavs Feb 2 '17 at 15:22
  • Added, and it looks like I was entirely mistaken about the source of the error. Thank you for the suggestion, as I didn't know how to get a backtrace in elisp. – Eldritch Cheese Feb 2 '17 at 15:33

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.