Indiana University
University Information Technology Services
  
What are archived documents?

In Emacs or Pico, what should I do if a huge chunk of my document disappears while I'm editing?

You may have mistakenly entered the command to kill the region (C-w in Emacs or Ctrl-k in Pico). This command is used to delete a large portion of a document, usually by setting a mark, moving the cursor to another spot, then using the command to kill all the text in between the spot you marked and the spot you're now on.

In Pico, you can usually tell when you're marking text, because the marked text is highlighted, but Emacs often gives no indication that a mark has been set.

Note: Normally in Pico, Ctrl-k deletes only the current line, but it will delete a whole region if you have set a mark.

Recovering text in Emacs

To get the text back in Emacs, type C-y . If that doesn't work, try typing C-x u . You might have to type this command several times. Watch carefully so that you can stop as soon as you get back the text that you want.

Note: If you aren't sure how to enter these commands in Emacs, see In Emacs, how are keystrokes denoted?

Recovering text in Pico

To get the text back in Pico, type Ctrl-u . If that doesn't work the first time, try typing Ctrl-u several more times, watching carefully to see when the command gets back the text that you want.

At Indiana University, to get support for personal or departmental Linux or Unix systems, see At IU, how do I get support for Linux or Unix?

Also see:

This is document abjc in domain all.
Last modified on August 22, 2008.
Please tell us, did you find the answer to your question?