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 0BA5C7F734 for ; Wed, 23 Sep 2015 12:26:16 +0200 (CEST) IronPort-PHdr: 9a23:R13m/BVPbbLA4BH1BuwSNuO4TmbV8LGtZVwlr6E/grcLSJyIuqrYZhGGt8tkgFKBZ4jH8fUM07OQ6PC8HzBaqszd+Fk5M7VyFDY9wf0MmAIhBMPXQWbaF9XNKxIAIcJZSVV+9Gu6O0UGUOz3ZlnVv2HgpWVKQka3CwN5K6zPF5LIiIzvjqbpq8GVP18D3mb1SIgxBSv1hD2ZjtMRj4pmJ/R54TryiVwMRd5rw3h1L0mYhRf265T41pdi9yNNp6BprJYYAu2pN5g/GLdRCTBjN2Eu+OXqswPCRE2B/CgySGITxxVBBwzI4xbSVY3w9Cb8re9lnieAdY3bSLEwWDPqzapw2gSgpy4DMzM29yn+kM15l+MI81qauxVjztuMM8muP/1kc/aFcA== Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=gallego@cri.ensmp.fr; spf=Pass smtp.mailfrom=gclci-caml-list@m.gmane.org; spf=Pass smtp.helo=postmaster@plane.gmane.org Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of gallego@cri.ensmp.fr) identity=pra; client-ip=80.91.229.3; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="gclci-caml-list@m.gmane.org"; x-sender="gallego@cri.ensmp.fr"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of gclci-caml-list@m.gmane.org designates 80.91.229.3 as permitted sender) identity=mailfrom; client-ip=80.91.229.3; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="gclci-caml-list@m.gmane.org"; x-sender="gclci-caml-list@m.gmane.org"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of postmaster@plane.gmane.org designates 80.91.229.3 as permitted sender) identity=helo; client-ip=80.91.229.3; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="gclci-caml-list@m.gmane.org"; x-sender="postmaster@plane.gmane.org"; x-conformance=sidf_compatible; x-record-type="v=spf1" X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0A4CACNfQJWgQPlW1Bdg3hptDuLEYYBgUAHOxEBAQEBAQEBARABARYzLkEDgVmCCAEEASMECwFLCwsaAgUhAgIPAQQoGxmIJgwBtnmUSIEiik6EWlGCUoFDBYc0jjOFEooOmRU3gXYBAQgCgi1vgyuGQgEBAQ X-IPAS-Result: A0A4CACNfQJWgQPlW1Bdg3hptDuLEYYBgUAHOxEBAQEBAQEBARABARYzLkEDgVmCCAEEASMECwFLCwsaAgUhAgIPAQQoGxmIJgwBtnmUSIEiik6EWlGCUoFDBYc0jjOFEooOmRU3gXYBAQgCgi1vgyuGQgEBAQ X-IronPort-AV: E=Sophos;i="5.17,577,1437429600"; d="scan'208";a="179054610" Received: from plane.gmane.org ([80.91.229.3]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/AES256-SHA; 23 Sep 2015 12:26:11 +0200 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZehFa-0003V7-JN for caml-list@inria.fr; Wed, 23 Sep 2015 12:26:10 +0200 Received: from 6.9.67.86.rev.sfr.net ([86.67.9.6]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 23 Sep 2015 12:26:10 +0200 Received: from gallego by 6.9.67.86.rev.sfr.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 23 Sep 2015 12:26:10 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: caml-list@inria.fr From: gallego@cri.ensmp.fr (Emilio =?utf-8?Q?Jes=C3=BAs?= Gallego Arias) Date: Wed, 23 Sep 2015 12:25:59 +0200 Message-ID: <877fnh77pk.fsf@cri.ensmp.fr> References: <84io72z88q.fsf@cri.ensmp.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 6.9.67.86.rev.sfr.net User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/24.4 (gnu/linux) Cancel-Lock: sha1:Ox/9oJSqbl3sbMRfYqE/rURMbYg= X-Validation-by: gallego@cri.ensmp.fr Subject: Re: [Caml-list] How can I change the margin size in the toplevel? Hi Alan, Alan Schmitt writes: > Thanks a lot for this suggestion. Unfortunately it does not seem to work > in the toplevel: it’s as if the toplevel was not using > Format.std_formatter for its output. I don’t know how to get hold of the > formatter used in the toplevel to change its options… 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. 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:335. Indeed, this little hack works for me(TM): 8<--------------------------------------------------------------------8< Index: parsing/location.ml =================================================================== --- parsing/location.ml (revision 16441) +++ parsing/location.ml (working copy) @@ -333,6 +333,7 @@ let pp_ksprintf ?before k fmt = let buf = Buffer.create 64 in let ppf = 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< I don't know what would be the proper way to integrate it upstream. Best regards, Emilio