Commands for English Text Commands for English Text

JOVE has many commands that work on the basic units of English text: words, sentences and paragraphs. Word Commands Word Commands

JOVE has commands for moving over or operating on words. By convention, they are all ESC commands.

ESC F
    Move Forward over a word.

ESC B
    Move Backward over a word.

ESC D
    Kill forward to the end of a word.

ESC DEL
    Kill backward to the beginning of a word.

Notice how these commands form a group that parallels the character- based commands, C-F, C-B, C-D, and DEL.

The commands ESC F and ESC B move forward and backward over words. They are thus analogous to Control-F and Control-B, which move over single characters. Like their Control- analogues, ESC F and ESC B move several words if given an argument. ESC F with a negative argument moves backward like ESC B, and ESC B with a negative argument moves forward. Forward motion stops right after the last letter of the word, while backward motion stops right before the first letter.

It is easy to kill a word at a time. ESC D kills the word after point. To be precise, it kills everything from point to the place ESC F would move to. Thus, if point is in the middle of a word, only the part after point is killed. If some punctuation comes after point, and before the next word, it is killed along with the word. If you wish to kill only the next word but not the punctuation, simply do ESC F to get to the end, and kill the word backwards with ESC DEL. ESC D takes arguments just like ESC F.

ESC DEL kills the word before point. It kills everything from point back to where ESC B would move to. If point is after the space in "FOO, BAR", then "FOO, " is killed. If you wish to kill just "FOO", then do a ESC B and a ESC D instead of a ESC DEL. Sentence Commands Sentence Commands

The JOVE commands for manipulating sentences and paragraphs are mostly ESC commands, so as to resemble the word-handling commands.

ESC A
    Move back to the beginning of the sentence.

ESC E
    Move forward to the end of the sentence.

ESC K
    Kill forward to the end of the sentence.

C-X DEL
    Kill back to the beginning of the sentence.

The commands ESC A and ESC E move to the beginning and end of the current sentence, respectively. They were chosen to resemble Control-A and Control-E, which move to the beginning and end of a line. Unlike them, ESC A and ESC E if repeated or given numeric arguments move over successive sentences. JOVE considers a sentence to end wherever there is a ".", "?", or "!" followed by the end of a line or by one or more spaces. Neither ESC A nor ESC E moves past the end of the line or spaces which delimit the sentence.

Just as C-A and C-E have a kill command, C-K, to go with them, so ESC A and ESC E have a corresponding kill command ESC K which kills from point to the end of the sentence. With minus one as an argument it kills back to the beginning of the sentence. Positive arguments serve as a repeat count.

There is a special command, C-X DEL for killing back to the beginning of a sentence, because this is useful when you change your mind in the middle of composing text. Paragraph Commands Paragraph Commands

The JOVE commands for handling paragraphs are

ESC [
    Move back to previous paragraph beginning.

ESC ]
    Move forward to next paragraph end.

ESC [ moves to the beginning of the current or previous paragraph, while ESC ] moves to the end of the current or next paragraph. Paragraphs are delimited by lines of differing indent, or lines with text formatter commands, or blank lines. JOVE knows how to deal with most indented paragraphs correctly, although it can get confused by one- or two-line paragraphs delimited only by indentation. Text Indentation Commands Text Indentation Commands

Tab Indent "appropriately" in a mode-dependent fashion.

LineFeed
    Is the same as Return, except it copies the indent of the line you just left.

ESC M
    Moves to the line's first non-blank character.

The way to request indentation is with the Tab command. Its precise effect depends on the major mode. In Text mode, it indents to the next tab stop. In C mode, it indents to the "right" position for C programs.

To move over the indentation on a line, do ESC M (first-non-blank). This command, given anywhere on a line, positions the cursor at the first non-blank, non-tab character on the line. Text Filling Text Filling

Auto Fill mode causes text to be filled (broken up into lines that fit in a specified width) automatically as you type it in. If you alter existing text so that it is no longer properly filled, JOVE can fill it again if you ask.

Entering Auto Fill mode is done with ESC X auto-fill-mode. From then on, lines are broken automatically at spaces when they get longer than the desired width. To leave Auto Fill mode, once again execute ESC X auto-fill-mode. When Auto Fill mode is in effect, the word Fill appears in the mode line.

