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#44983: Truncate long lines of grep output Date: Thu, 10 Dec 2020 10:18:16 +0200 Organization: LINKOV.NET Message-ID: <87k0tq14qn.fsf@mail.linkov.net> References: <87v9dlc3ti.fsf_-_@mail.linkov.net> <83ft4pik35.fsf@gnu.org> <87sg8p5kw0.fsf@mail.linkov.net> <83eek8hoyx.fsf@gnu.org> <87h7p4r1n9.fsf@mail.linkov.net> <62EB4762-278D-43E7-8699-BBDC47818A50@gnu.org> <87zh2w7ww1.fsf@mail.linkov.net> <83pn3reyjs.fsf@gnu.org> <87y2ie7for.fsf@mail.linkov.net> <87h7p0f611.fsf@mail.linkov.net> <87a6uqafmk.fsf@mail.linkov.net> <87zh2q61n6.fsf@mail.linkov.net> <3620abd0-ce79-cc9d-3fb2-255e91f13da1@yandex.ru> <87mtyo3x1z.fsf@mail.linkov.net> <857088a6-fe90-d989-9115-2c159b2a02e6@yandex.ru> <87lfe6x1uf.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3924"; 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: 44983@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 10 09:42:30 2020 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 1knHWw-0000w5-Ez for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 10 Dec 2020 09:42:30 +0100 Original-Received: from localhost ([::1]:41848 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1knHWv-0000F7-Fc for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 10 Dec 2020 03:42:29 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35514) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1knHPj-0002M6-B6 for bug-gnu-emacs@gnu.org; Thu, 10 Dec 2020 03:35:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53651) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1knHPi-0008Lo-Ux for bug-gnu-emacs@gnu.org; Thu, 10 Dec 2020 03:35:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1knHPi-0002ro-R6 for bug-gnu-emacs@gnu.org; Thu, 10 Dec 2020 03:35: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: Thu, 10 Dec 2020 08:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44983 X-GNU-PR-Package: emacs Original-Received: via spool by 44983-submit@debbugs.gnu.org id=B44983.160758926510954 (code B ref 44983); Thu, 10 Dec 2020 08:35:02 +0000 Original-Received: (at 44983) by debbugs.gnu.org; 10 Dec 2020 08:34:25 +0000 Original-Received: from localhost ([127.0.0.1]:36960 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1knHP7-0002qc-2L for submit@debbugs.gnu.org; Thu, 10 Dec 2020 03:34:25 -0500 Original-Received: from relay8-d.mail.gandi.net ([217.70.183.201]:36335) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1knHP3-0002q9-Qh for 44983@debbugs.gnu.org; Thu, 10 Dec 2020 03:34:22 -0500 X-Originating-IP: 91.129.99.98 Original-Received: from mail.gandi.net (m91-129-99-98.cust.tele2.ee [91.129.99.98]) (Authenticated sender: juri@linkov.net) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id 3AAA31BF208; Thu, 10 Dec 2020 08:34:13 +0000 (UTC) In-Reply-To: (Dmitry Gutov's message of "Wed, 9 Dec 2020 22:06:01 +0200") 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:195627 Archived-At: > Perhaps you would like to come up with the name for the new user option? Maybe something like 'xref-search-truncate' with a number of columns, nil by default. >> BTW, for sorting currently xref-search-program-alist uses: >> "| sort -t: -k1,1 -k2n,2" >> but fortunately ripgrep has a special option to do the same with: >> "--sort path" > > Somehow, that option came out to be consistently slower in my > benchmarking. Even when the results are only a few lines (that's actually > when the difference should be most apparent, because with many lines Elisp > takes up the most of CPU time). You can try it yourself: > > (benchmark 10 '(project-find-regexp ":package-version '(xref")) > > 0.86 with '| sort' > 1.33 with '--sort path' I confirm that in my tests '--sort path' is 2 times slower than '| sort'. >> BTW, it's possible to see all highlighted parts of the output >> by changing the argument 'MODE' of 'compilation-start' in 'grep' >> from #'grep-mode to t (so it uses comint-mode in grep buffers). > > Because ansi-color-process-output is in comint-output-filter-functions? Exactly.