eruby html mode not indented correctly

Bug #592009 reported by Perry Smith
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nXhtml
Fix Committed
Medium
Unassigned

Bug Description

This may be two bugs. I've attached edit.html.erb. I will attach template.txt which is the template buffer later if I can find a way.

The edit.html.erb attached is formatted by starting at the top line and hitting tab a few times and then moving down a line, put the cursor in the left most column and hit tab a few times, repeat.

The formatting of the ruby code in the template buffer is perfect if I start at the top and move down line by line. But the html is not indented properly. Notice the <p> tag at line 14. Lines 14 - 21 are indented two spaces too much and the last two lines are indented four spaces too much.

Now for the hard problem... Oh dear. I can't recreate the other problem. What had happened (somehow) is the sequence of lines in the template buffer got confused and a line was not where it was suppose to be. As a result, it would get indented incorrectly. I thought I know how to recreate this but I don't. I thought about not mentioning but I decided to anyway.

Revision history for this message
Perry Smith (pedz) wrote :
Revision history for this message
Perry Smith (pedz) wrote :

Attaching template buffer to help with debugging.

Revision history for this message
lborgman (lennart-borgman) wrote :

Hi Perry,

Thanks for the reports. It is very good you mentioned the "hard problem" too.

I will not be able to look into this (or the other opened bug reports) for a while, but I will do it later. In the mean time please add any information you find relevant.

What is the problem with attaching the template buffer? You can save it to a file using C-x C-w (or "M-x write-file" which is the same).

Revision history for this message
lborgman (lennart-borgman) wrote :

Hi again Perry,

I believed I have solved the "easy problem", but I am not sure about the "hard problem". Could you please test the latest nXhtml beta 2.09?

Changed in nxhtml:
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
lborgman (lennart-borgman) wrote :

I get no response so I am closing this.

Changed in nxhtml:
status: In Progress → Fix Committed
Revision history for this message
Perry Smith (pedz) wrote : Re: [Bug 592009] Re: eruby html mode not indented correctly

Yea. Sorry.

On Aug 7, 2010, at 4:23 PM, lborgman wrote:

> I get no response so I am closing this.
>
> ** Changed in: nxhtml
> Status: In Progress => Fix Committed
>
> --
> eruby html mode not indented correctly
> https://bugs.launchpad.net/bugs/592009
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in nXhtml for Emacs: Fix Committed
>
> Bug description:
> This may be two bugs. I've attached edit.html.erb. I will attach template.txt which is the template buffer later if I can find a way.
>
> The edit.html.erb attached is formatted by starting at the top line and hitting tab a few times and then moving down a line, put the cursor in the left most column and hit tab a few times, repeat.
>
> The formatting of the ruby code in the template buffer is perfect if I start at the top and move down line by line. But the html is not indented properly. Notice the <p> tag at line 14. Lines 14 - 21 are indented two spaces too much and the last two lines are indented four spaces too much.
>
> Now for the hard problem... Oh dear. I can't recreate the other problem. What had happened (somehow) is the sequence of lines in the template buffer got confused and a line was not where it was suppose to be. As a result, it would get indented incorrectly. I thought I know how to recreate this but I don't. I thought about not mentioning but I decided to anyway.
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/nxhtml/+bug/592009/+subscribe

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.