Commit 7d9fbf90 authored by Phil Sainty's avatar Phil Sainty

Add so-long library

* lisp/so-long.el: New library
* doc/emacs/trouble.texi: Briefly describe the problem and solution
* etc/NEWS: Include under "New Modes and Packages in Emacs 27.1"
parent d64c72f5
......@@ -152,6 +152,7 @@ Emacs.
* Crashing:: What Emacs does when it crashes.
* After a Crash:: Recovering editing in an Emacs session that crashed.
* Emergency Escape:: What to do if Emacs stops responding.
* Long Lines:: Mitigating slowness due to extremely long lines.
@end menu
@node DEL Does Not Delete
......@@ -457,6 +458,30 @@ program.
emergency escape---but there are cases where it won't work, when a
system call hangs or when Emacs is stuck in a tight loop in C code.
@node Long Lines
@subsection Long Lines
@cindex long lines
For a variety of reasons (some of which are fundamental to the Emacs
redisplay code and the complex range of possibilities it handles;
others of which are due to modes and features which do not scale well
in unusual circumstances), Emacs can perform poorly when extremely
long lines are present (where ``extremely long'' usually means at
least many thousands of characters).
A particular problem is that Emacs may ``hang'' for a long time at
the point of visiting a file with extremely long lines, and this case
can be mitigated by enabling the @file{so-long} library, which detects
when a visited file contains abnormally long lines, and takes steps to
disable features which are liable to cause slowness in that situation.
This library can also significantly improve performance when moving
and editing in such a buffer -- performance is still likely to degrade
as you get deeper into the long lines, but the improvements can
nevertheless be substantial.
Use @kbd{M-x so-long-commentary} to view the documentation for this
library and learn how to enable and configure it.
@node Bugs
@section Reporting Bugs
......@@ -1653,6 +1653,14 @@ expansion to backtrace buffers produced by the Lisp debugger, Edebug
and ERT. See the node "(elisp) Backtraces" in the Elisp manual for
documentation of the new mode and its commands.
** so-long.el helps to mitigate performance problems with long lines.
When 'global-so-long-mode' has been enabled, visiting a file with very
long lines will (subject to configuration) cause the user's preferred
'so-long-action' to be automatically invoked (by default, the buffer's
major mode is replaced by 'so-long-mode'). In extreme cases this can
prevent delays of several minutes, and make Emacs responsive almost
immediately. Type 'M-x so-long-commentary' for full documentation.
* Incompatible Lisp Changes in Emacs 27.1
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment