utop icon indicating copy to clipboard operation
utop copied to clipboard

Customize starting directory for utop

Open benbellick opened this issue 1 year ago • 1 comments

Hi! I opened up #471 . I use utop-mode but wanted to automatically load in my .ocamlinit file at the root level of my project without having to pass it in explicitly using the -init flag. My solution is to enable a customization to start utop from the project root dir.

Now when you set the variable utop-starting-directory (possibly via customize) to 'project-root, project.el is used to find the current buffer's project root. Then utop is called from that directory. If the project cannot be found, an error is thrown.

benbellick avatar Dec 13 '23 05:12 benbellick