bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#44983: Truncate long lines of grep output


From: Juri Linkov
Subject: bug#44983: Truncate long lines of grep output
Date: Tue, 01 Dec 2020 22:34:37 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

>>> Is the same problem exhibited by commands using the Xref UI? I don't
>>> remember seeing it, but of course our projects can be very different.
>> No difference from grep, Xref output has the same problem.
>
> Perhaps (setq truncate-lines t) could help in that case?

I customized truncate-lines to t long ago, and still this doesn't help
to improve performance on long lines in grep output.

> Then the lines would be cut at the window width, as you suggest below.
>
>> This will avoid the need of using such workarounds as in bug#44941:
>> grep -a "$@" | cut -c -200
>
> That might cut filenames unnecessary. Even when those a long, we need them
> in their entirety.
>
> The Grep results parsing code could be changed to only take the first XY
> characters of each line, though.

The proposed patch doesn't cut filenames, it hides only endings of long lines.
But still performance is not much better on very long lines.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]