1 Answer
1

then it doesn't work because each makefile command is executed in a separate shell, so the environment variable assignment vanishes after the first line completes. You can combine the two lines in a single logical line instead:

↹export OCAMLRUNPARAM=b; \
↹./Simpler-Basic test.sib

If you always want backtraces when running an Ocaml program from within Emacs, set the environment variable in your .emacs:

(setenv "OCAMLRUNPARAM" "b")

In order for Emacs to recognize the backtrace messages as error messages with a location, you need to register them in compilation-regexp-alist. Put something like this in your .emacs (untested):

Indeed, i wrote export OCAMLRUNPARAM=b in Makefile... I have amended it and now it shows well the traceback in Emacs... One advantage to have them in Emacs is to be able to localize them by clicking on them. But this does not work yet, I guess i need to modify again .emacs, do you have any suggestion?
–
SoftTimurJun 18 '11 at 18:10

By the way, when there is something wrong with my programs during compilation, I could localize them by clicking on them, for instance I could press on File "interp.ml", line 45, characters 21-91:. But it does not work yet with traceback...
–
SoftTimurJun 18 '11 at 18:13

@SoftTimur: You need to tell Emacs how to recognize the backtrace messages, see my edit.
–
GillesJun 18 '11 at 22:04