CoCoA Emacs Interface

Instructions for Emacs beginners

Emacs can do a lot for you: if you open a CoCoA file in emacs it will have coloured syntax, automatic indentation and some other interesting features... even better than the graphical interface ;-)

These are the main difficulties for Emacs beginners:


No C-x, C-c, C-v for Cut, Copy, Paste

FALSE!

By default, the usual C-v does something else (forward-page), but:

Anyway within Emacs you can Copy a region just selecting it with the mouse (no C-c needed).
You can Paste into the Emacs window using control-y or just click with the middle mouse button.

No "dialog windows"

All communication between you and Emacs is done in the minibuffer: the line under the mode line at the bottom of the Emacs window. Make sure it is always visible.

On the suggested Emacs for MacOSX there are Mac-style dialog windows.


Basic commands for Emacs-CoCoA

C-... Means: press Control together with ...
M-... Means: press Meta (Alt, Apple) together with ...
or: press ESC followed by ...
  1. Open a CoCoA file in Emacs (C-x C-f).
  2. IF its name does not end with .coc or .cocoa, type M-x cocoa-mode (it will appear in the bottom line)
  3. Type and move with arrows or mouse in your cocoa file
  4. Send lines to the *cocoa* buffer using the CoCoA menu or typing C-c C-l [el]
Use the [NEW!] CoCoA menu to investigate other Emacs-CoCoA commands. Visit the CoCoA and Emacs page to set it up.

 

Meaning of the Mode line

-:** emacs.tex       (TeX Fill)--L17--All------------------


-:-- emacs.cocoa     (CoCoA Abbrev)--L75--42%------------------

−− / ** saved / to be saved
TeX Fill CoCoA Abbrev TeX mode, Fill mode, CoCoA mode, Abbrev mode
L75 / L17 line number
42% / All relative position
 

Some useful key bindings

C-x C-f Open find-file "space" and "tab" will complete the directory/file name
C-x C-s Save save-buffer Emacs periodically saves your buffer aaaa into the file #aaaa# so that you may recover changes you did not save (M-x recover-file).
C-y Paste yank  
C-_ [C-Shift-"minus"] Undo   undo (can be repeated many times)
C-s Find isearch-forward  
M-% Replace query-replace  
M-x help t Tutorial help-with-tutorial if you want to learn more about Emacs
 

Panic buttons

C-g keyboard-quit interrupts the current command (and beeps!)
C-x b switch-to-buffer to go to the buffer you want: you may also use the Buffers menu
C-x 1 [one] delete-other-windows expand the current buffer to the whole window