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 mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id E50C67F737 for ; Wed, 23 Sep 2015 13:35:04 +0200 (CEST) IronPort-PHdr: 9a23:Jew+3BxvtRIa2u/XCy+O+j09IxM/srCxBDY+r6Qd0eMSIJqq85mqBkHD//Il1AaPBtWHra4ewLGN+4nbGkU+or+5+EgYd5JNUxJXwe43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6anHS+4HYoFwnlMkItf6KuStKU0578jLv60qaQSjsLrQL1Wal1IhSyoFeZnegtqqwmFJwMzADUqGBDYeVcyDAgD1uSmxHh+pX4p8Y7oGx48sgs/M9YUKj8Y79wDfkBVGxnYCgJ45jGsBjHTAzHxHYHwH5evRNMBwXK61nTRJb4qWOuueN53CSVOuX9V7FyVDK56r8tRgW+2wkdMDts32zNhoRLkKVfuBeooRo3l4/Sboa9O/dkcubGYdQeXW9IWMAXWyEXUdD0VJcGE+dUZbUQlIL6vVZb6ELmXQQ= Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=info@gerd-stolpmann.de; spf=None smtp.mailfrom=info@gerd-stolpmann.de; spf=None smtp.helo=postmaster@mout.kundenserver.de Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of info@gerd-stolpmann.de) identity=pra; client-ip=212.227.17.10; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="info@gerd-stolpmann.de"; x-sender="info@gerd-stolpmann.de"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of info@gerd-stolpmann.de) identity=mailfrom; client-ip=212.227.17.10; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="info@gerd-stolpmann.de"; x-sender="info@gerd-stolpmann.de"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mout.kundenserver.de) identity=helo; client-ip=212.227.17.10; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="info@gerd-stolpmann.de"; x-sender="postmaster@mout.kundenserver.de"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0CCAQAxjgJWnAoR49Rdg3hptEGLDwaFfQKBRzwQAQEBAQEBAQEQAQEBAQEGDQkJIS6CHYIIAQEDASMELiQFCwtCAgJXBhMJiB0MCbZ3lCEBAQEBBgIBH4V4hXiEZyYHgi47EoExBYc0jjN+AoQSh3mCFYZqBJInOIQubwGJbAEBAQ X-IPAS-Result: A0CCAQAxjgJWnAoR49Rdg3hptEGLDwaFfQKBRzwQAQEBAQEBAQEQAQEBAQEGDQkJIS6CHYIIAQEDASMELiQFCwtCAgJXBhMJiB0MCbZ3lCEBAQEBBgIBH4V4hXiEZyYHgi47EoExBYc0jjN+AoQSh3mCFYZqBJInOIQubwGJbAEBAQ X-IronPort-AV: E=Sophos;i="5.17,577,1437429600"; d="asc'?scan'208";a="179063339" Received: from mout.kundenserver.de ([212.227.17.10]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Sep 2015 13:34:53 +0200 Received: from office1.lan.sumadev.de ([88.69.138.237]) by mrelayeu.kundenserver.de (mreue103) with ESMTPSA (Nemesis) id 0LkjTw-1aEs1P2Fca-00aR1J; Wed, 23 Sep 2015 13:34:51 +0200 Received: from [192.168.65.10] (unknown [192.168.65.10]) by office1.lan.sumadev.de (Postfix) with ESMTPSA id 9D288DC05D; Wed, 23 Sep 2015 13:34:50 +0200 (CEST) Message-ID: <1443008077.4442.1.camel@e130.lan.sumadev.de> From: Gerd Stolpmann To: Emilio =?ISO-8859-1?Q?Jes=FAs?= Gallego Arias Cc: caml-list@inria.fr Date: Wed, 23 Sep 2015 13:34:37 +0200 In-Reply-To: <877fnh77pk.fsf@cri.ensmp.fr> References: <84io72z88q.fsf@cri.ensmp.fr> <877fnh77pk.fsf@cri.ensmp.fr> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-El4KxIQDvrlKEmmn3ojG" X-Mailer: Evolution 3.10.4-0ubuntu2 Mime-Version: 1.0 X-Provags-ID: V03:K0:cZkAJn+Pldo8CosvSci9M8/tOnXToC7KdkIpAj4q+5dFyvs9K7V B113Kr/eBlo4x/v/9qinr7oBHmIDJ7vn9TA3n1pIa64zrtwQSfB6Kpq/P8a387v5anLLINP qvJeDAdE4F8lD+uPaGuWNJVS6WHtUcKDKLfSpOBUZ5szW0KkGzFQpqH0/6TX9UnkM4BOawS ni2Fimq8Jshk0HGbMQ5pw== X-UI-Out-Filterresults: notjunk:1;V01:K0:HH0fvi25UBQ=:1n8M335hFgEuOW1ePnCSqO svI6uS4unlRUZT4QQtdeEzBiZT1xWtDfJG246zraoOcO7lXEe9ONtkBXnY0MLTQT6h64jCZ+c ymdv5ltrRgklJbTh2YxJTd3EAabOlehMJUBH6kavnv5qirkbnse0DrUjEI5fms4OPk9xbEfqp PAKpacE6KGSS9MPW6xpo+wwgwMkgsSqgEgSQQ4ZVdqi/2A8pxgJ5Uw0ljt3xAYESi9ne1URJw JlQ3ewchjdV56a0lY942Cvg/bTr+hTcsYEiWzGo/2v+qMIrZjju8u3Q8GfMlhk2T7fTJHWrtU JyvULUFqT8M+YK/JSett17NDghsEGyprHuGdBr3Fh1auWSNo1Kqn/6RJW409VxDdUKszxUAo3 E1ZeH1VQa6NRomGoPMn1SgXpRTt2MDCxYwDBQchiuazI0mkl+00WedIgQr0Q+DOyGpvXAO4pf MPpo22Byvq3JVj+vDtML4TKGA78FLVoEEzf+toXh+1BghHLwJ23lG6IFT/X1iaCvzcfm3d/Fu SWHaBq31DlzWmdxEAnb4/fk6eZgjJOKWvHy8XxkSI+Zei+P+Pcg9bbHIsBSL7FhxOpdcSeW1m U94SUjwu7OW87qPnopPghQ7msjkpFpHnb5JqABDk/BlOm8RRhd7ijQRrhgNl3ebIA4Ii1FTdL Rc8BJ8OOjSJ91h0OXj5ftmUVRrQJWqP9aP1ynruM1Tc4bR4Vf4fV53Pq+23FruvkOqn4= Subject: Re: [Caml-list] How can I change the margin size in the toplevel? --=-El4KxIQDvrlKEmmn3ojG Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Am Mittwoch, den 23.09.2015, 12:25 +0200 schrieb Emilio Jes=C3=BAs Gallego Arias: > Hi Alan, >=20 > Alan Schmitt writes: >=20 > > Thanks a lot for this suggestion. Unfortunately it does not seem to work > > in the toplevel: it=E2=80=99s as if the toplevel was not using > > Format.std_formatter for its output. I don=E2=80=99t know how to get ho= ld of the > > formatter used in the toplevel to change its options=E2=80=A6 >=20 > Oh I see, indeed the particular problem here seems that typing errors > are first formatted to a fresh buffer formatter, which won't inherit > stderr's margin. >=20 > The code seems to have changed in the last months (likely due to color > support), but the corresponding code in trunk is at parsing/location.ml:3= 35. >=20 > Indeed, this little hack works for me(TM): >=20 > 8<--------------------------------------------------------------------8< > Index: parsing/location.ml > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- parsing/location.ml (revision 16441) > +++ parsing/location.ml (working copy) > @@ -333,6 +333,7 @@ > let pp_ksprintf ?before k fmt =3D > let buf =3D Buffer.create 64 in > let ppf =3D Format.formatter_of_buffer buf in > + Format.pp_set_margin ppf (200 + 1); > Misc.Color.set_color_tag_handling ppf; > begin match before with > | None -> () > 8<--------------------------------------------------------------------8< >=20 > I don't know what would be the proper way to integrate it upstream. Maybe to propagate the margin? Format.pp_set_margin ppf (Format.pp_get_margin Format.std_formatter()) Don't know whether std_formatter or err_formatter is the right one. Gerd > Best regards, > Emilio >=20 >=20 --=20 ------------------------------------------------------------ Gerd Stolpmann, Darmstadt, Germany gerd@gerd-stolpmann.de My OCaml site: http://www.camlcity.org Contact details: http://www.camlcity.org/contact.html Company homepage: http://www.gerd-stolpmann.de ------------------------------------------------------------ --=-El4KxIQDvrlKEmmn3ojG Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAABAgAGBQJWAo5NAAoJEAaM4b9ZLB5TN70IAIdXCTfTjKnf6XJj75x+BBgP OuLMT13CHSXltVs/GWBfsKe3e82iaDksmPyp6UejWsVymcxnLgmAzPB8pfgZRy+q 8NmQnw0N2cl674tT7Z7U5uVbSjS7bjp9c+OpsbZjTbAdkbXAa1RstZgq5DigjH3L u9mFEQNXrCiUbyzv2YfN5ksEDkGgy0cAzvQwO62JITWQDGEqWubWjJqy/YWhJo1A P+AqUeR9dHhnz+2eNglFN46JzaJlNeSqVxBSVMrQHmeV5zix76QcZRAz7shTwK9l WoUBnVfx/yfz+0WNHrWVn09AdF7wIBekQKj4fI4YrP/N59SQL5a90ziQht2jc+0= =GHyg -----END PGP SIGNATURE----- --=-El4KxIQDvrlKEmmn3ojG--