Columbia MM
MM Manual

USING CUT AND PASTE WITH MM

With some microcomputer systems, you can open more than one window on your screen, so you may be running MM in a terminal session in one window and have a word processor open in another. Examples include various Macintosh and NeXT applications and the Windows program running on MS-DOS microcomputers. Copying text between MM and files on the microcomputer can be simplified by using the cut and paste technique to copy text from one window to another. Cut and paste may eliminate the need to do a file transfer operation separately.

This section describes some ways to adjust MM to handle cut and paste properly.


PASTING INTO MM

If you write a message first on your microcomputer, you can paste it into MM at the same Message prompt where MM expects you to type a message, as shown below.



 Message (End with CTRL/D or ESC
  Use CTRL/B to insert a file, CTRL/E to enter editor, CTRL/F to run text
  through a filter, CTRL/K to redisplay message, CTRL/L to clear screen and
  redisplay, CTRL/N to abort, CTRL/P to run a program and insert output.):


Pasting in from another window is no different from typing, as far as MM is concerned. There is one detail that may mess up your text. MM's Text Mode normally wraps lines, that is, the cursor drops to a new line automatically when it gets too close to the right margin. This is controlled by the variable autowrap-column, which normally is set to -7, meaning 7 character positions from the right side. If your pasted-in text has longer lines, it will get wrapped by MM, and may end up looking like the following.



The name of the corporation itself was Columbia College in the City of
New York until
the trustees authorized the change in 1896 to Columbia University in the
City of New York.


Despite the ugly appearance, the wrapping is somewhat desirable because most terminals have 80 columns, and if the above text was sent with its original longer lines, the end of each line might not be displayed on some terminals, or else the line will be displayed wrapped similarly to the above anyway. If you definitely want to send longer lines, you can, before pasting the text, give MM the command set autowrap 0 to turn off the wrap entirely, or set autowrap to some other number. A positive number counts from the left, and negative counts from the right (so -7 is the same as 73 on an 80-column terminal).

Another approach is to fill the paragraph to a new line length. The real problem in the example above is the short lines, not the long ones. One way to format the text is to process it through another program that acts as a filter. Notice in the Message prompt the option CTRL/F to run text through a filter. For example, after the text is input, press control-f, and then give the command fmt 70 75 to set a goal of 70 columns, maximum of 75, as shown below. (To doublecheck what it did, use control-l to redisplay, or else use display at the S> prompt.)



[control-f]
Filter: fmt 70 73
[Done]
[control-l]
The name of the corporation itself was Columbia College in the City of
New York until the trustees authorized the change in 1896 to Columbia
University in the City of New York.


If you are using Emacs, you can paste into Emacs text also. Use Emacs fill commands to fix up the line length (meta-q for example; see the Emacs manual for more details).


CUTTING FROM MM

Cutting from MM is usually fairly simple. Just read the message to put it on screen. To the extent that you can scroll back the terminal window, you can cut a moderately long message in one step and then paste it to another window.

Normally the variable crt-filter is set to the more program, so when you read a message, MM pauses at the end of each screen full and prompts you with the word More. If the pause and prompt are causing any difficulty, you can turn it off with the command set crt-filter, setting it to nothing, so there is no pause and prompt.



MM>set crt-filter
MM>


You may find setting crt-filter to nothing useful in some other kinds of screen capture, like print-screen (as long as you can scroll back on the terminal) or a session log. To restore crt-filter, you could give the command show crt-filter beforehand, take a note of what it is, and then type in the value later, like set crt-filter /usr/ucb/more -d as an example. However, as long as you do not save-init, a simpler method perhaps is to give the command take .mminit if you want to continue, or else simply quit from MM if you are finished.


[ Columbia MM Manual ]