From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jon Oddie Newsgroups: gmane.emacs.help Subject: Re: extended regexp Date: Tue, 11 Dec 2012 05:23:07 +0000 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1355205501 8518 80.91.229.3 (11 Dec 2012 05:58:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 11 Dec 2012 05:58:21 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Dec 11 06:58:35 2012 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 1TiIrS-0007pL-Na for geh-help-gnu-emacs@m.gmane.org; Tue, 11 Dec 2012 06:58:34 +0100 Original-Received: from localhost ([::1]:45335 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TiIrG-000099-91 for geh-help-gnu-emacs@m.gmane.org; Tue, 11 Dec 2012 00:58:22 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:52522) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TiIJD-0001x2-Dy for help-gnu-emacs@gnu.org; Tue, 11 Dec 2012 00:23:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TiIJC-0006HP-GN for help-gnu-emacs@gnu.org; Tue, 11 Dec 2012 00:23:11 -0500 Original-Received: from mail-we0-f169.google.com ([74.125.82.169]:58591) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TiIJC-0006HK-AO for help-gnu-emacs@gnu.org; Tue, 11 Dec 2012 00:23:10 -0500 Original-Received: by mail-we0-f169.google.com with SMTP id t49so1745606wey.0 for ; Mon, 10 Dec 2012 21:23:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=WeEPDUJCN0Nyzm6VCF84P8uRx5o4lawAwOMq0nlFzGc=; b=breXuhxCld13BScR8clM8BoBVKhc38V7W5RYayXoLQ/WyssnU79ZUvtgd7ovPYMXg5 X2UACK4AOZxB2ERqPU+beE1fB58OrgiNJHvOhsmdUaFCVVgwW6TA5O15AYQLbVEPsh9f g4pT+EmM6YfOiwmKIp3p+UV3yHQsMd+hqmNiZc4O8rNoHhRx40qcnjVF6j5lolTi4bJp TTJpdBJvDpNSH5upNtgYp2THRjidhUm6jyE9RF0nEA+Q6nJLN2p5tfjJxU7OdrFqd/J3 GanLD+OKK8Qd0WiJzwkan9/RHhVgCJXHsaYa8WOaV/5oP82VnwGV+ey+LKZQD8pi+p/N rLuA== Original-Received: by 10.180.81.39 with SMTP id w7mr14634385wix.15.1355203389634; Mon, 10 Dec 2012 21:23:09 -0800 (PST) Original-Received: from [10.1.130.149] ([149.7.41.3]) by mx.google.com with ESMTPS id bd7sm14649454wib.8.2012.12.10.21.23.08 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 10 Dec 2012 21:23:08 -0800 (PST) In-Reply-To: X-Mailer: Apple Mail (2.1085) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 74.125.82.169 X-Mailman-Approved-At: Tue, 11 Dec 2012 00:58:07 -0500 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:88127 Archived-At: >> If there is no extended-regexp functions nor mode avalaible, I may >> send a feature request for it (the idea would be to have a regexp variable >> for usual or extended search and replace). However, do you think someone >> else might be interested by such a behaviour? > > We'd be happy to use a cleaner regexp syntax, but doing it without > breaking backward compatibility is tricky, unless you go the > `rx' route. E.g. provide a new function/macro (call it `re') which > converts between your new syntax and the old one. > FWIW, I started work on something like this a while back, called `pcre2el'[1]. It is a bit misnamed, since the majority of PCRE is too difficult to support by simple translation to Emacs native regexes, but it does cover the simple cases. It also converts the string forms to `rx' syntax, and extends the RE-Builder to handle these conversions, so you can use C-c TAB to switch transparently between PCRE-like, Emacs and rx syntax. Jon [1] https://github.com/joddie/pcre2el