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

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

Re: Regexp: match any character including newline


From: Yuri Khan
Subject: Re: Regexp: match any character including newline
Date: Wed, 16 Oct 2013 22:56:54 +0700

On Wed, Oct 16, 2013 at 10:31 PM, Kai Großjohann
<kai.grossjohann@gmx.net> wrote:

> You can use keyboard macros, but you will need a mode that understands
> XML.  Let's say you install nxml (it's part of Emacs I think).  Let's
> say the content is in a file foo.xml, so that nxml mode is turned on.
> Consider that point is before the <tr>.  Now you can use C-M-f to move
> it before the <td>.  Now you can use C-M-n to move it after the closing
> </td>.  Even if the content of <td>...</td> contains tags!

Good alternate approach. If only macros were as fast and responsive as
regexp replace in my configuration…

In my case, nesting is not a concern (as HTML tables almost never nest
except for layouting, and even then it’s evil), so regexps are an
adequate tool.

> See?  No regex anywhere.  Way cool!  Instead, you're exploiting the
> navigation that you get from Emacs modes.

This is way cool indeed, and I am in fact using nxml-mode and its
navigation commands.

However, this line of thought makes me wish for a match/replace
language as concise as regexps and at least as powerful as XSLT :]



reply via email to

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