From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Lennart Borgman (gmail)" Newsgroups: gmane.emacs.help Subject: Re: Is there a nXhtml untag element function? Date: Thu, 09 Aug 2007 00:51:13 +0200 Message-ID: <46BA48E1.4000808@gmail.com> References: <1186343615.904525.79050@i38g2000prf.googlegroups.com> <46B84AA2.4040001@gmail.com> <46B9057C.9000502@gmail.com> <4d08d6110708081003g152a7dbbqf9ad7757b976f70e@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1186613505 16200 80.91.229.12 (8 Aug 2007 22:51:45 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 8 Aug 2007 22:51:45 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Andy Lech Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Aug 09 00:51:42 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IIuNO-0001aX-2Q for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Aug 2007 00:51:38 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IIuNN-0000SB-D5 for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Aug 2007 18:51:37 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IIuN2-0000PN-PY for help-gnu-emacs@gnu.org; Wed, 08 Aug 2007 18:51:16 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IIuMz-0000O6-MF for help-gnu-emacs@gnu.org; Wed, 08 Aug 2007 18:51:16 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IIuMz-0000O3-Fs for help-gnu-emacs@gnu.org; Wed, 08 Aug 2007 18:51:13 -0400 Original-Received: from ch-smtp01.sth.basefarm.net ([80.76.149.212]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IIuMy-00077c-Sn for help-gnu-emacs@gnu.org; Wed, 08 Aug 2007 18:51:13 -0400 Original-Received: from c83-254-133-189.bredband.comhem.se ([83.254.133.189]:63389 helo=[127.0.0.1]) by ch-smtp01.sth.basefarm.net with esmtp (Exim 4.66) (envelope-from ) id 1IIuMv-0006ja-5w; Thu, 09 Aug 2007 00:51:10 +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 In-Reply-To: <4d08d6110708081003g152a7dbbqf9ad7757b976f70e@mail.gmail.com> X-Antivirus: avast! (VPS 000764-2, 2007-08-08), Outbound message X-Antivirus-Status: Clean X-Originating-IP: 83.254.133.189 X-Scan-Result: No virus found in message 1IIuMv-0006ja-5w. X-Scan-Signature: ch-smtp01.sth.basefarm.net 1IIuMv-0006ja-5w 5012adb9684a5f022c0d7dc96548554c X-Detected-Kernel: Linux 2.6? (barebone, rare!) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:46423 Archived-At: 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: > > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> > > > > Testing nxml-untag-element > > > >

Testing nxml-untag-element

> > Bold and underlined > > > > 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-_, , C-/, . (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.