caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Ronan Le Hy <ronan.lehy@gmail.com>
To: OCaml Mailing List <caml-list@inria.fr>
Subject: Re: [Caml-list] indenting a .ml file with emacs in batch mode using ocaml-mode style
Date: Wed, 25 Feb 2015 09:43:54 +0100	[thread overview]
Message-ID: <CAEc-HQk_-6J2KvGNsn6dki8fbJpZ-CK+1fJG8pHhM9gSp+sYyg@mail.gmail.com> (raw)
In-Reply-To: <54ECBBA4.9030405@inria.fr>

Hi François,

2015-02-24 18:57 GMT+01:00 Francois Berenger <francois.berenger@inria.fr>:
> Is there anyone who knows how to tell emacs how to indent a given .ml file
> using the indentation style from ocaml-mode?
> emacs -batch source.ml \
>   --eval '(indent-region (point-min) (point-max) nil)' \
>   -f save-buffer

You can set the major mode using (caml-mode):
 emacs --batch source.ml --eval '(progn (caml-mode) (message "mode:
%s" major-mode) (indent-region (point-min) (point-max) nil)
(save-buffer))'

-- 
Ronan

      parent reply	other threads:[~2015-02-25  8:44 UTC|newest]

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

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=CAEc-HQk_-6J2KvGNsn6dki8fbJpZ-CK+1fJG8pHhM9gSp+sYyg@mail.gmail.com \
    --to=ronan.lehy@gmail.com \
    --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).