Re: Validation and indentation in eruby-nxhtml-mumamo

"Lennart Borgman (gmail)" <[email protected]>
Newsgroups gmane.emacs.nxml.general
Message-ID <[email protected]>
Torsten Senf wrote:
> Hi 

Hi Torsten,

> first of all thank you for developing nXhtml and thank you for including
> eRuby notation. I write a lot auf rhtml files and today I tested your nXhtml
> version 1.16 in my emacs. Here is my environment:
> 
> nXhtml version 1.16, GNU Emacs 23.0.60.3 (i686-pc-linux-gnu, GTK+ Version
> 2.8.20), Debian etch 
> 
> I found some problems which I will tell you.
> 
> 1) All eRuby snippets, these means all which stands in <% ... %> is also
> validated by nXhtml, and the validation wents wrong with the error:
> `<' that is not markup must be entered as `&lt;' .
> 
>  When I use some php snippets <?php ... ?> no validation will occur in these part. 
> I think these behaviour should also occur in an eRuby snippet, no
> validation by default.

Yes, that would be desireable, but unfortunately it is not currently 
possible. The reason is that the parser from nxml-mode works with the 
whole buffer and there is no way to stop it - except rewriting it. And 
that looks like a very complicated job.

I hope however someone will do it. It requires that you understand very 
complicated code in my opinion, but it would be useful here and in 
Semantic/CEDET too.

In the mean time there is not much to do. I tried a hack where I 
temoporarily replaced <% with something else, but I can't get that to 
work reliably.

You can of course have your own functions for that. You can for example 
replace <% with [[% (or something better) and then reverse it when you 
save the file. You may want to look in the file nxhtml-strval.el where I 
tried something like it.

> 2) The indentation in the eRuby snippet works partly good, but the following
> code would be indented wrong:
> 
> Correct indentaion in pure ruby-mode:
>     Array.each do |my_array|
>       puts my_array.inspect
>     end
> 
> Indentaion in eruby-nxhtml-mumamo
>     Array.each do |my_array|
>   puts my_array.inspect
> end

Please contact the ruby-mode authors about this.

> I hope you understand what I mean and please apologize my bad english. It
> would be nice when you can fix the above issues.

Sorry I can't help very much this time.

> Regards
> 
> Torstem
> 


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/emacs-nxml-mode/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/emacs-nxml-mode/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[email protected] 
    mailto:[email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.