If you edit the middle of a paragraph, it may no longer correctly be filled. To refill a paragraph, use the command ESC J (fill-paragraph). It causes the paragraph that point is inside to be filled. All the line breaks are removed and new ones inserted where necessary.

The maximum line width for filling is in the variable right-margin. Both ESC J and auto-fill make sure that no line exceeds this width. The value of right-margin is initially 78.

Normally ESC J figures out the indent of the paragraph and uses that same indent when filling. If you want to change the indent of a paragraph you set left-margin to the new position and type C-U ESC J. fill-paragraph, when supplied a numeric argument, uses the value of left-margin.

If you know where you want to set the right margin but you don't know the actual value, move to where you want to set the value and use the right-margin-here command. left-margin-here does the same for the left-margin variable. Case Conversion Commands Case Conversion Commands

ESC L
    Convert following word to lower case.

ESC U
    Convert following word to upper case.

ESC C
    Capitalize the following word.

The word conversion commands are most useful. ESC L converts the word after point to lower case, moving past it. Thus, successive ESC L's convert successive words. ESC U converts to all capitals instead, while ESC C puts the first letter of the word into upper case and the rest into lower case. All these commands convert several words at once if given an argument. They are especially convenient for converting a large amount of text from all upper case to mixed case, because you can move through the test using ESC L, ESC U or ESC C on each word as appropriate.

When given a negative argument, the word case conversion commands apply to the appropriate number of words before point, but do not move point. This is convenient when you have just typed a word in the wrong case. You can give the case conversion command and continue typing.

If a word case conversion command is given in the middle of a word, it applies only to the part of the word which follows the cursor, treating it as a whole word.

The other case conversion functions are case-region-upper and case-region-lower, which convert everything between point and mark to the specified case. Point and mark remain unchanged. Commands for Fixing Typos Commands for Fixing Typos

In this section we describe the commands that are especially useful for the times when you catch a mistake on your text after you have made it, or change your mind while composing text on line.

DEL Delete last character.

ESC DEL
    Kill last word.

C-X DEL
    Kill to beginning of sentence.

C-T Transpose two characters.

C-X C-T
    Transpose two lines.

ESC Minus ESC L
    Convert last word to lower case.

ESC Minus ESC U
    Convert last word to upper case.

ESC Minus ESC C
    Convert last word to lower case with capital initial.

Killing Your Mistakes Killing Your Mistakes

The DEL command is the most important correction command. When used among printing (self-inserting) characters, it can be thought of as canceling the last character typed.

When your mistake is longer than a couple of characters, it might be more convenient to use ESC DEL or C-X DEL. ESC DEL kills back to the start of the last word, and C-X DEL kills back to the start of the last sentence. C-X DEL is particularly useful when you are thinking of what to write as you type it, in case you change your mind about phrasing. ESC DEL and C-X DEL save the killed text for C-Y and ESC Y to retrieve.

ESC DEL is often useful even when you have typed only a few characters wrong, if you know you are confused in your typing and aren't sure what you typed. At such a time, you cannot correct with DEL except by looking at the screen to see what you did. It requires less thought to kill the whole word and start over again, especially if the system is heavily loaded.

If you were typing a command or command parameters, C-G will abort the command with no further processing. Transposition Transposition

The common error of transposing two characters can be fixed with the C-T (transpose-characters) command. Normally, C-T transposes the two characters on either side of the cursor and moves the cursor forward one character. Repeating the command several times "drags" a character to the right. (Remember that point is considered to be between two characters, even though the visible cursor in your terminal is on only one of them.) When given at the end of a line, rather than switching the last character of the line with the line separator, which would be useless, C-T transposes the last two characters on the line. So, if you catch your transposition error right away, you can fix it with just a C-T. If you don't catch it so fast, you must move the cursor back to between the two characters.

To transpose two lines, use the C-X C-T (transpose-lines) command. The line containing the cursor is exchanged with the line above it; the cursor is left at the beginning of the line following its original position. Checking and Correcting Spelling Checking and Correcting Spelling

