|
|||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||
emacs documentation: http://www.gnu.org/software/emacs/manual/html_node/
Emacs uses major and minor modes that provide a UI context for editing various file types. Here are some useful ones for working with OpenACS:
I use M-x cvs-examine to update and check in code when I am working with OpenACS. One thing that is a pain with CVS is that cvs diff does not tell you what you are going to get if you update, it only tells you what is changed in your local copy.
You can use M-x cvs-examine and then type "d e" next to any of the files in your checkout in the *cvs* buffer to open ediff mode and then interactively merge what's in CVS with your local changes. In ediff mode you use n/p to got to the next/previous difference. You can copy changes from the CVS buffer to your local copy using a/b to copy the the buffer marked A to B or B to A. Type ? on the ediff window to get a list of other commands.
See historical page describing oacs.el http://web.archive.org/web/20040621200046/www.thecodemill.biz/services/oacs/
Download: oacs.el.tar updated 2006-08-15 . The lastest version includes nXML mode support in addition to PSGML support. There are good installation instructions in the INSTALL.txt file. A quick install guide for Debian
sudo su -
cd /usr/share/emacs/site-lisp
wget http://www.emacswiki.org/elisp/color-occur.el
wget http://openacs.org/storage/view/xowiki-resources%5C/oacs.el.tar
tar xf oacs.el.tar
apt-get install psgml mmm-mode
# Alternatively compile manually
wget http://www.lysator.liu.se/~lenst/about_psgml/psgml-1.2.5.tar.gz
tar xfz psgml-1.2.5.tar.gz
cd psgml-1.2.5
./configure
make install
cd ..
wget http://switch.dl.sourceforge.net/sourceforge/mmm-mode/mmm-mode-0.4.8.tar.gz
tar xfz mmm-mode-0.4.8.tar.gz
cd mmm-mode-0.4.8
./configure
make install
After this login as the user who is doing the development and edit you .emacs file.
The following was written by Bart the author of oacs.el
OpenACS lacked a good Integrated Development Environment and as I use Emacs for almost everything it was only natural to fill the void. The Emacs OACS module is an extension to GNU Emacs, the extensible, customizable, self-documenting real-time display editor.
Emacs OACS's development is driven by the needs I encounter in my OpenACS projects. Development takes place in my spare time. At this stage the code is the documentation. I lack the time to write a proper article. However, as Emacs OACS addresses the issues described in articles XQL Document Type Definition and Replacing SQL bind vars in Emacs some background information can be found in those articles.
Forum thread: Beta Emacs OACS module available
See http://openacs.org/doc/nxml-mode.html
See:
To make emacs display .vuh files similar to .tcl files, add to .emacs file:
To make emacs display .adp files similar to .html files, add to .emacs file:
Minor Modes
M-x global-font-lock-mode highlights syntax using colors
M-x transient-mark-mode shows a highlighted text region
M-x show-paren-mode shows matching parentheses (and when the do not)
Move, Search and Replace
M-x goto-line go to a specific line in a file
M-x goto-char go to a specific character number in a file
M-C-f search forward for matching brace
M-C-b search backward for matching brace
M-x replace-regexp search/replace using regular expressions
M-x query-replace-regexp query/search/replace using regular expressions
note \\( and \\) for start and end subgroups
M-x grep grep creates new buffer with results
for fast loading/editing search hits
Useful "sleepers" (not found in many shortcut sheets)
fg<cr> restart a suspended emacs session from commandline
C-q <key press> add a key without emacs interpreting the key binding
You can configure emacs to create 4 spaces when you press the tab key--important for meeting coding standards. Add this to your .emacs file:
(setq-default tab-width 4 indent-tabs-mode nil)
Comments