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: Emacs regexp scan (Sep 29) Date: Sat, 5 Oct 2019 11:37:45 +0200 Message-ID: References: <1697CA97-B2E6-4202-B14D-99DCF93954FD@acm.org> <02405f0d-788f-1b87-0269-b06eb2d67ff8@cs.ucla.edu> <83zhif4nq6.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="263040"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Paul Eggert , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 05 11:38:36 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.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iGgWJ-0016LC-II for ged-emacs-devel@m.gmane.org; Sat, 05 Oct 2019 11:38:35 +0200 Original-Received: from localhost ([::1]:55204 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iGgWI-0002Xw-D7 for ged-emacs-devel@m.gmane.org; Sat, 05 Oct 2019 05:38:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36912) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iGgVn-0002Xp-EN for emacs-devel@gnu.org; Sat, 05 Oct 2019 05:38:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iGgVm-0002Pm-5S for emacs-devel@gnu.org; Sat, 05 Oct 2019 05:38:03 -0400 Original-Received: from mail224c50.megamailservers.eu ([91.136.10.234]:50628 helo=mail33c50.megamailservers.eu) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iGgVl-0002PJ-J0; Sat, 05 Oct 2019 05:38:02 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1570268268; bh=zqLC6G9jK/9oOw6ZUK2M3n1wQ54yj+XPnUnotE3XpQw=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=LiM772ZZ7InuQOZ98xC1fjeW8zQW8rGSmCLdAR7vqeGfpQ4i2I3O/ZPS+IkX0i0kU TPH4ygx7Ah3MjNp4tPvhGDfNBdJQRAke8BHgjtrWERSXJGw8wnTE9UGx7FjNPVKe3R BuJQZxFZinFngTBPw2m954QIjrT16dfV/YJioGOg= Feedback-ID: mattiase@acm.or Original-Received: from [192.168.1.65] (c-e636e253.032-75-73746f71.bbcust.telenor.se [83.226.54.230]) (authenticated bits=0) by mail33c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id x959bkpC016206; Sat, 5 Oct 2019 09:37:47 +0000 In-Reply-To: <83zhif4nq6.fsf@gnu.org> X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B020E.5D98646C.001A, 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=CaB2G4jl c=1 sm=1 tr=0 a=M+GU/qJco4WXjv8D6jB2IA==:117 a=M+GU/qJco4WXjv8D6jB2IA==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=mDV3o1hIAAAA:8 a=RkR20tcsAM9tR5_jS_kA:9 a=CjuIK1q_8ugA:10 a=_FVE-zBwftR9WsbkzFJk:22 a=pHzHmUro8NiASowvMSCR:22 a=Ew2E2A-JSTLzCXPT_086:22 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] [fuzzy] X-Received-From: 91.136.10.234 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:240606 Archived-At: 5 okt. 2019 kl. 10.10 skrev Eli Zaretskii : > If the regexp scanner needs to be pacified, isn't it better to fix the > scanner instead? The check is there because it is often useful. Relint/xr has been = detecting and complaining about non-escaped use of special characters = such as +, *, ?, ^ and $ for some time now, and for good reason: it's an = error-prone exploitation of a hole in the syntax. We think that "*.^" is = better written "\\*.\\^" because the latter is more regular, less likely = to break when modified, and tells the reader that no, it isn't a = mistake, the programmer knows what he is doing. Such non-essential escaping has been added many times before, and it has = never been controversial in the slightest. > I also don't think I see the simplification here. In fact, the > original code looks simpler to me than the new one, as the former is > just a simple while loop, whereas the latter is a nested dolist. Actually the original was a nested pair of while loops, which indicates = that it wasn't quite that simple.