Difference between revisions of "CoCoA:Emacs interface"

From ApCoCoAWiki
m (just settling)
m (still working on it...)
Line 1: Line 1:
Dowload [http://cocoa.dima.unige.it/download/emacs CoCoA on Emacs]
+
== cocoa-mode ==
  
== cocoa-mode provides ==
+
The distribution of cocoa-4.5 includes an <code>emacs/</code> directory which contains <code>cocoa.el</code> and <code>cocoa.emacs</code> (the settings to be added to your <code>.emacs</code>).
  
 
* a friendly '''CoCoA''' menu
 
* a friendly '''CoCoA''' menu
Line 7: Line 7:
 
* coloured syntax (in font-lock-mode - default)   
 
* coloured syntax (in font-lock-mode - default)   
 
* capitalization of keywords (in abbrev-mode - default)   
 
* capitalization of keywords (in abbrev-mode - default)   
* automatic loading of CoCoA <code>wordlist.txt</code> for dynamic abbrev expansion  (<code>M-/</code> or <code>ESC /</code>)   
+
* automatic loading of <code>wordlist.txt</code> for dynamic abbrev expansion  (<code>M-/</code> or <code>ESC /</code> or <code>TAB /</code>)   
  
== Some key bindings in cocoa-mode ==  
+
=== CoCoA menu ===
 +
 
 +
From the menu you can
 +
* send lines, regions and files to cocoa
 +
* (if you had a parse error after sending a file) go to the parse error line
 +
* start or restart the CoCoAServer
 +
 
 +
=== Some key bindings in cocoa-mode ===
  
 
* <code>C-c C-e</code>  (like in latex-mode) writes the appropriate "End" (EndIf,...)       
 
* <code>C-c C-e</code>  (like in latex-mode) writes the appropriate "End" (EndIf,...)       

Revision as of 16:25, 17 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

From the menu you can

  • send lines, regions and files to cocoa
  • (if you had a parse error after sending a file) go to the parse error line
  • 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 (evaluate line)
  • C-c C-r (evaluate region)
  • C-c C-f (evaluate file)
  • C-c C-m or C-c ? (evaluate CoCoA manual for the word under the cursor)

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