[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

AE.8 Abandonar y abortar

C-g
C-BREAK (MS-DOS unicamente)

Abandona: cancela un comando en ejecución o a medio teclear.

C-]

Aborta el nivel más interno de edición recursiva y cancela el comando que lo invocó (abort-recursive-edit).

ESC ESC ESC

Abandona o aborta, lo que tenga más sentido (keyboard-escape-quit).

M-x top-level

Aborta todos los niveles de edición recursiva que estén ejecutándose.

C-x u

Cancela un cambio realizado en el contenido del búfer (undo).

Hay dos maneras de cancelar comandos que no terminaron de ejecutarse: abandonar con C-g, y abortar con C-] o M-x top-level. Abandonar cancela un comando a medio teclear o uno que ya está ejecutándose. Abortar sale de un nivel de edición recursiva y cancela el comando que invocó la edición recursiva. (See section Niveles de edición recursiva.)

Abandonar con C-g se usa para descartar un comando a medio teclear, o un argumento numérico no deseado. También detiene un comando en plena ejecución en forma relativamente segura, así que puede usarlo si da accidentalmente un comando que demora mucho tiempo. En particular, es seguro abandonar el matado; su texto quedará todo en el búfer, o quedará todo en el anillo de matadas (o quizá ambos). Abandonar una búsqueda incremental tiene efectos particulares documentados en búsquedas; en general, pueden ser necesarios dos caracteres C-g consecutivos para zafarse de una búsqueda (see section Búsqueda incremental).

En MS-DOS, el carácter C-BREAK sirve como carácter de abandono como C-g. El motivo es que no es factible, en MS-DOS, reconocer un C-g mientras corre un comando, entre interacciones con el usuario. En cambio, es factible reconocer C-BREAK en todo momento. See section Teclado y ratón en MS-DOS.

C-g funciona ajustando la variable quit-flag a t en el instante que se pulsa C-g; Emacs Lisp revisa esta variable frecuentemente y abandona si no es nil. C-g sólo se ejecuta realmente como un comando si lo teclea cuando Emacs está esperando una entrada. En dicho caso, el comando que ejecuta es keyboard-quit.

Si abandona con C-g por segunda vez antes de que el primer C-g sea reconocido, ud. activa la funcionalidad de "escape de emergencia" y vuelve a la shell. See section Escape de emergencia.

There may be times when you cannot quit. When Emacs is waiting for the operating system to do something, quitting is impossible unless special pains are taken for the particular system call within Emacs where the waiting occurs. We have done this for the system calls that users are likely to want to quit from, but it's possible you will find another. In one very common case--waiting for file input or output using NFS--Emacs itself knows how to quit, but many NFS implementations simply do not allow user programs to stop waiting for NFS when the NFS server is hung.

Aborting with C-] (abort-recursive-edit) is used to get out of a recursive editing level and cancel the command which invoked it. Quitting with C-g does not do this, and could not do this, because it is used to cancel a partially typed command within the recursive editing level. Both operations are useful. For example, if you are in a recursive edit and type C-u 8 to enter a numeric argument, you can cancel that argument with C-g and remain in the recursive edit.

The command ESC ESC ESC (keyboard-escape-quit) can either quit or abort. This key was defined because ESC is used to "get out" in many PC programs. It can cancel a prefix argument, clear a selected region, or get out of a Query Replace, like C-g. It can get out of the minibuffer or a recursive edit, like C-]. It can also get out of splitting the frame into multiple windows, like C-x 1. One thing it cannot do, however, is stop a command that is running. That's because it executes as an ordinary command, and Emacs doesn't notice it until it is ready for a command.

The command M-x top-level is equivalent to "enough" C-] commands to get you out of all the levels of recursive edits that you are in. C-] gets you out one level at a time, but M-x top-level goes out all levels at once. Both C-] and M-x top-level are like all other commands, and unlike C-g, in that they take effect only when Emacs is ready for a command. C-] is an ordinary key and has its meaning only because of its binding in the keymap. @xref{Recursive Edit}.

C-x u (undo) is not strictly speaking a way of canceling a command, but you can think of it as canceling a command that already finished executing. @xref{Undo}, for more information about the undo facility.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated by Roberto on abril, 2 2007 using texi2html 1.76.