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: Experimental regexp check: repetition of empty-matching expression Date: Sat, 13 Apr 2019 10:09:57 +0200 Message-ID: References: <30C4697B-B2C4-48F3-B01E-B17C00C152B4@acm.org> <6820fa9a-b99d-d2ad-ee28-1145f545ebda@cs.ucla.edu> Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.8\)) 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="59445"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Emacs developers To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Apr 13 10:10:50 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 1hFDkP-000FMU-9t for ged-emacs-devel@m.gmane.org; Sat, 13 Apr 2019 10:10:49 +0200 Original-Received: from localhost ([127.0.0.1]:48312 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hFDkO-0001DR-A8 for ged-emacs-devel@m.gmane.org; Sat, 13 Apr 2019 04:10:48 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:35666) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hFDjq-0001DJ-4Q for emacs-devel@gnu.org; Sat, 13 Apr 2019 04:10:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hFDjp-0003db-4q for emacs-devel@gnu.org; Sat, 13 Apr 2019 04:10:14 -0400 Original-Received: from mail239c50.megamailservers.eu ([91.136.10.249]:44546 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 1hFDjo-0003cN-Ed for emacs-devel@gnu.org; Sat, 13 Apr 2019 04:10:13 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1555142999; bh=7TCU8AAytQEH6VotYy6qcyqR0BbX4tdZYRpBQgicoS4=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=WPYKLQP2Vtq0ySvV09ycxxkeTkzJyJ1fMrSVzUAXCDZdV3Ox9YQK+oq7zEBt8qY05 ZILCItDHfygC9Hq/84jo4611bj561mlCKKnFPHgT62zedzFvdM6tUDDsvakjDOQMpO 6IsrsM7fNkQbUG2IP+mfQDLcv4aGPoHS9k3dQ1wA= 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 x3D89vX9010927; Sat, 13 Apr 2019 08:09:59 +0000 In-Reply-To: <6820fa9a-b99d-d2ad-ee28-1145f545ebda@cs.ucla.edu> X-Mailer: Apple Mail (2.3445.104.8) X-CTCH-RefID: str=0001.0A0B0208.5CB19957.002B, 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=kj9zAlcOel0A:10 a=l0d5yCj3I8W7-EArilYA:9 a=CjuIK1q_8ugA: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:235389 Archived-At: 13 apr. 2019 kl. 04.47 skrev Paul Eggert : >=20 > I think it's useful, except that the last entry (in dabbrev.el) seems = to be a false alarm, as a regexp pattern is initially nil but is = assigned something else before use, and the trawler assumes it's nil. Yes, I couldn't make up my mind about the best way to suppress that one. = Ignoring repetitions of the empty string, like \(?:\)*, may be the = answer. > I installed the attached patch into master to fix the other issues as = best I could. Thanks. That was quick work! --- a/lisp/mail/mail-extr.el +++ b/lisp/mail/mail-extr.el @@ -383,7 +383,7 @@ mail-extr-initial-pattern ;; Matches telephone extensions. (defconst mail-extr-telephone-extension-pattern (purecopy - "\\(\\([Ee]xt\\|\\|[Tt]ph\\|[Tt]el\\|[Xx]\\).?\\)? *\\+?[0-9][- = 0-9]+")) + "\\(\\([Ee]xt\\|[Tt]ph\\|[Tt]el\\|[Xx]\\).?\\)? *\\+?[0-9][- = 0-9]+")) ^ Doesn't it look like the dot is meant to be escaped? =20 --- a/lisp/net/tramp-adb.el +++ b/lisp/net/tramp-adb.el @@ -53,7 +53,7 @@ tramp-adb-method "When this method name is used, forward all calls to Android Debug = Bridge.") =20 (defcustom tramp-adb-prompt - = "^\\(?:[[:digit:]]*|?\\)?\\(?:[[:alnum:]\e;[]*@?[[:alnum:]]*[^#\\$]*\\)?[#= \\$][[:space:]]" + = "^[[:digit:]]*|?\\(?:[[:alnum:]\e;[]*@?[[:alnum:]]*[^#\\$]*\\)?[#\\$][[:sp= ace:]]" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ There is a second one a bit later in the same regexp.