From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 111447F20B for ; Fri, 15 Feb 2013 12:01:45 +0100 (CET) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of louis.gesbert@ocamlpro.com) identity=pra; client-ip=212.227.126.171; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="louis.gesbert@ocamlpro.com"; x-sender="louis.gesbert@ocamlpro.com"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of louis.gesbert@ocamlpro.com) identity=mailfrom; client-ip=212.227.126.171; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="louis.gesbert@ocamlpro.com"; x-sender="louis.gesbert@ocamlpro.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of postmaster@moutng.kundenserver.de designates 212.227.126.171 as permitted sender) identity=helo; client-ip=212.227.126.171; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="louis.gesbert@ocamlpro.com"; x-sender="postmaster@moutng.kundenserver.de"; x-conformance=sidf_compatible; x-record-type="v=spf1" X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgECANIUHlHU436rZWdsb2JhbABEwGQWDg0KCgcUBSSCIAEFJ1IQC0ZXBogpvR8EiQiEMQuEPwOqA4FpCBc X-IPAS-Result: AgECANIUHlHU436rZWdsb2JhbABEwGQWDg0KCgcUBSSCIAEFJ1IQC0ZXBogpvR8EiQiEMQuEPwOqA4FpCBc X-IronPort-AV: E=Sophos;i="4.84,673,1355094000"; d="scan'208";a="2315907" Received: from moutng.kundenserver.de ([212.227.126.171]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 15 Feb 2013 12:00:35 +0100 Received: from agaric.localnet (jua06-3-88-189-115-104.fbx.proxad.net [88.189.115.104]) by mrelayeu.kundenserver.de (node=mreu2) with ESMTP (Nemesis) id 0MR93L-1UTErK0fFf-00U2TT; Fri, 15 Feb 2013 12:01:41 +0100 From: Louis Gesbert To: Daniel =?iso-8859-15?q?B=FCnzli?= Date: Fri, 15 Feb 2013 12:01:39 +0100 User-Agent: KMail/1.13.7 (Linux/3.2.0-4-amd64; KDE/4.8.4; x86_64; ; ) Cc: caml-list@inria.fr References: <201302081625.29881.louis.gesbert@ocamlpro.com> <1F8AABE110B94A03A92DDB149BE31A46@erratique.ch> In-Reply-To: Organization: OCamlPro MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Message-Id: <201302151201.39564.louis.gesbert@ocamlpro.com> X-Provags-ID: V02:K0:HxRoVZz1pdLUIvgmlzpvgkPjfZCUvHx4hkGxAo4pOm0 28cbOpJ8zoYwgqgdu0AWo8Nq87ARqLnvJ8oulWVK5kooqVR/r9 QdDwCNApt4V39HX7GGi8b/Xr4RAHbmB3/W/pPhAC0abXFxWKCC yVn7plZJo6u+3EEwLSWwaFfY/Ji3JoslhTkK/8FDnxCoDbaAQP 8dFYbmJNFdyUf0d2ODDRmdu6HUDRJoJxbJzrUAe2xzmbLr/uTj /MmB6F74FAJSmKIZtf1g7HgQBVbPRxNGIGzC6IQcvPwH5PuRqh mravqSnbiWZ32RnujoNuV0jK6fSion0AQtWWDlOL4DK459ppAU TxEKuTpwy3fgFKV/CHpyHs8am9a/10Q9i49Q7gUTda9Bbg696A AMyc5QWK8Xf7g== X-Validation-by: louis.gesbert@ocamlpro.com Subject: Re: [Caml-list] ocp-indent beta release Hi Daniel, Well, I can't say I really agree with your readability argument -- =ABwaste= ful and=20 detrimental to code compactness=BB :) -- but you know... matter of taste. Anyway, you've been heard: there is now an option "with_never=3Dtrue" that = states=20 exactly what you asked for (never indent after try/match with, or function)= .=20 Your example code has been added to our tests with this option and passes j= ust=20 fine. Best, Louis PS: concerned commit is here: https://github.com/OCamlPro/ocp- indent/commit/62012b5b5bb4f2ee76105ae1cd3bb08a224c631a Le vendredi 15 f=E9vrier 2013 01:00:35, Daniel B=FCnzli a =E9crit : > Le jeudi, 14 f=E9vrier 2013 =E0 17:18, Daniel B=FCnzli a =E9crit : > > By the way there's one big issue for me, in my whole code base I strict= ly > > stick to 80 columns and use the other acceptable convention mentioned > > here [1]. This means that I do not indent the top most cases so that you > > don't run into the 80 character limit too quickly. > >=20 > > Here's what I mean: > >=20 > > let f =3D function > >=20 > > | A -> ... > > | B -> ... > >=20 > > let f x =3D match x with > >=20 > > | A -> ... > > | B -> ... >=20 > In fact it's not only the top most cases. These ones: >=20 > let f =3D > let g =3D function >=20 > | A -> "A" > | B -> "B" >=20 > in > g >=20 > also seem to be annoyingly indented to >=20 > let f =3D > let g =3D function >=20 > | A -> "A" > | B -> "B" >=20 > in > g >=20 >=20 >=20 > this really wastes too much space and is unusable for me, especially if y= ou > have local, nested function definitions. >=20 > I have attached a file with the examples (email rendering is not very > reliable). For me there should be a setting that lets that file unchanged. >=20 > In typerex I could get this behaviour by having at least (don't remember > exactly which conjunction does the thing): >=20 > (setq typerex-let-always-indent nil) > (setq typerex-with-indent 0) > (setq typerex-function-indent 0) > (setq typerex-fun-indent 0) > (setq typerex-type-indent 0) > (setq typerex-if-then-else-indent 0) >=20 >=20 >=20 > Best, >=20 > Daniel