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 350647F734 for ; Wed, 23 Sep 2015 18:40:12 +0200 (CEST) IronPort-PHdr: 9a23:gw7JNhHsJodHnHyd26fZZJ1GYnF86YWxBRYc798ds5kLTJ75rsiwAkXT6L1XgUPTWs2DsrQf27aQ7/qrCDdIyK3CmU5BWaQEbwUCh8QSkl5oK+++Imq/EsTXaTcnFt9JTl5v8iLzG0FUHMHjew+a+SXqvnYsExnyfTB4Ov7yUtaLyZ/ni6buodaCOE1hv3mUX/BbFF2OtwLft80b08NJC50a7V/3mEZOYPlc3mhyJFiezF7W78a0+4N/oWwL46pyv+YJa6jxfrw5QLpEF3xmdjltvIy4/SXEGCKL731UaW4WlxtUH0CR5RXzWNHquSv/t/Zh8DGdOdzqQLs0XzW78qotTwXn3nQpLTk8pU7egNZxgaYTmxmhqgZy2caAb4ifLvtzeuXGdtMXX2dbdslUXi1FRIi7at1cXKI6Ie9Eotyl9BM1phykCFzpXbu3xw== Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=gabriel.scherer@gmail.com; spf=Pass smtp.mailfrom=gabriel.scherer@gmail.com; spf=None smtp.helo=postmaster@mail-wi0-f182.google.com Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of gabriel.scherer@gmail.com) identity=pra; client-ip=209.85.212.182; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="gabriel.scherer@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of gabriel.scherer@gmail.com designates 209.85.212.182 as permitted sender) identity=mailfrom; client-ip=209.85.212.182; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="gabriel.scherer@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-wi0-f182.google.com) identity=helo; client-ip=209.85.212.182; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="postmaster@mail-wi0-f182.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0D5AQB/1QJWlLbUVdFdg0M1aQarBoZijW2FfQKBRAc7EQEBAQEBAQEBEAEBAQEHCwsJHzCCHYIIAQEEEhEdARsSCwEDDAYFCw0CAiYCAiIBEQEFARwGEyKHdgEDEg2pU4EwPjGLRoFsgnmJdgoZJw1WhB8BAQEBAQEEAQEBAQEBFgEFDoEUhVGDd4EGhEgSMweCaYFDBZVnhRKHeYFPRocRkDgSI4EXN4IwgX88M4lsAQEB X-IPAS-Result: A0D5AQB/1QJWlLbUVdFdg0M1aQarBoZijW2FfQKBRAc7EQEBAQEBAQEBEAEBAQEHCwsJHzCCHYIIAQEEEhEdARsSCwEDDAYFCw0CAiYCAiIBEQEFARwGEyKHdgEDEg2pU4EwPjGLRoFsgnmJdgoZJw1WhB8BAQEBAQEEAQEBAQEBFgEFDoEUhVGDd4EGhEgSMweCaYFDBZVnhRKHeYFPRocRkDgSI4EXN4IwgX88M4lsAQEB X-IronPort-AV: E=Sophos;i="5.17,577,1437429600"; d="scan'208";a="148355727" Received: from mail-wi0-f182.google.com ([209.85.212.182]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 23 Sep 2015 18:40:11 +0200 Received: by wicge5 with SMTP id ge5so215876665wic.0 for ; Wed, 23 Sep 2015 09:40:11 -0700 (PDT) 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 :cc:content-type:content-transfer-encoding; bh=o5J1zVunCXh0IhdYM136p7K6Z+wHw5yBSctFLWGmoPk=; b=ewkcfoiZL/mHDTLI47g+6H8XrajI832ElbIRd2ZswTgPjmM2L1gz16c2xQd3s8GWTp ABWlWep7jF/vbeyZEGd+Amq91hFAy/IQsBHLytA2+wH50kP8V1du+jcp/+9wmClo7hci Fm2LujsUwvu183nRGxyUlg+5hcu5DfwJQoe0qrH2qXcTIr3SbAt8n3CPhdxNpdEr3jMq IVSVuth6EJSk35eGoH1tL8VJAUu3ySGz3j3fqIUJ+SYpNjqBMW8Fy1iapTetHKre51dH Dq8mMah9aBjPJvQ0VNs31kBn4fnhBr5TJCMFeJ0sO5wC5XFAvEtB9hwKds2WFajYLDkC B0ZA== X-Received: by 10.180.11.165 with SMTP id r5mr5170241wib.43.1443026411295; Wed, 23 Sep 2015 09:40:11 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.148.212 with HTTP; Wed, 23 Sep 2015 09:39:31 -0700 (PDT) In-Reply-To: References: <84io72z88q.fsf@cri.ensmp.fr> <56025424.2010508@linux-france.org> From: Gabriel Scherer Date: Wed, 23 Sep 2015 18:39:31 +0200 Message-ID: To: Alan Schmitt Cc: David MENTRE , Nicolas Ojeda Bar , caml users Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Caml-list] How can I change the margin size in the toplevel? For the record, Simon Cruanes is trying to find a good fix for the issue, with a preliminary patch proposal in https://github.com/ocaml/ocaml/pull/207 Maybe we could discuss the implementation there (or in a new Mantis ticket) rather than on the mailing-list directly. (There are wonderful people that prepare summaries of mailing-list discussions, you know, they probably have to read all the messages, let's not create too much work.) On Wed, Sep 23, 2015 at 6:05 PM, Alan Schmitt wrote: > On 2015-09-23 14:23, Alan Schmitt writes: > >> Is there a guide somewhere that explains how to create a new opam switch >> From local (modified) ocaml sources? > > A very helpful colleague gave me a crash course on nix and I was able to > compile a patched version (where I tweaked error_of_printer in > parsing/location.ml as follows): > > #+begin_src ocaml > let error_of_printer loc print x =3D > let buf =3D Buffer.create 64 in > let ppf =3D Format.formatter_of_buffer buf in > Format.pp_set_margin ppf (Format.pp_get_margin !formatter_for_warnings = ()); > pp_print_string ppf "Error: "; > print ppf x; > pp_print_flush ppf (); > let msg =3D Buffer.contents buf in > errorf ~loc "%s" msg > #+end_src > > This works great: I can now change the margin of the error messages > simply by doing a "Format.set_margin" in the toplevel. > > Alan > > -- > OpenPGP Key ID : 040D0A3B4ED2E5C7 > Athmospheric CO=E2=82=82 (Updated September 22, 2015, Mauna Loa Obs.): 39= 7.77 ppm