When you write a paper, you should correct its spelling at some point close to finishing it. To correct the entire buffer, do ESC X spell-buffer. This invokes the spell program, which prints a list of all the misspelled words. JOVE catches the list and places it in a JOVE buffer called Spell. You are given an opportunity to delete from that buffer any words that aren't really errors; then JOVE looks up each misspelled word and remembers where it is in the buffer being corrected. Then you can go forward to each misspelled word with C-X C-N (next-error) and backward with C-X C-P (previous-error). See the section entitled Error Message Parsing. File Handling File Handling

The basic unit of stored data is the file. Each program, each paper, lives usually in its own file. To edit a program or paper, the editor must be told the name of the file that contains it. This is called visiting a file. To make your changes to the file permanent on disk, you must save the file. Visiting Files Visiting Files

C-X C-V
    Visit a file.

C-X C-R
    Same as C-X C-V.

C-X C-S
    Save the visited file.

ESC ~
    Tell JOVE to forget that the buffer has been changed.

Visiting a file means copying its contents into JOVE where you can edit them. JOVE remembers the name of the file you visited. Unless you use the multiple buffer feature of JOVE, you can only be visiting one file at a time. The name of the current selected buffer is visible in the mode line.

The changes you make with JOVE are made in a copy inside JOVE. The file itself is not changed. The changed text is not permanent until you save it in a file. The first time you change the text, an asterisk appears at the end of the mode line; this indicates that the text contains fresh changes which will be lost unless you save them.

To visit a file, use the command C-X C-V. Follow the command with the name of the file you wish to visit, terminated by a Return. You can abort the command by typing C-G, or edit the filename with many of the standard JOVE commands (e.g., C-A, C-E, C-F, ESC F, ESC DEL). If the filename you wish to visit is similar to the filename in the mode line (the default filename), you can type C-R to insert the default and then edit it. If you do type a Return to finish the command, the new file's text appears on the screen, and its name appears in the mode line. In addition, its name becomes the new default filename.

If you wish to save the file and make your changes permanent, type C-X C-S. After the save is finished, C-X C-S prints the filename and the number of characters and lines that it wrote to the file. If there are no changes to save (no asterisk at the end of the mode line), the file is not saved; otherwise the changes saved and the asterisk at the end of the mode line will disappear.

What if you want to create a file? Just visit it. JOVE prints (New file) but aside from that behaves as if you had visited an existing empty file. If you make any changes and save them, the file is created. If you visit a nonexistent file unintentionally (because you typed the wrong filename), go ahead and visit the file you meant. If you don't save the unwanted file, it is not created.

If you alter one file and then visit another in the same buffer, JOVE offers to save the old one. If you answer YES, the old file is saved; if you answer NO, all the changes you have made to it since the last save are lost. You should not type ahead after a file visiting command, because your type-ahead might answer an unexpected question in a way that you would regret.

Sometimes you will change a buffer by accident. Even if you undo the effect of the change by editing, JOVE still knows that "the buffer has been changed". You can tell JOVE to pretend that there have been no changes with the ESC ~ command (make-buffer-unmodified). This command simply clears the "modified" flag which says that the buffer contains changes which need to be saved. Even if the buffer really is changed JOVE will still act as if it were not.

If JOVE is about to save a file and sees that the date of the version on disk does not match what JOVE last read or wrote, JOVE notifies you of this fact, and asks what to do, because this probably means that something is wrong. For example, somebody else may have been editing the same file. If this is so, there is a good chance that your work or his work will be lost if you don't take the proper steps. You should first find out exactly what is going on. If you determine that somebody else has modified the file, save your file under a different filename and then DIFF the two files to merge the two sets of changes. (The "patch" command is useful for applying the results of context diffs directly). Also get in touch with the other person so that the files don't diverge any further. How to Undo Drastic Changes to a File How to Undo Drastic Changes to a File

If you have made several extensive changes to a file and then change your mind about them, and you haven't yet saved them, you can get rid of them by reading in the previous version of the file. You can do this with the C-X C-V command, to visit the unsaved version of the file. Recovering from system/editor crashes Recovering from system/editor crashes

