[Top][All Lists]

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

bug#22143: 24.5; Emacs blocked on long lines.

From: Michael Heerdegen
Subject: bug#22143: 24.5; Emacs blocked on long lines.
Date: Thu, 05 Apr 2018 16:41:41 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)


(First, I don't think this is wishlist.  Isn't it a bug when an editor
can't open a file or freezes when doing so?)

In the last weeks I had to look at my .gnus.registry.eieio.  It has a
line with ~ 400000 chars in my case. Opening it with Emacs is not fun.
Searching and scrolling is all extremely sluggish.  I then realized that
something simple like

#+begin_src emacs-lisp
(add-hook 'find-file-hook
          (defun my-find-file-care-about-long-lines ()
              (when (and (search-forward-regexp ".\\{2000\\}" 50000 t)
                         (y-or-n-p "Very long lines detected - enable 
longlines-mode? "))
                (require 'longlines)
                (longlines-mode +1)))))

seems to work around the problem quite nicely (though the rest is only a
heuristic).  But

  - longlines is obsolete, and
  - this requires user configuration.

When I tried to open the .gnus.registry.eieio file with other editors in
my Debian, most froze.  "kate" OTOH warned about the extremely long line
and added line breaks automatically - AFAIU this is quite the same as
what longlines does.

If we can't solve the issue with long lines in the display code, maybe
we should do something like this by default?  Just freezing or
presenting a buffer where most actions are very sluggish is not a good
choice.  Needing to kill an editor after opening the "wrong file" is not



reply via email to

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