# UTop create\_implicits not working with Emacs?

**URL:** <https://discuss.ocaml.org/t/utop-create-implicits-not-working-with-emacs/11229>\
**Category:** Ecosystem\
**Tags:** utop, emacs\
**Created:** [January 23, 2023, 5:48pm UTC](https://discuss.ocaml.org/t/utop-create-implicits-not-working-with-emacs/11229 "2023-01-23T17:48:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ysalmon](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/ysalmon/32/4168_2.png) [@ysalmon](https://discuss.ocaml.org/u/ysalmon)\
**Post date:** [January 23, 2023, 5:48pm UTC](https://discuss.ocaml.org/t/utop-create-implicits-not-working-with-emacs/11229/1 "2023-01-23T17:48:46Z")

</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 the -emacs command line option) : results still get a `-` in front of them and no `_%i` variable seem to exist.

How come ?

---

<div class="post-metadata">

**Author:** ![Gopiandcode](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/gopiandcode/32/5346_2.png) [@Gopiandcode](https://discuss.ocaml.org/u/Gopiandcode)\
**Post date:** [January 24, 2023, 3:58am UTC](https://discuss.ocaml.org/t/utop-create-implicits-not-working-with-emacs/11229/2 "2023-01-24T03:58:33Z")

</div>

I think the reason is that the uTop implementation for Emacs is missing the code to bind implicits, which seems to be a bug?:

See the code to rewrite toplevel expressions in the normal uTop loop:

> <https://github.com/ocaml-community/utop/blob/master/src/lib/uTop_main.ml#L858>

and the corresponding code in the module implementing Emacs support:

> <https://github.com/ocaml-community/utop/blob/595002e6f07e6a3c6abc6e94a1b2448006115f1b/src/lib/uTop_main.ml#L1078>

Maybe there’s a reason for this discrepancy? Not sure.

---

<div class="post-metadata">

**Author:** ![ysalmon](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/ysalmon/32/4168_2.png) [@ysalmon](https://discuss.ocaml.org/u/ysalmon)\
**Post date:** [January 24, 2023, 8:24am UTC](https://discuss.ocaml.org/t/utop-create-implicits-not-working-with-emacs/11229/3 "2023-01-24T08:24:18Z")

</div>

Thank you. I saw the first snippet by searching for `implicits`, but I did not realise that the emacs mode would use a different function.

So an issue to Utop it is.
