From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.devel Subject: Re: Scan of regexps in Emacs (March 17) Date: Sat, 6 Apr 2019 11:43:08 +0200 Message-ID: <8F82F7FF-8921-4ABF-AA1F-18777104BB2A@acm.org> References: <5363970c-3207-1bb4-8b30-74a7d12277cc@cs.ucla.edu> <05269D79-B016-4FCB-94B8-068BF7D1C2D2@acm.org> <3974269b-6cad-0744-bd1f-66c067f94192@cs.ucla.edu> <4b1164c4-e302-ce41-07c3-145d31a97b4c@cs.ucla.edu> <21CCFA3D-B391-44E1-9ED5-1D37009F1988@acm.org> <09AE372B-3A30-4596-8C4E-B9F4CBF6E348@acm.org> <692fe297-1c72-0cda-8765-c119fd0b5ef6@cs.ucla.edu> Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.8\)) Content-Type: multipart/mixed; boundary="Apple-Mail=_0B944174-E6F0-445D-AF2D-957F41D1A9B5" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="170703"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Stefan Monnier , Emacs developers To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Apr 06 11:57:28 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 1hCi4l-000iGf-4g for ged-emacs-devel@m.gmane.org; Sat, 06 Apr 2019 11:57:27 +0200 Original-Received: from localhost ([127.0.0.1]:52863 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hCi4k-0000ro-6e for ged-emacs-devel@m.gmane.org; Sat, 06 Apr 2019 05:57:26 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:34604) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hCi3C-0008DP-FR for emacs-devel@gnu.org; Sat, 06 Apr 2019 05:55:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hChrM-0006oj-2u for emacs-devel@gnu.org; Sat, 06 Apr 2019 05:43:37 -0400 Original-Received: from mail239c50.megamailservers.eu ([91.136.10.249]:32986 helo=mail56c50.megamailservers.eu) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hChrK-0006gi-SZ for emacs-devel@gnu.org; Sat, 06 Apr 2019 05:43:35 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1554543792; bh=Oy+4GeoK/MBQ8djZBxYcE1Hk0eTx8EpEUqx7SEU5N5w=; h=From:Subject:Date:In-Reply-To:Cc:To:References:From; b=c3u7J99icyhdpRAnuIRl5fftgyB92qK+zMSwevqcSfmOzTKr3Cl9k9yWTK0v81cCu GpKz57VWGj3wXvA5KyvVrrZ5TZusQWWtmkBGsTKWCZvTa/c13AylDoyElNigXmC6pX 6dkshyosP9DZFY/Y6WL1LeDQUeV6aKWDrHULXRjg= Feedback-ID: mattiase@acm.or Original-Received: from [192.168.1.64] (c-e636e253.032-75-73746f71.bbcust.telenor.se [83.226.54.230]) (authenticated bits=0) by mail56c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id x369h98V031367; Sat, 6 Apr 2019 09:43:11 +0000 In-Reply-To: <692fe297-1c72-0cda-8765-c119fd0b5ef6@cs.ucla.edu> X-Mailer: Apple Mail (2.3445.104.8) X-CTCH-RefID: str=0001.0A0B0201.5CA874B0.0005, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=G6gy7es5 c=1 sm=1 tr=0 a=M+GU/qJco4WXjv8D6jB2IA==:117 a=M+GU/qJco4WXjv8D6jB2IA==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=GIERkjkbB7goZjXpi5QA:9 a=QEXdDO2ut3YA:10 a=Wbqk4Np9gK4cAi9fFtMA:9 a=ITdVHhY7-e0A:10 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-Received-From: 91.136.10.249 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:235024 Archived-At: --Apple-Mail=_0B944174-E6F0-445D-AF2D-957F41D1A9B5 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 3 apr. 2019 kl. 00.08 skrev Paul Eggert : >=20 > On 4/2/19 7:15 AM, Mattias Engdeg=C3=A5rd wrote: >> where does a user go to understand extant regexps? >=20 > A user that *really* wants to know can go read the source code and get > confused, just like I did. :-) >=20 > But I think it's better if the documentation doesn't say what happens. > If you prefer that the documentation explicitly say that it doesn't = say > what happens, I guess that would be OK too (what sort of wording would > you like, though?). I was mostly thinking about regexps like "^***" which do occur in actual = code (by mistake), and are almost but not quite explained in the manual. = But perhaps some knowledge is better hidden. >> I've attached the ones found by a modified relint/xr, in case you are = interested. >=20 > Sure! Fixed in the attached patch. Thank you, it looks fine to me. Some tool improvements uncovered more = oddities; log attached. --Apple-Mail=_0B944174-E6F0-445D-AF2D-957F41D1A9B5 Content-Disposition: attachment; filename=relint.log Content-Type: application/octet-stream; x-unix-mode=0644; name="relint.log" Content-Transfer-Encoding: 7bit ;; -*- compilation -*- lisp/net/tramp.el:2811:30: `skip-regexp' cannot be used for arguments to `skip-chars-forward' lisp/progmodes/sh-script.el:2909:37: In call to skip-chars-forward: Suspect skip set framed in `[...]' (pos 0) "[a-z0-9]*?" ^ lisp/progmodes/verilog-mode.el:14269:38: `sig-re' cannot be used for arguments to `skip-chars-backward' lisp/progmodes/verilog-mode.el:14272:37: `sig-re' cannot be used for arguments to `skip-chars-forward' lisp/vc/log-edit.el:353:10: In call to re-search-forward: Literal `-' not first or last in character alternative (pos 41) "^\\([^[:alpha:]]\\|[[:alnum:]-]+[^[:alnum:]-:]\\)" ...........................................^ lisp/xml.el:721:25: In call to re-search-forward: Literal `-' not first or last in character alternative (pos 24) "\\=\"\\([[:space:][:alnum:]-'()+,./:=?;!*#@$_%]*\\)\"" ...........................^ lisp/xml.el:724:25: In call to re-search-forward: Literal `-' not first or last in character alternative (pos 24) "\\='\\([[:space:][:alnum:]-()+,./:=?;!*#@$_%]*\\)'" ..........................^ --Apple-Mail=_0B944174-E6F0-445D-AF2D-957F41D1A9B5--