From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#46859: 28.0.50; [PATCH]: Add option to truncate long lines in xref.el Date: Sat, 6 Mar 2021 14:44:45 +0200 Message-ID: References: <87im69uzlt.fsf@mail.linkov.net> <878s74fv27.fsf@mail.linkov.net> <4119ea3055ef8f306fc0@heytings.org> <4119ea30557ef84ca190@heytings.org> <7eb7ee0f-7dba-c90d-cb58-af42c3828643@yandex.ru> <4119ea30554b406efbbf@heytings.org> <4119ea30558f1e4145b0@heytings.org> <4119ea30555e80bdcf7e@heytings.org> <1c82e582-8b90-f3c5-5391-1e88ca4e7ab2@yandex.ru> <4119ea30553e3f90ab8c@heytings.org> <08b51962-6305-5188-0bea-b17b4139646c@yandex.ru> <4119ea3055bd6f6d2e91@heytings.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34567"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 Cc: 46859@debbugs.gnu.org To: Gregory Heytings Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Mar 06 13:45: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 1lIWJ5-0008sB-11 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 06 Mar 2021 13:45:19 +0100 Original-Received: from localhost ([::1]:53032 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lIWJ3-0001Um-Mr for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 06 Mar 2021 07:45:17 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:32906) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lIWIo-0001Uc-Sm for bug-gnu-emacs@gnu.org; Sat, 06 Mar 2021 07:45:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52895) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lIWIo-0000Uo-KT for bug-gnu-emacs@gnu.org; Sat, 06 Mar 2021 07:45:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lIWIo-0006In-Iq for bug-gnu-emacs@gnu.org; Sat, 06 Mar 2021 07:45:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 06 Mar 2021 12:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46859 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 46859-submit@debbugs.gnu.org id=B46859.161503470124204 (code B ref 46859); Sat, 06 Mar 2021 12:45:02 +0000 Original-Received: (at 46859) by debbugs.gnu.org; 6 Mar 2021 12:45:01 +0000 Original-Received: from localhost ([127.0.0.1]:36208 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lIWIm-0006IK-Pq for submit@debbugs.gnu.org; Sat, 06 Mar 2021 07:45:01 -0500 Original-Received: from mail-wr1-f49.google.com ([209.85.221.49]:34221) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lIWIl-0006I7-50 for 46859@debbugs.gnu.org; Sat, 06 Mar 2021 07:44:59 -0500 Original-Received: by mail-wr1-f49.google.com with SMTP id u16so5459126wrt.1 for <46859@debbugs.gnu.org>; Sat, 06 Mar 2021 04:44:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=i9kTuyLJOcwVnnK1Hqcz7peiUKoz+t+vR5D5al7psK8=; b=iO6aAW1oRsIluYd/rOpfSBkQQggr+jUTqnVzJy1IcLQxrkM+8zDbUk0fajVsk7+zk+ +lQYPYTUhxYJLufvm6kvoaMiLwa5i8jhHNnojVMtBA0sD6AN2alXNVrofNFBLcj3eqRn vF6KBpx1slV/Ls8yXlJvavPdufynDw7q4536RhcVdEwBsmGLrbeLl1k3vhP56tjOg4zf eXmjfm8LJcZ1IC4qiKLAhxaSNhQNjAo3ZYl0DN7mr7XGiDRRC9iqg7TBKnlM+B81Ye3q I11JENFmHVRytGegrm1xzQL6P1G2VC8+BN3BnpW1JbsP7nquxDI170PcRRQ8ZxAAKcoi ql3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=i9kTuyLJOcwVnnK1Hqcz7peiUKoz+t+vR5D5al7psK8=; b=o+aK4/JFXz0s59xx6xPvTJ9xsPjBVSYv/ZKAkPhOLzjZ9jtNyTFT2N7xJuAkV00rDS l4+pziniiurgRG97pllo06bXIgQng1/YITHegj+SkiI8Uvb/ox6N02fVZrUuP6pdP5KM 0ha8Hjfvz5gSnXUF4AgCwhr6BIp3nvaI9OExvLqy8I5iDW9FEFVkEwBsDD4oQv3pkLQJ YYBSNZYuRml0tyhrfGUIO0ctijrur/oxAsfkl11rgj/YFd0ZLlbWuNlA6tr6hl/xu9c5 K9aEWaYsyH3YNyWH4yyZ495FvxXoesOOhMI4U9R/o6kSdfpYMk6OEJMMpfcmfnbXYcu+ NLbg== X-Gm-Message-State: AOAM532GlXyGRatW5uCoOGDUOTdJUrCNcjRcImgjeSdfxiEz0QI6P3Bz LHEeJpEq5urjl/Dv8VoFTLcinEeMoIg= X-Google-Smtp-Source: ABdhPJzkZPP1+m7M0Dk2UDNY1l2F9yoTJHSG5CCKvdUPJBXWwRHytJmPyrIzb8lB3r7PynoeBhNhuQ== X-Received: by 2002:adf:fe01:: with SMTP id n1mr14087521wrr.341.1615034693325; Sat, 06 Mar 2021 04:44:53 -0800 (PST) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id p6sm8642862wru.2.2021.03.06.04.44.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 06 Mar 2021 04:44:53 -0800 (PST) In-Reply-To: <4119ea3055bd6f6d2e91@heytings.org> Content-Language: en-US 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:201620 Archived-At: On 03.03.2021 23:06, Gregory Heytings wrote: > >> >> With your approach we'll have to deal with interpreting Grep outputs >> which list every line in the searched files. This will almost >> certainly be slower in the case when there are only handful of >> matches. But benchmarks welcome. >> > > I don't know what you exactly need (I don't (yet?) use project), so I > can't elaborate further or provide benchmarks alas. The same code is also used in the default implementation of xref-find-references, in case you ever tried it. > Could you perhaps tell me what you need? We are discussing changes to xref.el, because project-find-regexp delegates a lot of its logic to it. Check out xref-matches-in-files and xref--convert-hits which it calls at the end. What you're thinking of seems to require a Grep-specific version of xref--convert-hits logic, which in the end constructs specialized xref items with a new type of location (alternative to xref-file-location).