caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Francois Berenger <francois.berenger@inria.fr>
To: OCaml Mailing List <caml-list@inria.fr>
Subject: [Caml-list] indenting a .ml file with emacs in batch mode using ocaml-mode style
Date: Tue, 24 Feb 2015 18:57:56 +0100	[thread overview]
Message-ID: <54ECBBA4.9030405@inria.fr> (raw)

Hello,

Is there anyone who knows how to tell emacs how to indent a given .ml 
file using the indentation style from ocaml-mode?

It should ressemble something like this:

emacs -batch source.ml \
   --eval '(indent-region (point-min) (point-max) nil)' \
   -f save-buffer

I just don't know how to tell emacs to use the ocaml-mode for that
instead of whatever the user has configured in his ~/.emacs (for 
example, instead of tuareg-mode).

Thanks a lot,
Francois.

             reply	other threads:[~2015-02-24 17:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-24 17:57 Francois Berenger [this message]
2015-02-24 20:26 ` Thomas Gazagnaire
2015-02-25  8:43 ` Ronan Le Hy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54ECBBA4.9030405@inria.fr \
    --to=francois.berenger@inria.fr \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).