Questions tagged [tuareg]

An Emacs mode to edit files written in the OCaml programming language.

An Emacs mode to edit files written in the OCaml programming language.

38 questions
2
votes
4 answers

OCaml Emacs Tuareg: Evaluate phrase keyboard shortcut, and how to display actual greek symbols?

Two questions about Emacs Tuareg for OCaml: I have seen some configurations where it displays an alpha symbol instead of a'. How can I turn this on? What is the keyboard shortcut for "evaluate phrase" or "evaluate buffer"?
Nick Heiner
  • 119,074
  • 188
  • 476
  • 699
1
vote
1 answer

emacs color theme for OCaml

I am using console emacs in tuareg mode to edit OCaml code. For syntax highlighting I am using the color-theme package and I am settled for some time now on the jsc-dark color theme. Sadly, the result of my OCaml editing experience is mediocre (most…
Marcus Junius Brutus
  • 26,087
  • 41
  • 189
  • 331
1
vote
1 answer

Is it possible to use the font of tuareg in caml-mode under Emacs?

For Indentation of “if”, i have to use caml-mode under Emacs. But I find the font of tuareg is more colorful than caml-font, so my question is whether it is possible to use the font of tuareg in caml-mode. Also, with the current .emacs which…
SoftTimur
  • 5,630
  • 38
  • 140
  • 292
1
vote
1 answer

Why can't I evaluate this OCaml line with tuareg mode's C-c C-e command?

Background: I'm using Emacs 23.3, OCaml 3.12.0 and tuareg 1.45.7. I'm looking at the Hickey OCaml book, and trying to run the examples on pg. 157 of the book, 167 of the .pdf. The problem arises with the expression type ’a blob = < draw : unit; ..…
David
  • 987
  • 1
  • 7
  • 14
1
vote
0 answers

MetaOCaml staging annotation syntax highlighting in Emacs using tuareg-support-metaocaml

TL:DR; I would like MetaOCaml syntax highlighting in Emacs, but the relevant option has no effect. What can I do? I'm pretty new to Emacs, but have been using MetaOCaml for a while. I installed opam 1.3.1-r1 and emacs 25.2 through my distribution's…
Alex
  • 121
  • 4
1
vote
1 answer

How to show all result on buffer in OCaml's tuareg mode

In OCaml's tuareg mode, I cat't see the execution result if the result is big as below. # function ();; - : tree_t = Node (Node (Node (Node (Node (Node (Node (Node (Node (Node (Empty, 1, Empty), 2, Empty), 3, ...), ...), …
mmsss
  • 263
  • 1
  • 2
  • 7
1
vote
1 answer

Autoload tuareg-mode for .ml4 files

What do I need to change in tuareg.el to get Emacs to automatically load tuareg-mode for .ml4 files? I can easily change to tuareg-mode manually, but it would be nice not to have to do that.
Paul Steckler
  • 617
  • 5
  • 19
1
vote
0 answers

How to use emacs tuareg mode effectively to manage an OCaml project?

I am using OCaml for a project with 20 - 50 files inside. Also I am using emacs + tuareg. Syntax highlight is well done by tuareg and generally it is good using emacs for one file editing. However, for the project files, I need to frequently switch…
Jackson Tale
  • 25,428
  • 34
  • 149
  • 271
1
vote
2 answers

emacs : file mode specification error

I want to install tuareg-mode for emacs and I followed these instructions. I have downloaded the tuareg-2.0.7 version which contains the following: Makefile,ocamldebug.el,README,tuareg.el,tuareg-pkg.el,tuareg-site-file.el. I copied all those…
mark4rd
  • 255
  • 5
  • 12
1
vote
2 answers

How can I configure anonymous structure and function indentation in tuareg mode?

I am trying to figure out how to fix the indentation in tuareg mode so that it does not insert a massive amount of indentation in anonymous functions and structures. I have used it in the past and it has not done this, but now it is. I would like…
Arlen Cox
  • 384
  • 1
  • 2
  • 10
1
vote
1 answer

How to enable syntax color and indention for lwt in Emacs Tuareg mode?

I am using Tuareg mode for Emacs. I am also using lwt. lwt has some syntax extension, but Tuareg cannot recognize them and it is ugly without indention and coloring. I found…
Jackson Tale
  • 25,428
  • 34
  • 149
  • 271
0
votes
0 answers

Looking for outline minor mode for OCaml buffers (with Tuareg and Merlin)

I am missing one feature in emacs Tuareg mode: an outline of the current OCaml buffer with a list of top-level definitions. There is a similar feature in Proof General mode for Coq which I find very useful. If there is an additional package or some…
krokodil
  • 1,326
  • 10
  • 18
0
votes
1 answer

Enable tuareg mode in the emacs shell

In emacs I have got the tuareg mode enabled in the top and the shell in the bottom without color syntax. How can I have color syntax in the shell? In order to get here, I installed camllight using this script…
poyo
  • 1
  • 2
0
votes
1 answer

ocaml - unbound value error in recursive list matching function

I copied a recursive list matching function from a slide of an introductory ocaml course. let rec fac n = match n with 0 -> 1 | _ -> n * fac(n-1);; fac 3;; I get: "Error: Unbound value fac" Why is this?
user3435407
  • 1,019
  • 4
  • 15
  • 31
0
votes
1 answer

Ocaml error unbound Value

When i try to evaluate line 2 or 5 of this program, i get "Unbound value carre" or "Unbound value bis". To evaluate it i use emacs with tuareg, could it be related ? let carre x = x*x;; carre(9);; let bis y = y^y;; bis("ab");; For example, here…
StuYYY
  • 97
  • 2
  • 12