From: Yuri Khan <yuri.v.khan@gmail.com>
To: "Kai Großjohann" <kai.grossjohann@gmx.net>
Cc: "help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
Subject: Re: Regexp: match any character including newline
Date: Wed, 16 Oct 2013 22:56:54 +0700 [thread overview]
Message-ID: <CAP_d_8VdAT664TrvUqh8mdq4Uz612es53MNQxr7xZTKUWEHH4w@mail.gmail.com> (raw)
In-Reply-To: <525EB16D.90804@gmx.net>
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 :]
next prev parent reply other threads:[~2013-10-16 15:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-16 14:42 Regexp: match any character including newline Yuri Khan
2013-10-16 15:31 ` Kai Großjohann
2013-10-16 15:56 ` Yuri Khan [this message]
2013-10-16 16:53 ` Drew Adams
2013-10-17 2:25 ` Eric Abrahamsen
[not found] <mailman.4131.1381934579.10748.help-gnu-emacs@gnu.org>
2013-10-16 15:58 ` Rustom Mody
2013-10-16 16:16 ` Yuri Khan
[not found] ` <mailman.4141.1381940186.10748.help-gnu-emacs@gnu.org>
2013-10-16 16:48 ` Rustom Mody
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAP_d_8VdAT664TrvUqh8mdq4Uz612es53MNQxr7xZTKUWEHH4w@mail.gmail.com \
--to=yuri.v.khan@gmail.com \
--cc=help-gnu-emacs@gnu.org \
--cc=kai.grossjohann@gmx.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.