all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: Oleksandr Gavenko <gavenkoa@gmail.com>
Cc: 22143@debbugs.gnu.org
Subject: bug#22143: 24.5; Emacs blocked on long lines.
Date: Thu, 05 Apr 2018 16:41:41 +0200	[thread overview]
Message-ID: <87muyh4swq.fsf@web.de> (raw)
In-Reply-To: <87d1ud6kw8.fsf@gavenkoa.example.com> (Oleksandr Gavenko's message of "Fri, 11 Dec 2015 17:54:31 +0200")

Hello,

(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 ()
            (save-excursion
              (when (and (search-forward-regexp ".\\{2000\\}" 50000 t)
                         (y-or-n-p "Very long lines detected - enable longlines-mode? "))
                (require 'longlines)
                (longlines-mode +1)))))
#+end_src

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
good.


Thanks,

Michael.





  reply	other threads:[~2018-04-05 14:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-11 15:54 bug#22143: 24.5; Emacs blocked on long lines Oleksandr Gavenko
2018-04-05 14:41 ` Michael Heerdegen [this message]
2018-04-05 15:00   ` Eli Zaretskii
2018-04-05 15:20     ` Michael Heerdegen
2018-04-05 15:34       ` Eli Zaretskii
2020-08-21 13:53 ` Stefan Kangas
2020-08-21 14:01   ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87muyh4swq.fsf@web.de \
    --to=michael_heerdegen@web.de \
    --cc=22143@debbugs.gnu.org \
    --cc=gavenkoa@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.