You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I am trying to use utop-mode in my emacs workflow and am encountering the following issue. I would like to do some basic setup in an .ocamlinit file to make certain facilities available to me every time I start a new utop (e.g. install a printer).
Example
Suppose I have a .ocamlinit file which looks as follows:
openUtop_test__Lib;;
#install_printer pp_a;;
where the first line is just some example module, and the second line is just some example printer being installed (which we will say prints values of type a.
When I start utop from the command line via opam exec -- dune utop . -- -emacs, Utop_test__Lib is indeed opened and pp_a is automatically called when values of type a are created.
However, when I run the (nearly identical) command opam exec -- dune utop . -- -emacs when invoking M-x utop, the .ocamlinit file is not loaded.
Is this the intended behavior? If not, I would be happy to work on it if someone can point me towards where to start :)
The text was updated successfully, but these errors were encountered:
Upon further investigation, I now see that the problem is the command opam exec -- dune utop . -- -emacs is executed from dir in which the currently focused buffer exists. Is there currently some way I can tell utop to default execute from the project root dir?
Summary
Hi! I am trying to use
utop-mode
in my emacs workflow and am encountering the following issue. I would like to do some basic setup in an.ocamlinit
file to make certain facilities available to me every time I start a newutop
(e.g. install a printer).Example
Suppose I have a
.ocamlinit
file which looks as follows:where the first line is just some example module, and the second line is just some example printer being installed (which we will say prints values of type
a
.When I start
utop
from the command line viaopam exec -- dune utop . -- -emacs
,Utop_test__Lib
is indeed opened andpp_a
is automatically called when values of typea
are created.However, when I run the (nearly identical) command
opam exec -- dune utop . -- -emacs
when invokingM-x utop
, the.ocamlinit
file is not loaded.Is this the intended behavior? If not, I would be happy to work on it if someone can point me towards where to start :)
The text was updated successfully, but these errors were encountered: