Byte compiled nXhtml breaks Tidy and long underlines

Asked by arcade

Let me start by saying that I have just used nXhtml to rebuild a small graphic design agency website for a relative. Even as a emacs/html beginner I have found this software very effective & I am keen to continue using it in future projects . However, this recent work has raised a couple of problems which I hope can be solved here:

System Details:
Debian - Testing (squeeze),
Emacs - 23.1.1 (x86_64-pc-linux-gnu, GTK+ Version 2.16.6)
nXhtml - 1.95

* Tidy & Byte compile
On occasions nXhtml can become sluggish so I have byte compiled nXhtml to improve its performance. I have done this on versions; 1.93 & 1.95 as far as I can tell the compiles seems to go well nXhtml launches & is noticeably faster & more responsive. But, unfortunately when I request Tidy to 'tidy' a buffer it clashes? with the following error message:

Debugger entered--Lisp error: (void-function buffer-narrowed-p)
  buffer-narrowed-p()
  tidy-buffer()
  call-interactively(tidy-buffer nil nil)

I have googled this error message & what little I can find seems not to relate to Tidy or nXhtml. Any suggestions on what can be done to make Tidy work with a byte compile nXhtml would be most welcome.

*Long underlines
If an underlined html/CSS items is immediately followed by a line break/return the underline continues across the page & goes on to the next line to finish @ the next block of text. If I use C-c C-w to remove underlines (as suggested on http://ourcomments.org/Emacs/nXhtml/doc/nxhtml-changes.html) I get the following error message:

C-c C-w is undefined

Is there any way to stop the incorrect display of the underlines or simply remove them all together?

Any useful suggestions on how to solve these problems would be much appreciated.

Thanks in advance

Question information

Language:
English Edit question
Status:
Solved
For:
nXhtml Edit question
Assignee:
No assignee Edit question
Solved by:
lborgman
Solved:
Last query:
Last reply:
Revision history for this message
Best lborgman (lennart-borgman) said :
#1

Hi arcade, I am really glad to hear that you as an Emacs/html beginner found nXhtml useful.

I forgot to tell Emacs where to find buffer-narrowed-p. This is now fixed in version 1.96 which I just released.

I am however a bit puzzled by the underlines. Could you please show me an example? Maybe both a piece of code and a picture of how the underline looks.

C-c C-w has been changed to C-C _ now. It is used to hide the errors from the nxml parser. Those used to be marked by a red underline before, but are now marked by red text instead.

If you get red underlines now something is wrong I think.

(Note: The nxml parser does not know about php for example so it thinks a lot of things are errors. However the nxml parser is still useful since it is used for xhtml completion.)

Revision history for this message
arcade (james-takein) said :
#2

Thanks lborgman, that solved my question.

Revision history for this message
lborgman (lennart-borgman) said :
#3

Thanks arcade for telling me that it works.

However I am a bit worried that you might be using an old version of nxml-mode. Could you perhaps check if you are using the one that comes with Emacs? Just do

   C-h f nxml-mode

and click on the link in the help buffer to open the file where it is defined. It that file in the Emacs tree or somewhere else?

If it is somewhere else it is an old version and it can hang Emacs quite badly.