unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: David Kastrup <dak@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: case change in replacement text with regex-replace
Date: Wed, 18 Apr 2007 20:09:36 +0200	[thread overview]
Message-ID: <85bqhlbllr.fsf@lola.goethe.zz> (raw)
In-Reply-To: mailman.2192.1176873913.7795.help-gnu-emacs@gnu.org

Dieter Wilhelm <dieter@duenenhof-wilhelm.de> writes:

> bojohan+news@dd.chalmers.se (Johan Bockgård) writes:
>
>> Dieter Wilhelm <dieter@duenenhof-wilhelm.de> writes:
>>
>>> \U I didn't see in the elisp manual
>>
>> For the record, XEmacs does have \U:
>                   ^^^^^^
>
> Thank you, one of the few occasions were I could read that XEmacs has
> also it's advantages in comparison to Gnu Emacs.

\,(downcase \1)

can be used in Emacs 22 in the replacement text.  Sure, it is more
verbose, but also quite more flexible.  The Emacs manual has:

    For example, to add consecutively numbered strings like `ABC00042' to
    columns 73 to 80 (unless they are already occupied), you can use

         M-x replace-regexp <RET> ^.\{0,72\}$ <RET>
         \,(format "%-72sABC%05d" \& \#) <RET>


-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

  parent reply	other threads:[~2007-04-18 18:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-11 11:31 case change in replacement text with regex-replace Le TeXnicien de Surface
2007-04-14 20:01 ` Dieter Wilhelm
     [not found] ` <mailman.2074.1176581215.7795.help-gnu-emacs@gnu.org>
2007-04-15  8:22   ` Le TeXnicien de Surface
2007-04-15 23:10     ` Dieter Wilhelm
2007-04-15 23:21       ` Dieter Wilhelm
     [not found]       ` <mailman.2110.1176679588.7795.help-gnu-emacs@gnu.org>
2007-04-16  6:56         ` case change in replacement text with regex-replace [solved] Le TeXnicien de Surface
2007-04-16 19:50           ` Dieter Wilhelm
     [not found]     ` <mailman.2109.1176678953.7795.help-gnu-emacs@gnu.org>
2007-04-17 23:47       ` case change in replacement text with regex-replace Johan Bockgård
2007-04-18  5:19         ` Dieter Wilhelm
     [not found]         ` <mailman.2192.1176873913.7795.help-gnu-emacs@gnu.org>
2007-04-18 18:09           ` David Kastrup [this message]
2007-04-21 21:19             ` Dieter Wilhelm

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=85bqhlbllr.fsf@lola.goethe.zz \
    --to=dak@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).