[Omake] omake summary messages are not parsed by emacs

Sam Steingold sds at gnu.org
Tue Jul 7 10:46:41 PDT 2009


Hi,
This patch fixes the problem reported below:


diff -r c39cb68ca711 src/build/omake_build_tee.ml
--- a/src/build/omake_build_tee.ml	Mon Jul 06 10:22:58 2009 -0400
+++ b/src/build/omake_build_tee.ml	Tue Jul 07 13:44:11 2009 -0400
@@ -182,7 +182,13 @@
  let format_tee_with_nl buf command =
     match tee_file command.command_tee with
        Some name ->
-         format_file_with_nl buf name
+         let wd = Dir.absname (venv_dir command.command_venv)
+         and print_dir = opt_print_dir (venv_options command.command_venv) in
+         if print_dir then
+           fprintf buf "@\n@[make[0]: Entering directory `%s'@]" wd;
+         format_file_with_nl buf name;
+         if print_dir then
+           fprintf buf "@\n@[make[0]: Leaving directory `%s'@]" wd;
      | None ->
           ()



Sam Steingold wrote:
> the final omake messages:
> 
> *** omake: blocked (7.54 sec, 16/1826 scans, 1086/8118 rules, 2143/80867 digests)
> *** omake: targets were not rebuilt because of errors:
>     a/b/c.cmi
>        depends on: a/b/c.ml
>     a/b/c.cmo
>        depends on: a/b/c.ml
>        - build news/tools c.cmo
>        + ocamlfind ocamlc ... -c c.ml
>        File "c.ml", line 219, characters 23-43:
>        Error: Unbound value Foo.bar
>     a/b/c.cmx
>        depends on: a/b/c.ml
>     a/b/c.o
>        depends on: a/b/c.ml
> *** omake: polling for filesystem changes
> 
> is not handled correctly by the emacs compilation mode because the error 
> message [[File "c.ml", line 219, characters 23-43:]] contains the local file 
> name while the "current directory" (as established by the "entering/leaving" 
> messages) is the top-level.
> the result is that when I click on "c.ml", emacs prompts me for the path 
> instead of opening "a/b/c.ml".
> (note that the running messages are handled correctly because of the 
> "entering/leaving" messages).
> 
> This could be fixed by either
> 1. adding the "entering/leaving" messages to the final omake report or
> 2. using full paths in the summary message, i.e.
>         File "a/b/c.ml", line 219, characters 23-43:
> or
>         File "/home/sds/src/a/b/c.ml", line 219, characters 23-43:
> 
> Thanks
> Sam.



More information about the Omake mailing list