From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id AA9C77EF10 for ; Wed, 25 Feb 2015 09:44:15 +0100 (CET) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of ronan.lehy@gmail.com) identity=pra; client-ip=74.125.82.179; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="ronan.lehy@gmail.com"; x-sender="ronan.lehy@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of ronan.lehy@gmail.com designates 74.125.82.179 as permitted sender) identity=mailfrom; client-ip=74.125.82.179; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="ronan.lehy@gmail.com"; x-sender="ronan.lehy@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-we0-f179.google.com) identity=helo; client-ip=74.125.82.179; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="ronan.lehy@gmail.com"; x-sender="postmaster@mail-we0-f179.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0BoAQDpiu1Um7NSfUpbg1ZaBIMEwBeFeAKBHAdDAQEBAQEBEAEBAQEBBgsLCRQuhBABAQQSER0BGx4DDAYFCw8CJgICIgERAQUBHAYTIod4AQMRrxA+MYsugWuCd45BChknDVSEXQELARkBBQ6BE4lyhDs6gmiBQwWTO4VlgVSQHRIjgQwJglSBPT0xgkMBAQE X-IPAS-Result: A0BoAQDpiu1Um7NSfUpbg1ZaBIMEwBeFeAKBHAdDAQEBAQEBEAEBAQEBBgsLCRQuhBABAQQSER0BGx4DDAYFCw8CJgICIgERAQUBHAYTIod4AQMRrxA+MYsugWuCd45BChknDVSEXQELARkBBQ6BE4lyhDs6gmiBQwWTO4VlgVSQHRIjgQwJglSBPT0xgkMBAQE X-IronPort-AV: E=Sophos;i="5.09,643,1418079600"; d="scan'208";a="123289648" Received: from mail-we0-f179.google.com ([74.125.82.179]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 25 Feb 2015 09:44:15 +0100 Received: by wesq59 with SMTP id q59so2130641wes.1 for ; Wed, 25 Feb 2015 00:44:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=FKJOPIXTqy8BH1h9FfJithCR4VjMsivpgNjiNIwTwq0=; b=ANpBdofqt9yglxlGeEsF+9eGoMIuVZMspNjEDTd6NkzfJst4XpWl/0mdO6Y3sCySEl l9VKSeZwY/GrGrp7vOQueQSN+1dJ8oHVHkkuCCRWcApfGD1Alw/aCNYKMohAA64l/iGA x6UVux5c+XECaalocVHum/naxyejnPWcRzkLd2eIH0A4iVKacw4ZR23+UIt7TgDnCkKi 2ebGl+PZ6u5N7/ERnKQLigePk/mxDr1R58kpn6N26VYl6suG2AlbKrdynyXdPDctC5+x MrSlhPClsq6f9coWvbZA34er5d77VMf3+imHFRWc/iS6cjghrAXBZKmGf4OqhKJiZ67Y Cs9Q== X-Received: by 10.194.157.38 with SMTP id wj6mr4144827wjb.62.1424853854863; Wed, 25 Feb 2015 00:44:14 -0800 (PST) MIME-Version: 1.0 Received: by 10.194.219.2 with HTTP; Wed, 25 Feb 2015 00:43:54 -0800 (PST) In-Reply-To: <54ECBBA4.9030405@inria.fr> References: <54ECBBA4.9030405@inria.fr> From: Ronan Le Hy Date: Wed, 25 Feb 2015 09:43:54 +0100 Message-ID: To: OCaml Mailing List Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Caml-list] indenting a .ml file with emacs in batch mode using ocaml-mode style Hi Fran=C3=A7ois, 2015-02-24 18:57 GMT+01:00 Francois Berenger : > 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))' --=20 Ronan