From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: [patch] Re: regexp repacement, how to present replacement to user? Date: Tue, 23 Oct 2007 10:16:52 +0200 Message-ID: <86640y8cuj.fsf@lola.quinscape.zz> References: <200710131700.42100.pogonyshev@gmx.net> <200710201653.57778.pogonyshev@gmx.net> <200710212200.38685.pogonyshev@gmx.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1193127437 27682 80.91.229.12 (23 Oct 2007 08:17:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 23 Oct 2007 08:17:17 +0000 (UTC) Cc: juri@jurta.org, emacs-devel@gnu.org, monnier@iro.umontreal.ca, Paul Pogonyshev To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 23 10:17:16 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IkEwr-0004g2-04 for ged-emacs-devel@m.gmane.org; Tue, 23 Oct 2007 10:17:13 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IkEwi-0008ID-VS for ged-emacs-devel@m.gmane.org; Tue, 23 Oct 2007 04:17:04 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IkEwd-0008Dd-HO for emacs-devel@gnu.org; Tue, 23 Oct 2007 04:16:59 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IkEwb-0008AS-HH for emacs-devel@gnu.org; Tue, 23 Oct 2007 04:16:58 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IkEwb-00089H-5W for emacs-devel@gnu.org; Tue, 23 Oct 2007 04:16:57 -0400 Original-Received: from pc3.berlin.powerweb.de ([62.67.228.11]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IkEwa-0003Io-08 for emacs-devel@gnu.org; Tue, 23 Oct 2007 04:16:56 -0400 Original-Received: from quinscape.de (dslnet.212-29-44.ip210.dokom.de [212.29.44.210] (may be forged)) by pc3.berlin.powerweb.de (8.9.3p3/8.9.3) with ESMTP id KAA06733 for ; Tue, 23 Oct 2007 10:16:53 +0200 X-Delivered-To: Original-Received: (qmail 19205 invoked from network); 23 Oct 2007 08:16:54 -0000 Original-Received: from localhost (quinx.quinscape.de [127.0.0.1]) by quinx.quinscape.de (AvMailGate-2.1.3-2) id 19200-MmMigO; Di, 23 Okt 2007 10:16:54 +0200 (CEST) Original-Received: from unknown (HELO lola.quinscape.zz) ([10.0.3.43]) (envelope-sender ) by ns.quinscape.de (qmail-ldap-1.03) with SMTP for ; 23 Oct 2007 08:16:54 -0000 Original-Received: by lola.quinscape.zz (Postfix, from userid 1001) id 09FB88F281; Tue, 23 Oct 2007 10:16:52 +0200 (CEST) In-Reply-To: (Richard Stallman's message of "Tue\, 23 Oct 2007 03\:12\:50 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux) X-AntiVirus: checked by AntiVir MailGate (version: 2.1.3-2; AVE: 7.6.0.27; VDF: 7.0.0.121; host: quinx) X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:81527 Archived-At: Richard Stallman writes: > These functions basically perform part of what `replace-match' > does. The latter substitutes replacement group references (`\N' > and `\&') and replaces match in the buffer with the result text. > Proposed functions only generate and return that text, without > modyfing the buffer. > > Yes, I understand that. I agree that these functions make logical > sense. > > The question is, is this operation sufficiently useful that we > should add functions to Emacs to do it, and document them? Well, these sort of operations are sufficiently obscure that one should add functions for them, I think. The exact format of the match data is more or less an implementation detail. The core manipulation used here strongly depends on those internals. So even if it is not used that often, it leaves a bad feeling if some code outside of the core of Emacs is required for doing this sort of manipulation. -- David Kastrup