From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#63272: 29.0.90; xref fails on long lines Date: Mon, 08 May 2023 18:41:13 +0300 Organization: LINKOV.NET Message-ID: <868rdzw9ra.fsf@mail.linkov.net> References: <86fs8cxr79.fsf@mail.linkov.net> <7393ccd9-f32f-9ce9-7159-e0fe6e1e1fef@gutov.dev> <86354a1xd0.fsf@mail.linkov.net> <599c01ab-f23c-b27a-6035-cd141770a415@gutov.dev> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15687"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) Cc: 63272@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 08 17:57:13 2023 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 1pw3Ef-0003w7-7t for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 08 May 2023 17:57:13 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pw3EZ-0003RP-3O; Mon, 08 May 2023 11:57:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pw3EU-0003NE-Ri for bug-gnu-emacs@gnu.org; Mon, 08 May 2023 11:57:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pw3EU-00043X-Jd for bug-gnu-emacs@gnu.org; Mon, 08 May 2023 11:57:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pw3EU-0004AV-Fp for bug-gnu-emacs@gnu.org; Mon, 08 May 2023 11:57:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 08 May 2023 15:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63272 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug Original-Received: via spool by 63272-submit@debbugs.gnu.org id=B63272.168356141715993 (code B ref 63272); Mon, 08 May 2023 15:57:02 +0000 Original-Received: (at 63272) by debbugs.gnu.org; 8 May 2023 15:56:57 +0000 Original-Received: from localhost ([127.0.0.1]:41379 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pw3EP-00049t-2Z for submit@debbugs.gnu.org; Mon, 08 May 2023 11:56:57 -0400 Original-Received: from relay2-d.mail.gandi.net ([217.70.183.194]:35895) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pw3EN-00049Y-1Y for 63272@debbugs.gnu.org; Mon, 08 May 2023 11:56:55 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 2ADF340003; Mon, 8 May 2023 15:56:47 +0000 (UTC) In-Reply-To: <599c01ab-f23c-b27a-6035-cd141770a415@gutov.dev> (Dmitry Gutov's message of "Fri, 5 May 2023 23:49:14 +0300") 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:261340 Archived-At: >> In the real case the prefix and suffix were unique, so I didn't expect >> that in a generated file there was a very long distance between prefix >> and suffix. To limit the distance between prefix and suffix I tried: >> C-x p g prefix.{0,100}suffix > > Try escaping { and }: > > C-x p g prefix.\{0,100\}suffix Thanks, this works. > The regexp needs to use the syntax that Emacs can understand. > > Just the subset of it that can be translated to command like, so that Grep > and Ripgrep can work with it too. > >> but xref that uses ripgrep fails to find matches. >> So needed to fall back to ripgrep-based rgrep in this case: >> M-x rgrep prefix.{0,100}suffix >> that works successfully. >> It seems the problem is because of different regexp syntax >> used by ripgrep and re-search-forward in xref--collect-matches-1. > > The conversion is performed by xref--regexp-to-extended. Shouldn't the conversion also escape { and } ?