Difference between revisions of "CoCoA:Emacs interface"

From CoCoAWiki
(first draft for the emacs page)
 
m (just settling)
Line 1: Line 1:
 +
Dowload [http://cocoa.dima.unige.it/download/emacs CoCoA on Emacs]
 +
 
== cocoa-mode provides ==  
 
== cocoa-mode provides ==  
  
Line 5: 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 CoCoA <code>wordlist.txt</code> for dynamic abbrev expansion  (<code>M-/</code> or <code>ESC /</code>)   
  
 
== Some key bindings in cocoa-mode ==  
 
== Some key bindings in cocoa-mode ==  
  
* <font color=blue>C-c C-e</font>  (like in latex-mode) writes the appropriate "End" (EndIf,...)       
+
* <code>C-c C-e</code>  (like in latex-mode) writes the appropriate "End" (EndIf,...)       
* <font color=blue>C-c C-c</font> (like in c-mode)  comment-region
+
* <code>C-c C-c</code> (like in c-mode)  comment-region
  
 
If the following features do not work you should customize the variable  <code>cocoa-executable</code>  in '''cocoa.emacs''':  
 
If the following features do not work you should customize the variable  <code>cocoa-executable</code>  in '''cocoa.emacs''':  
  
==== Calling CoCoA ====
+
=== Calling CoCoA ===
 
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:
  
* <font color=blue>C-c C-l</font> (evaluate line)
+
* <code>C-c C-l</code> (evaluate line)
* <font color=blue>C-c C-r</font> (evaluate region)
+
* <code>C-c C-r</code> (evaluate region)
* <font color=blue>C-c C-f</font> (evaluate file)
+
* <code>C-c C-f</code> (evaluate file)
* <font color=blue>C-c C-m</font> or  <code>C-c ?</code> (evaluate CoCoA manual for the word under the cursor)
+
* <code>C-c C-m</code> or  <code>C-c ?</code> (evaluate CoCoA manual for the word under the cursor)
  
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]]

Revision as of 16:22, 14 October 2005

Dowload CoCoA on Emacs

cocoa-mode provides

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

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