JOVE does not have Auto Save mode, but it does provide a way to recover your work in the event of a system or editor crash. JOVE saves information about the files you're editing every so many changes to a buffer to make recovery possible. Since a relatively small amount of information is involved it's hardly even noticeable when JOVE does this. The variable "sync-frequency" says how often to save the necessary information, and the default is every 50 changes. 50 is a very reasonable number: if you are writing a paper you will not lose more than the last 50 characters you typed, which is less than the average length of a line. Miscellaneous File Operations Miscellaneous File Operations

ESC X write-file <file><return> writes the contents of the buffer into the file <file>, and then visits that file. It can be thought of as a way of "changing the name" of the file you are visiting. Unlike C-X C-S, write-file saves even if the buffer has not been changed. C-X C-W is another way of getting this command.

ESC X insert-file <file><return> inserts the contents of <file> into the buffer at point, leaving point unchanged before the contents. You can also use C-X C-I to get this command.

ESC X write-region <file><return> writes the region (the text between point and mark) to the specified file. It does not set the visited filename. The buffer is not changed.

ESC X append-region <file><return> appends the region to <file>. The text is added to the end of <file>. Using Multiple Buffers Using Multiple Buffers

When we speak of "the buffer", which contains the text you are editing, we have given the impression that there is only one. In fact, there may be many of them, each with its own body of text. At any time only one buffer can be selected and available for editing, but it isn't hard to switch to a different one. Each buffer individually remembers which file it is visiting, what modes are in effect, and whether there are any changes that need saving.

C-X B
    Select or create a buffer.

C-X C-F
    Visit a file in its own buffer.

C-X C-B
    List the existing buffers.

C-X K
    Kill a buffer.

Each buffer in JOVE has a single name, which normally doesn't change. A buffer's name can be any length. The name of the currently selected buffer and the name of the file visited in it are visible in the mode line when you are at top level. A newly started JOVE has only one buffer, named Main, unless you specified files to edit in the shell command that started JOVE. Creating and Selecting Buffers Creating and Selecting Buffers

