diff options
| author | Eli Zaretskii | 2022-06-18 13:45:13 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2022-06-18 13:45:13 +0300 |
| commit | 4b00bc47c7e07bb2a329fa6d0220f39a45289875 (patch) | |
| tree | 3ede2b39a6a405c65e09ee784fb9f7ae6385b55c | |
| parent | a82af5ae786073aa3e7af82f3d181e8b18fdd594 (diff) | |
| download | emacs-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.texi | 2 | ||||
| -rw-r--r-- | doc/emacs/trouble.texi | 139 | ||||
| -rw-r--r-- | etc/NEWS | 8 |
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 | ||
| 1184 | Dealing with Emacs Trouble | 1184 | Dealing 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 | ||
| 1196 | Reporting Bugs | 1196 | Reporting 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. | |||
| 151 | Emacs. | 151 | Emacs. |
| 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}, | ||
| 172 | which is ordinarily used to erase the last character that you typed. | ||
| 173 | In Emacs, this key is supposed to be equivalent to @key{DEL}. | ||
| 174 | |||
| 175 | When Emacs starts up on a graphical display, it determines | ||
| 176 | automatically which key should be @key{DEL}. In some unusual cases, | ||
| 177 | Emacs gets the wrong information from the system, and @key{BACKSPACE} | ||
| 178 | ends up deleting forwards instead of backwards. | ||
| 179 | |||
| 180 | Some keyboards also have a @key{Delete} key, which is ordinarily | ||
| 181 | used to delete forwards. If this key deletes backward in Emacs, that | ||
| 182 | too suggests Emacs got the wrong information---but in the opposite | ||
| 183 | sense. | ||
| 184 | |||
| 185 | On a text terminal, if you find that @key{BACKSPACE} prompts for a | ||
| 186 | Help command, like @kbd{Control-h}, instead of deleting a character, | ||
| 187 | it means that key is actually sending the @samp{BS} character. Emacs | ||
| 188 | ought 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 | ||
| 192 | command @kbd{M-x normal-erase-is-backspace-mode}. This toggles | ||
| 193 | between the two modes that Emacs supports for handling @key{DEL}, so | ||
| 194 | if Emacs starts in the wrong mode, this should switch to the right | ||
| 195 | mode. On a text terminal, if you want to ask for help when @key{BS} | ||
| 196 | is treated as @key{DEL}, use @key{F1} instead of @kbd{C-h}; @kbd{C-?} | ||
| 197 | may also work, if it sends character code 127. | ||
| 198 | |||
| 199 | To fix the problem in every Emacs session, put one of the following | ||
| 200 | lines into your initialization file (@pxref{Init File}). For the | ||
| 201 | first case above, where @key{BACKSPACE} deletes forwards instead of | ||
| 202 | backwards, 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 | ||
| 209 | For 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 | ||
| 217 | customize 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 | ||
| 220 | Customization}. | ||
| 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 |
| 526 | library and learn more about how to enable and configure it. | 469 | library 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 | ||
| 473 | enough, or if you'd rather not disable the display-related features | ||
| 474 | that @code{so-long-mode} turns off, you can instead customize the | ||
| 475 | variable @code{max-redisplay-ticks} to a non-zero value. Then Emacs | ||
| 476 | will 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 | ||
| 478 | window needs more low-level display operations than the value of this | ||
| 479 | variable. The display of the offending window will then remain | ||
| 480 | outdated, and possibly incomplete, on the screen, but Emacs should | ||
| 481 | otherwise be responsive, and you could then switch to another buffer, | ||
| 482 | or 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 | ||
| 484 | window is aborted due to this reason, the buffer shown in that window | ||
| 485 | will not have any of its windows redisplayed until the buffer is | ||
| 486 | modified or until you type @kbd{C-l} (@pxref{Recentering}) in one of | ||
| 487 | that buffer's windows. | ||
| 488 | |||
| 489 | If you decide to customize this variable to a non-zero value, we | ||
| 490 | recommend to use a value between 50,000 and 200,000, depending on your | ||
| 491 | patience and the speed of your system. The default value is zero, | ||
| 492 | which 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}, | ||
| 501 | which is ordinarily used to erase the last character that you typed. | ||
| 502 | In Emacs, this key is supposed to be equivalent to @key{DEL}. | ||
| 503 | |||
| 504 | When Emacs starts up on a graphical display, it determines | ||
| 505 | automatically which key should be @key{DEL}. In some unusual cases, | ||
| 506 | Emacs gets the wrong information from the system, and @key{BACKSPACE} | ||
| 507 | ends up deleting forwards instead of backwards. | ||
| 508 | |||
| 509 | Some keyboards also have a @key{Delete} key, which is ordinarily | ||
| 510 | used to delete forwards. If this key deletes backward in Emacs, that | ||
| 511 | too suggests Emacs got the wrong information---but in the opposite | ||
| 512 | sense. | ||
| 513 | |||
| 514 | On a text terminal, if you find that @key{BACKSPACE} prompts for a | ||
| 515 | Help command, like @kbd{Control-h}, instead of deleting a character, | ||
| 516 | it means that key is actually sending the @samp{BS} character. Emacs | ||
| 517 | ought 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 | ||
| 521 | command @kbd{M-x normal-erase-is-backspace-mode}. This toggles | ||
| 522 | between the two modes that Emacs supports for handling @key{DEL}, so | ||
| 523 | if Emacs starts in the wrong mode, this should switch to the right | ||
| 524 | mode. On a text terminal, if you want to ask for help when @key{BS} | ||
| 525 | is treated as @key{DEL}, use @key{F1} instead of @kbd{C-h}; @kbd{C-?} | ||
| 526 | may also work, if it sends character code 127. | ||
| 527 | |||
| 528 | To fix the problem in every Emacs session, put one of the following | ||
| 529 | lines into your initialization file (@pxref{Init File}). For the | ||
| 530 | first case above, where @key{BACKSPACE} deletes forwards instead of | ||
| 531 | backwards, 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 | ||
| 538 | For 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 | ||
| 546 | customize 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 | ||
| 549 | Customization}. | ||
| 550 | |||
| 528 | @node Bugs | 551 | @node Bugs |
| 529 | @section Reporting Bugs | 552 | @section Reporting Bugs |
| 530 | 553 | ||
| @@ -748,6 +748,14 @@ available options can be restored by enabling this option. | |||
| 748 | Use it if you want Imenu to forget the buffer's index alist and | 748 | Use it if you want Imenu to forget the buffer's index alist and |
| 749 | recreate it anew next time 'imenu' is invoked. | 749 | recreate it anew next time 'imenu' is invoked. |
| 750 | 750 | ||
| 751 | +++ | ||
| 752 | ** Emacs is now capable of aborting too-long redisplay processing. | ||
| 753 | This is controlled by the new variable 'max-redisplay-ticks'. If that | ||
| 754 | variable is set to a non-zero value, display of a window will be | ||
| 755 | aborted after that many low-level redisplay operations, thus | ||
| 756 | preventing Emacs from becoming wedged when visiting files with very | ||
| 757 | long lines. | ||
| 758 | |||
| 751 | * Editing Changes in Emacs 29.1 | 759 | * Editing Changes in Emacs 29.1 |
| 752 | 760 | ||
| 753 | +++ | 761 | +++ |