caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Thomas Gazagnaire <thomas@gazagnaire.org>
To: Francois Berenger <francois.berenger@inria.fr>
Cc: 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: Tue, 24 Feb 2015 20:26:01 +0000	[thread overview]
Message-ID: <02647772-FD85-4497-A2C6-9C9FD83CBEC8@gazagnaire.org> (raw)
In-Reply-To: <54ECBBA4.9030405@inria.fr>

`ocp-indent -i <file>` ?

Thomas
> On 24 Feb 2015, at 17:57, Francois Berenger <francois.berenger@inria.fr> wrote:
> 
> 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.
> 
> -- 
> Caml-list mailing list.  Subscription management and archives:
> https://sympa.inria.fr/sympa/arc/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs


  reply	other threads:[~2015-02-24 20:26 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 [this message]
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=02647772-FD85-4497-A2C6-9C9FD83CBEC8@gazagnaire.org \
    --to=thomas@gazagnaire.org \
    --cc=caml-list@inria.fr \
    --cc=francois.berenger@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).