From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Phillip Lord Newsgroups: gmane.emacs.devel Subject: Re: Rename regex functions to use prefix re- Date: Tue, 05 May 2020 22:56:26 +0100 Message-ID: <87wo5qcagl.fsf@russet.org.uk> References: <266155d4-f9c0-8ed3-8df5-32feea171076@yandex.ru> <542564DC-6DD0-41E5-A9CC-365673D68BE0@gmail.com> <93FA1F56-A056-4E17-A468-17829D638FF5@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="27824"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.90 (gnu/linux) Cc: Yuan Fu , Emacs developers , =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= , Dmitry Gutov , Stefan Monnier To: Stefan Kangas Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue May 05 23:57:06 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jW5Yo-00077u-Fy for ged-emacs-devel@m.gmane-mx.org; Tue, 05 May 2020 23:57:06 +0200 Original-Received: from localhost ([::1]:39322 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jW5Yn-0007lc-3g for ged-emacs-devel@m.gmane-mx.org; Tue, 05 May 2020 17:57:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34856) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jW5YG-0007H5-Rk for emacs-devel@gnu.org; Tue, 05 May 2020 17:56:32 -0400 Original-Received: from cloud103.planethippo.com ([78.129.138.110]:36834) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jW5YF-0002hh-6f for emacs-devel@gnu.org; Tue, 05 May 2020 17:56:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=russet.org.uk; s=default; h=Content-Type:MIME-Version:Message-ID: In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=T4cPjyiqkdXB9IYeJS1TmIRmZbLfr6MQIn3VqccGflk=; b=1h8PQAVtR8pY+DXB4mWRVqaif 9DEBALK0VBJojQzvAyj/BsC6Fovqv6LbeLYS+0tcHvVPIuZFkUc2DUrAIlR2SCpIcYRmIFdRpnAxI hxWM9XaNqN09BbNDkWb/vJ9Ok+oZ7y5VBjhUOFOSCvj8GaJ/rQA81mO4ZhDZJLi7qD5pEOwhDagma OCyY10wPstrZcopmPaxPH5HZyyxgYqmIizJcHS+gsrF9nkTukTiyKIQA8WbC7vzJJxYuUVTh5KavN x3ZA8fCNl8WHSnzhzVrC9FrkEkSAuQty1u3kUMuzYoHMEXfr8OP7ELzX6ocyXHLDeW6zvakEn0Jxq E9ZLvYXVQ==; Original-Received: from cpc142652-benw12-2-0-cust953.16-2.cable.virginm.net ([82.21.43.186]:33496 helo=russet.org.uk) by cloud103.planethippo.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1jW5YB-0000dE-2g; Tue, 05 May 2020 22:56:27 +0100 In-Reply-To: (Stefan Kangas's message of "Sat, 2 May 2020 01:25:22 +0200") X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cloud103.planethippo.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - russet.org.uk X-Get-Message-Sender-Via: cloud103.planethippo.com: authenticated_id: phillip.lord@russet.org.uk X-Authenticated-Sender: cloud103.planethippo.com: phillip.lord@russet.org.uk Received-SPF: none client-ip=78.129.138.110; envelope-from=phillip.lord@russet.org.uk; helo=cloud103.planethippo.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/05 16:27:19 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:249053 Archived-At: Stefan Kangas writes: > Yuan Fu writes: > >> What about >> >> re-search-forward re-search-forward >> re-search-backward re-search-backward >> replace-regexp-in-string re-replace-in-string >> replace-match re-replace-match >> string-match re-search-in-string >> match-string re-matched-string >> >> Or something along that line? > > We could think about the exact renames, but already the above looks > like a big improvement to me. I would definitely support regularizing > the regex functions to use the "re-" prefix. Worth looking at Wilfred Hughes re.el. Or my own "m-buffer" which obviates the need for re-search-forward and replace-match in many circumstances. There are a pile of these different libraries, with clean, well-thoughtout and regular APIs. They are a big improvement over Emacs organically grown set. Phil