To create a new buffer, you need only think of a name for it (say, FOO) and then do C-X B FOO<return>, which is the command C-X B (select-buffer) followed by the name. This makes a new, empty buffer (if one by that name didn't previously exist) and selects it for editing. The new buffer is not visiting any file, so if you try to save it you will be asked for the filename to use. Each buffer has its own major mode; the new buffer's major mode is Text mode by default.

To return to buffer FOO later after having switched to another, the same command C-X B FOO<return> is used, since C-X B can tell whether a buffer named FOO exists already or not. C-X B Main<return> reselects the buffer Main that JOVE started out with. Just C-X B<return> reselects the previous buffer. Repeated C-X B<return>'s alternate between the last two buffers selected.

You can also read a file into its own newly created buffer, all with one command: C-X C-F (find-file), followed by the filename. The name of the buffer is the last element of the file's pathname. C-F stands for "Find", because if the specified file already resides in a buffer in your JOVE, that buffer is reselected. So you need not remember whether you have brought the file in already or not. A buffer created by C-X C-F can be reselected later with C-X B or C-X C-F, whichever you find more convenient. Nonexistent files can be created with C-X C-F just as they can with C-X C-V. Using Existing Buffers Using Existing Buffers

To get a list of all the buffers that exist, do C-X C-B (list-buffers). Each buffer's type, name, and visited filename is printed. An asterisk before the buffer name indicates a buffer which contains changes that have not been saved. The number that appears at the beginning of a line in a C-X C-B listing is that buffer's buffer number. You can select a buffer by typing its number in place of its name. If a buffer with that number doesn't already exist, a new buffer is created with that number as its name.

If several buffers have modified text in them, you should save some of them with C-X C-M (write-modified-files). This finds all the buffers that need saving and then saves them. Saving the buffers this way is much easier and more efficient (but more dangerous) than selecting each one and typing C-X C-S. If you give C-X C-M an argument, JOVE will ask for confirmation before saving each buffer.

ESC X rename-buffer <new name><return> changes the name of the currently selected buffer.

ESC X erase-buffer <buffer name><return> erases the contents of the <buffer name> without deleting the buffer entirely. Killing Buffers Killing Buffers

After you use a JOVE for a while, it may fill up with buffers which you no longer need. Eventually you can reach a point where trying to create any more results in an "out of memory" or "out of lines" error. When this happens you will want to kill some buffers with the C-X K (delete-buffer) command. You can kill the buffer FOO by doing C-X K FOO<return>. If you type C-X K <return> JOVE will kill the previously selected buffer. If you try to kill a buffer that needs saving JOVE will ask you to confirm it.

If you need to kill several buffers, use the command kill-some-buffers. This prompts you with the name of each buffer and asks for confirmation before killing that buffer. Controlling the Display Controlling the Display

Since only part of a large file will fit on the screen, JOVE tries to show the part that is likely to be interesting. The display control commands allow you to see a different part of the file.

C-L Reposition point at a specified vertical position, OR clear and redraw the screen with point in the same place.

C-V Scroll forwards (a screen or a few lines).

ESC V
    Scroll backwards.

C-Z Scroll forward some lines.

ESC Z
    Scroll backwards some lines.

The terminal screen is rarely large enough to display all of your file. If the whole buffer doesn't fit on the screen, JOVE shows a contiguous portion of it, containing point. It continues to show approximately the same portion until point moves outside of what is displayed; then JOVE chooses a new portion centered around the new point. This is JOVE's guess as to what you are most interested in seeing, but if the guess is wrong, you can use the display control commands to see a different portion. The available screen area through which you can see part of the buffer is called the window, and the choice of where in the buffer to start displaying is also called the window. (When there is only one window, it plus the mode line and the input line take up the whole screen).

First we describe how JOVE chooses a new window position on its own. The goal is usually to place point half way down the window. This is controlled by the variable scroll-step, whose value is the number of lines above the bottom or below the top of the window that the line containing point is placed. A value of 0 (the initial value) means center point in the window.

The basic display control command is C-L (redraw-display). In its simplest form, with no argument, it tells JOVE to choose a new window position, centering point half way from the top as usual.

C-L with a positive argument chooses a new window so as to put point that many lines from the top. An argument of zero puts point on the very top line. Point does not move with respect to the text; rather, the text and point move rigidly on the screen.

If point stays on the same line, the window is first cleared and then redrawn. Thus, two C-L's in a row are guaranteed to clear the current window. ESC C-L will clear and redraw the entire screen.

The scrolling commands C-V, ESC V, C-Z, and ESC Z, let you move the whole display up or down a few lines. C-V (next-page) with an argument shows you that many more lines at the bottom of the screen, moving the text and point up together as C-L might. C-V with a negative argument shows you more lines at the top of the screen, as does ESC V (previous-page) with a positive argument.

To read the buffer a window at a time, use the C-V command with no argument. It takes the last line at the bottom of the window and puts it at the top, followed by nearly a whole window of lines not visible before. Point is put at the top of the window. Thus, each C-V shows the "next page of text", except for one line of overlap to provide context. To move backward, use ESC V without an argument, which moves a whole window backwards (again with a line of overlap).

C-Z and ESC Z scroll one line forward and one line backward, respectively. These are convenient for moving in units of lines without having to type a numeric argument. Multiple Windows Multiple Windows

JOVE allows you to split the screen into two or more windows and use them to display parts of different files, or different parts of the same file.

C-X 2
    Divide the current window into two smaller ones.

C-X 1
    Delete all windows but the current one.

C-X D
    Delete current window.

C-X N
    Switch to the next window.

C-X P
    Switch to the previous window.

C-X O
    Same as C-X P.

C-X ^
    Make this window bigger.

ESC C-V
    Scroll the other window.

When using multiple window mode, the text portion of the screen is divided into separate parts called windows, which can display different pieces of text. Each window can display different files, or parts of the same file. Only one of the windows is active; that is the window which the cursor is in. Editing normally takes place in that window alone. To edit in another window, you would give a command to move the cursor to the other window, and then edit there.

Each window displays a mode line for the buffer it's displaying. This is useful to keep track of which window corresponds with which file. In addition, the mode line serves as a separator between windows. By setting the variable mode-line-should-standout to "on" you can have JOVE display the mode-line in reverse video (assuming your particular terminal has the reverse video capability).

The command C-X 2 (split-current-window) enters multiple window mode. A new mode line appears across the middle of the screen, dividing the text display area into two halves. Both windows contain the same buffer and display the same position in it, namely where point was at the time you issued the command. The cursor moves to the second window.

To return to viewing only one window, use the command C-X 1 (delete-other-windows). The current window expands to fill the whole screen, and the other windows disappear until the next C-X 2. (The buffers and their contents are unaffected by any of the window operations).

While there is more than one window, you can use C-X N (next-window) to switch to the next window, and C-X P (previous-window) to switch to the previous one. If you are in the bottom window and you type C-X N, you will be placed in the top window, and the same kind of thing happens when you type C-X P in the top window, namely you will be placed in the bottom window. C-X O is the same as C-X P. It stands for "other window" because when there are only two windows, repeated use of this command will switch between the two windows.

Often you will be editing one window while using the other just for reference. Then, the command ESC C-V (page-next-window) is very useful. It scrolls the next window, as if you switched to the next window, typed C-V, and switched back, without your having to do all that. With a negative argument, ESC C-V will do an ESC V in the next window.

When a window splits, both halves are approximately the same size. You can redistribute the screen space between the windows with the C-X ^ (grow-window) command. It makes the currently selected window grow one line bigger, or as many lines as is specified with a numeric argument. Use ESC X shrink-window to make the current window smaller. Multiple Windows and Multiple Buffers Multiple Windows and Multiple Buffers

Buffers can be selected independently in each window. The C-X B command selects a new buffer in whichever window contains the cursor. Other windows' buffers do not change.

You can view the same buffer in more than one window. Although the same buffer appears in both windows, they have different values of point, so you can move around in one window while the other window continues to show the same text. Then, having found one place you wish to refer to, you can go back into the other window with C-X O or C-X P to make your changes.

If you have the same buffer in both windows, you must beware of trying to visit a different file in one of the windows with C-X C-V, because if you bring a new file into this buffer, it will replaced the old file in both windows. To view different files in different windows, you must switch buffers in one of the windows first (with C-X B or C-X C-F, perhaps).

A convenient "combination" command for viewing something in another window is C-X 4 (window-find). With this command you can ask to see any specified buffer, file or tag in the other window. Follow the C-X 4 with either B and a buffer name, F and a filename, or T and a tag name. This switches to the other window and finds there what you specified. If you were previously in one-window mode, multiple-window mode is entered. C-X 4 B is similar to C-X 2 C-X B. C-X 4 F is similar to C-X 2 C-X C-F. C-X 4 T is similar to C-X 2 C-X T. The difference is one of efficiency, and also that C-X 4 works equally well if you are already using two windows. Processes Under JOVE Processes Under JOVE

Another feature in JOVE is its ability to interact with in a useful way. You can run other commands from JOVE and catch their output in JOVE buffers. In this chapter we will discuss the different ways to run and interact with commands. Non-interactive commands Non-interactive

To run a command from JOVE just type "C-X !" followed by the name of the command terminated with Return. For example, to get a list of all the users on the system, you do: C-X ! who<return> Then JOVE picks a reasonable buffer in which the output from the command will be placed. E.g., "who" uses a buffer called who; "ps alx" uses ps; and "fgrep -n foo *.c" uses fgrep. If JOVE wants to use a buffer that already exists it first erases the old contents. If the buffer it selects holds a file, not output from a previous shell command, you must first delete that buffer with C-X K.

Once JOVE has picked a buffer it puts that buffer in a window so you can see the command's output as it is running. If there is only one window JOVE will automatically make another one. Otherwise, JOVE tries to pick the most convenient window which isn't the current one.

It's not a good idea to type anything while the command is running. There are two reasons for this:

(i) JOVE won't see the characters (thus won't execute them) until the command finishes, so you may forget what you've typed.

