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

yasnippets with nxhtml-django-mode active prevents editing in snippets #170

Closed
joaotavora opened this issue Nov 3, 2011 · 5 comments
Closed
Assignees

Comments

@joaotavora
Copy link
Owner

I'm not sure if this is a problem with yasnippets or nxhtml, as it only presents itself when both are active. If it is a problem with nxhtml, feel free to close this ticket and I'll head on over there for a fix :)

What steps will reproduce the problem?

  1. Download and install yasnippets and nxhtml.
  2. Open up a new file called new_file.djhtml, and activate django-nxhtml mode if it isn't activated already.
  3. Type "div[TAB]" to open up a div snippet.
  4. Within the id attribute, open up a django template marker (i.e., '{{')
  5. You can no longer type anything into the snippet's "id" attribute.

What is the expected output? What do you see instead?
Expected output: ability to insert, edit, or delete inside snippet attributes.
Actual output: inability to insert, edit, or delete inside snippet attributes.

What version of the product are you using? On what operating system?
The latest versions of both yasnippets and nxhtml on Linux Mint Julia. Emacs is version 23.1 downloaded from Mint's central repositories.

Please provide any additional information below.

Error message provided below:

[yas] snippet expanded.
let: Wrong type argument: overlayp, nil

Google Code Info:
Issue #: 168
Author: campusco...@gmail.com
Created On: 2011-02-22T20:21:38.000Z
Closed On: 2011-02-23T01:43:57.000Z

@ghost ghost assigned joaotavora Nov 3, 2011
@joaotavora
Copy link
Owner Author

When you say "the latest versions of yasnippet" do you mean trunk version at http://yasnippet.googlecode.com/svn/trunk/yasnippet.el ?

I'm sorry I don't have time lately to review these problems, so any additional info is useful. Also try to reproduce this error (you do state there is an error), but doing M-x toggle-debug-on-error before. Then paste or attach the output here.

Google Code Info:
Author: joaotav...@gmail.com
Created On: 2011-02-22T22:17:43.000Z

@joaotavora
Copy link
Owner Author

Sorry, I should have mentioned that I'm running the latest stable (0.6.1c). Here's the full trace:

Debugger entered--Lisp error: (wrong-type-argument overlayp nil)
overlay-get(nil yas/field)
(let ((field ...)) (cond (after? ... ... ...) (field ... ...)))
(if (yas/undo-in-progress) nil (let (...) (cond ... ...)))
(unless (yas/undo-in-progress) (let (...) (cond ... ...)))
yas/on-field-overlay-modification(#<overlay from 10 to 13 in new_file.djhtml> nil 13 13)

Google Code Info:
Author: campusco...@gmail.com
Created On: 2011-02-23T00:28:15.000Z

@joaotavora
Copy link
Owner Author

Do try the http://yasnippet.googlecode.com/svn/trunk/yasnippet.el trunk version. I'm almost sure these problems have been fixed in a previous issue.

Google Code Info:
Author: joaotav...@gmail.com
Created On: 2011-02-23T00:34:08.000Z

@joaotavora
Copy link
Owner Author

OK, I think I've found the source of this issue and it's definitely a problem with nXhtml. It seems that nXhtml is missing some kind of django autoload (see: https://bugs.launchpad.net/nxhtml/+bug/692290), so, when I begin to type the django template marker, it throws some kind of error ("(mumamo-major-mode-from-modespec): Couldn't find an available major mode for spec django-variable-mode"). This error ends up interfering with yasnippet functionality in both the the stable version (0.6.1c, where I am unable to type anything additional into the snippet attributes) as well as the trunk version (where I am unable to trigger new snippets after the error has occurred). After downloading the beta version of nXhtml, this error (the "missing django-variable-mode spec" one) disappears, but unfortunately the beta doesn't seem to play nice with yasnippets yet (or perhaps it needs some additional configuration, which I haven't had the time to look into yet).

Anyway, since the error isn't caused by yasnippets, feel free to close this ticket. Sorry for taking up your time with this.

Google Code Info:
Author: campusco...@gmail.com
Created On: 2011-02-23T01:37:11.000Z

@joaotavora
Copy link
Owner Author

Thanks. Closing since this apparently isn't a problem with yasnippet.

Google Code Info:
Author: joaotav...@gmail.com
Created On: 2011-02-23T01:43:57.000Z

gdevanla pushed a commit to gdevanla/yasnippet that referenced this issue Feb 20, 2017
Add some snippets for lua-mode, such as do, eif, eife, if, ife, iparis,
paris, repeat, while, require
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