Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
doc:ide [2015/04/27 18:35] – [IDE: Emacs] gkazhoya | doc:ide [2015/09/04 14:47] (current) – gkazhoya | ||
---|---|---|---|
Line 36: | Line 36: | ||
Emacs is used by many people around the world, mostly as a text editor, it is also popular for Tex/Latex development, | Emacs is used by many people around the world, mostly as a text editor, it is also popular for Tex/Latex development, | ||
- | Please note that, as most other IDEs, Emacs requires an external compiler and build system (linker) to program with the user's language of choice (except, of course, Emacs Lisp, an implementation of which is included in Emacs because without it it wouldn' | + | Please note that, as most other IDEs, Emacs requires an external compiler and build system (linker) to program with the user's language of choice (except, of course, Emacs Lisp, an implementation of which is included in Emacs because without it it wouldn' |
==== Summary ==== | ==== Summary ==== | ||
- | CRAM is written in Common Lisp (CL). There are many different implementations (i.e. compilers) for CL. The compiler used in CRAM and Roslisp is SBCL. The build system that compiles different components (the CL files / packages / systems) located in different places in the file system, into one piece of software, is ASDF. It defines in what sequence | + | CRAM is written in Common Lisp (CL). There are many different implementations (i.e. compilers) for CL. The compiler used in CRAM and Roslisp is SBCL. The build system that compiles different components (the CL files / packages / systems) located in different places in the file system, into one piece of software, is ASDF. It defines in which order the different components are to be compiled, where to find them, and is responsible for incremental code compilation. |
- | The IDE used for CL programming in the CRAM community is Emacs. To connect the Emacs Lisp (which is a different Lisp dialect) | + | The IDE used for CL programming in the CRAM community is Emacs. To connect the Emacs Lisp of Emacs (which is a different Lisp dialect) to the Common Lisp there is an Emacs extension called Slime. It's half written in Emacs Lisp, and half is in Common Lisp, the two halves talk to each other through TCP. |
Emacs has a convenience extension for working with ROS called rosemacs. It can be used, e.g. for finding the source of a ROS package without knowing it's actual path but using the '' | Emacs has a convenience extension for working with ROS called rosemacs. It can be used, e.g. for finding the source of a ROS package without knowing it's actual path but using the '' | ||
Line 48: | Line 48: | ||
To utilize the features of rosemacs when programming and building Common Lisp software there is also a slime-ros extension for Emacs which tells the CL build system where to find Lisp code of ROS packages. | To utilize the features of rosemacs when programming and building Common Lisp software there is also a slime-ros extension for Emacs which tells the CL build system where to find Lisp code of ROS packages. | ||
- | For more info on how the different components are connected together check out the [[doc/ | + | For more info on how the different components are connected together check out the [[doc/ |
===== Setup ===== | ===== Setup ===== | ||
Line 54: | Line 54: | ||
To setup the development environment one needs to (1) install the necessary components and (2) configure them. | To setup the development environment one needs to (1) install the necessary components and (2) configure them. | ||
- | If you followed the [[../ | + | If you followed the [[../ |
If you are interested to know what the default configuration does and what happens under the hood, check out the [[doc/ | If you are interested to know what the default configuration does and what happens under the hood, check out the [[doc/ | ||
Line 60: | Line 60: | ||
===== Useful Tips ===== | ===== Useful Tips ===== | ||
- | ==== Key bindings | + | ==== Definitions |
- | An Emacs buffer is the equivalent of window / tab in other editors. It can have a file associated with it that you can (or cannot depending on the privileges) edit or a background | + | An Emacs //buffer// is the equivalent of window / tab in other editors. It can have a file associated with it that you can (or cannot depending on the privileges) edit, or it can be running |
Textual representation of Emacs key bindings has a number of conventions: | Textual representation of Emacs key bindings has a number of conventions: | ||
Line 71: | Line 71: | ||
* '' | * '' | ||
* Commands like '' | * Commands like '' | ||
+ | ==== Key bindings ==== | ||
Taken from the Slime manual: | Taken from the Slime manual: | ||
Line 89: | Line 90: | ||
* C-M-f (C-M-b): go forward (backward) one expression (in Lisp an S-expression) | * C-M-f (C-M-b): go forward (backward) one expression (in Lisp an S-expression) | ||
* C-M-\: indent region | * C-M-\: indent region | ||
- | * M-; : comment out region (chooses correct commenting characters depending on file extension) | + | * M-; : comment out region (chooses correct commenting characters depending on the extension |
* M-< (M- >): go to buffer beginning (or end) | * M-< (M- >): go to buffer beginning (or end) | ||
* M-%: find-replace | * M-%: find-replace | ||
Line 112: | Line 113: | ||
* M-x slime-browse-system: | * M-x slime-browse-system: | ||
* C-c C-t: trace function at point | * C-c C-t: trace function at point | ||
+ | * C-M-< | ||
In REPL: | In REPL: |