(ii)
    Although JOVE won't know what you've typed, it will know that you've typed something, and then it will try to be "smart" and not update the display until it's interpreted what you've typed. But, of course, JOVE won't interpret what you type until the command completes, so you're left with the uneasy feeling you get when you don't know what the hell the computer is doing*. *This is a bug and should be fixed, but probably won't be for a while.

If you want to interrupt the command for some reason (perhaps you mistyped it, or you changed your mind) you can type C-]. Typing this inside JOVE while a process is running is the same as typing C-C when you are outside JOVE, namely the process stops in a hurry.

When the command finishes, JOVE puts you back in the window in which you started. Then it prints a message indicating whether or not the command completed successfully in its (the command's) opinion. That is, if the command had what it considers an error (or you interrupt it with C-]) JOVE will print an appropriate message. Limitations of Non-Interactive Processes Limitations of Non-Interactive Processes

The reason these are called non-interactive processes is that you can't type any input to them; you can't interact with them; they can't ask you questions because there is no way for you to answer. For example, you can't run a command interpreter (a shell), or mail or crypt with C-X ! because there is no way to provide it with input. Remember that JOVE (not the process in the window) is listening to your keyboard, and JOVE waits until the process dies before it looks at what you type.

C-X ! is useful for running commands that do some output and then exit. For example, it's very useful to use with the C compiler to catch compilation error messages (see Compiling C Programs), or with the grep commands. Interactive Processes — Run a Shell in a Window Interactive Processes — Run a Shell in a Window

Some versions of JOVE† † For example, the version provided with 4.3BSD. have the capability of running interactive processes. This is more useful than non-interactive processes for certain types of jobs:

(i) You can go off and do some editing while the command is running. This is useful for commands that do sporadic output and run for fairly long periods of time.

(ii)
    Unlike non-interactive processes, you can type input to these. In addition, you can edit what you type with the power of all the JOVE commands before you send the input to the process. This is a really important feature, and is especially useful for running a shell in a window.

(iii)
    Because you can continue with normal editing while one of the processes is running, you can create a bunch of contexts and manage them (select them, delete them, or temporarily put them aside) with JOVE's window and buffer mechanisms.

Although we may have given an image of processes being attached to windows, in fact they are attached to buffers. Therefore, once an i-process is running you can select another buffer into that window, or if you wish you can delete the window altogether. If you reselect that buffer later it will be up to date. That is, even though the buffer wasn't visible it was still receiving output from the process. You don't have to worry about missing anything when the buffer isn't visible. Advantages of Running Processes in JOVE Windows. Advantages of Running Processes in JOVE Windows.

There are several advantages to running a shell in a window. What you type isn't seen immediately by the process; instead JOVE waits until you type an entire line before passing it on to the process to read. This means that before you type <return> all of JOVE's editing capabilities are available for fixing errors on your input line. If you discover an error at the beginning of the line, rather than erasing the whole line and starting over, you can simply move to the error, correct it, move back and continue typing.

Another feature is that you have the entire history of your session in a JOVE buffer. You don't have to worry about output from a command moving past the top of the screen. If you missed some output you can move back through it with ESC V and other commands. In addition, you can save yourself retyping a command (or a similar one) by sending edited versions of previous commands, or edit the output of one command to become a list of commands to be executed ("immediate shell scripts"). Differences between Normal and I-process Buffers Differences between Normal and I-process Buffers

JOVE behaves differently in several ways when you are in an i-process buffer. Most obviously, <return> does different things depending on both your position in the buffer and on the state of the process. In the normal case, when point is at the end of the buffer, Return does what you'd expect: it inserts a line-separator and then sends the line to the process. If you are somewhere else in the buffer, possibly positioned at a previous command that you want to edit, Return will place a copy of that line (with the prompt discarded if there is one) at the end of the buffer and move you there. Then you can edit the line and type Return as in the normal case. If the process has died for some reason, Return does nothing. It doesn't even insert itself. If that happens unexpectedly, you should type ESC X list-processes<return> to get a list of each process and its state. If your process died abnormally, list-processes may help you figure out why. How to Run a Shell in a Window How to Run a Shell in a Window

Type ESC X shell<return> to start up a shell. As with C-X !, JOVE will create a buffer, called *shell*-1, and select a window for this new buffer. But unlike C-X ! you will be left in the new window. Now, the shell process is said to be attached to shell-1.