Commits

Peter Szilagyi committed 6ff69e4 Merge

Provisional merge from roll-test. Another feature merge expected soon.

Comments (0)

Files changed (360)

 syntax: glob
 
-# ignore Omakefile because it's different for my machine and
-# the Jane Street setup
-OMakefile
-OMakeroot
-
 *.old.*
-lib
 
 *.annot
 *.cmi
 *.objdeps
 *.omakedb*
 *.omc
+*.cmt
+*.cmti
 *.opt
 *.spit
 *.spot
 *.elc
 *.orig
 *.out
+.\#*
+*.a
+*.so
+*.cma
+*.cmxa
+*.cmo
+\#*\#
 
 bins.inferred-1step.deps
 *.build_info.c
 *.hg_version.c
 
-test
+# test
+
+.deps
+
+ocaml/omake/OMakefile
+ocp-indent/ocp.ml
+ocp-indent/tuareg.ml
 b2802c0d91715ff184c158534275e4ff43077ec1 2012-04-30-roll-prod
 f02920f1782c1d3be779209283140003e321a7e5 2012-06-11-roll-prod
 9ffb5ef4ba3aa69ebc22c59cbf54a515ec8aa7c4 2012-06-13-roll-prod
-6fd664d978f0750c69cb808eebe95703a24ca6d9 2012-10-03-roll-prod
+964d0c4723a0e557b8f51975ca787583977dcfb4 2012-06-29-roll-test
+e8d14e80cfa1c1cc30ff966ec27b79d7cacd4aff 2012-07-31-roll-test
+705108ac39fe648683266b719e662a84b3238167 2012-08-01-roll-test
+9f54c7d9a40ca234e62269273ad766b99cda7544 2012-09-12-roll-test
+03c2cad9c97a7b7c77215ad51c355395e45b5335 2012-09-12-roll-test
+088bb4c77f9001179fcb7079c9ac3b0a902ab401 2012-09-12-roll-test
 6fd664d978f0750c69cb808eebe95703a24ca6d9 2012-10-03-roll-prod
 c50e54234aa39eada400bfcd2576535f6f4801d7 2012-10-03-roll-prod
+4eece59cdc95274abe98eb5ff4d73c91901f4047 2012-10-03-roll-test
+4143d34932ab7154fc56e10c1bedf2378eeb5dd5 2012-10-03-roll-test
+6a947d72288117856b485aba28c5f32e9b2b633c 2012-10-03-roll-test
+================================================================================
+2012-10-03 Rolled rev 4143d34932ab to test
+================================================================================
+
+changes
+=======
+
+- Enabled debugging (-g) to make it easier to debug, for example, the
+  space leak mstanojevic discovered in omake_server.exe.
+- Incorporated the Jane Street CentOS 5/6 compatibility libraries.
+- Jane.evil: Provisionally added nlinger's ESC bindings from dlobraico.
+- Build ocaml compatibly with an opam system compiler.
+
+bug fixes
+=========
+
+- HASKELL-SITE-FILE doesn't provide the feature, so use LOAD-LIBRARY
+  rather than REQUIRE, which expects the feature to be provided.
+
 ================================================================================
 2012-10-03 Rolled rev 349c47add51e to production
 ================================================================================
 
 [...]
 
+--------------------------------------------------------------------------------
+
+new stuff
+=========
+
+- ocp-indent can be used to indent ocaml code.
+
+    https://github.com/OCamlPro/ocp-indent
+
+  Currently only whole-buffer indentation is supported.  To use it, set
+
+    (setq ocaml-indenter 'ocp-indent)
+
+  to use Tuareg's indenter, use
+
+    (setq ocaml-indenter 'tuareg)
+
+  This is in its infancy, but we added a few regression tests so we
+  don't go backwards.
+
+  The code is in omake-mode/ocp-indent.  To run regression tests do
+  cd regressions; ./runtests
+
+- omake-mode works with the new core release, ocaml-core-108.07.00
+
+changes
+=======
+
+- We are using a new repo,
+
+    https://bitbucket.org/seanmcl/ocaml-core-108.07.00-seanmcl
+
+  to build omake-mode both externally and at Jane Street.  This makes
+  problems we faced with installing inotify in the two places easier to handle.
+
+bug fixes
+=========
+
+--------------------------------------------------------------------------------
+
+new stuff
+=========
+- If inotify's max_user_watches is exceeded, an error message is shown.
+
+changes
+=======
+
+- Built with a new fork of core that allows us to make changes without waiting
+  for them to be accepted into the main branch
+- Builds on both OSX and Linux both for home use and at Jane Street
+- Removed Omake.prompt-when-setting-environment-variable-for-a-project-that-is-building
+
+bug fixes
+=========
+
+--------------------------------------------------------------------------------
+
+new stuff
+=========
+
+changes
+=======
+- Server is daemonized.  New commands are
+  omake_server.exe controller (start|stop|restart|status)
+  This had the undesired effect that due to a bug in lock_file.ml,
+  omake-server no longer runs on OSX.  Waiting for a bug fix to use
+  OSX again.
+- omake_server.exe server (start|stop) have been removed
+- the disk copy of emacs log messages are timestamped
+
+bug fixes
+=========
+
+- Now a single user can't run multiple copies of the server
+- toggle-env works again
+
+--------------------------------------------------------------------------------
+
+
+new stuff
+=========
+
+- Almost have an end-to-end regression test.  Each test will consist of
+  a directory with
+  - some ocaml code/OMakefiles
+  - setup.sh to set up the server
+  - setup.el to simulate the user using emacs
+
+- Projects buffer supports 'n' and 'p' for 'next' and 'previous' project.
+
+changes
+=======
+
+- Improved status buffer when the underlying process dies.
+- Improved 'l' in project buffer to show 'No errors' when there are no errors
+  (rather than just silently doing nothing.)
+
+bug fixes
+=========
+
+- Press enter on an unwatched project buffer line opens dired
+- Stop spinner on dead omake processes
+- check.sh should work at JS now.  At least I fixed some path problems
+  that resulted from differences between linux and osx.
+- Remove 'depends on' lines from errors
+- Fixed bad indentation due to omake raw output ugliness.
+
+--------------------------------------------------------------------------------
+
+new stuff
+=========
+
+- Automatic compilation, unit testing, and regression tests via check.sh
+
+- Run omake_server.exe on a file (omake_server.exe server file FILE [-debug])
+
+- When omake dies, the status buffer is no longer deleted automatically.  It
+  stays with a message alerting the user of the dead omake process.
+
+- Started Emacs-level regression testing.  Not much here yet, but it's in
+  the works.
+
+changes
+=======
+
+- moved logs around and broke them up by date to be more organized.
+
+bug fixes
+=========
+
+- Performance improvement for big builds via computing error hashes on the
+  ocaml side and caching string representation of errors on the elisp side.
+
+- Temporarily patched a problem with the Jane.server microfeature.  The
+  feature needs to be eliminated, but it will require some discussion.
+
+--------------------------------------------------------------------------------
+
+new stuff
+=========
+
+- Robust unit testing.  Jane.test, Jane.test-eq, Jane.test-error, Jane.run-tests.
+  Example
+   (Jane.test-eq List.assoc.1 (List.assoc 5 '((5 . 6) (1 . 3))) 6)
+   (Jane.test-eq List.assoc.2 (List.assoc 5 '((5 6) (1 3))) '(6))
+   (Jane.test-eq List.assoc.3 (List.assoc 5 '((5 6) (1 3))) '(7))
+
+  Result
+     Selector: "Omake\\|Hashtbl\\|String\\|List"
+     Passed: 2 (0 unexpected)
+     Failed: 1 (1 unexpected)
+     Error:  0 (0 unexpected)
+     Total:  3/3
+
+     Started at:   2012-07-23 16:28:08-0400
+     Finished.
+     Finished at:  2012-07-23 16:28:08-0400
+
+     ..F
+
+     F List\.assoc\.3
+         (ert-test-failed
+          ((ert-should
+            (equal
+             (List\.assoc 5 ...)
+             '...))
+           :form
+           (equal
+            (6)
+            (7))
+           :value nil :explanation
+           (list-elt 0
+                     (different-atoms 6 7))))
+
+  From the *ert* buffer you can jump to the errors (typing '.'), fix the code, and
+  rerun the test (typing 'r').
+
+  This will be a major part of the planned omake-mode testing framework.
+
+
+
+
+changes
+=======
+
+- Omake.shutdown kills non-project buffers as well as project buffers.
+
+bug fixes
+=========
+- If a unit test failed, it would stop the rest
+  of the init code from running, thus making Emacs unusable.
+- Fixed a bug that would fail on files in the top level directory
+
+
+--------------------------------------------------------------------------------
+
+new stuff
+=========
+
+- Omake.notify-maintainer-of-error redesign
+  Now all relevant logs and buffers are saved to
+  /tmp/omake-server/USER/bug-report/N
+  The command asks the user for a message, which is also stored in
+  the directory.  An email is sent including the user message and
+  where to find the files.
+
+- omake-mode working on OSX
+
+- Omake.show-raw-buffer will show you the raw buffer for the last compilation
+  of a project that is not compiling.  This is important when your OMakefiles
+  are messed up, because in that case the omake process stops and the
+  project is killed immediately.
+
+changes
+=========
+
+- better error handling
+- better handling of preprocessor errors, which now appear as omake failures
+  rather than ocaml errors so you can see the context of the failure.
+
+bug fixes
+=========
+
+- stopping server from the command line left connection objects alive
+
+--------------------------------------------------------------------------------
+
+new stuff
+=========
+
+- Verbose status buffer shows
+  - total error count (even if only 50 are sent)
+  - seconds since last update
+
+- Unvisited error count in status buffer shows unsent error count
+
+- Better documentation for omake-mode (still incomplete) and
+  other js-elisp stuff.
+
+- Detects 'waiting for project lock'
+
+- Config file remembers if you've been warned about environment variable
+  changes and doesn't warn you again.
+
+changes
+=========
+
+- Omake.watch autocompletion improvements
+- Improved next-error to always connect to the server.
+
+bug fixes
+=========
+
+- omake errors were not always showing the error text
+
+--------------------------------------------------------------------------------
+
+new stuff
+=========
+
+- Support for missing package errors, eg
+
+  *** omake: targets were not rebuilt because of errors:
+     lib/bug.cmx
+        depends on: lib/bug.ml
+        depends on: lib/bug.mli
+        - build lib bug.cmx
+        + ocamlfind ocamlopt -thread -w @a-4-7-9-29-28 -pp 'camlp4o /usr/local/lib/ocaml/site-lib/type-conv/pa_type_conv.cma /usr/local/lib/ocaml/site-lib/sexplib/pa_sexp_conv.cma /usr/local/lib/ocaml/site-lib/fieldslib/pa_fields_conv.cma /usr/local/lib/ocaml/site-lib/pa_pipebang/pa_pipebang.cma' -strict-sequence -annot -inline 20 -nodynlink -g -package core -package core_extended -package async -package pcre -c bug.mli
+        ocamlfind: Package `core_extended' not found
+        - exit lib bug.cmx, 0.10 sec, code 2
+
+- An almost working patch of ocaml-core on linux with ocaml 4.0.  The part
+  that doesn't work is an issue with the core build script, not with the
+  ocaml code.  There is a workaround for building.
+
+- Pressing RET on a projects buffer line opens a dired buffer of that project.
+
+- Nice error message when you try to compile a project via tramp.
+
+changes
+=========
+
+- Omake.start-project (C-cC-c) redesigned to be agnostic to the watched status
+  of a project.
+
+- Version bump to 13 (mmmmm, bad luck?)
+
+- New error handling framework.  For example, when you try to start omake in a
+  tramp buffer, show a message in the minibuffer and abort the current stack
+  but don't raise an exn.  Users shouldn't notices this.
+
+- Killed off some trivial issues.
+
+- The server no longer ignores sigterm.
+
+bug fixes
+=========
+
+- Config files now save the fields the ocaml code doesn't know about, and
+  ensures all the required fields are present.  This allows forward and
+  backward compatibility between versions.
+
+- Omake server checks to be sure the permissions on /tmp/omake-server are
+  OK before starting.
+
+- Broken pipe error possibly fixed.  I couldn't reproduce it due to
+  hardware issues, so please check this.  To check, start a project
+  that takes a long time to build.  Then kill the emacs that started
+  the compilation.  The server should not write errror messages to the
+  log about a broken pipe.
+
+--------------------------------------------------------------------------------
+
+new stuff
+=========
+
+- A new bare info page (jane-emacs) for non-omake-mode Emacs stuff.
+- New environment variable FOUR_POINT_ZERO
+- Working on an automated test infrastructure.
+
+changes
+=========
+
+- Support new error-enabled warnings format in ocaml 4.0
+- Verbose mode shows the settings of the environment variables
+  on the next compilation as well as the current one.
+- Changed variable
+  Omake.create-dedicated-frame --> Omake.create-dedicated-status-frame
+- In project buffer, 'w' now toggles between watched and unwatched.
+  'u' was removed.
+
+bug fixes
+=========
+
+- Eliminated nohup.out files
+- toggle-env/set-env prompts are the same now
+
+--------------------------------------------------------------------------------
+
+new stuff
+=========
+
+- (for sweeks) added file omake_server.new.ml to show the new (working) multi-emacs
+  server
+
+changes
+=========
+
+- renamed elisp-for-ocaml-programmers to jane-lib
+
+bug fixes
+=========
+
+- code and error frames are raised
+
+- fixed a small window-selection bug when a dedicated frame was set but
+  the code was showing in another frame, and the point was in that frame
+
+--------------------------------------------------------------------------------
+
 changes
 =========
 
+OCAMLOPTFLAGS += -g
 
-LIB=/usr/local/lib/ocaml/site-lib
+# CR pszilagyi: The following compatibility settings are necessary but
+# not sufficient to build an ocaml/omake/omake_server.exe (for
+# example) on CentOS 6 that can be run on CentOS 5.  These take care
+# of application libraries, such as libtinfo.so, but not libc.so.
+#
+# When using opam with a recent Jane Street system compiler
+# (/janelibs/ocaml-4.00.0+jane1+with-fp, for example), these are not
+# necessary.  We may want to remove these if we decide to use a
+# /janelibs build as an opam system compiler.
+#
+# Jane-specific CentOS 5 build compatibility based on jane/trunk/OMakeroot:
+REDHAT_RELEASE = $(shell \
+  test -f /etc/redhat-release \
+   && cat /etc/redhat-release)
+REDHAT_VERSION = $(strip \
+  $(if $(findstring CentOS release 5,$(REDHAT_RELEASE)),5,\
+  $(if $(findstring CentOS release 6,$(REDHAT_RELEASE)),6)))
+C5COMPATROOT = /usr/jane
+C5_COMPAT_ROOT_DIRS = \
+  $(C5COMPATROOT)/lib64 \
+  $(C5COMPATROOT)/usr/lib64 \
+  $(C5COMPATROOT)/usr/lib64/mysql
+OCAML_LIB_FLAGS = $(foreach d,$(C5_COMPAT_ROOT_DIRS),\
+  -ccopt -Xlinker \
+  -ccopt -rpath \
+  -ccopt -Xlinker \
+  -ccopt $(d))
+ifeq ($(REDHAT_VERSION),6)
+  OCAMLOPTFLAGS += $(OCAML_LIB_FLAGS)
+endif
+export OCAMLOPTFLAGS
 
-PP='camlp4o $(LIB)/type-conv/pa_type_conv.cma $(LIB)/sexplib/pa_sexp_conv.cma $(LIB)/fieldslib/pa_fields_conv.cma $(LIB)/pa_pipebang/pa_pipebang.cma'
+default : ocaml
 
-OCAMLOPT=ocamlfind ocamlopt -thread -w @a-4-7-9-29-28 \
-        -pp $(PP) \
-        -strict-sequence -annot -inline 20 -nodynlink -g \
-	-package core -package core_extended -package async -package pcre \
-
-%.cmx : %.ml %.mli
-	$(OCAMLOPT) -c $<i
-	$(OCAMLOPT) -c $<
-
-omake_server.exe : process.cmx omake.cmx omake_server.cmx
-	$(OCAMLOPT) -linkpkg -o $@ $^
-
-# Check whether the files compile without warnings or errors
-
-check-files = omake-lib.el omake.el
-check : *.el
-	emacs -batch -q --no-site-file -f batch-byte-compile $(check-files)
+ocaml :
+	cd ocaml; $(MAKE)
 
 clean :
-	rm -f *.exe *.cmx *.cmi *.spit *.spot *.o *.annot *.omc *.elc
+	cd ocaml; $(MAKE) clean
+
+.PHONY : ocaml
+Subdirs()

OMakefile.inside-jane-street

-OCAML_LIBRARIES[] =
-  async
-  core
-  core_extended
-  pcre
-  version_util
-
-EXES[] =
-  omake_server
-
-FILES[] =
-  $(EXES)
-  omake
-  process
-
-OCamlMakePPDeps($(PA_JANE), $(FILES))
-
-OCamlMakeProjDefaults($(addsuffixes .exe, $(EXES)))
 -*- mode: org -*-
 
-Jane Street Emacs customization files.
+Jane Street Emacs utilities.
 
-* files
+* Usage
 
-** js-common.el
+** Normal usage at the office
 
-Company-wide customizations that should be included
-by every emacs user.
+Everyone should add one of the following lines to their .emacs file.
 
-** js-cr.el
+      (load "/mnt/global/base/lib/elisp/jane/jane-common")
 
-Emacs support for the code review tool (cr)
+loads the shared libraries and sets variables according to our
+coding standards.
 
-** js-defaults.el
+      (load "/mnt/global/base/lib/elisp/jane/jane-defaults")
 
-Sane default settings for most emacs users
+Does the above and also sets standard defaults which many users
+find useful.
 
-** js-lib.el
+** Beta testers
 
-A grab-bag of functions for customizing emacs.
+Beta-testers (thank you!) should add
 
-** js-micro-features.el
+      (load "/mnt/global/base/lib/elisp/jane-test/jane-common")
 
-Micro features
+or
 
-** js-ocaml.el
+      (load "/mnt/global/base/lib/elisp/jane-test/jane-defaults")
 
-Common variable settings for tuareg-mode.
+These are analogous to the above, but with the next release.
 
-* notes
+** At home
 
-Note that the following libraries are *not* in this repo:
+For use at home
+  - Choose a site-lisp directory S.
+  - Clone the BitBucket repo into S/jane
+  - Add one of the following to .emacs
 
-   - tuareg
-   - ocamlspot
+      (load "S/jane/jane-common")
+      (load "S/jane/jane-defaults")
+
+
+
+

RELEASE_PROCEDURE

--*- mode:org -*-
-
-Tests
-=====
-
-Compile
---------
-
-* C-cC-c (Omake.compile) in a dired buffer
-* C-cC-c in a file
-* Repeatedly run C-cC-c and C-g for stress test
-* C-cC-c in an [Errors] buffer
-* C-cC-c in another directory that is not a subdir of a running
-  session, to make sure it will kill the other running session.
-
-Next-error
-----------
-
-* Make sure errors from the file you're visiting show up first
-* Cycle through all the errors and make sure you get what you expect
-
-Variables
----------
-
-* Try getenv, setenv, and toggle with restarts to make sure the variables
-  are being set properly
-
-* Window selection
-
-F1   = F1 contents before next-error
-F2   = F2 contents before next-error
-n-e  = frame in which I ran next-error
-F1'  = F1 contents after next-error
-F2'  = F2 contents after next-error
-s-w' = the selected window after next-error
-X    = I think disagrees with the spec
-
-Experiments with two frames
-
- | F1        | F2        | n-e | F1'       | X | F2'       | X | s-w' | X |
- |-----------+-----------+-----+-----------+---+-----------+---+------+---|
- | code      | *scratch* | F1  | split     |   | *scratch* |   | code |   |
- | *scratch* | code      | F2  | *scratch* |   | split     |   | code |   |
- | code      | [Errors]  | F1  | code      |   | [Errors]  |   | code |   |
- | code      | [Errors]  | F2  | code      |   | [Errors]  |   | code |   |
- | [Errors]  | code      | F1  | [Errors]  |   | code      |   | code |   |
- | [Errors]  | code      | F2  | [Errors]  |   | code      |   | code |   |
- | code      | code      | F1  | split     |   | code      |   | code |   |
- | code      | code      | F2  | code      |   | split     |   | code |   |
- | [Errors]  | [Errors]  | F1  | split     |   | [Errors]  |   | code |   |
-
-Experiments with a single frame
-
- | W1        | W2        | n-e | W1'      | X | W2'      | X | s-w' | X |
- |-----------+-----------+-----+----------+---+----------+---+------+---|
- | code      | <none>    | W1  | code     |   | [Errors] |   | code |   |
- | code      | *scratch* | W1  | code     |   | [Errors] |   | code |   |
- | *scratch* | code      | W2  | [Errors] |   | code     |   | code |   |
- | code      | [Errors]  | W1  | code     |   | [Errors] |   | code |   |
- | code      | [Errors]  | W2  | code     |   | [Errors] |   | code |   |
- | [Errors]  | code      | W1  | [Errors] |   | code     |   | code |   |
- | [Errors]  | code      | W2  | [Errors] |   | code     |   | code |   |
- | code      | code      | W1  | code     |   | [Errors] |   | code |   |
- | code      | code      | W2  | [Errors] |   | code     |   | code |   |
-
-
+#!/bin/bash
+set -e -u -o pipefail
+#set -x
+
+# Create a single file with all the elisp files and compile it to make
+# sure there are no errors
+
+tmp_file=/tmp/all.el
+
+home=$(dirname $0)/..
+cd $home
+home=$(pwd -L)
+bin=$home/bin
+contrib_dir=$home/elisp/contrib
+jane_dir=$home/elisp/jane
+omake_dir=$home/elisp/omake
+
+# echo "home: $home"
+# exit 1
+
+# top_files="
+# jane-common"
+
+jane_files="
+jane-lib
+jane-micro-features"
+
+omake_files="
+omake-custom
+omake-file
+omake-errors
+omake-version
+omake-face
+omake-id
+omake-path
+omake-progress
+omake-window
+omake-error
+omake-ring
+omake-failure
+omake-result
+omake-status
+omake-buffer
+omake-spinner
+omake-inotify
+omake-model
+omake-project
+omake-env
+omake-ocaml
+omake-filter
+omake-connection
+omake-server
+omake-ping
+omake-timer
+omake-interface
+omake-test
+omake-setup"
+
+rm -f $tmp_file
+cat > $tmp_file <<EOF
+(eval-when-compile
+  (require 'cl)
+  (require 'bytecomp)
+  (setq byte-compile-warnings (remove 'cl-functions byte-compile-warning-types))
+  (add-to-list 'load-path "$contrib_dir"))
+EOF
+
+function e {
+    echo $1 >> $tmp_file
+}
+
+function emit {
+    e ";; -----------------------------------------------------------------------------"
+    e ";; $1"
+    e ";; -----------------------------------------------------------------------------"
+}
+
+# for file in $top_files; do
+#     emit $file
+#     cat $home/$file.el >> $tmp_file
+# done
+
+for file in $jane_files; do
+    emit $file
+    cat $jane_dir/$file.el >> $tmp_file
+done
+
+for file in $omake_files; do
+    emit $file
+    cat $omake_dir/$file.el >> $tmp_file
+done
+
+batch=/tmp/batch.txt
+
+emacs -batch -f batch-byte-compile $tmp_file &> $batch
+
+if grep "Error\|Warning" $batch &> /dev/null; then
+    echo "check.sh: compilation failed"
+    cat $batch
+    exit 1
+fi
+
+emacs -batch -L $contrib_dir -l ert -l $tmp_file -f ert-run-tests-batch-and-exit &> $batch
+
+if grep "unexpected" $batch &> /dev/null; then
+    echo "check.sh: tests failed"
+    cat $batch
+    exit 1
+fi
+
+# run server tests
+if [ -e $bin/omake_server.exe ]; then
+    $home/ocaml/omake/test/runtests.sh
+fi
+#!/bin/bash
+
+set -e -u -o pipefail
+ulimit -c unlimited # allow arbitrarily large core files
+
+mode=test
+for arg in "$@"; do
+    case $arg in
+        -prod)
+            mode=prod
+            ;;
+        -test)
+            mode=test
+            ;;
+        *)
+            echo "Unknown argument: $arg"
+            exit 2
+            ;;
+    esac
+done
+
+if [ $mode = "prod" ]; then
+    echo "You are about to install a new PRODUCTION version of omake-emacs."
+    echo -n "Press ENTER to proceed, Ctrl-C to abort. "
+    read
+fi
+
+make -C doc
+
+exe=omake_server.exe
+
+echo "Installing $exe for mode: $mode"
+
+case $mode in
+    prod)
+        installed_exe=$exe
+        ;;
+    test)
+        installed_exe=omake_server_test.exe
+        ;;
+esac
+
+hg push ssh://hg2//hg/jane-elisp/roll-$mode
+jadmin install to-merge -loc 'hkg,ldn,nyc' \
+    ocaml/omake/$exe \
+    /mnt/global/base/bin/$installed_exe \
+    ;

deprecated/deprecated.el

Empty file removed.
+
+files=omake-mode jane-emacs
+texi=$(addsuffix .texi, $(files))
+info=$(addsuffix .info, $(files))
+
+default: $(info) #commit
+
+# omake-server.info: omake-server.texi
+# 	makeinfo $<
+# 	if [ -n "$$(hg st -m $@)" ]; then hg com -m 'rebuilt $@' $@; fi
+
+%.info : %.texi
+	makeinfo $<
+
+commit:
+	if [ -n "$$(hg st -m $(info))" ]; then hg com -m 'rebuilt info docs' $(info); fi
+
+clean :
+	-rm *.info
+This is the file .../info/dir, which contains the topmost node of the
+Info hierarchy.  The first time you invoke Info you start off
+looking at that node, which is (dir)Top.
+
+File: dir	Node: Top	This is the top of the INFO tree
+
+  This (the Directory node) gives a menu of major topics.
+  Typing "q" exits, "?" lists all Info commands, "d" returns here,
+  "h" gives a primer for first-timers,
+  "mEmacs<Return>" visits the Emacs topic, etc.
+
+  In Emacs, you can click mouse button 2 on a menu item or cross reference
+  to select it.
+
+* Menu:
+
+Jane
+* Jane Street Emacs: (jane-emacs).  Jane Street Emacs support.
+* OMake Mode: (omake-mode).  An Emacs interface for Omake.

doc/jane-emacs.info

+This is jane-emacs.info, produced by makeinfo version 4.13 from
+jane-emacs.texi.
+
+INFO-DIR-SECTION Jane Street
+START-INFO-DIR-ENTRY
+* jane-emacs: (jane-emacs).
+END-INFO-DIR-ENTRY
+
+
+File: jane-emacs.info,  Node: Top,  Next: Micro-features,  Up: (dir)
+
+Jane Street Emacs
+*****************
+
+Emacs use at Jane Street.
+
+* Menu:
+
+* Micro-features:: Batches of features that are easily enabled.
+* Ocamlspotter:: Jump to the definition of OCaml modules and values.
+
+
+File: jane-emacs.info,  Node: Micro-features,  Next: Ocamlspotter,  Prev: Top,  Up: Top
+
+Micro-features
+**************
+
+Emacs has a dizzying array of modes, variables, and keybindings
+available to customize the editing experience.  It can be difficult for
+new users to distinguish between options that many of us use frequently
+(`dired', `dabbrev-expand'), from those used infrequently.  Moreover,
+groups of variables often work together to make editing consistent
+(`truncate-lines', `truncate-partial-width-windows').  To facilitate
+experimenting with Emacs features, Jane Street created groups of
+options for tasks we find useful.  We call such a group a
+"micro-feature".  The choice of which variable goes into which group is
+somewhat arbitrary, but we've found that the current collections work
+well for most users.
+
+   For example, if you want to use `rgrep' to search files, enabling the
+grep microfeature will create shortcuts to search all ocaml files, or
+all OMakefiles below a given directory.  The perl microfeature sets
+mode variables that most people find improves editing in perl-mode.
+
+   Microfeatures are enabled by calling a function in your .emacs file.
+The two examples above are enabled using
+
+(Jane.grep)
+(Jane.perl)
+
+   You can see the code for these functions by putting the cursor on
+one of the functions and doing `M-x find-function-at-point'.
+
+   * `Jane.advanced'   Re-enable features that are turned off by
+     default because they confuse casual users.  (e.g. recursive
+     minibuffers.)
+
+   * `Jane.auto-modes'   Open files in the most natural major mode.
+
+   * `Jane.auto-revert'   Have Emacs update the buffer showing a file
+     that has changed on disk without asking permission.
+
+   * `Jane.backups'   Automatic backups.
+
+   * `Jane.bell'   How to alert in case of an error (and not annoy your
+     neighbors.)
+
+   * `Jane.buffer-menu'   Improve the buffer-menu (the buffer that
+     shows all the current buffers).
+
+   * `Jane.comint'   Improve shell interaction.
+
+   * `Jane.compilation'   Compilation support.
+
+   * `Jane.completion'   Improve completion.
+
+   * `Jane.desktop'   Save your desktop (the open buffers, history,
+     etc.) across sessions.
+
+   * `Jane.dictionary'   Look up words using a dictionary service.
+
+   * `Jane.dired'   Customize the directory editor.
+
+   * `Jane.ediff'   Diff tool.
+
+   * `Jane.edit-with-emacs'   Use Emacs to edit Chrome text boxes.
+
+   * `Jane.faces-{default,basic,dark,light,subtle}'   Faces.
+
+   * `Jane.find'   Fancy find-file support (due to sweeks)
+
+   * `Jane.flyspell'   Incremental spell checking.
+
+   * `Jane.frame'   Frames.
+
+   * `Jane.frame'   Frames.
+
+   * `Jane.global-keybindings'   Bindings some users find useful.
+
+   * `Jane.grep'   Use grep from Emacs
+
+   * `Jane.hg-blame-summary'   Quickly show the last user who edited a
+     line.
+
+   * `Jane.ido'   Settings for ido (nice buffer switching)
+
+   * `Jane.iswitchb'   Settings for iswitchb (another nice buffer
+     switching package)
+
+   * `Jane.linum'   Show line numbers in the left margin.
+
+   * `Jane.midnight'   Kill old unmodified buffers.
+
+   * `Jane.multiframe'   Settings for using multiple frames.
+
+   * `Jane.new-cr-todo'   Using the CR tool.
+
+   * `Jane.no-clutter'   Don't show scroll or tool bars or make backup
+     files.
+
+   * `Jane.pages'   Use visible page delimiters.
+
+   * `Jane.perl'   Perl-mode.
+
+   * `Jane.prefer-other-visible-frame'   More frame hacking.
+
+   * `Jane.recentf'   Remember recently opened files.
+
+   * `Jane.rectangle'   Buffer rectangle customizations.
+
+   * `Jane.saveplace'   When re-opening a file, the point goes to its
+     last location.
+
+   * `Jane.scrolling'   Scroll one line at a time.
+
+   * `Jane.selective-display'   Activate selective display based on the
+     column at point.
+
+   * `Jane.server'   Use the emacs server (with emacsclient)
+
+   * `Jane.text'   Improved text modes.
+
+   * `Jane.time'   Show time and date on the mode line.
+
+   * `Jane.uniquify'   Better unique names for files with the same name.
+
+   * `Jane.vc'   Version control.
+
+
+File: jane-emacs.info,  Node: Ocamlspotter,  Prev: Micro-features,  Up: Top
+
+Ocamlspotter
+************
+
+OCamlspotter allows you to navigate OCaml code more easily.  It
+provides the following two very useful features.
+
+   * Jump to the definition of a value.
+
+     `M-x ocamlspot-query', `C-c;'
+
+   * Show the type of an expression.
+
+     `M-x ocamlspot-type', `C-ct'
+
+
+
+Tag Table:
+Node: Top180
+Node: Micro-features459
+Node: Ocamlspotter4517
+
+End Tag Table

doc/jane-emacs.texi

+
+@c -----------------------------------------------------------------------------
+@c  Header
+@c -----------------------------------------------------------------------------
+
+\input texinfo
+
+@setfilename jane-emacs.info
+@settitle Jane Street Emacs customizations
+
+@set VERSION 3.0
+@set EMACSVER 23.3
+@set DATE April 2012
+
+@dircategory Jane Street
+@direntry
+* jane-emacs: (jane-emacs).
+@end direntry
+
+@titlepage
+@title Jane Street Emacs
+@subtitle For Emacs Version @value{EMACSVER}
+@subtitle Revision @value{VERSION}, @value{DATE}
+@author Sean McLaughlin and Stephen Weeks
+@page
+@vskip 0pt plus 1filll
+@end titlepage
+
+@c Output the table of contents at the beginning.
+@summarycontents
+@contents
+
+@c -----------------------------------------------------------------------------
+@c  Top
+@c -----------------------------------------------------------------------------
+
+@node Top
+@top Jane Street Emacs
+
+Emacs use at Jane Street.
+
+@menu
+* Micro-features:: Batches of features that are easily enabled.
+* Ocamlspotter:: Jump to the definition of OCaml modules and values.
+
+@end menu
+
+@node Micro-features
+@unnumbered Micro-features
+
+Emacs has a dizzying array of modes, variables, and keybindings
+available to customize the editing
+experience.  It can be difficult for new users to
+distinguish between options that many of us use frequently
+(`dired', `dabbrev-expand'), from those used
+infrequently.  Moreover, groups of variables often work together to
+make editing consistent (`truncate-lines', `truncate-partial-width-windows').
+To facilitate experimenting with Emacs features, Jane Street
+created groups of options for tasks we find useful.
+We call such a group a @dfn{micro-feature}.  The choice of which
+variable goes into which group is somewhat arbitrary, but we've found
+that the current collections work well for most users.
+
+For example, if you want to use @kbd{rgrep} to search files, enabling the
+grep microfeature will create shortcuts to search all ocaml files, or
+all OMakefiles below a given directory.  The perl microfeature sets
+mode variables that most people find improves editing in perl-mode.
+
+Microfeatures are enabled by calling a function in your .emacs file.
+The two examples above are enabled using
+
+@verbatim
+(Jane.grep)
+(Jane.perl)
+@end verbatim
+
+You can see the code for these functions by putting the cursor on
+one of the functions and doing @kbd{M-x find-function-at-point}.
+
+@itemize
+@item @kbd{Jane.advanced}
+  Re-enable features that are turned off by default because they
+confuse casual users.  (e.g. recursive minibuffers.)
+@item @kbd{Jane.auto-modes}
+  Open files in the most natural major mode.
+@item @kbd{Jane.auto-revert}
+  Have Emacs update the buffer showing a file that has changed
+on disk without asking permission.
+@item @kbd{Jane.backups}
+  Automatic backups.
+@item @kbd{Jane.bell}
+  How to alert in case of an error (and not annoy your neighbors.)
+@item @kbd{Jane.buffer-menu}
+  Improve the buffer-menu (the buffer that shows all the current buffers).
+@item @kbd{Jane.comint}
+  Improve shell interaction.
+@item @kbd{Jane.compilation}
+  Compilation support.
+@item @kbd{Jane.completion}
+  Improve completion.
+@item @kbd{Jane.desktop}
+  Save your desktop (the open buffers, history, etc.) across sessions.
+@item @kbd{Jane.dictionary}
+  Look up words using a dictionary service.
+@item @kbd{Jane.dired}
+  Customize the directory editor.
+@item @kbd{Jane.ediff}
+  Diff tool.
+@item @kbd{Jane.edit-with-emacs}
+  Use Emacs to edit Chrome text boxes.
+@item @kbd{Jane.faces-@{default,basic,dark,light,subtle@}}
+  Faces.
+@item @kbd{Jane.find}
+  Fancy find-file support (due to sweeks)
+@item @kbd{Jane.flyspell}
+  Incremental spell checking.
+@item @kbd{Jane.frame}
+  Frames.
+@item @kbd{Jane.frame}
+  Frames.
+@item @kbd{Jane.global-keybindings}
+  Bindings some users find useful.
+@item @kbd{Jane.grep}
+  Use grep from Emacs
+@item @kbd{Jane.hg-blame-summary}
+  Quickly show the last user who edited a line.
+@item @kbd{Jane.ido}
+  Settings for ido (nice buffer switching)
+@item @kbd{Jane.iswitchb}
+  Settings for iswitchb (another nice buffer switching package)
+@item @kbd{Jane.linum}
+  Show line numbers in the left margin.
+@item @kbd{Jane.midnight}
+  Kill old unmodified buffers.
+@item @kbd{Jane.multiframe}
+  Settings for using multiple frames.
+@item @kbd{Jane.new-cr-todo}
+  Using the CR tool.
+@item @kbd{Jane.no-clutter}
+  Don't show scroll or tool bars or make backup files.
+@item @kbd{Jane.pages}
+  Use visible page delimiters.
+@item @kbd{Jane.perl}
+  Perl-mode.
+@item @kbd{Jane.prefer-other-visible-frame}
+  More frame hacking.
+@item @kbd{Jane.recentf}
+  Remember recently opened files.
+@item @kbd{Jane.rectangle}
+  Buffer rectangle customizations.
+@item @kbd{Jane.saveplace}
+  When re-opening a file, the point goes to its last location.
+@item @kbd{Jane.scrolling}
+  Scroll one line at a time.
+@item @kbd{Jane.selective-display}
+  Activate selective display based on the column at point.
+@item @kbd{Jane.server}
+  Use the emacs server (with emacsclient)
+@item @kbd{Jane.text}
+  Improved text modes.
+@item @kbd{Jane.time}
+  Show time and date on the mode line.
+@item @kbd{Jane.uniquify}
+  Better unique names for files with the same name.
+@item @kbd{Jane.vc}
+  Version control.
+@end itemize
+
+@node Ocamlspotter
+@unnumbered Ocamlspotter
+
+OCamlspotter allows you to navigate OCaml code more easily.
+It provides the following two very useful features.
+
+@itemize
+@item Jump to the definition of a value.
+
+      @kbd{M-x ocamlspot-query}, @kbd{C-c;}
+@item Show the type of an expression.
+
+      @kbd{M-x ocamlspot-type}, @kbd{C-ct}
+@end itemize
+
+@bye

doc/omake-mode.info

Binary file added.

doc/omake-mode.texi

+
+@c -----------------------------------------------------------------------------
+@c  Header
+@c -----------------------------------------------------------------------------
+
+@setfilename omake-mode.info
+@settitle OMake Mode Reference Manual
+
+@set VERSION 3.0
+@set EMACSVER 23.3
+@set DATE April 2012
+
+@c Combine indices.
+@synindex cp fn
+@syncodeindex vr fn
+@c @syncodeindex ky fn
+@syncodeindex pg fn
+
+@dircategory OMake Mode
+@direntry
+* Omake Server: (omake-mode). The OMake Server Manual.
+@end direntry
+
+@titlepage
+@title An OMake interface for Emacs
+@subtitle For Emacs Version @value{EMACSVER}
+@subtitle Revision @value{VERSION}, @value{DATE}
+@author Sean McLaughlin and Stephen Weeks
+@page
+@vskip 0pt plus 1filll
+@end titlepage
+
+@c Output the table of contents at the beginning.
+@summarycontents
+@contents
+
+@c -----------------------------------------------------------------------------
+@c  Top
+@c -----------------------------------------------------------------------------
+
+@node Top
+@top OMake Mode
+
+OMake (http://omake.metaprl.org/index.html) is a compilation manager
+used, among other things, to build OCaml programs.  OMake Server
+is a combined OCaml/Emacs-Lisp program that manages groups of OMake
+compilations.  You can start and stop compilations
+(from Emacs or the command line),
+manage and save compilation options for each project,
+quickly jump to errors discovered by the OCaml compiler,
+and access compilations from multiple Emacs processes.
+
+@menu
+* Quick Start::                 How to begin compiling quickly.
+* Projects::                    A project is a running omake process.
+* Buffers::                     Special buffers
+* Windows and Frames::          Where buffers are displayed
+* User Interface::              Variables and functions
+* Server::                      Interacting with the server from the command line
+* Index::                       Index including concepts, functions, variables, and other terms.
+* Acknowledgments::             Major contributors to omake-server.
+
+@end menu
+
+@c -----------------------------------------------------------------------------
+@c  Quick Start
+@c -----------------------------------------------------------------------------
+
+@node Quick Start
+@chapter Quick Start
+
+@enumerate
+@item Open a dired buffer where you want compilation to begin.
+@item Do @kbd{C-c C-c} to run @kbd{Omake.compile}.
+This will either start a compilation in that directory, or watch an existing
+project if there is already one running.
+It will also show a status buffer
+for the project. @ref{Status Buffer}.
+@item Do @kbd{C-c C-l} to jump through the OCaml errors with @kbd{Omake.next-error}.
+@item To see all the currently building projects, do @kbd{C-c C-p}
+(@kbd{Omake.show-projects-buffer}).
+@end enumerate
+
+@c -----------------------------------------------------------------------------
+@c  Projects
+@c -----------------------------------------------------------------------------
+
+@node Projects
+@chapter Projects
+@cindex project
+
+A @dfn{project} is the name we give to a running omake process.  For example,
+suppose we have the following directory structure:
+
+@verbatim
+foo/
+  OMakeroot
+  OMakefile
+  a/
+    OMakefile
+    a.ml
+  b/
+    OMakefile
+    b.ml
+@end verbatim
+
+@noindent Running
+@verbatim
+$ cd foo/a
+$ omake_server.exe project start
+@end verbatim
+
+@noindent would create a project in foo/a with
+@dfn{omakeroot-dir} foo and @dfn{compilation-dir} foo/a.
+The omakeroot-dir is the directory of the OMakeroot file,
+and compilation-dir is where compilation began.
+@cindex omakeroot-dir
+@cindex compilation-dir
+
+Omake Mode can manage multiple concurrent projects.  The only restriction
+is that projects must have unique omakeroot-dirs.  In the above example, we
+could not simultaneously have projects foo/a and foo/b since they share an OMakeroot file.
+
+Note that you never need to use the command line.  Projects can be managed
+directly from Emacs (@ref{User Interface}).
+To view the projects currently building, @xref{Projects Buffer}.
+
+Each Emacs process can decide whether or not it is interested in a given
+project.  Notifying the server that a given Emacs wants to see updates to
+a project is called @dfn{watching} the project.
+@cindex watch, watching
+
+
+@c -----------------------------------------------------------------------------
+@c  Buffers
+@c -----------------------------------------------------------------------------
+
+@node Buffers
+@chapter Buffers
+
+OMake Mode maintains a number of specialized buffers.  The
+@dfn{projects buffer} maintains a list of the current projects.  Each
+project
+
+@menu
+* Projects Buffer::
+* Status Buffer::
+* Raw Buffer::
+@end menu
+
+@node Projects Buffer
+@section The Projects Buffer
+
+The @dfn{projects buffer} gives an overview of the projects currently
+being compiled, and whether Emacs is watching the projects.
+To see the projects buffer, do @kbd{C-c C-p} (@kbd{Omake.show-projects-buffer}).
+For example, the following is the contents of a projects
+
+@verbatim
+    watching #watching   omakeroot                 dir
+
+[0] yes      1           ~/foo                     lib
+[1] yes      2           ~/bar                     .
+@end verbatim
+
+This buffer shows that there are two projects being compiled.
+The foo project was started in foo/lib, and the bar project was
+started in the same diretory as the OMakeroot file.  Both projects
+are being watched by Emacs, meaning that there is a status buffer
+for the project, and any new errors are being sent to this Emacs
+instance.  #watching refers to the number of Emacs instances watching
+the project.  Project ``bar'' is being watched by some other Emacs,
+while this Emacs is the only one watching project ``foo''.
+
+If the cursor is on a project line, you can manage the project directly
+from the projects buffer.
+
+``k'' will kill the project.  Killing the project means stopping the omake
+process.  In this case, killing ``bar'' will remove the project from
+both Emacs instances.
+
+``w'' will toggle the watching status of the project.
+
+``l'' will jump to the next error in the project.
+
+``RET'' will open a dired buffer of the directory where compilation
+began
+
+@node Status Buffer
+@section The Status Buffer
+
+@node Raw Buffer
+@section The Raw Buffer
+
+@c -----------------------------------------------------------------------------
+@c  User Interface
+@c -----------------------------------------------------------------------------
+
+@node User Interface
+@chapter User Interface
+
+@menu
+Commands
+* Common::                        Frequently used commands
+* Dedicated Windows and Frames::  Controlling where buffers appear
+* Environment Variables::         Env
+* Customization::                 Cus
+* Debugging::                     Deb
+@end menu
+
+@node Common
+@section Common
+
+@defun Omake.show-projects-buffer
+  Show the projects buffer.
+  @xref{Projects}.
+@end defun
+
+
+@defun Omake.compile
+@kindex Omake.compile
+Compile a new project or watch an existing project.
+Open a file in (or dired buffer of) the directory you want to compile
+and do @kbd{M-x Omake.compile}.  To set the omake command, use a prefix
+argument (@kbd{C-u M-x Omake.compile}).
+@end defun
+
+@defun Omake.watch
+Watch a project.
+@xref{Projects}.
+@end defun
+
+@defun Omake.unwatch
+Unwatch a project.
+@xref{Projects}.
+@end defun
+
+@defun Omake.next-error
+@kindex C-c C-l
+Jump to the next error.
+@end defun
+
+@defun Omake.toggle-verbose
+@kindex C-c C-v
+Show verbose data in the status buffer.
+@end defun
+
+@defun Omake.toggle-expanded-error
+Some errors are very large (e.g. signature mismatches).  Omake-mode
+hides the bulk of the message (indicated with elipses)
+until it is the current error.
+Use Omake.toggle-expanded-error to expand/contract large errors.
+@end defun
+
+@defun Omake.show-raw-buffer
+Show a buffer containing the raw OMake output.  This is
+useful in exceptional cases where omake-mode is confused.
+@end defun
+
+@defun Omake.shutdown
+Shutdown the OMake server.  Note that this will affect other
+emacs instances communicating with the server.
+@end defun
+
+@node Dedicated Windows and Frames
+@section Dedicated Windows and Frames
+
+@defun Omake.set-dedicated-status-@{window,frame@.
+Set the window (frame) where status buffers are displayed.
+@xref{Windows and Frames}.
+@end defun
+
+@defun Omake.set-dedicated-code-@{window,frame@.
+Set the window (frame) where code is displayed.
+@xref{Windows and Frames}.
+@end defun
+
+@defun Omake.clear-dedicated-windows-and-frames
+Unset all dedicated windows and frames.
+@xref{Windows and Frames}.
+@end defun
+
+@node Environment Variables
+@section Environment Variables
+
+The behavior of the Jane Street OMakeroot is affected by a number of environment
+variables.
+
+@itemize
+@item @kbd{FOUR_POINT_ZERO}
+@item @kbd{LIMIT_SUBDIRS_FOR_SPEED}
+@item @kbd{LINK_EXECUTABLES}
+@item @kbd{VERSION_UTIL_SUPPORT}
+@item @kbd{X_LIBRARY_INLINING}
+@end itemize
+
+You can see the current settings for the variables in a project that is building by
+toggling verbose mode with @kbd{C-c C-v}.  You also set these variables from within OMake
+mode.  The easiest way to do this is with @kbd{C-c C-o}, which prompts for a variable (and
+supports tab completion) and then toggles the value.
+
+OMake server maintains distinct settings of these variables for each project, where a
+project is identified by the path to the root of the project.  There is one directory in
+@kbd{~/.omake-server} for each project OMake server has encountered.  You can see your per
+project settings for project P (P is the full path to the project) in:
+
+  @kbd{~/.omake-server/$P/env.sexp}
+
+If you move a project from one directory to another, OMake server will not know this, and
+will treat the project as a new project, which will reset your settings to their default
+values.
+
+When OMake server encounters a new project, it uses the environment variable setting of a
+variable, if any, for its initial value.  So, for example, you can put in your
+@kbd{~/.bashrc}:
+
+  @kbd{export X_LIBRARY_INLINING=false}
+
+Then, OMake server will initialiaze @kbd{X_LIBRARY_INLINING} to @kbd{false} in any new
+projects it encounters.  This will not affect existing projects.  If you change your
+@kbd{~/.bashrc}, in order to affect omake server, you must start it in an environment
+where the changed @kbd{~/.bashrc} is in effect.  If you start OMake server via emacs, as
+is typical, you can restart emacs from a new terminal that has the changed
+@kbd{~/.bashrc}, and then restart OMake server.
+
+@defun Omake.setenv
+Set an OMake environment variable.
+@end defun
+
+@defun Omake.getenv
+Display the value of an OMake environment variable.
+@end defun
+
+@defun Omake.toggle-env
+@kindex C-c C-o
+Toggle an OMake environment variable.
+@end defun
+
+@node Customization
+@section Customization
+
+@defun Omake.use-light-faces
+Use faces for a light background.
+@end defun
+
+@defun Omake.use-dark-faces
+Use faces for a dark background.
+@end defun
+
+@node Debugging
+@section Debugging
+
+@defun Omake.notify-maintainer-of-error
+Submit a bug report.
+@end defun
+
+@defun Omake.reset-visited
+Reset the visited error ring.
+@end defun
+
+@defun Omake.show-elisp-buffer
+Show the last elisp code from omake-server that was evaled by Emacs.
+@end defun
+
+@defun Omake.show-server-log
+Show the omake-server global log.
+@end defun
+
+@defun Omake.show-mode-log
+Show the Emacs messages log.
+@end defun
+
+@defun Omake.reset-visited
+Unset the visited status of the errors.
+@end defun
+
+@defun Omake.show-project-log
+Show the OMake log for a given project.
+@end defun
+
+@defun Omake.shutdown-and-remove-hooks
+Shutdown the server and remove the kill-buffer hooks.
+If omake-mode is totally hosed and you have trouble quitting emacs
+try this function.
+@end defun
+
+@c -----------------------------------------------------------------------------
+@c  Windows
+@c -----------------------------------------------------------------------------
+
+@node Windows and Frames
+@chapter Windows and Frames
+
+In this section we describe the algorithm for determining in which windows
+to show the various omake-server buffers.  By ``windows'' we mean
+Emacs windows. (@ref{Windows, , , emacs})  This is in contrast to X windows, which
+correspond to Emacs frames. (@ref{Frames, , , emacs})  The
+@dfn{selected window} is the window that currently has the cursor in
+it.  The @dfn{selected frame} is the frame that currently has the cursor.
+
+@menu
+* Dedicated::
+@end menu
+
+@node Dedicated
+@section Dedicated
+
+There are a number of ways to display the error and code buffers.
+If you always want them to appear in the same window
+(resp. frame), use the following functions.
+
+@defun Omake.set-dedicated-error-window
+Always show errors in this window.
+@end defun
+
+@defun Omake.set-dedicated-code-window
+Always show code in this window.
+@end defun
+
+@defun Omake.set-dedicated-error-frame
+Always show errors in some window in this frame.
+@end defun
+
+@defun Omake.set-dedicated-code-frame
+Always show code in some window in this frame.
+@end defun
+
+@noindent
+(Note that if you set a dedicated window (frame), and subsequently
+delete it, there is no longer a dedicated window.)  Depending on
+personal preference, there are reasons for setting a dedicated frame
+rather than a dedicated window and vice versa.  Frames have multiple
+windows which makes windows more precise, but frames are created and
+deleted much less frequently than windows, which means they will
+disappear less often.
+
+@noindent
+We use the following abbreviations to describe the algorithm that
+follows.
+@verbatim
+DCW       = dedicated code window
+DCF       = dedicated code frame
+DEW       = dedicated error window
+DEF       = dedicated error frame
+SW        = selected window
+SF        = selected frame
+EB        = errors buffer
+CB        = code buffer
+frame(W)  = the frame of window W
+# CR sweeks: window(B) is ill-defined.  There can be multiple windows showing a buffer.
+window(B) = the window of buffer B
+buffer(W) = the buffer of window W
+split(W)  = the new window resulting from the split of existing window W
+lru(F)    = least recently used window of frame F
+EF        = final frame where EB is shown
+CF        = final frame where CB is shown
+EW        = final window where EB is shown
+CW        = final window where CB is shown
+@end verbatim
+
+The purpose of this section is to determine EW and CW from DCW, DCF,
+ECW, ECF, SW, SF.  Throughout this discussion, we assume that the DEW is
+distinct from the DCW.  (This is enforced by omake-server.)  We do not
+assume that buffer(DCW) <> EB.  It is easy
+to imagine that someone manually switched to EB from DCW.
+
+When we write ``split(W)'' we are always splitting a frame with
+a single window, and we split it according to the variable
+@code{Omake.split-window-horizontally}.  We assure that EW<>CW.
+
+@section Choosing the frame
+
+Choosing the correct frames for CW and EW is straightforward.
+
+@section Choosing CF
+
+If there is a DCW, CF=frame(DCW). @*
+If there is a DCF, CF=DCF. @*
+Otherwise CF=SF.
+
+@section Choosing EF
+
+If there is a DEW, EF=frame(DEW). @*
+If there is a DEF, EF=DEF. @*
+Otherwise EF=SF.
+
+@section Choosing CW and EW
+
+Assume EF and CF are determined as above.
+@verbatim
+If EF and CF are distinct, we can select EW and CW independently.
+
+Case: EF and CF are distinct.
+  [EW]
+  Case: DEW exists
+    EW=DEW
+  Case: There exists W in EF such that buffer(W) = EB
+    EW=W
+  Case:
+    EW=lru(EF)
+
+  [CW]
+  Case: DCW exists
+    EW=DCW
+  Case: SW in CF.
+    EW=SW
+  Case:
+    EW=lru(CF)
+
+If EF=CF, we have to make sure the choices are not interfering
+with each other to maintain CW<>EW.
+