camlspotter avatar camlspotter committed a0e11a9

readme update

Comments (0)

Files changed (1)

 and use it:
 
 * Set ``load-path``.
-* Tell Emacs where it can find ``ocamlspot`` binary.
+* Set your ``ocamlspot`` binary in your emacs setting (``M-x customize-group => ocamlspot``)
 * Add caml or tuareg mode hook.
+* See the buffer ``*ocamlspot-process*`` if you thing something goes wrong.
 
 If you have done properly, move your cursor to OCaml identifier and
 press ``C-c ;``. Emacs should display the definition of the identifier.
 Sorry but I do not use Vim.
 
 
-To work with OCamlSpotter
-==========================
+If something goes wrong...
+--------------------------------
 
 To browse modules correctly, 
 
 * Use the correct ``ocamlspot`` matching with your OCaml compiler version.
-* Set your ``ocamlspot`` binary in your emacs setting (``M-x customize-group => ocamlspot``)
-* See the buffer ``*ocamlspot-process*`` if you thing something goes wrong.
 * Compile OCaml modules with ``-bin-annot`` ocaml compiler option.
 * Keep the source code and produced cmt/cmti files.
 * Install cmt/cmti files along with cmi/cma/cmxa files.
 
 Otherwise OCamlSpotter complains that it cannot find required cmt/cmti files.
 
-How to do it?
----------------------------
+Browsing libraries, packages and OCaml stdlibs 
+=======================================================
 
-Normally this requires little modifications to the build script (Makefile/OMakefile/...) of each library.
+Libraries and packages
+-----------------------------
+
+Normally OCaml libraries and packages are not always compiled with -bin-annot option
+and do not always install the annotation files.
+Therefore, if you want to use OCamlSpotter with installed libraries and packages,
+you must rebuild them with -bin-annot compiler option.
+This requires little modifications to their build script (Makefile/OMakefile/...).
 Basically, you need:
 
 * Add -bin-annot to the compiler switch. For example OCAMLCFLAGS += -bin-annot
      install::
         cp \*.mli \*.cmi \*.cma \*.cmt \*.cmti \*.cmxa $(INSTALLDIR)
 
-This means that you need to recompile all the OCaml libraries you use with -bin-annot.
+* Do not remove the original source files, otherwise browsing cannot work.
+
+Browsing OCaml stdlib and otherlibs
+------------------------------------------
 
 If you want to browse OCaml's standard library (stdlib and otherlibs), 
-you must also recompile those modules with -bin-annot option to create cmt/cmti files.
+you must recompile those modules with -bin-annot option to create cmt/cmti files.
 
-Some automation
---------------------------
+Automation
+------------------------------------
 
 To facilitate these you may want to use SpotInstall( https://bitbucket.org/camlspotter/spotinstall ). SpotInstall provides:
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.