From debbugs-submit-bounces@debbugs.gnu.org Thu May 04 11:15:37 2023 Received: (at submit) by debbugs.gnu.org; 4 May 2023 15:15:37 +0000 Received: from localhost ([127.0.0.1]:51766 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1puagC-0004RX-M7 for submit@debbugs.gnu.org; Thu, 04 May 2023 11:15:37 -0400 Received: from lists.gnu.org ([209.51.188.17]:60054) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1puagA-0004RA-LT for submit@debbugs.gnu.org; Thu, 04 May 2023 11:15:35 -0400 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 1puagA-00009c-6m for bug-gnu-emacs@gnu.org; Thu, 04 May 2023 11:15:34 -0400 Received: from relay6-d.mail.gandi.net ([2001:4b98:dc4:8::226]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1puag2-0002NX-Ik for bug-gnu-emacs@gnu.org; Thu, 04 May 2023 11:15:33 -0400 Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id CB86DC0003 for ; Thu, 4 May 2023 15:15:19 +0000 (UTC) From: Juri Linkov To: bug-gnu-emacs@gnu.org Subject: 29.0.90; xref fails on long lines Organization: LINKOV.NET Date: Thu, 04 May 2023 18:07:46 +0300 Message-ID: <86fs8cxr79.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2001:4b98:dc4:8::226; envelope-from=juri@linkov.net; helo=relay6-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_HELO_TEMPERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.6 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.6 (--) 1. Create a file with a long line, e.g. type a C-u 500000 b c Save the file and commit to git. (long-line-optimizations-p returns t) 2. Try to search a regexp that matches the whole long line, e.g. C-x p g a.*c RET Debugger entered--Lisp error: (error "Stack overflow in regexp matcher") xref--collect-matches-1("a.*c" "/tmp/file" 1 1 500003 nil) xref--collect-matches((1 "/tmp/file" "abbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb...") "a.*c" # nil) #f(compiled-function (hit) #)((1 "/tmp/file" "abbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb...")) xref--convert-hits(((1 "/tmp/file" "abbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb...")) "a.*c") xref-matches-in-files("a.*c" ("/tmp/file")) project--find-regexp-in-files("a.*c" ("/tmp/file")) apply(project--find-regexp-in-files ("a.*c" ("/tmp/file"))) #f(compiled-function (&rest args2) #)() xref--show-xref-buffer(#f(compiled-function (&rest args2) #) ((window . #) (display-action) (auto-jump))) xref--show-xrefs(#f(compiled-function (&rest args2) #) nil) xref-show-xrefs(#f(compiled-function (&rest args2) #) nil) project-find-regexp("a.*c") funcall-interactively(project-find-regexp "a.*c") call-interactively(project-find-regexp nil nil) command-execute(project-find-regexp) From debbugs-submit-bounces@debbugs.gnu.org Thu May 04 11:33:29 2023 Received: (at 63272) by debbugs.gnu.org; 4 May 2023 15:33:29 +0000 Received: from localhost ([127.0.0.1]:51854 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1puaxU-00053P-Sg for submit@debbugs.gnu.org; Thu, 04 May 2023 11:33:29 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:52215) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1puaxS-000539-1K for 63272@debbugs.gnu.org; Thu, 04 May 2023 11:33:26 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id C23945C0073; Thu, 4 May 2023 11:33:20 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Thu, 04 May 2023 11:33:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm2; t= 1683214400; x=1683300800; bh=uzcALizB9hwU7O+f/D+CmjaOduyC3q8wW62 RqJDfUdA=; b=suf1xpQDE8jVTSYwhZJ2HYyKJZgCiBQ1s97j4CjXKv6g2aoSRiC GEXuaBRVkEhpFJl9CR4BfYRP6Dz2kJs6iug+wQkLKbyYIsIfLMSqmkKAt92knVCu bQZwqUlOdwUPZwbHac/n+zobfpVr2ESl/4OjB7c5kyPd/Tl2tdLkXH1kDkGb9qPe BX3WsR/4spBOeP9jKnJ0BdW4P3FueqShOT3zkrR//+WcGkckki90I9vyrlhac7q8 OGDIpkMMpekvYaWClNViVguXJ9laPYKgY9rVz87H01suA3nqDOwijmvmDmbjLCqp 6HpIxJibkGiRvDStHyYvWK0j31kAp6kifDA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1683214400; x= 1683300800; bh=uzcALizB9hwU7O+f/D+CmjaOduyC3q8wW62RqJDfUdA=; b=A nK1iozzRUDzLiMoRYn5L4zcXNNBAOPhRHBQ0CUa5Q0FrhlkAK48O07SbJq5iWWYD gw1L7nmOfJV8EkneqxfIab4gG50pdXkpcyDWC63C9m6Sh/r6629vG2vf9yRdvbuE iehq5kzu1kZSeuyyZR/nR2A8EDdHZ+Vzakcm5oWIWeEyUPexXwqVdPNSoqX41OTh 9T/u5KnainEI8P38BV5h6itiQH5Z7/tGVCTyJxk5cEcVisPCRhfTSz2rBtkGAqsE lu72XvJXvZCc3108ES1FrD+gnr05X38KR2vHzQH5UJR01IO3ddd6G0aG8mvTq/RD tJlekZuwOzymW94D+5eIA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeeftddgkeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvfhfhjggtgfesthejredttdefjeenucfhrhhomhepffhmihht rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth gvrhhnpeeghedthedujeeiteeutddtjeekheejteeukeehffdutdejuedvfeevueeviedu udenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumh hithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 4 May 2023 11:33:19 -0400 (EDT) Message-ID: <7393ccd9-f32f-9ce9-7159-e0fe6e1e1fef@gutov.dev> Date: Thu, 4 May 2023 18:33:17 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: bug#63272: 29.0.90; xref fails on long lines Content-Language: en-US To: Juri Linkov , 63272@debbugs.gnu.org References: <86fs8cxr79.fsf@mail.linkov.net> From: Dmitry Gutov In-Reply-To: <86fs8cxr79.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 63272 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.9 (--) On 04/05/2023 18:07, Juri Linkov wrote: > 1. Create a file with a long line, e.g. type > > a C-u 500000 b c > > Save the file and commit to git. > (long-line-optimizations-p returns t) > > 2. Try to search a regexp that matches the whole long line, e.g. > > C-x p g a.*c RET > > Debugger entered--Lisp error: (error "Stack overflow in regexp matcher") Isn't that more like a problem with the regexp you entered, or with our regexp engine? E.g. try this: C-x p g a[^c]*c RET From debbugs-submit-bounces@debbugs.gnu.org Thu May 04 11:58:08 2023 Received: (at submit) by debbugs.gnu.org; 4 May 2023 15:58:08 +0000 Received: from localhost ([127.0.0.1]:51878 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pubLM-0005zs-9U for submit@debbugs.gnu.org; Thu, 04 May 2023 11:58:08 -0400 Received: from lists.gnu.org ([209.51.188.17]:36634) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pubLK-0005zd-Kd for submit@debbugs.gnu.org; Thu, 04 May 2023 11:58:06 -0400 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 1pubLK-0000F7-En for bug-gnu-emacs@gnu.org; Thu, 04 May 2023 11:58:06 -0400 Received: from heytings.org ([95.142.160.155]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pubLI-0000wG-PL for bug-gnu-emacs@gnu.org; Thu, 04 May 2023 11:58:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1683215882; bh=s3+eBnXnAGdZj3Kjgp48O7+4gVjf4wNHU78xrxawwZg=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=jhw/U7fvNoY9XM8f4N+RMYmawqb950GXLUcKCZUQsM/ueQAhUrkl157FI90zJi3rQ EZ21Iv1oAJ2kIAovY1BqiicFS4fcWknOauiGM0rGbsT4HNzhfYea3VBcUawO2Uyr6H qC/nBgCZ2dYJ+XN3S5QH9PaLgMRg3QBi1DWulMwOxYnVjnWyz4O09Xl61Jw8AAT8kq 6pgNqzJgP28Sk3A2izRTIJeOo2Yx4PU88dCGKebGhHjStWHzac4HO5N/ILW5Zl7Txj Ci4tmshZAWP/TP/HmdPZhBTZPZNGFQiVe8ek1x4p9YhD8qeNgtJzLmbIOguOHS5XP6 EQSUoWXHIbo4g== Date: Thu, 04 May 2023 15:58:02 +0000 From: Gregory Heytings To: Juri Linkov Subject: Re: bug#63272: 29.0.90; xref fails on long lines In-Reply-To: <86fs8cxr79.fsf@mail.linkov.net> Message-ID: <221c671685e2b66488a3@heytings.org> References: <86fs8cxr79.fsf@mail.linkov.net> MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=us-ascii Received-SPF: pass client-ip=95.142.160.155; envelope-from=gregory@heytings.org; helo=heytings.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: 63272@debbugs.gnu.org, bug-gnu-emacs@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) > > 1. Create a file with a long line, e.g. type > > a C-u 500000 b c > > Save the file and commit to git. > > (long-line-optimizations-p returns t) > > 2. Try to search a regexp that matches the whole long line, e.g. > > C-x p g a.*c RET > > Debugger entered--Lisp error: (error "Stack overflow in regexp matcher") > That seems to be a problem with/limitation of the regexp engine that is not immediately related to (displaying) long lines. After (setq long-line-threshold nil) you will get the same error. From debbugs-submit-bounces@debbugs.gnu.org Fri May 05 05:13:47 2023 Received: (at 63272) by debbugs.gnu.org; 5 May 2023 09:13:47 +0000 Received: from localhost ([127.0.0.1]:53143 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1purVb-0007K7-Hg for submit@debbugs.gnu.org; Fri, 05 May 2023 05:13:47 -0400 Received: from heytings.org ([95.142.160.155]:49580) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1purVZ-0007Jw-DB for 63272@debbugs.gnu.org; Fri, 05 May 2023 05:13:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1683278023; bh=CHFpMEWb9AmYXLzWjyAJXH8f37cAEl/RR2qrp+337W4=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=i3udiZJBUDgYIRG77W400LACE1o0w1WTIXloz4dln0aprTfYQXpeuUpehlH6S+dTU LP5OeX39whwelxE+pdnyLlYVE0pxd05wPySbuk8LvGiXoaGFhq7BCrEEfW7ZQoFwO5 X0dTurckQTzhuzGP5P9ApTeM5D7zm7ecmm7LJxT3qnSLcLFr2bcXKGfBKyLP5VMjld TbZK+k7OL4V2Mnr7O2RtaBNQCksBy61I2O1g1AJJxnjIiJ49XdtiiWLE8ZxLEw3z6E 9NsG7qlFfIQ5P3jozzlX6awktYI+lZDXWJ9DYeywbFrZhj5krdBfhWCYzC+qNBA8eF 1Fm+0vedMey3Q== Date: Fri, 05 May 2023 09:13:43 +0000 From: Gregory Heytings To: Juri Linkov Subject: Re: bug#63272: 29.0.90; xref fails on long lines In-Reply-To: <221c671685e2b66488a3@heytings.org> Message-ID: References: <86fs8cxr79.fsf@mail.linkov.net> <221c671685e2b66488a3@heytings.org> MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=us-ascii X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 63272 Cc: 63272@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> 2. Try to search a regexp that matches the whole long line, e.g. >> >> C-x p g a.*c RET >> >> Debugger entered--Lisp error: (error "Stack overflow in regexp >> matcher") > > That seems to be a problem with/limitation of the regexp engine that is > not immediately related to (displaying) long lines. After (setq > long-line-threshold nil) you will get the same error. > By the way, you may want to have a look at bug#61514, in which such problematic regexps are discussed. From debbugs-submit-bounces@debbugs.gnu.org Fri May 05 13:53:37 2023 Received: (at 63272) by debbugs.gnu.org; 5 May 2023 17:53:37 +0000 Received: from localhost ([127.0.0.1]:57418 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1puzcf-00086S-FD for submit@debbugs.gnu.org; Fri, 05 May 2023 13:53:37 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:50097) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1puzce-000861-GG for 63272@debbugs.gnu.org; Fri, 05 May 2023 13:53:36 -0400 Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 8E731C0002; Fri, 5 May 2023 17:53:28 +0000 (UTC) From: Juri Linkov To: Gregory Heytings Subject: Re: bug#63272: 29.0.90; xref fails on long lines In-Reply-To: (Gregory Heytings's message of "Fri, 05 May 2023 09:13:43 +0000") Organization: LINKOV.NET References: <86fs8cxr79.fsf@mail.linkov.net> <221c671685e2b66488a3@heytings.org> Date: Fri, 05 May 2023 20:39:11 +0300 Message-ID: <86a5yi3cg0.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 63272 Cc: 63272@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >>> 2. Try to search a regexp that matches the whole long line, e.g. >>> >>> C-x p g a.*c RET >>> >>> Debugger entered--Lisp error: (error "Stack overflow in regexp matcher") >> >> That seems to be a problem with/limitation of the regexp engine that is >> not immediately related to (displaying) long lines. After (setq >> long-line-threshold nil) you will get the same error. > > By the way, you may want to have a look at bug#61514, in which such > problematic regexps are discussed. Thanks for the reference, I see it's fixed, and I can't find more problems. From debbugs-submit-bounces@debbugs.gnu.org Fri May 05 13:53:40 2023 Received: (at 63272) by debbugs.gnu.org; 5 May 2023 17:53:40 +0000 Received: from localhost ([127.0.0.1]:57421 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1puzch-00086j-O2 for submit@debbugs.gnu.org; Fri, 05 May 2023 13:53:39 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:58351) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1puzcg-000864-Lp; Fri, 05 May 2023 13:53:39 -0400 Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 12D88C0005; Fri, 5 May 2023 17:53:31 +0000 (UTC) From: Juri Linkov To: Dmitry Gutov Subject: Re: bug#63272: 29.0.90; xref fails on long lines In-Reply-To: <7393ccd9-f32f-9ce9-7159-e0fe6e1e1fef@gutov.dev> (Dmitry Gutov's message of "Thu, 4 May 2023 18:33:17 +0300") Organization: LINKOV.NET References: <86fs8cxr79.fsf@mail.linkov.net> <7393ccd9-f32f-9ce9-7159-e0fe6e1e1fef@gutov.dev> Date: Fri, 05 May 2023 20:50:19 +0300 Message-ID: <86354a1xd0.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 63272 Cc: 63272@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) tags 63272 notabug close 63272 29.0.60 thanks >> 1. Create a file with a long line, e.g. type >> a C-u 500000 b c >> Save the file and commit to git. >> (long-line-optimizations-p returns t) >> 2. Try to search a regexp that matches the whole long line, e.g. >> C-x p g a.*c RET >> Debugger entered--Lisp error: (error "Stack overflow in regexp matcher") > > Isn't that more like a problem with the regexp you entered, or with our > regexp engine? > > E.g. try this: > > C-x p g a[^c]*c RET 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 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. Since this is a separate problem, I'm closing this one, then a new feature request could be opened if you want. From debbugs-submit-bounces@debbugs.gnu.org Fri May 05 16:49:29 2023 Received: (at 63272) by debbugs.gnu.org; 5 May 2023 20:49:29 +0000 Received: from localhost ([127.0.0.1]:57647 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pv2Mq-0007Is-QB for submit@debbugs.gnu.org; Fri, 05 May 2023 16:49:29 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:42705) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pv2Ml-0007IZ-3n for 63272@debbugs.gnu.org; Fri, 05 May 2023 16:49:27 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id A34E65C014B; Fri, 5 May 2023 16:49:17 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Fri, 05 May 2023 16:49:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm2; t= 1683319757; x=1683406157; bh=qVwnSBpJldY3e+woiLm2S2tCGa9PYyI8/CB rvGUBmm0=; b=kWebySlaIj8Ah0x/IfPCYLnP4s0S+iK4H36peFcPIsTdKBAPXk6 siTqhsV1uQsShlNVSHJw5nnawNzFDcXmOj6i83nTFv2lEmOg2Ch6+Wpw+9ieNHv/ VUUs8MhCYjxVAIc6rbHO2t5QRCsj7QqVaY9Fsqiyvl/OlPG1I0GGpP/cHONItqxD wm1nb5YHCs2br+WmECdpOzw6yrJ5brvvGIlt5D34YYQG/GJ7ftxW2RW85nDgFl4t paCe8QtOqNO+B+8GhzLK19fD198wCriSps9me4Anwz5Z4/iVlNlZOIauIh5sbP7u KLrjkSl7553xXNGJqQEZj/K0up+NhrV0rdQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1683319757; x=1683406157; bh=qVwnSBpJldY3e+woiLm2S2tCGa9PYyI8/CB rvGUBmm0=; b=NDmr9O0IYdtfKqWKpqsRTOo3YyaPIKA/pK41Jxz5kqEej4gqEOY 3fXnEuxuSm7ikppxcbyYBf0CuDKwVyvdaqvxjVxyCkYDjUP7nThDQaoNHgluinBo 65mzx0u/ieIB4dHChF8dVTwv/WqIbHuZ9Et3fNRpwPNkNQg4c7rWikAHdb8mk3oc 0ETA0it2dgbfmGT3ztnJkQg7zj4jw8emPnAYbcERtn7B6AsnMLAjvmheUNQNqfWy pHXP2LTy3XRQ6cqZjJYk/Sjz+xCNMJsOYb5bcN6wafmkiMR5XQwAJFmV4hr6LAfE aQOMR7iBThtRVcolR2LkBObT8/rhJ11+a+A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeefvddgudehiecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuvfevfhfhjggtgfesthejredttdefjeenucfhrhhomhepffhm ihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrg htthgvrhhnpeeigfetveehveevffehledtueekieeikeeufeegudfgfeeghfdulefgfeev ledvveenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe gumhhithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 5 May 2023 16:49:16 -0400 (EDT) Message-ID: <599c01ab-f23c-b27a-6035-cd141770a415@gutov.dev> Date: Fri, 5 May 2023 23:49:14 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: bug#63272: 29.0.90; xref fails on long lines Content-Language: en-US To: Juri Linkov References: <86fs8cxr79.fsf@mail.linkov.net> <7393ccd9-f32f-9ce9-7159-e0fe6e1e1fef@gutov.dev> <86354a1xd0.fsf@mail.linkov.net> From: Dmitry Gutov In-Reply-To: <86354a1xd0.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -1.8 (-) X-Debbugs-Envelope-To: 63272 Cc: 63272@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.8 (--) On 05/05/2023 20:50, Juri Linkov wrote: > 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 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. From debbugs-submit-bounces@debbugs.gnu.org Mon May 08 11:56:57 2023 Received: (at 63272) by debbugs.gnu.org; 8 May 2023 15:56:57 +0000 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 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 Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 2ADF340003; Mon, 8 May 2023 15:56:47 +0000 (UTC) From: Juri Linkov To: Dmitry Gutov Subject: Re: bug#63272: 29.0.90; xref fails on long lines In-Reply-To: <599c01ab-f23c-b27a-6035-cd141770a415@gutov.dev> (Dmitry Gutov's message of "Fri, 5 May 2023 23:49:14 +0300") Organization: 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> Date: Mon, 08 May 2023 18:41:13 +0300 Message-ID: <868rdzw9ra.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 63272 Cc: 63272@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> 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 } ? From debbugs-submit-bounces@debbugs.gnu.org Mon May 08 14:59:30 2023 Received: (at 63272) by debbugs.gnu.org; 8 May 2023 18:59:31 +0000 Received: from localhost ([127.0.0.1]:41582 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pw64p-0001CF-Tm for submit@debbugs.gnu.org; Mon, 08 May 2023 14:59:30 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:40965) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pw64n-0001By-R0 for 63272@debbugs.gnu.org; Mon, 08 May 2023 14:59:14 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 6CFBF5C018B; Mon, 8 May 2023 14:59:08 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Mon, 08 May 2023 14:59:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm2; t= 1683572348; x=1683658748; bh=pDhrZkKfgNkAtMclfTfBLDf/z2CObBo2gFI JnSbrNtg=; b=awdFlAn9iWL6kuIlaZN9YkMv8TUWi/Eh/EC7a0WYyxedKTpWYWa e9gMizAybPQfOt8mlJX4zWu6nZIYz8x7BwZvXuXDmj6iLwSn3+KGzB3PZ0HRXdk9 tNGEQc38bMDDpnZJ98N2PcPxU6XjHa2CFBvHIcOP73Pu7eaTsziYKJvbS1jsrfko SSetddENOKb4AQv4LxurmPSx04ou3EFp9jhcabcgiuZqiF8HjMZoD1tQ8zFLquGV gyqW/gWwCh5hTeyXqMjxrvy8H4RQmVcAq4pHvovOR298MgYYhvNmtFB/pheVgdaL /gvjqg4sTgzBwncwKrlfvQ5pMpeJgbDsvlQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1683572348; x=1683658748; bh=pDhrZkKfgNkAtMclfTfBLDf/z2CObBo2gFI JnSbrNtg=; b=Xzwq7NyTmNgumtkEvyU9tT8eYzkhnlIfXwAMDuto75MPzXO609Z zryudgY/O4CEPZUNu09GuaQZeAzU3JeZrhcmrgJvnPqmBzITX7gi6O55hIs4c2Gv mPH/+E62qWXHxV0EFlaVNzzr05sdpvAOBFohramSbPwPgyyT/Q4ccn6A0byFUD8S 26n2pvIo+aofnpf23u8lXIEdK72yTPiCCKrxtWo3Con7Ps+fgiCa5S6qp87uJYCa 5+zH71uQozNNJ2clFt3Snj9cvA+4TNHvsVLNyMP45edhdHqj40xMIxc6CgbOA8QQ zSRe3KyC59kkALOldBGiXAFjh/e4emqINoQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeefkedgudefudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuvfevfhfhjggtgfesthejredttdefjeenucfhrhhomhepffhm ihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrg htthgvrhhnpeeigfetveehveevffehledtueekieeikeeufeegudfgfeeghfdulefgfeev ledvveenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe gumhhithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 8 May 2023 14:59:07 -0400 (EDT) Message-ID: <35c1f6a5-0d12-3089-6f96-3002008b4092@gutov.dev> Date: Mon, 8 May 2023 21:59:05 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: bug#63272: 29.0.90; xref fails on long lines Content-Language: en-US To: Juri Linkov 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> <868rdzw9ra.fsf@mail.linkov.net> From: Dmitry Gutov In-Reply-To: <868rdzw9ra.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -1.8 (-) X-Debbugs-Envelope-To: 63272 Cc: 63272@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) On 08/05/2023 18:41, Juri Linkov wrote: >>> 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 } ? It _un_escapes them in this case: { and } have to be escaped in Emacs regexps, but they don't need to be escaped in "extended regular extensions". So the conversion toggles escaping. From unknown Sat Jun 21 12:31:41 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 06 Jun 2023 11:24:10 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator