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#46859: 28.0.50; [PATCH]: Add option to truncate long lines in xref.el Date: Tue, 02 Mar 2021 21:25:50 +0200 Organization: LINKOV.NET Message-ID: <87im69uzlt.fsf@mail.linkov.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30502"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: theo@thornhill.no To: 46859@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Mar 02 20:44:17 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 1lHAwJ-0007im-So for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 02 Mar 2021 20:44:15 +0100 Original-Received: from localhost ([::1]:60790 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lHAwI-0002pF-UT for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 02 Mar 2021 14:44:14 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59452) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lHAw6-0002kr-Ma for bug-gnu-emacs@gnu.org; Tue, 02 Mar 2021 14:44:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42717) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lHAw6-0006fw-D9 for bug-gnu-emacs@gnu.org; Tue, 02 Mar 2021 14:44:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lHAw6-0003Hs-9J for bug-gnu-emacs@gnu.org; Tue, 02 Mar 2021 14:44:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 02 Mar 2021 19:44: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 X-Debbugs-Original-To: Theodor Thornhill via "Bug reports for GNU Emacs, the Swiss army knife of text editors" X-Debbugs-Original-Cc: 46859@debbugs.gnu.org, Theodor Thornhill Original-Received: via spool by submit@debbugs.gnu.org id=B.161471419212559 (code B ref -1); Tue, 02 Mar 2021 19:44:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 2 Mar 2021 19:43:12 +0000 Original-Received: from localhost ([127.0.0.1]:54260 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHAvI-0003GP-87 for submit@debbugs.gnu.org; Tue, 02 Mar 2021 14:43:12 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:60900) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHAvG-0003GG-Us for submit@debbugs.gnu.org; Tue, 02 Mar 2021 14:43:11 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59236) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lHAvG-00028p-Mn for bug-gnu-emacs@gnu.org; Tue, 02 Mar 2021 14:43:10 -0500 Original-Received: from relay12.mail.gandi.net ([217.70.178.232]:60349) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lHAvE-0006ZW-0G for bug-gnu-emacs@gnu.org; Tue, 02 Mar 2021 14:43:10 -0500 Original-Received: from mail.gandi.net (m91-129-96-116.cust.tele2.ee [91.129.96.116]) (Authenticated sender: juri@linkov.net) by relay12.mail.gandi.net (Postfix) with ESMTPSA id DB26820000A; Tue, 2 Mar 2021 19:43:02 +0000 (UTC) In-Reply-To: (Theodor Thornhill via's message of "Mon, 01 Mar 2021 21:40:50 +0100") Received-SPF: pass client-ip=217.70.178.232; envelope-from=juri@linkov.net; helo=relay12.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, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:201235 Archived-At: > The added functionality is created to not kick in before a certain > threshold, where 500 columns seems reasonably long. Anything above that > will be truncated, but xref will still show that there was a hit. > > I'm sure the patch can be improved, so please, don't hesitate to tell > me. > > I consider this a great improvement, and I hope you will to§ I've customized 'xref-search-program-alist' that defines ripgrep command line to contain additional options: -M 500 --max-columns-preview that truncates long lines of ripgrep output after we discussed this in https://debbugs.gnu.org/44983 But maybe your new option would be easier to customize.