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

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

bug#46859: closed (28.0.50; [PATCH]: Add option to truncate long lines i


From: GNU bug Tracking System
Subject: bug#46859: closed (28.0.50; [PATCH]: Add option to truncate long lines in xref.el)
Date: Tue, 18 May 2021 00:41:01 +0000

Your message dated Tue, 18 May 2021 03:39:53 +0300
with message-id <01ad60b1-950c-b8bb-7384-23e5482ecc58@yandex.ru>
and subject line Re: bug#46859: 28.0.50; [PATCH]: Add option to truncate long 
lines in xref.el
has caused the debbugs.gnu.org bug report #46859,
regarding 28.0.50; [PATCH]: Add option to truncate long lines in xref.el
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
46859: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=46859
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: 28.0.50; [PATCH]: Add option to truncate long lines in xref.el Date: Mon, 01 Mar 2021 21:40:50 +0100
Hi!

When using the xref buffer, especially in combination with
'project-find-regexp', sometimes my projects has huge one-line
files. The simplest example of these kind of files are the minified
".js" files that are compiled. Right now I have one at 500 000 columns,
which admittedly is a lot. However, when 'project-find-regexp' searches
these files and finds a hit in one of them, the search takes a long
time. In addition, navigating the xref buffer when the results show up
also takes a long time, because of the troubles emacs has with long
lines.

Before the supplied patch, one search with 'project-find-regexp' with
ripgrep enabled takes around 3-4 seconds. With the supplied patch, the
search is almost instantaneous.

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§

Have a nice day,

--
Theodor Thornhill

Attachment: 0001-Add-option-to-truncate-long-lines.patch
Description: Text Data


--- End Message ---
--- Begin Message --- Subject: Re: bug#46859: 28.0.50; [PATCH]: Add option to truncate long lines in xref.el Date: Tue, 18 May 2021 03:39:53 +0300 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1
Version: 28.1

On 17.05.2021 19:57, Theodor Thornhill wrote:
Hi and sorry for the late reply,

I was looking for some user experience feedback (with possible subsequent 
tweaks, etc), but the current behavior is indeed annoying enough to install 
this anyway.

Agreed. When testing I found it to be a nice improvement.

Very good.

I've pushed an updated version in d83db639d3:

- It make sure not to hide the line number with the ellipsis anymore.
- The option was renamed to xref-truncation-width.
- It can be set to nil to disable the feature.

Please try the new version when you have the time.


--- End Message ---

reply via email to

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