From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Philippe Vaucher Newsgroups: gmane.emacs.devel Subject: Re: modern regexes in emacs Date: Fri, 15 Feb 2019 14:42:43 +0100 Message-ID: References: <20180616123704.7123f6d7@jabberwock.cb.piermont.com> <87po0qs6re.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000009947dd0581eef404" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="37851"; mail-complaints-to="usenet@blaine.gmane.org" Cc: emacs-devel , Jay Kamat , =?UTF-8?Q?Elias_M=C3=A5rtenson?= , "Perry E. Metzger" To: =?UTF-8?Q?Mattias_Engdeg=C3=A5rd?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 15 14:50:53 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gudtF-0009kd-BH for ged-emacs-devel@m.gmane.org; Fri, 15 Feb 2019 14:50:53 +0100 Original-Received: from localhost ([127.0.0.1]:40276 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gudtE-00031f-Bx for ged-emacs-devel@m.gmane.org; Fri, 15 Feb 2019 08:50:52 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:49161) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gudlo-0006Rr-1y for emacs-devel@gnu.org; Fri, 15 Feb 2019 08:43:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gudln-0008OS-8l for emacs-devel@gnu.org; Fri, 15 Feb 2019 08:43:12 -0500 Original-Received: from mail-lj1-x234.google.com ([2a00:1450:4864:20::234]:40344) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gudln-0008NH-0Q for emacs-devel@gnu.org; Fri, 15 Feb 2019 08:43:11 -0500 Original-Received: by mail-lj1-x234.google.com with SMTP id w6so3630245ljd.7 for ; Fri, 15 Feb 2019 05:43:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=BLFPcaeAqmEzJ2u2r0UekuwRc6vW0hljqveaGpTmtPA=; b=Qzd6Ua2CpE1dZEcXyXaJx5tiWEFo0zq2oyyY0DGIlN5Fku/pZ5BTlsDVSpLVfiZyaC e6ZrANV7SDb1Xzwym0KC39PsA7RBOuj4IhvfywvVH4sXOjD9Rr/mEGA3dbx4kEu/TE2m eLa4pNXQBoe9XyHA59GT7bw8JT7L8jz0qCTAFC3BiStVsZL9kwP+nhc69MsS7aq2cOy1 +PHbeuwtoYBz7OsyA/umURsOy/Np1GHqVwZxO5klgu4ySaB7bOWnhFAnjmCqOVpJXVRt OK4RpywhVGijgR+FbvuNl64+bKrio7FieCVT4GVntyVFoL0GP7d8Oohz6E4qoAIm6K4w F9jA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=BLFPcaeAqmEzJ2u2r0UekuwRc6vW0hljqveaGpTmtPA=; b=GXwnWtdPn+zhMA6Lji8B01O/onu4Vhuud8FrMLNepWC1tPa0GtLhK44Os+LlBqFYEa SE3PO+XPwJjx4pSSEbEytoUD3dKw3TViB+JX6Pguij2cSu9J66lhwGcnz/XamLduWewN X+eoM7Ce6WmA+idV/jKSPNmyoRAm2yU1h3t6kXS70mSevvdT1R9VBUuxPmpZnL/sVXns pgsOCNrZeIcUi76MVZGObIhtTrYI6O6mDid2FfwuM+043y5BrApclARgVPmqpHodNhD8 hTpNZdHKB1Hjm93Bp8ux9ZPrvNaEOo2/TY8LqPWL3m2Y5fva1NzHKP8TltkzVWKio6uG AACQ== X-Gm-Message-State: AHQUAuZckxvxzhMiNd6nZYnNueWBM8nUuGymtW6uCdUZOXfJnyf4nroq jY1bPS3ll9V/BkZtLuJGR9bD82pn+dY31xiYmj0= X-Google-Smtp-Source: AHgI3IY9aX4ZQlrC08pRTGn4zqg2gBQiY0eidkhvlQbTdxbkIplgJj0cLjTszv5ZOHrg3OTZec33IBYkzu/TcD0yAzk= X-Received: by 2002:a2e:145a:: with SMTP id 26-v6mr1339610lju.116.1550238189436; Fri, 15 Feb 2019 05:43:09 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::234 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:233367 Archived-At: --0000000000009947dd0581eef404 Content-Type: text/plain; charset="UTF-8" > Of course you should write "-?[0-9]+" when you need it! And for > interactive use -- search-and-replace, say -- the conventional notations > are not bad, since they are compact to write, you have the meaning all in > your head anyway, and nobody is going to look at it later on. I think the purpose of this thread is to ask for emacs to support PCRE regexpes in commands like `query-replace-regexp`. Would this even be possible? I can imagine a whole lot of packages breaking if the regexp syntax changed, and changing it just for the user input in interactive functions looks a bit sketchy. --0000000000009947dd0581eef404 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Of course you should write &q= uot;-?[0-9]+" when you need it! And for interactive use -- search-and-= replace, say -- the conventional notations are not bad, since they are comp= act to write, you have the meaning all in your head anyway, and nobody is g= oing to look at it later on.

I think the pu= rpose of this thread is to ask for emacs to support PCRE regexpes in comman= ds like `query-replace-regexp`.

Would this even be= possible? I can imagine a whole lot of packages breaking if the regexp syn= tax changed, and changing it just for the user input in interactive functio= ns looks a bit sketchy.
--0000000000009947dd0581eef404--