Skip to content
Permalink
Browse files

Add so-long library

* lisp/so-long.el: New library.
* doc/emacs/trouble.texi (Long Lines): New node covering so-long.el.
* doc/emacs/emacs.texi (Top): Add menu entry for the Long Lines node.
* etc/NEWS: Include under "New Modes and Packages in Emacs 27.1"
  • Loading branch information...
phil-s committed Nov 2, 2018
1 parent 04cbdde commit 4ac905f88f10439ca0795b217a046e3a62895fc4
Showing with 1,737 additions and 0 deletions.
  1. +1 −0 doc/emacs/emacs.texi
  2. +25 −0 doc/emacs/trouble.texi
  3. +8 −0 etc/NEWS
  4. +1,703 −0 lisp/so-long.el
@@ -1176,6 +1176,7 @@ Dealing with Emacs Trouble
* 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.

Reporting Bugs

@@ -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

@@ -1705,6 +1705,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

0 comments on commit 4ac905f

Please sign in to comment.
You can’t perform that action at this time.