-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: At emacs startup, ocamlformat creates a lot of temporary files #2001
Comments
It should be noticed that when saving a file, ocamlformat will format each temporary file it created |
I don't observe this with the main branch of ocamlformat, what version are you using? If that's an old one can you try with 0.20.0 or 0.20.1? |
I have ocamlformat 0.20.1
|
The steps I provided will remove all installed files when you leave emacs so it's safe to execute it ;-) |
I'm using emacs 28.0.50, if this may help but I have the same behaviour with emacs 27.2 |
So, after a bit of investigation this is what I noticed:
Temporary files are created anytime you save a file but if you don't hook ocamformat to tuareg-mode at least you don't end up with 20 temporary files created at startup. Using the #2003 patch doesn't change anything about these behaviours. You still can't reproduce it with the steps I provided? |
I see, using the lambda notation to hook ocamlformat onto the tuareg mode is what we used in the documentation (https://github.com/ocaml-ppx/ocamlformat/blob/main/doc/editor_setup.mld) this page shows some tips on how to neatly interface ocamlformat with tuareg. |
Describe the bug
OCamlformat creates a lot of files in /tmp/ named ocamlformat[random ascii*].ml when starting emacs
How to Reproduce
Steps to reproduce the behavior:
The text was updated successfully, but these errors were encountered: