Difference between revisions of "CoCoA:Emacs interface"

From ApCoCoAWiki
(added CoCoA menu picture)
(slowly updating ("go to parse error line"))
Line 13: Line 13:
 
From the menu you can  
 
From the menu you can  
 
* send lines, regions and files to cocoa
 
* send lines, regions and files to cocoa
* (if you had a parse error after sending a file) go to the parse error line
+
* go to the parse error line (if you had a parse error after sending a file)  
 
* start or restart the CoCoAServer
 
* start or restart the CoCoAServer
  
Line 26: Line 26:
 
From a buffer in '''cocoa-mode''' you can select things and "send"  them to a cocoa buffer (called <code>*cocoa*</code>) to be evaluated:
 
From a buffer in '''cocoa-mode''' you can select things and "send"  them to a cocoa buffer (called <code>*cocoa*</code>) to be evaluated:
  
* <code>C-c C-l</code> (evaluate line)
+
; <code>C-c C-l</code> : execute this line (from any point in the line)
* <code>C-c C-r</code> (evaluate region)
+
; <code>C-c C-r</code> : execute the selected region
* <code>C-c C-f</code> (evaluate file)
+
; <code>C-c C-f</code> : execute all this file (from any point in thefile)
* <code>C-c C-m</code> or  <code>C-c ?</code> (evaluate CoCoA manual for the word under the cursor)
+
; <code>C-c C-p</code> : go to the parse error line (if C-c C-f gave a parse error)  
 +
; <code>C-c C-m</code> or  <code>C-c ?</code> : call the CoCoA manual for this word (from any point in the word)
  
 
They will automatically start CoCoA (if it isn't already running in a <code>*cocoa*</code> buffer).
 
They will automatically start CoCoA (if it isn't already running in a <code>*cocoa*</code> buffer).
 
   
 
   
* <code>M-x cocoa</code>   opens a buffer (called <code>*cocoa*</code>) with a running CoCoA
+
; <code>M-x cocoa</code> : opens a buffer (called <code>*cocoa*</code>) with a running CoCoA
  
 
[[Category:CoCoA4]]
 
[[Category:CoCoA4]]

Revision as of 11:08, 19 October 2005

cocoa-mode

The distribution of cocoa-4.5 includes an emacs/ directory which contains cocoa.el and cocoa.emacs (the settings to be added to your .emacs).

  • a friendly CoCoA menu
  • automatic indentation
  • coloured syntax (in font-lock-mode - default)
  • capitalization of keywords (in abbrev-mode - default)
  • automatic loading of wordlist.txt for dynamic abbrev expansion (M-/ or ESC / or TAB /)

CoCoA menu

CoCoA menu for cocoa-mode

From the menu you can

  • send lines, regions and files to cocoa
  • go to the parse error line (if you had a parse error after sending a file)
  • start or restart the CoCoAServer

Some key bindings in cocoa-mode

  • C-c C-e (like in latex-mode) writes the appropriate "End" (EndIf,...)
  • C-c C-c (like in c-mode) comment-region

If the following features do not work you should customize the variable cocoa-executable in cocoa.emacs:

Calling CoCoA

From a buffer in cocoa-mode you can select things and "send" them to a cocoa buffer (called *cocoa*) to be evaluated:

C-c C-l
execute this line (from any point in the line)
C-c C-r
execute the selected region
C-c C-f
execute all this file (from any point in thefile)
C-c C-p
go to the parse error line (if C-c C-f gave a parse error)
C-c C-m or C-c ?
call the CoCoA manual for this word (from any point in the word)

They will automatically start CoCoA (if it isn't already running in a *cocoa* buffer).

M-x cocoa
opens a buffer (called *cocoa*) with a running CoCoA