aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2022-06-18 13:45:13 +0300
committerEli Zaretskii2022-06-18 13:45:13 +0300
commit4b00bc47c7e07bb2a329fa6d0220f39a45289875 (patch)
tree3ede2b39a6a405c65e09ee784fb9f7ae6385b55c
parenta82af5ae786073aa3e7af82f3d181e8b18fdd594 (diff)
downloademacs-4b00bc47c7e07bb2a329fa6d0220f39a45289875.tar.gz
emacs-4b00bc47c7e07bb2a329fa6d0220f39a45289875.zip
Update documentation
* doc/emacs/trouble.texi (DEL Does Not Delete): Move to the end of the chapter. This issue is no longer frequent or important as it was back in Emacs 20 days. (Long Lines): Document 'max-redisplay-ticks'. * doc/emacs/emacs.texi (Top): Update the detailed menu. * etc/NEWS: Announce 'max-redisplay-ticks'.
-rw-r--r--doc/emacs/emacs.texi2
-rw-r--r--doc/emacs/trouble.texi139
-rw-r--r--etc/NEWS8
3 files changed, 90 insertions, 59 deletions
diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi
index ad0fa5f0cd0..5e72699bbe8 100644
--- a/doc/emacs/emacs.texi
+++ b/doc/emacs/emacs.texi
@@ -1183,7 +1183,6 @@ The Emacs Initialization File
1183 1183
1184Dealing with Emacs Trouble 1184Dealing with Emacs Trouble
1185 1185
1186* DEL Does Not Delete:: What to do if @key{DEL} doesn't delete.
1187* Stuck Recursive:: '[...]' in mode line around the parentheses. 1186* Stuck Recursive:: '[...]' in mode line around the parentheses.
1188* Screen Garbled:: Garbage on the screen. 1187* Screen Garbled:: Garbage on the screen.
1189* Text Garbled:: Garbage in the text. 1188* Text Garbled:: Garbage in the text.
@@ -1192,6 +1191,7 @@ Dealing with Emacs Trouble
1192* After a Crash:: Recovering editing in an Emacs session that crashed. 1191* After a Crash:: Recovering editing in an Emacs session that crashed.
1193* Emergency Escape:: What to do if Emacs stops responding. 1192* Emergency Escape:: What to do if Emacs stops responding.
1194* Long Lines:: Mitigating slowness due to extremely long lines. 1193* Long Lines:: Mitigating slowness due to extremely long lines.
1194* DEL Does Not Delete:: What to do if @key{DEL} doesn't delete.
1195 1195
1196Reporting Bugs 1196Reporting Bugs
1197 1197
diff --git a/doc/emacs/trouble.texi b/doc/emacs/trouble.texi
index 8da96de1cb4..75b97ac6a84 100644
--- a/doc/emacs/trouble.texi
+++ b/doc/emacs/trouble.texi
@@ -151,7 +151,6 @@ garbled displays, running out of memory, and crashes and hangs.
151Emacs. 151Emacs.
152 152
153@menu 153@menu
154* DEL Does Not Delete:: What to do if @key{DEL} doesn't delete.
155* Stuck Recursive:: '[...]' in mode line around the parentheses. 154* Stuck Recursive:: '[...]' in mode line around the parentheses.
156* Screen Garbled:: Garbage on the screen. 155* Screen Garbled:: Garbage on the screen.
157* Text Garbled:: Garbage in the text. 156* Text Garbled:: Garbage in the text.
@@ -160,65 +159,9 @@ Emacs.
160* After a Crash:: Recovering editing in an Emacs session that crashed. 159* After a Crash:: Recovering editing in an Emacs session that crashed.
161* Emergency Escape:: What to do if Emacs stops responding. 160* Emergency Escape:: What to do if Emacs stops responding.
162* Long Lines:: Mitigating slowness due to extremely long lines. 161* Long Lines:: Mitigating slowness due to extremely long lines.
162* DEL Does Not Delete:: What to do if @key{DEL} doesn't delete.
163@end menu 163@end menu
164 164
165@node DEL Does Not Delete
166@subsection If @key{DEL} Fails to Delete
167@cindex @key{DEL} vs @key{BACKSPACE}
168@cindex @key{BACKSPACE} vs @key{DEL}
169@cindex @key{DEL} does not delete
170
171 Every keyboard has a large key, usually labeled @key{BACKSPACE},
172which is ordinarily used to erase the last character that you typed.
173In Emacs, this key is supposed to be equivalent to @key{DEL}.
174
175 When Emacs starts up on a graphical display, it determines
176automatically which key should be @key{DEL}. In some unusual cases,
177Emacs gets the wrong information from the system, and @key{BACKSPACE}
178ends up deleting forwards instead of backwards.
179
180 Some keyboards also have a @key{Delete} key, which is ordinarily
181used to delete forwards. If this key deletes backward in Emacs, that
182too suggests Emacs got the wrong information---but in the opposite
183sense.
184
185 On a text terminal, if you find that @key{BACKSPACE} prompts for a
186Help command, like @kbd{Control-h}, instead of deleting a character,
187it means that key is actually sending the @samp{BS} character. Emacs
188ought to be treating @key{BS} as @key{DEL}, but it isn't.
189
190@findex normal-erase-is-backspace-mode
191 In all of those cases, the immediate remedy is the same: use the
192command @kbd{M-x normal-erase-is-backspace-mode}. This toggles
193between the two modes that Emacs supports for handling @key{DEL}, so
194if Emacs starts in the wrong mode, this should switch to the right
195mode. On a text terminal, if you want to ask for help when @key{BS}
196is treated as @key{DEL}, use @key{F1} instead of @kbd{C-h}; @kbd{C-?}
197may also work, if it sends character code 127.
198
199 To fix the problem in every Emacs session, put one of the following
200lines into your initialization file (@pxref{Init File}). For the
201first case above, where @key{BACKSPACE} deletes forwards instead of
202backwards, use this line to make @key{BACKSPACE} act as @key{DEL}:
203
204@lisp
205(normal-erase-is-backspace-mode 0)
206@end lisp
207
208@noindent
209For the other two cases, use this line:
210
211@lisp
212(normal-erase-is-backspace-mode 1)
213@end lisp
214
215@vindex normal-erase-is-backspace
216 Another way to fix the problem for every Emacs session is to
217customize the variable @code{normal-erase-is-backspace}: the value
218@code{t} specifies the mode where @key{BS} or @key{BACKSPACE} is
219@key{DEL}, and @code{nil} specifies the other mode. @xref{Easy
220Customization}.
221
222@node Stuck Recursive 165@node Stuck Recursive
223@subsection Recursive Editing Levels 166@subsection Recursive Editing Levels
224@cindex stuck in recursive editing 167@cindex stuck in recursive editing
@@ -525,6 +468,86 @@ be substantial.
525 Use @kbd{M-x so-long-commentary} to view the documentation for this 468 Use @kbd{M-x so-long-commentary} to view the documentation for this
526library and learn more about how to enable and configure it. 469library and learn more about how to enable and configure it.
527 470
471@vindex max-redisplay-ticks
472 If even @code{so-long-mode} doesn't help making Emacs responsive
473enough, or if you'd rather not disable the display-related features
474that @code{so-long-mode} turns off, you can instead customize the
475variable @code{max-redisplay-ticks} to a non-zero value. Then Emacs
476will abort redisplay of a window and commands, like @kbd{C-n} and
477@kbd{M-v}, which use the display code to do their job, if processing a
478window needs more low-level display operations than the value of this
479variable. The display of the offending window will then remain
480outdated, and possibly incomplete, on the screen, but Emacs should
481otherwise be responsive, and you could then switch to another buffer,
482or kill the problematic buffer, or turn on @code{so-long-mode} or
483@code{sol-long-minor-mode} in that buffer. When the display of a
484window is aborted due to this reason, the buffer shown in that window
485will not have any of its windows redisplayed until the buffer is
486modified or until you type @kbd{C-l} (@pxref{Recentering}) in one of
487that buffer's windows.
488
489 If you decide to customize this variable to a non-zero value, we
490recommend to use a value between 50,000 and 200,000, depending on your
491patience and the speed of your system. The default value is zero,
492which disables this feature.
493
494@node DEL Does Not Delete
495@subsection If @key{DEL} Fails to Delete
496@cindex @key{DEL} vs @key{BACKSPACE}
497@cindex @key{BACKSPACE} vs @key{DEL}
498@cindex @key{DEL} does not delete
499
500 Every keyboard has a large key, usually labeled @key{BACKSPACE},
501which is ordinarily used to erase the last character that you typed.
502In Emacs, this key is supposed to be equivalent to @key{DEL}.
503
504 When Emacs starts up on a graphical display, it determines
505automatically which key should be @key{DEL}. In some unusual cases,
506Emacs gets the wrong information from the system, and @key{BACKSPACE}
507ends up deleting forwards instead of backwards.
508
509 Some keyboards also have a @key{Delete} key, which is ordinarily
510used to delete forwards. If this key deletes backward in Emacs, that
511too suggests Emacs got the wrong information---but in the opposite
512sense.
513
514 On a text terminal, if you find that @key{BACKSPACE} prompts for a
515Help command, like @kbd{Control-h}, instead of deleting a character,
516it means that key is actually sending the @samp{BS} character. Emacs
517ought to be treating @key{BS} as @key{DEL}, but it isn't.
518
519@findex normal-erase-is-backspace-mode
520 In all of those cases, the immediate remedy is the same: use the
521command @kbd{M-x normal-erase-is-backspace-mode}. This toggles
522between the two modes that Emacs supports for handling @key{DEL}, so
523if Emacs starts in the wrong mode, this should switch to the right
524mode. On a text terminal, if you want to ask for help when @key{BS}
525is treated as @key{DEL}, use @key{F1} instead of @kbd{C-h}; @kbd{C-?}
526may also work, if it sends character code 127.
527
528 To fix the problem in every Emacs session, put one of the following
529lines into your initialization file (@pxref{Init File}). For the
530first case above, where @key{BACKSPACE} deletes forwards instead of
531backwards, use this line to make @key{BACKSPACE} act as @key{DEL}:
532
533@lisp
534(normal-erase-is-backspace-mode 0)
535@end lisp
536
537@noindent
538For the other two cases, use this line:
539
540@lisp
541(normal-erase-is-backspace-mode 1)
542@end lisp
543
544@vindex normal-erase-is-backspace
545 Another way to fix the problem for every Emacs session is to
546customize the variable @code{normal-erase-is-backspace}: the value
547@code{t} specifies the mode where @key{BS} or @key{BACKSPACE} is
548@key{DEL}, and @code{nil} specifies the other mode. @xref{Easy
549Customization}.
550
528@node Bugs 551@node Bugs
529@section Reporting Bugs 552@section Reporting Bugs
530 553
diff --git a/etc/NEWS b/etc/NEWS
index 424d1250c33..fa54d68a10f 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -748,6 +748,14 @@ available options can be restored by enabling this option.
748Use it if you want Imenu to forget the buffer's index alist and 748Use it if you want Imenu to forget the buffer's index alist and
749recreate it anew next time 'imenu' is invoked. 749recreate it anew next time 'imenu' is invoked.
750 750
751+++
752** Emacs is now capable of aborting too-long redisplay processing.
753This is controlled by the new variable 'max-redisplay-ticks'. If that
754variable is set to a non-zero value, display of a window will be
755aborted after that many low-level redisplay operations, thus
756preventing Emacs from becoming wedged when visiting files with very
757long lines.
758
751* Editing Changes in Emacs 29.1 759* Editing Changes in Emacs 29.1
752 760
753+++ 761+++