Loading ...
Sorry, an error occurred while loading the content.

2123Re: nXML and embedded code in templates

Expand Messages
  • Dmitry Gutov
    Sep 21, 2012
    • 0 Attachment
      Lennart Borgman <lennart.borgman@...> writes:

      > On Sat, Sep 22, 2012 at 2:13 AM, Dmitry Gutov <dgutov@...> wrote:
      >> Like some, I'd like to be able to use nxml-mode for editing ERB
      >> templates. Or EJS and JSP, they use similar syntax.
      >> sgml-mode in Emacs already tries to recognize this type of tags, and
      >> here's a few years old patch for xmltok.el that does something similar:
      >> What do you think of the goal? Should nXML be useful for these types of
      >> files? Does the patch take the right approach?
      >> --Dmitry
      > I like the goal, but unfortunately you can not reach it currently. I
      > have tried this in nXhtml if you are interested.
      > The problem is that nXML parses the buffer using primitives that you
      > can not restrict to a part of the buffer. I have suggested that the
      > primitives in Emacs should be changed to make such a restriction
      > possible, but that is a very difficult job on very low level in Emacs.
      > (You have to know quite a bit about how buffers are stored and handled
      > etc.)

      You're talking about a general goal of being able to skip arbitrary
      parts of a buffer. That's hard, true. If you recall, we've discussed it

      But we can make the tokenizer recognize (and skip or whatever) specific
      types of tags, like the patch linked above does.
    • Show all 4 messages in this topic