From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: Scan of Emacs regexp mistakes Date: Tue, 14 Apr 2020 08:47:42 -0700 (PDT) Message-ID: References: <140DB045-4529-4862-99B8-5F0DEF1EE8D4@acm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="16109"; mail-complaints-to="usenet@ciao.gmane.io" To: =?utf-8?B?TWF0dGlhcyBFbmdkZWfDpXJk?= , emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Apr 14 18:57:16 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 1jOOs7-00045d-Lk for ged-emacs-devel@m.gmane-mx.org; Tue, 14 Apr 2020 18:57:15 +0200 Original-Received: from localhost ([::1]:35206 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jOOs6-0000L4-Hd for ged-emacs-devel@m.gmane-mx.org; Tue, 14 Apr 2020 12:57:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60026) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jOOhH-0007p1-4P for emacs-devel@gnu.org; Tue, 14 Apr 2020 12:46:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jOOhF-0000C8-LN for emacs-devel@gnu.org; Tue, 14 Apr 2020 12:46:02 -0400 Original-Received: from userp2120.oracle.com ([156.151.31.85]:45002) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jONms-0004jL-Ub for emacs-devel@gnu.org; Tue, 14 Apr 2020 11:47:47 -0400 Original-Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 03EFdOfY021767; Tue, 14 Apr 2020 15:47:44 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=4ucrSfyPVHqcRIDO/Glwcc1U/UKmSJVb1qfVm2OSicY=; b=LgKkx4bwKoYc19ltGjSAa/1M5vKrJYNlPBo3ZXcfaIotZnaoGcAkvvPHCeDalgqFW07m PLZGyIW/qbMowSMIONQYTeN7ZZl4P48o6v5BP2TlQHCC3dLJ4+w+XL54FlpBxW1Nl4/x gJnVifxCbBkIRTdr+DK0ZXS9FoaM3Firj8XnVsJ+um6prrLJkSpgD2uADgJqJ5yHd+y6 uM7yEvIHHFH/C6c13JXM9cJc1rm61NJfDJ7XiKQWfavo/nmbRDgK0QwE2llWXvo7joY5 e3YSzBrj/NdQ7tixmMWxQ+FosGr5kdMT7f4sQWWvapiwxI2VYKDEMJdkb8yv6y+nWzLh fg== Original-Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by userp2120.oracle.com with ESMTP id 30b6hpnkhx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 14 Apr 2020 15:47:44 +0000 Original-Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 03EFl9Gg018852; Tue, 14 Apr 2020 15:47:43 GMT Original-Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserp3030.oracle.com with ESMTP id 30ctaagw0n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 14 Apr 2020 15:47:43 +0000 Original-Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 03EFlhVG016734; Tue, 14 Apr 2020 15:47:43 GMT In-Reply-To: <140DB045-4529-4862-99B8-5F0DEF1EE8D4@acm.org> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4966.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9591 signatures=668686 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 suspectscore=0 spamscore=0 adultscore=0 mlxscore=0 phishscore=0 mlxlogscore=999 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2004140125 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9591 signatures=668686 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 adultscore=0 mlxlogscore=999 clxscore=1015 mlxscore=0 phishscore=0 suspectscore=0 lowpriorityscore=0 bulkscore=0 malwarescore=0 priorityscore=1501 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2004140124 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 156.151.31.85 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:246948 Archived-At: > The filename-matching regexp glitches were fixed separately by the > attached patch, pushed to emacs-27, since these were actual or latent > bugs. >=20 > Several different regexps were used for matching anything but "." and > "..", all wrong. These were all replaced with the concise and correct > (rx (or (not ".") "...")), meaning "[^.]\\|\\.\\.\\." for > traditionalists. >=20 > It is quite clear that returning . and .. from directory-files etc was > a mistake; they are practically never useful but requires callers to > take steps to filter them out. It's likely that nothing would break if > we stopped returning those entries, but that is not a change that I'm > proposing right now. FWIW - That "quite clear" is not clear to me. And it's not clear to me why you think "[^.]\\|\\.\\.\\." is more correct than "^\\([^.]\\|\\.\\([^.]\\|\\..\\)\\).*", which is what Dired has used for a file name other than `.' and `..'. This kind of wholescale changing of regexps seems unwise, to me. Who knows how long it will take for each of the changes to actually be checked in practice, to see whether it is an improvement or breaks things? The changes from ^ ... $ to \\` ... \\' are probably good, or at least OK (no, I didn't check them individually). But the filename-except-.-or-.. change seems wrong, in general.