ocamlformat
ocamlformat copied to clipboard
Emacs error popup
When using ocamlformat under emacs, a buffer pops up very often saying the following
ocamlformat errors:
ocamlformat: SRC… arguments: no '117-117' file
Usage: ocamlformat [OPTION]… [SRC]…
Try 'ocamlformat --help' for more information.
The '117-117' range would be lines on which I typed a couple of newlines. This behavior happens even on files that pass ocaml typechecking.
Currently using ocamlformat 22.4.
I tried again with the most recent release and didn't witness any issue. Do you have a concrete example? Did you configure emacs following the instructions of https://ocaml.org/p/ocamlformat/0.23.0/doc/editor_setup.html or do you have a custom setup?
I'm using the lastest version of doom emacs. I have upgraded the ocamlformat package to the lastest version, but this issues still persists. I will try again with a vanilla emacs config to see if it's a problem on doom's side in which case I will report an issue with them.
Can confirm this bug. It happens when entering a new line and ocamlformat-line
is called. I'm using ocamlformat 0.24.1 and the latest doom emacs. Is it possible that the doom emacs ocaml package needs an upgrade?
edit: Manually applying https://github.com/ocaml-ppx/ocamlformat/commit/f986a50fbee85e4f955c39972a28894402fdec7a fixed the issue on my setup
After a recent update to doom emacs, this is no longer an issue.