From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.help Subject: Re: A variant of match-end, but after replacement? Date: Sun, 19 Jul 2015 23:23:24 +0300 Message-ID: <55AC073C.5090004@yandex.ru> References: <87mvysjrkb.fsf@mbork.pl> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1437337421 11803 80.91.229.3 (19 Jul 2015 20:23:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 19 Jul 2015 20:23:41 +0000 (UTC) To: Marcin Borkowski , Help Gnu Emacs mailing list Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jul 19 22:23:41 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZGv7d-0008Te-5D for geh-help-gnu-emacs@m.gmane.org; Sun, 19 Jul 2015 22:23:41 +0200 Original-Received: from localhost ([::1]:52619 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZGv7c-0001Q1-Fp for geh-help-gnu-emacs@m.gmane.org; Sun, 19 Jul 2015 16:23:40 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44788) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZGv7T-0001Pl-GX for help-gnu-emacs@gnu.org; Sun, 19 Jul 2015 16:23:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZGv7Q-0006tl-8Y for help-gnu-emacs@gnu.org; Sun, 19 Jul 2015 16:23:31 -0400 Original-Received: from mail-wg0-x229.google.com ([2a00:1450:400c:c00::229]:33088) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZGv7Q-0006tb-0c for help-gnu-emacs@gnu.org; Sun, 19 Jul 2015 16:23:28 -0400 Original-Received: by wgmn9 with SMTP id n9so116954778wgm.0 for ; Sun, 19 Jul 2015 13:23:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=hCNkrrqAXABiLLmJd80w5W1NiNOOFjj+CGtNI/iQCfc=; b=O9G+y/OKtASd0pbY1mZCXAUyZ4T/gZdgsccVSdQCcTwLtarPemE+osquBkInHKGyNH 7WPpmTIE3VEZYAQttqOq9TX7YMhzDvhER4IcUvk5t8nPomwYDKBQcVXup+vS3SoP+N+b wjNPCYLguZ7cKpbgoLOs4zqVSmXc3AscFeAyWy6oNIRcsPwcFNt9sOR8zZhSMMlCONOB Ih6EOuMcLSJxcumxAprZRmqdUmarAGb0etc5KUQ1MQxDSFDI4hHM3CTMASPa6jP6lNQi UGDC4HI8TPlJ9hk5ejbfhBYOfzRR/Zlfl+YnSS4+Jb8Eb6zO0FHwbX0d9lo/y8/BX9W4 DFMA== X-Received: by 10.180.7.129 with SMTP id j1mr15519158wia.39.1437337407358; Sun, 19 Jul 2015 13:23:27 -0700 (PDT) Original-Received: from [192.168.1.2] ([185.105.175.24]) by smtp.googlemail.com with ESMTPSA id q3sm28598354wjr.38.2015.07.19.13.23.26 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 19 Jul 2015 13:23:26 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0 In-Reply-To: <87mvysjrkb.fsf@mbork.pl> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c00::229 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:105859 Archived-At: By the way, On 07/19/2015 02:49 PM, Marcin Borkowski wrote: > Note: I have good reasons not to use replace-regexp-in-string, since > I want to replace each match with something different, according to what > was matched inside one of the groups. AFAIK, replace-regexp-in-string > doesn't support such a use-case. ...it does. Its REP argument can be a function, and in it you're free to choose the replacement based on the match data.