Harmonia

Linux, Solaris, MacOS X Installation Instructions

Follow these steps to install Harmonia-Mode on your computer:

  1. Check Hardware and Software Requirements
  2. Install
  3. Run

Hardware Requirements

To download the current release, first check that your system matches or exceeds the hardware requirements. Note, we support only the versions of those operating systems that are listed below.

Operating System CPU RAM Disk Space
Linux Debian (Sarge) Pentium III, 450 Mhz 256MB 25 MB
Linux (other) Pentium III, 450 Mhz 256MB 25 MB
Solaris 8 UltraSPARC IIi, 300 Mhz 256 MB 30 MB
Solaris 9 UltraSPARC IIi, 300 MHz 256 MB 30 MB
MacOS X 10.4.x PPC G3/G4 500 MHz 384 MB 405 MB

Speed Issues

While Harmonia-mode has been engineered using the latest incremental lexing and parsing algorithms, it can often appear somewhat slow, especially when loading a new file into XEmacs. Most of this slowdown is due to Harmonia-mode exercising XEmacs in a way it has never been before, rather than the performance of the language analysis kernel. However, given that this slowdown exists, please try to run Harmonia-mode on an unloaded machine with a fast CPU and a lot of free RAM.

Software Requirements

Debian (Sid) Linux Requirements

