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

different expand behaviour between 'key' and 'menu' #553

Closed
ghost opened this issue Jan 11, 2015 · 5 comments
Closed

different expand behaviour between 'key' and 'menu' #553

ghost opened this issue Jan 11, 2015 · 5 comments

Comments

@ghost
Copy link

ghost commented Jan 11, 2015

Just try to modify elisp snippet for org-mode as below:

# -*- mode: snippet -*-
# name: elisp source block
# key: src_elisp
# group: Source
# --
#+BEGIN_SRC emacs-lisp :tangle yes :results ${1:none}
$0
#+END_SRC 

When I expand from menu YASnippet->org-mode->Source->src_elisp, everything works fine. The curser stop at $1 location first then $0.

But when I use TAB right after type src_elisp, it expands it but the curser stops at begin of #+BEGIN_SRC ... and in the mini-buffer it shows [No matches].

@npostavs
Copy link
Collaborator

npostavs commented Mar 3, 2015

Couldn't reproduce on latest master (6f4e4c1) with Emacs 24.4.1 (Windows).

What Emacs and yasnippet versions do you have? Does it happen starting from emacs -Q?

@ghost
Copy link
Author

ghost commented Mar 5, 2015

Just check the yasnippet version, shows (version 0.8.0beta) (21ffe4b). I still have that problem.

I am using Emacs 25.0.50.1

I can't find the SHA you mentioned in your reply.

$ git show 6f4e4c1
fatal: ambiguous argument '6f4e4c1': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

@npostavs
Copy link
Collaborator

npostavs commented Mar 5, 2015

Oops, I let my yasnippet fork diverge a while back and totally forgot about it.

I confirm the problem shows up with 21ffe4b, with 24.4.1 as well.

@npostavs npostavs added the bug label Mar 5, 2015
@npostavs
Copy link
Collaborator

npostavs commented Mar 6, 2015

Hmm, actually I don't think I'm seeing the problem. I added a new src_elisp snippet instead of replacing the existing elisp one. But now that I got rid of the elisp one it seems to work fine.

Tested with emacs -Q -l check-553.el then hit <tab>, where check-553.el contains:

(add-to-list 'load-path "~/src/yasnippet/")
(require 'yasnippet)
(yas-global-mode +1)
(switch-to-buffer (get-buffer-create "foo.org"))
(org-mode)
(insert "src_elisp")

yasnippet 21ffe4b, Emacs 24.4.1

@npostavs
Copy link
Collaborator

npostavs commented Mar 7, 2015

Works also with Emacs 25.0.50.1, emacs-mirror/emacs@20c6b22

This is probably caused by your config. Or else it was a bug in the particular 25.0.50.1 you were using.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant