From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#19873: Ill-formed regular expression is constructed in forward-paragraph. Date: Fri, 03 Dec 2021 17:15:18 +0100 Message-ID: <875ys5y8a1.fsf@gnus.org> References: <20150215103122.GA3282@acm.fritz.box> <87o9xodhq4.fsf@jane> <20170309210445.GB4046@acm> <87y25347ew.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15518"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Marcin Borkowski , 19873@debbugs.gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 03 17:16:19 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1mtBEQ-0003nd-Ma for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 03 Dec 2021 17:16:18 +0100 Original-Received: from localhost ([::1]:33656 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mtBEP-0005U4-BX for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 03 Dec 2021 11:16:17 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:52514) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mtBED-0005Tn-17 for bug-gnu-emacs@gnu.org; Fri, 03 Dec 2021 11:16:05 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40500) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mtBEA-0001U2-FR for bug-gnu-emacs@gnu.org; Fri, 03 Dec 2021 11:16:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mtBEA-0002hU-6u for bug-gnu-emacs@gnu.org; Fri, 03 Dec 2021 11:16:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Dec 2021 16:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19873 X-GNU-PR-Package: emacs Original-Received: via spool by 19873-submit@debbugs.gnu.org id=B19873.16385481459399 (code B ref 19873); Fri, 03 Dec 2021 16:16:02 +0000 Original-Received: (at 19873) by debbugs.gnu.org; 3 Dec 2021 16:15:45 +0000 Original-Received: from localhost ([127.0.0.1]:52046 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mtBDs-0002Qk-If for submit@debbugs.gnu.org; Fri, 03 Dec 2021 11:15:45 -0500 Original-Received: from quimby.gnus.org ([95.216.78.240]:53918) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mtBDc-00026C-RS for 19873@debbugs.gnu.org; Fri, 03 Dec 2021 11:15:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=yjwuqK6JOgUKBMbnoJj8YSmZbm6VElZ4F1NyZqvx08Y=; b=NlhXbTkuAP1D14AKCLdmAONgei 5ufhmy+4wuKoX7wi390TcLhts4Tu82oSO6bTwuN7BH93tDJh/PpSbA/qX2u7CBIBlfX89ETugGhiw sEz0kSfLvTsBXKj4ok2ABzda1t7aXJwWiLb9s0OpKkoVcnPIF5Svaho4PeHrgQoOSSvg=; Original-Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mtBDS-0004N8-MC; Fri, 03 Dec 2021 17:15:21 +0100 X-Now-Playing: Joni Mitchell's _Blue_: "River" In-Reply-To: (Alan Mackenzie's message of "Thu, 2 Dec 2021 20:45:17 +0000") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:221391 Archived-At: Alan Mackenzie writes: > Back when the bug was new, I started writing a library to analyse a > regular expression and convert it into an equivalent well formed regular > expression. It's actually working, but is incomplete. It's currently > 2757 lines long, including pretty complete unit testing. I actually > looked at it again at the start of November. Interesting. > It strikes me as one of these things which needs to be done > systematically, which, as I said, I've already tried (and not yet given > up). The question presents itself, would the effort be better spent > improving Emacs's regexp engine? Indeed -- making the Emacs regexp engine transform these complex regexps into simpler, equivalent forms would be great. We wouldn't have to use it on all regexps -- the problem usually rears its head when we're combining several user-defined regexps into a large one, so if we had a `simplify-regexp' function that we could stick in here, that'd solve the issue here (and in similar circumstances elsewhere). -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no