summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorGregory Heytings <gregory@heytings.org>2022-07-08 23:36:18 +0200
committerGregory Heytings <gregory@heytings.org>2022-07-08 23:36:18 +0200
commit60e51595c8a89ffc34dbe0d36c75d1c119a7d5c5 (patch)
treee9736bab9374cbe83431fc70f499b51ae1c92313 /doc
parente31cffb5abfe68b62047532765a2076ac4885475 (diff)
downloademacs-60e51595c8a89ffc34dbe0d36c75d1c119a7d5c5.tar.gz
Revert commit 38b3780f6e.
Diffstat (limited to 'doc')
-rw-r--r--doc/emacs/display.texi25
-rw-r--r--doc/emacs/emacs.texi1
-rw-r--r--doc/emacs/trouble.texi59
3 files changed, 60 insertions, 25 deletions
diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi
index 9fe9533e88c..cadac7e4538 100644
--- a/doc/emacs/display.texi
+++ b/doc/emacs/display.texi
@@ -19,8 +19,6 @@ the text is displayed.
* Horizontal Scrolling:: Moving text left and right in a window.
* Narrowing:: Restricting display and editing to a portion
of the buffer.
-* Auto-Narrowing:: Automatically restrict display to a portion of
- the buffer.
* View Mode:: Viewing read-only buffers.
* Follow Mode:: Follow mode lets two windows scroll as one.
* Faces:: How to change the display style using faces.
@@ -469,29 +467,6 @@ this command asks for confirmation and gives you the option of enabling it;
if you enable the command, confirmation will no longer be required for
it. @xref{Disabling}.
-@node Auto-Narrowing
-@findex auto-narrow-mode
-@vindex auto-narrow-long-line-threshold
-@vindex auto-narrow-display-length
-@vindex auto-narrow-widen-automatically
-
- When a file with extremely long lines is opened or inserted in a
-buffer, Emacs automatically enters auto-narrow mode, and the word
-@samp{Auto-Narrow} appears in the mode line. This means that Emacs
-restricts display, but not editing, to a portion of the buffer above
-and below point. All editing commands, including narrowing commands,
-remain available, and they act on the whole buffer. For example,
-@kbd{M->} moves point to the end of the buffer, and not, as would
-happen with ordinary narrowing, to the end of the portion of the
-buffer to which display is currently restricted.
-
- The behavior of auto-narrow mode is controlled by three variables:
-@code{auto-narrow-long-line-threshold} is the line length above which
-auto-narrow move is entered, @code{auto-narrow-display-length} is the
-number of characters to which display is restricted, and
-@code{auto-narrow-widen-automatically} is a list of commands for which
-display is widened before they are executed.
-
@node View Mode
@section View Mode
@cindex View mode
diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi
index b43c966f872..5e72699bbe8 100644
--- a/doc/emacs/emacs.texi
+++ b/doc/emacs/emacs.texi
@@ -1190,6 +1190,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.
* DEL Does Not Delete:: What to do if @key{DEL} doesn't delete.
Reporting Bugs
diff --git a/doc/emacs/trouble.texi b/doc/emacs/trouble.texi
index 887e5c6170f..f06b93759d8 100644
--- a/doc/emacs/trouble.texi
+++ b/doc/emacs/trouble.texi
@@ -158,6 +158,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.
* DEL Does Not Delete:: What to do if @key{DEL} doesn't delete.
@end menu
@@ -432,6 +433,64 @@ 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).
+
+@cindex @code{so-long} mode
+@findex global-so-long-mode
+@vindex so-long-action
+ A particular problem is that Emacs may ``hang'' for a long time at
+the point of visiting a file with extremely long lines. This 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.
+To enable this library, type @kbd{M-x global-so-long-mode @key{RET}},
+or turn on the @code{global-so-long-mode} in your init file
+(@pxref{Init File}), or customize the @code{global-so-long-mode}
+option. You can tailor this mode's operation by customizing the
+variable @code{so-long-action}.
+
+ The @file{so-long} library can also significantly improve
+performance when moving and editing in a buffer with long lines.
+Performance is still likely to degrade as you get deeper into the long
+lines, but the improvements from using this library can nevertheless
+be substantial.
+
+@findex so-long-commentary
+ Use @kbd{M-x so-long-commentary} to view the documentation for this
+library and learn more about how to enable and configure it.
+
+@vindex max-redisplay-ticks
+ If even @code{so-long-mode} doesn't help making Emacs responsive
+enough, or if you'd rather not disable the display-related features
+that @code{so-long-mode} turns off, you can instead customize the
+variable @code{max-redisplay-ticks} to a non-zero value. Then Emacs
+will abort redisplay of a window and commands, like @kbd{C-n} and
+@kbd{M-v}, which use the display code to do their job, if processing a
+window needs more low-level display operations than the value of this
+variable. The display of the offending window will then remain
+outdated, and possibly incomplete, on the screen, but Emacs should
+otherwise be responsive, and you could then switch to another buffer,
+or kill the problematic buffer, or turn on @code{so-long-mode} or
+@code{so-long-minor-mode} in that buffer. When the display of a
+window is aborted due to this reason, the buffer shown in that window
+will not have any of its windows redisplayed until the buffer is
+modified or until you type @kbd{C-l} (@pxref{Recentering}) in one of
+that buffer's windows.
+
+ If you decide to customize this variable to a non-zero value, we
+recommend to use a value between 100,000 and 1,000,000, depending on
+your patience and the speed of your system. The default value is
+zero, which disables this feature.
+
@node DEL Does Not Delete
@subsection If @key{DEL} Fails to Delete
@cindex @key{DEL} vs @key{BACKSPACE}