help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is there a nXhtml untag element function?


From: Lennart Borgman (gmail)
Subject: Re: Is there a nXhtml untag element function?
Date: Thu, 09 Aug 2007 00:51:13 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070728 Thunderbird/2.0.0.6 Mnenhy/0.7.5.666

Andy Lech wrote:

Thank you for getting out an update so quickly. It works but there is a problem with undo when nxml-untag-select = yes (or Ask with yes).

Here's what happened:

1. Upgraded to Emacs-22-CvsP070523-EmacsW32-1.54 and nxhtml-1.04-070808-01_46_58. (Thought I had the latest EmacsW32 but I was wrong.)
2.  Created this simple file:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>

<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
  <head>
    <title>Testing nxml-untag-element</title>
  </head>

  <body>
    <h1>Testing nxml-untag-element</h1>

    <b><u>Bold and underlined</u></b>
  </body>
</html>

3. Called nxml-untag-element inside the H1 tag and it removed the start and end tags correctly.
4.  Called undo and it restored the H1 start tag but not the end tag.
5. Repeated 3 and 4 on the U tag inside the B tag. Should have done the same thing and it did.
6.  Looked at the help for nxml-untag-element and found nxml-untag-select.
7.  Set nxml-untag-select to no
8.  Repeated 3 and 4.  This time it did restore the end tag.

Leaving nxml-untag-select = no works fine for my purposes, but let me know when you have an update or need more beta testing.


Thanks for testing and for the report Andy, but I think that is the way undo works:

  undo is an interactive compiled Lisp function in `simple.el'.
  It is bound to C-z, C-_, <undo>, C-/, <menu-bar> <edit> <undo>.
  (undo &optional arg)

  Undo some previous changes.
  Repeat this command to undo more changes.
  A numeric argument serves as a repeat count.

  In Transient Mark mode when the mark is active, only undo changes within
the current region. Similarly, when not in Transient Mark mode, just M-x universal-argument
  as an argument limits undo to changes within the current region.

So just deselect the region and do undo after that.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]