From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dieter Wilhelm Newsgroups: gmane.emacs.help Subject: Re: case change in replacement text with regex-replace Date: Mon, 16 Apr 2007 01:21:21 +0200 Organization: The Church of Emacs Message-ID: <87k5wdxlzi.fsf@debby.local.net> References: <461cc717$0$5074$ba4acef3@news.orange.fr> <4621e0c0$0$5094$ba4acef3@news.orange.fr> <87odlpxmh5.fsf@debby.local.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1176679327 10016 80.91.229.12 (15 Apr 2007 23:22:07 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 15 Apr 2007 23:22:07 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Le TeXnicien de Surface Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Apr 16 01:22:01 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 1HdE2j-0000Uj-1G for geh-help-gnu-emacs@m.gmane.org; Mon, 16 Apr 2007 01:22:01 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HdE7G-0005Tj-JV for geh-help-gnu-emacs@m.gmane.org; Sun, 15 Apr 2007 19:26:42 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HdE70-0005PX-ML for help-gnu-emacs@gnu.org; Sun, 15 Apr 2007 19:26:26 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HdE6y-0005Kl-S0 for help-gnu-emacs@gnu.org; Sun, 15 Apr 2007 19:26:25 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HdE6y-0005KA-J6 for help-gnu-emacs@gnu.org; Sun, 15 Apr 2007 19:26:24 -0400 Original-Received: from moutng.kundenserver.de ([212.227.126.186]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HdE2Q-0000O4-1E for help-gnu-emacs@gnu.org; Sun, 15 Apr 2007 19:21:42 -0400 Original-Received: from [84.167.31.41] (helo=debby.local.net) by mrelayeu.kundenserver.de (node=mrelayeu8) with ESMTP (Nemesis), id 0ML31I-1HdE2M1ufY-00062u; Mon, 16 Apr 2007 01:21:41 +0200 Original-Received: from dieter by debby.local.net with local (Exim 4.63) (envelope-from ) id 1HdE25-0000sR-Tt; Mon, 16 Apr 2007 01:21:21 +0200 In-Reply-To: <87odlpxmh5.fsf@debby.local.net> (Dieter Wilhelm's message of "Mon\, 16 Apr 2007 01\:10\:46 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.95 (gnu/linux) X-Provags-ID: V01U2FsdGVkX182qo+EI+9L0y82QvwKRIUPsC9jwnodE4k2M8K McniFDCWBYpQ5NY7rg4tppMmXkTyVs8crWmTtsKbXZmM3LIv6+ fvSQ3OCF73rthJ/ejmYTIDVuO5s3Wme 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:42707 Archived-At: Dieter Wilhelm writes: > I'd try it with the \, command with replace-regexp though > > (info "(emacs) Regexp Replace") <- put cursor behind parenthesis and > type C-x C-e. The following is just an idea, I didn't check it. I > assume you must also make the search and replace command case > sensitive. > > IDEA: \(.\)\(.\) -> \,(concat (upcase \1)(downcase \2) " " (...)) Why so complicated? Maybe the solution to your problem is solvable with a simple keyboard macro? -- Best wishes H. Dieter Wilhelm Darmstadt, Germany