Harmonia requires several software programs to be installed:

  1. XEmacs (versions 21.4.5 - 21.4.7, 21.4.9 -21.4.10, 21.4.13 - 21.4.17 are acceptable)
  2. Unpacked Java source code (can be found in Sun's JDK in the src.jar file)
  3. C compiler (Harmonia-C-Mode will use the preprocessor)
  4. Please also make sure that you have the following Debian packages (and versions) installed
    • libc6 (>= 2.3.1-17)
    • libgc6c102 (>= 1:6.1-2)
    • libexpat1 (>= 1.95.6-4)
    • zlib1g (>= 1:1.1.4-13)
    • libstdc++5 (>= 1:3.3.1-0pre0)
    • libgcc1 (>= 1:3.3.1-0pre0)

    If you upgrade to the latest Debian (unstable) packages for these libraries, you should be ok.

Linux (other) Requirements

Harmonia requires several packages to be installed:

  1. XEmacs (versions 21.4.5 - 21.4.7, 21.4.9 - 21.4.10, 21.4.13 - 21.4.17 are acceptable)
  2. Unpacked Java source code (can be found in Sun's JDK in the src.jar file)
  3. C compiler (Harmonia-C-Mode will use the preprocessor)
  4. Expat (an XML parser).
  5. libc6 (>= 2.3.x)

Solaris 8/9 Requirements

Harmonia requires several packages to be installed:

  1. XEmacs (versions 21.4.5 - 21.4.7, 21.4.9 - 21.4.10, 21.4.13 - 21.4.17 are acceptable)
  2. Unpacked Java source code (can be found in Sun's JDK in the src.jar file)
  3. C compiler (Harmonia-C-Mode will use the preprocessor)
  4. Expat (an XML parser).

MacOS X Requirements

Harmonia requires several packages to be installed:

  1. X11 User Package: Harmonia-Mode in XEmacs on MacOSX only works under X Windows. You can download X11 from Apple or find it on your MacOS X 10.3 Installation CD.
  2. Developer Tools Package: (found on the Developer Tools CD or in the /Applications/Utilities folder) (Harmonia-C-Mode will use the C preprocessor)
  3. Java: (comes with MacOS X). If you have installed the Java Developer Tools, Harmonia will have access to the Java Development Kit source code and will use these files to analyze your Java code.

Install

Now read the installation instructions corresponding to your Operating System and download type:

Debian (Sid) Linux, Other Linux, Solaris 8, 9

(bin) Installation
  1. Make sure the download is executable.
    chmod a+x harmonia-x.x.x.bin
  2. Run the download binary to extract Harmonia in /usr/harmonia-x.x.x (you will probably need to be root). ./harmonia-x.x.x.bin
    A symlink, /usr/harmonia, will be created to the installation directory /usr/harmonia-x.x.x. When the binary has finished extracting Harmonia, it will run a setup script (/usr/harmonia/scripts/setup-xemacs.sh). This script will test out your XEmacs installation, and if it is ok, will install some Lisp code to automatically run Harmonia when you start XEmacs.
(tgz) Installation
  1. Unpack the download into /. You will probably need to be root.
    cd /
    gtar zxvf harmonia-x.x.x.tar.gz
  2. Harmonia will be installed in /usr/harmonia-x.x.x. A symlink, /usr/harmonia, will be created to the installation directory.
  3. Run the /usr/harmonia/scripts/setup-xemacs.sh script to finish installing Harmonia. This script will test out your XEmacs installation, and if it is ok, will install some Lisp code to automatically run Harmonia when you start XEmacs.

MacOS X (dmg) Installation

  1. Use the Disk Utility application to open the Harmonia disk image.
  2. Double-click the Harmonia installer package (harmonia-x.x.x.pkg).
  3. Harmonia libraries will be installed in /Library/Frameworks/Harmonia_Common.framework, /Library/Frameworks/Harmonia_LK.framework, and /Library/Application Support/Harmonia.
  4. Harmonia-XEmacs will be installed in the /Applications directory.

Running Harmonia-Mode

  • Linux and Solaris
    1. To run Harmonia-mode, just run xemacs from your shell.
      • Note that xemacs is not the same as emacs! Harmonia-mode doesn't work with regular emacs, so make sure that you run xemacs.
    2. You will be able to tell that you ran the right program if you see Loading Harmonia...done in the bottom line of your XEmacs window. If you do not see this message, it may have been overwritten by a later one. Look for it in the Message Log (Choose the Show Message Log menu item from the View menu).
  • MacOS X
    1. To run Harmonia-mode, just double-click on Harmonia-XEmacs in your /Applications folder.

Harmonia-Mode comes with a demo directory in /usr/harmonia/demo (on MacOS X it is /Library/Application Support/Harmonia/demo), inside of which are example programs in each language that this release supports. Load a C file (ending in ".h" or ".c"), a Java file (ending in ".java"), a Scheme file (ending in ".scm"), a Titanium file (ending in ".ti"), or a Cool file (ending in ".cl") and start editing! You should see Harmonia-C, Harmonia-Java, Harmonia-Scheme, Harmonia-Titanium or Harmonia-Cool at the bottom of your window in the modeline. Try them out!

To see what you can do with Harmonia-Mode, read the Features section of this manual (Language Analyses, Indentation and Highlighting, Structural Movement, Structural Search, and Elision).

If you decide to stop using Harmonia-mode, you can switch to the fundamental XEmacs editing mode by typing M-x fundamental-mode. For a more permanent solution, see the next page: Turning it On.

Additional Setup for Harmonia-mode for C

Harmonia-C-Mode uses the C preprocessor. If your preprocessor is not installed in its standard location for your platform, you will need to configure Harmonia to know where it is.

Additional Setup for Harmonia-mode for Java

On Linux and Solaris, Harmonia-Java-Mode needs access to the Java runtime source code in order to properly analyze your Java files. You will need to configure Harmonia to know where to find it.

Troubleshooting

  1. XEmacs starts but I don't see the message that Harmonia has loaded.
    1. There may be something in your ~/.xemacs/init.el (or ~/.emacs) file that has an error with XEmacs. This may prevent Harmonia-Mode from loading. Check out your XEmacs startup files and try to fix the problem.
  2. I loaded a Java file, but Harmonia-Mode does not start.
    1. Harmonia-Mode is too slow to use on really large files. We disable it on files larger than 200K. You can change this value by configuring Harmonia.
  3. I loaded a Titanium file that ends in .java, but it starts in Harmonia-Java-Mode, not Harmonia-Titanium-Mode.
    1. Titanium files must end in .ti to be autodetected by Harmonia-Mode. To switch modes manually, type
      M-x harmonia-titanium-mode.

Crash Recovery and Bug Reporting

Harmonia-mode has been engineered to recover from crashes in order to preserve your work, and to help us with debugging. If it crashes, it will ask for permission to file a bug report (via email to harmonia-bugs@sequoia.cs.berkeley.edu). (Note: sending email will not work on MacOS X).

Crash indicator

Harmonia-mode will then restart itself on your buffer, and allow you to edit your program again.

If you have any other problems with Harmonia-Mode, please report them using M-x harmonia-report-bug, or send us email at harmonia-bugs@sequoia.cs.berkeley.edu. Harmonia-mode is currently in active development, and we will be updating these web pages to notify you as we fix bugs and add features.