# \#emacs

**URL:** https://discuss.ocaml.org/tag/emacs/13.md

[Latest](https://discuss.ocaml.org/latest.md) · [Categories](https://discuss.ocaml.org/categories.md) · [Tags](https://discuss.ocaml.org/tags.md)

---

## [Neocaml-mode (A modern Emacs major mode for OCaml) is looking for testers](https://discuss.ocaml.org/t/neocaml-mode-a-modern-emacs-major-mode-for-ocaml-is-looking-for-testers/17807)

<div class="topic-metadata">

**Author:** [@bbatsov](https://discuss.ocaml.org/u/bbatsov)\
**Replies:** 38\
**Last updated:** [May 26, 2026, 12:22am UTC](https://discuss.ocaml.org/t/neocaml-mode-a-modern-emacs-major-mode-for-ocaml-is-looking-for-testers/17807 "2026-05-26T00:22:15Z")

</div>

Hey everyone, Just wanted to let you know I’ve spent a bit of time polishing neocaml and I think now it’s ready to be used (or at least tested) by more people. The font-locking and indentation are more or less done, and…

---

## [Weird completion list on records with company, including modules](https://discuss.ocaml.org/t/weird-completion-list-on-records-with-company-including-modules/18156)

<div class="topic-metadata">

**Author:** [@ysalmon](https://discuss.ocaml.org/u/ysalmon)\
**Replies:** 3\
**Last updated:** [May 21, 2026, 9:27am UTC](https://discuss.ocaml.org/t/weird-completion-list-on-records-with-company-including-modules/18156 "2026-05-21T09:27:11Z")

</div>

I am using Emacs, Tuareg, utop and Company (and merlin), and the autocomplete feature gives strange lists when a record field is involved. Consider the following type t = {x:int; y:int} type t2 = {f: t; g:t} let f x = …

---

## [Emacs warning when opening OCaml file](https://discuss.ocaml.org/t/emacs-warning-when-opening-ocaml-file/17996)

<div class="topic-metadata">

**Author:** [@curious](https://discuss.ocaml.org/u/curious)\
**Replies:** 2\
**Last updated:** [April 16, 2026, 2:48pm UTC](https://discuss.ocaml.org/t/emacs-warning-when-opening-ocaml-file/17996 "2026-04-16T14:48:22Z")

</div>

After following the Configuring Your Editor instructions for Emacs on the official OCaml website, I am getting a warning in Emacs after opening an \*.ml file. Any help would be appreciated. I am using Emacs version 30.2 o…

---

## [Configuring company to not complete keywords](https://discuss.ocaml.org/t/configuring-company-to-not-complete-keywords/17961)

<div class="topic-metadata">

**Author:** [@ysalmon](https://discuss.ocaml.org/u/ysalmon)\
**Replies:** 5\
**Last updated:** [April 10, 2026, 1:19pm UTC](https://discuss.ocaml.org/t/configuring-company-to-not-complete-keywords/17961 "2026-04-10T13:19:49Z")

</div>

My highschool labs have Emacs+Tuareg+Utop+Merlin+Company under Windows, and the completion has a annoying behaviour with keywords : it pops up a completion menu, but since it does not list keyword that is being typed, va…

---

## [Example of using LSP server in Emacs](https://discuss.ocaml.org/t/example-of-using-lsp-server-in-emacs/14601)

<div class="topic-metadata">

**Author:** [@zbroyar](https://discuss.ocaml.org/u/zbroyar)\
**Replies:** 7\
**Last updated:** [December 29, 2025, 1:09pm UTC](https://discuss.ocaml.org/t/example-of-using-lsp-server-in-emacs/14601 "2025-12-29T13:09:05Z")

</div>

Hi all, I’d be grateful if you share you emacs configs using ocaml-lsp-server. Many thanks in advence :slight\_smile:

---

## [\[ANN\] Transient emacs command for dune](https://discuss.ocaml.org/t/ann-transient-emacs-command-for-dune/17539)

<div class="topic-metadata">

**Author:** [@panglesd](https://discuss.ocaml.org/u/panglesd)\
**Replies:** 2\
**Last updated:** [November 28, 2025, 3:04pm UTC](https://discuss.ocaml.org/t/ann-transient-emacs-command-for-dune/17539 "2025-11-28T15:04:36Z")

</div>

Hello! :tada: On the behalf of everyone who has contributed to a training set for an LLM by writing something on the internet, I’m happy to announce the release of dune-transient, an emacs transient command to drive dun…

---

## [\[ANN\] Release of ocaml-eglot 1.2.0](https://discuss.ocaml.org/t/ann-release-of-ocaml-eglot-1-2-0/16515)

<div class="topic-metadata">

**Author:** [@xvw](https://discuss.ocaml.org/u/xvw)\
**Replies:** 0\
**Last updated:** [April 16, 2025, 4:49pm UTC](https://discuss.ocaml.org/t/ann-release-of-ocaml-eglot-1-2-0/16515 "2025-04-16T16:49:51Z")

</div>

We (at Tarides) are particularly pleased to announce the release of OCaml-eglot 1.2.0, An overlay on Eglot (the built-in LSP client for Emacs) for editing OCaml! ocaml-eglot is an alternative mode to merlin which uses o…

---

## [\[ANN\] Release of ocaml-eglot 1.0.0](https://discuss.ocaml.org/t/ann-release-of-ocaml-eglot-1-0-0/15978)

<div class="topic-metadata">

**Author:** [@xvw](https://discuss.ocaml.org/u/xvw)\
**Replies:** 13\
**Last updated:** [April 3, 2025, 2:14pm UTC](https://discuss.ocaml.org/t/ann-release-of-ocaml-eglot-1-0-0/15978 "2025-04-03T14:14:54Z")

</div>

\[ANN\] Release of ocaml-eglot 1.0.0 Hi everyone! We (at Tarides) are particularly pleased to announce the first release of OCaml-eglot, An overlay on Eglot (the built-in LSP client for Emacs) for editing OCaml! Github …

---

## [\[ANN\] 4th editor tooling dev-meeting: 28th of March](https://discuss.ocaml.org/t/ann-4th-editor-tooling-dev-meeting-28th-of-march/16346)

<div class="topic-metadata">

**Author:** [@PizieDust](https://discuss.ocaml.org/u/PizieDust)\
**Replies:** 4\
**Last updated:** [March 29, 2025, 9:45am UTC](https://discuss.ocaml.org/t/ann-4th-editor-tooling-dev-meeting-28th-of-march/16346 "2025-03-29T09:45:24Z")

</div>

Hi everyone, join us for the next Editor Public Dev-Meeting on March 28th! This session will feature a talk from Xavier (@xvw) presenting the brand new Emacs mode ocaml-eglot that interfaces with the OCaml-LSP server. O…

---

## [Neocaml - a TreeSitter-powered Emacs package for OCaml programming](https://discuss.ocaml.org/t/neocaml-a-treesitter-powered-emacs-package-for-ocaml-programming/16268)

<div class="topic-metadata">

**Author:** [@bbatsov](https://discuss.ocaml.org/u/bbatsov)\
**Replies:** 9\
**Last updated:** [March 20, 2025, 12:37pm UTC](https://discuss.ocaml.org/t/neocaml-a-treesitter-powered-emacs-package-for-ocaml-programming/16268 "2025-03-20T12:37:48Z")

</div>

In a different topics I wrote about about my recent work on neocaml, and I thought it might be a good idea to post something separately as well. Check out the project’s GitHub repo and the short blog post. Contributions…

---

## [Ocaml-ts-mode - Emacs ocaml major mode using tree sitter](https://discuss.ocaml.org/t/ocaml-ts-mode-emacs-ocaml-major-mode-using-tree-sitter/13807)

<div class="topic-metadata">

**Author:** [@orbitz](https://discuss.ocaml.org/u/orbitz)\
**Replies:** 32\
**Last updated:** [March 8, 2025, 8:03pm UTC](https://discuss.ocaml.org/t/ocaml-ts-mode-emacs-ocaml-major-mode-using-tree-sitter/13807 "2025-03-08T20:03:42Z")

</div>

This weekend I got interested in emacs major modes based on treesitter, so I decided to implement ocaml-ts-mode. The code can be found here: It was actually very easy thanks to the hard work others have done in creat…

---

## [Any editor plugins/modes equivalent to Gopcaml-mode, structural navigation for OCaml?](https://discuss.ocaml.org/t/any-editor-plugins-modes-equivalent-to-gopcaml-mode-structural-navigation-for-ocaml/16094)

<div class="topic-metadata">

**Author:** [@Gopiandcode](https://discuss.ocaml.org/u/Gopiandcode)\
**Replies:** 6\
**Last updated:** [February 11, 2025, 8:58pm UTC](https://discuss.ocaml.org/t/any-editor-plugins-modes-equivalent-to-gopcaml-mode-structural-navigation-for-ocaml/16094 "2025-02-11T20:58:54Z")

</div>

Hihi~ after a very long hiatus from any OCaml programming, I’m slowly getting back into things, anyway uuh, I might be a little bit biased, but I’ve been missing the keybindings and navigation support of gopcaml-mode hah…

---

## [Dune, emacs compilation error, and setting the directory in actions](https://discuss.ocaml.org/t/dune-emacs-compilation-error-and-setting-the-directory-in-actions/15944)

<div class="topic-metadata">

**Author:** [@brab](https://discuss.ocaml.org/u/brab)\
**Replies:** 2\
**Last updated:** [January 13, 2025, 10:47am UTC](https://discuss.ocaml.org/t/dune-emacs-compilation-error-and-setting-the-directory-in-actions/15944 "2025-01-13T10:47:45Z")

</div>

Hello, TL/DR: compiling a file using an action in dune seem to run directly in the directory where the dependency lives, breaking error reporting in emacs. When compiling an OCaml file for a project, dune jumps to the …

---

## [Merlin server difficulty on MSYS2](https://discuss.ocaml.org/t/merlin-server-difficulty-on-msys2/15879)

<div class="topic-metadata">

**Author:** [@jdf-id-au](https://discuss.ocaml.org/u/jdf-id-au)\
**Replies:** 10\
**Last updated:** [January 4, 2025, 10:14pm UTC](https://discuss.ocaml.org/t/merlin-server-difficulty-on-msys2/15879 "2025-01-04T22:14:41Z")

</div>

Hi everyone, I thought I’d post a slightly arcane scenario on the off-chance that someone might be able to suggest an approach to resolving it. Please bail out when your “nonsense bingo” card is full! merlin I’m trying…

---

## [Emacs and the environment variables](https://discuss.ocaml.org/t/emacs-and-the-environment-variables/15451)

<div class="topic-metadata">

**Author:** [@Jacek\_Podkanski](https://discuss.ocaml.org/u/Jacek_Podkanski)\
**Replies:** 10\
**Last updated:** [October 22, 2024, 12:21am UTC](https://discuss.ocaml.org/t/emacs-and-the-environment-variables/15451 "2024-10-22T00:21:36Z")

</div>

I am a new user. I had 2 days of frustration because Emacs and REPL did not work as expected because of missing environment variable: CAML\_LD\_LIBRARY\_PATH. Is this the last surprise? What else should I expect?

---

## [\[ANN\] New release of Merlin](https://discuss.ocaml.org/t/ann-new-release-of-merlin/15358)

<div class="topic-metadata">

**Author:** [@vds](https://discuss.ocaml.org/u/vds)\
**Replies:** 3\
**Last updated:** [September 30, 2024, 1:33pm UTC](https://discuss.ocaml.org/t/ann-new-release-of-merlin/15358 "2024-09-30T13:33:19Z")

</div>

I am very pleased to announce a new release of Merlin for OCaml 5.2, 5.1 and 4.14. This release brings a handful of fixes but also a handful of of new commands: signature\_help and inlay\_hint have been upstreamed from o…

---

## [\[ANN\] Advanced Code Navigation coming to OCaml-LSP](https://discuss.ocaml.org/t/ann-advanced-code-navigation-coming-to-ocaml-lsp/15266)

<div class="topic-metadata">

**Author:** [@PizieDust](https://discuss.ocaml.org/u/PizieDust)\
**Replies:** 3\
**Last updated:** [September 10, 2024, 8:16am UTC](https://discuss.ocaml.org/t/ann-advanced-code-navigation-coming-to-ocaml-lsp/15266 "2024-09-10T08:16:55Z")

</div>

Jump to Target Currently, the standard LSP protocol only allows for generalized code navigation (goto definition, goto declaration, goto implementation, goto type-definition), which is not very useful when it comes to pr…

---

## [How to get function completions from local module/file](https://discuss.ocaml.org/t/how-to-get-function-completions-from-local-module-file/14819)

<div class="topic-metadata">

**Author:** [@panther923](https://discuss.ocaml.org/u/panther923)\
**Replies:** 5\
**Last updated:** [June 20, 2024, 6:36am UTC](https://discuss.ocaml.org/t/how-to-get-function-completions-from-local-module-file/14819 "2024-06-20T06:36:28Z")

</div>

I have a file util.ml which stores some functions like take and drop. How to call this functions to other file The error: Unbound module util I’m using ocamlbuild and it builds properly; but ocamllsp is unable to lo…

---

## [Hide/Show in Emacs](https://discuss.ocaml.org/t/hide-show-in-emacs/14530)

<div class="topic-metadata">

**Author:** [@patrick-nicodemus](https://discuss.ocaml.org/u/patrick-nicodemus)\
**Replies:** 0\
**Last updated:** [April 21, 2024, 9:23pm UTC](https://discuss.ocaml.org/t/hide-show-in-emacs/14530 "2024-04-21T21:23:29Z")

</div>

I would like to restart the following discussion and ask if there is any update 5 years later. VSCode allows users to collapse a module definition using a dropdown arrow in the sidebar, leaving only the signature visib…

---

## [An Emacs mode for Cram tests](https://discuss.ocaml.org/t/an-emacs-mode-for-cram-tests/11221)

<div class="topic-metadata">

**Author:** [@Gopiandcode](https://discuss.ocaml.org/u/Gopiandcode)\
**Replies:** 8\
**Last updated:** [January 10, 2024, 4:15am UTC](https://discuss.ocaml.org/t/an-emacs-mode-for-cram-tests/11221 "2024-01-10T04:15:06Z")

</div>

Hi all! Recently I’ve been playing with tests, and have fallen in love with dune’s cram tests :heart: As I wasn’t able to find any support for it elsewhere, I’ve written a small Emacs mode to highlight cram tests to mak…

---

## [\[ANN\] Release opam-switch-mode 1.7 with Tuareg+Merlin support](https://discuss.ocaml.org/t/ann-release-opam-switch-mode-1-7-with-tuareg-merlin-support/12703)

<div class="topic-metadata">

**Author:** [@erikmd](https://discuss.ocaml.org/u/erikmd)\
**Replies:** 0\
**Last updated:** [July 27, 2023, 9:14am UTC](https://discuss.ocaml.org/t/ann-release-opam-switch-mode-1-7-with-tuareg-merlin-support/12703 "2023-07-27T09:14:12Z")

</div>

Emacs: new minor mode for opam users Dear all, If you happen to use use several opam switches and Emacs as an IDE: you may be interested in opam-switch-mode (which overlaps tuareg-mode’s M-x tuareg-opam-update-env funct…

---

## [Local opam switch and emacs](https://discuss.ocaml.org/t/local-opam-switch-and-emacs/12222)

<div class="topic-metadata">

**Author:** [@brab](https://discuss.ocaml.org/u/brab)\
**Replies:** 4\
**Last updated:** [May 29, 2023, 2:55pm UTC](https://discuss.ocaml.org/t/local-opam-switch-and-emacs/12222 "2023-05-29T14:55:37Z")

</div>

I have a project that uses a local opam switch, and when I open one of its files, the version of OCaml is correctly set to the local switch one. The problem is that I no longer can switch to the global switch later, even…

---

## [Introducing Gopcaml mode - structural OCaml editing](https://discuss.ocaml.org/t/introducing-gopcaml-mode-structural-ocaml-editing/5310)

<div class="topic-metadata">

**Author:** [@Gopiandcode](https://discuss.ocaml.org/u/Gopiandcode)\
**Replies:** 9\
**Last updated:** [February 14, 2023, 9:16am UTC](https://discuss.ocaml.org/t/introducing-gopcaml-mode-structural-ocaml-editing/5310 "2023-02-14T09:16:03Z")

</div>

Hi all, I am pleased to announce the first release of Gopcaml-mode, a new emacs library that aims to extend the existing OCaml editing experience with structural editing capabilities. A picture is worth a thousand words…

---

## [UTop create\_implicits not working with Emacs?](https://discuss.ocaml.org/t/utop-create-implicits-not-working-with-emacs/11229)

<div class="topic-metadata">

**Author:** [@ysalmon](https://discuss.ocaml.org/u/ysalmon)\
**Replies:** 2\
**Last updated:** [January 24, 2023, 8:24am UTC](https://discuss.ocaml.org/t/utop-create-implicits-not-working-with-emacs/11229 "2023-01-24T08:24:18Z")

</div>

I just discovered that one can say UTop.set\_create\_implicits true to have utop bind results to variables \_1, \_2 etc. This works well when running utop in a terminal but seems not to when running it from Emacs (ie. with t…

---

## [Get utop to not echo ;; at end of sent code](https://discuss.ocaml.org/t/get-utop-to-not-echo-at-end-of-sent-code/11230)

<div class="topic-metadata">

**Author:** [@ysalmon](https://discuss.ocaml.org/u/ysalmon)\
**Replies:** 1\
**Last updated:** [January 23, 2023, 6:41pm UTC](https://discuss.ocaml.org/t/get-utop-to-not-echo-at-end-of-sent-code/11230 "2023-01-23T18:41:11Z")

</div>

In Emacs, when one evaluates a phrase (or more), the utop emacs mode echoes that phrase, which is good. I appends a ;; at the end, which is likely necessary for the REPL, but I would like this ;; to not be echoed. I thi…

---

## [Tuareg can't find ocaml](https://discuss.ocaml.org/t/tuareg-cant-find-ocaml/11215)

<div class="topic-metadata">

**Author:** [@TimLeonard](https://discuss.ocaml.org/u/TimLeonard)\
**Replies:** 2\
**Last updated:** [January 21, 2023, 4:08am UTC](https://discuss.ocaml.org/t/tuareg-cant-find-ocaml/11215 "2023-01-21T04:08:10Z")

</div>

I’ve just installed tuareg in my GNU Emacs 27.2 (running on macOS), and it does syntax highlighting in tuareg-mode, but I can’t successfully start ocaml in an inferior shell with ‘M-x run-ocaml’. It says ‘no such file or…

---

## [Cool OCaml-based web-frontend for Emacs org-files](https://discuss.ocaml.org/t/cool-ocaml-based-web-frontend-for-emacs-org-files/10900)

<div class="topic-metadata">

**Author:** [@Gopiandcode](https://discuss.ocaml.org/u/Gopiandcode)\
**Replies:** 0\
**Last updated:** [December 2, 2022, 1:25pm UTC](https://discuss.ocaml.org/t/cool-ocaml-based-web-frontend-for-emacs-org-files/10900 "2022-12-02T13:25:39Z")

</div>

Hey everyone! It’s been a while. Here’s a little thing I’ve been working on that I thought might be interesting for this community: Emacs-viewer This is a simple application that presents a web frontend for your org fil…

---

## [How to enable the editor action to switch between implementation and interface (ml/mli) files for neovim?](https://discuss.ocaml.org/t/how-to-enable-the-editor-action-to-switch-between-implementation-and-interface-ml-mli-files-for-neovim/10572)

<div class="topic-metadata">

**Author:** [@sshz](https://discuss.ocaml.org/u/sshz)\
**Replies:** 3\
**Last updated:** [October 27, 2022, 7:59pm UTC](https://discuss.ocaml.org/t/how-to-enable-the-editor-action-to-switch-between-implementation-and-interface-ml-mli-files-for-neovim/10572 "2022-10-27T19:59:46Z")

</div>

I have been using ocamllsp with neovim using neovim’s native LSP client. However, it lacks the functionality of switching between implementation and interface. The functionality is implemented in ocamllsp under the name o…

---

## [How to start with Emacs to work on OCaml codebases](https://discuss.ocaml.org/t/how-to-start-with-emacs-to-work-on-ocaml-codebases/10312)

<div class="topic-metadata">

**Author:** [@mro](https://discuss.ocaml.org/u/mro)\
**Replies:** 18\
**Last updated:** [August 17, 2022, 6:03pm UTC](https://discuss.ocaml.org/t/how-to-start-with-emacs-to-work-on-ocaml-codebases/10312 "2022-08-17T18:03:32Z")

</div>

after using vim for a long time I want to give Emacs a try – to work on OCaml codebases. I find the GitHub - ocaml/tuareg: Emacs OCaml mode README targeted at people who already know emacs, so I am lost. Also the $ opa…

---

## [Odoc .mld support in tuareg-mode (and my terrible hack)](https://discuss.ocaml.org/t/odoc-mld-support-in-tuareg-mode-and-my-terrible-hack/10067)

<div class="topic-metadata">

**Author:** [@geoffder](https://discuss.ocaml.org/u/geoffder)\
**Replies:** 0\
**Last updated:** [June 22, 2022, 11:21pm UTC](https://discuss.ocaml.org/t/odoc-mld-support-in-tuareg-mode-and-my-terrible-hack/10067 "2022-06-22T23:21:02Z")

</div>

As I’ve been spending some time lately trying to improve my doc game as I approach re-releasing a library I work on, I finally got around to using odoc’s .mld markdown format. Currently .mlds do not have any support (tha…

[Next page](https://discuss.ocaml.org/tag/emacs/13.md?match_all_tags=true&page=1&tags%5B%5D=emacs)
