From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id qMgxMBY0WGPXRAEAbAwnHQ (envelope-from ) for ; Tue, 25 Oct 2022 21:08:06 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 4LhGLxY0WGM0zwAAG6o9tA (envelope-from ) for ; Tue, 25 Oct 2022 21:08:06 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 6C6D74582 for ; Tue, 25 Oct 2022 21:08:06 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1onPCo-0001wX-Fn; Tue, 25 Oct 2022 15:03:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1onPCm-0001r6-19 for emacs-orgmode@gnu.org; Tue, 25 Oct 2022 15:03:16 -0400 Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1onPCk-00071m-7a for emacs-orgmode@gnu.org; Tue, 25 Oct 2022 15:03:15 -0400 Received: by mail-ej1-x62b.google.com with SMTP id k2so15199815ejr.2 for ; Tue, 25 Oct 2022 12:03:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:from:to:cc:subject:date:message-id:reply-to; bh=ryG4penBFsP12170vGgHB7HrY7YODRzZZ+Q5ZdP8l78=; b=pEZYMowoE2BnHoD36s+gswqx4/5WAw8NXtH+Z+JCqRurfsJHedmKIqzaHqQPMNxL43 f04sTkBpKYRzpDqpI/IxW5JAgJ1rf9WQ/g9W6G6eD6UWjgl18kanKUQzAxinre3L1hHH sSo01V1tm6rnjEWFGIrdq8AofN99t1DcZV4ddARs5n5Q1DbWGaKYw5Bt4jIbhWWxiYN+ FwRu63KOowaAnk3hgsXD3YZUTS8oBpm3m2aHYKtZuKsLUzQnhSDZlxtjBjxLoKYlb0n4 bmfKrjmRVBcQ6sRoQ7JcpxL6HdUCb2WWZQ3g8CQYC9RmifSSR6wCj/9EPcs9Yw+0V8JQ 8YEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ryG4penBFsP12170vGgHB7HrY7YODRzZZ+Q5ZdP8l78=; b=m5JN1j002lGulacBLP5TH4lE+ao+mIRAw1kAYlrKM0/TVxi3lXln60j+H+79C0fM1A eswyv6fLHcZH/S4sdD1aTIAtdprNhAiRm8yIf+eI8SPQWBf9zd0T9Lw+jbgkhUwUF4DN mQ5W3niNth40nDKVf1wOkbTRxRFFSJBr0KvGH7tDB4o9Vmk0n983xIUFcT1Y16WOJ/xJ aUouMhMgMctyavwQna7OGSf5vhtZ6rWB9LQoJHuoLhkLPeVWST6ESxobHNxP8wAsqU3V MG38fvfPsBa+5XrxsOlN1ff1Xa52gPr9YH0xMgXONxT2Gmip0qgYRJIPSQrxQ1WmKRLz wc3A== X-Gm-Message-State: ACrzQf3IPZ+QPp4ybY504HYCZ84NEsuQOFcT1SI3/UY2BdMMjLgMJ38v dnP0NiHA2vGK4ndZY9nk2Q== X-Google-Smtp-Source: AMsMyM6chyEPnU90So153EJwAnMxNFEavLFTIyg74JrEEuSiPLHbLt+ZdqvOIqmfZ1mcHV5tjuccWg== X-Received: by 2002:a17:906:5dcc:b0:78d:fb98:6f85 with SMTP id p12-20020a1709065dcc00b0078dfb986f85mr34621600ejv.123.1666724591537; Tue, 25 Oct 2022 12:03:11 -0700 (PDT) Received: from localhost (94-21-158-133.pool.digikabel.hu. [94.21.158.133]) by smtp.gmail.com with ESMTPSA id b8-20020aa7d488000000b00461a6997c5dsm2084767edr.83.2022.10.25.12.03.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Oct 2022 12:03:11 -0700 (PDT) References: <87r0ywvtqp.fsf@gmail.com> <87ilk8szv4.fsf@gmail.com> User-agent: mu4e 1.8.10; emacs 28.2 From: Dominik Schrempf To: Bruno Barbier Cc: emacs-orgmode@gnu.org Subject: Re: Org Haskell code blocks Date: Tue, 25 Oct 2022 20:51:45 +0200 In-reply-to: Message-ID: <87sfjbbua9.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::62b; envelope-from=dominik.schrempf@gmail.com; helo=mail-ej1-x62b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Emacs-orgmode" Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1666724886; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=ryG4penBFsP12170vGgHB7HrY7YODRzZZ+Q5ZdP8l78=; b=YItRogaWEE5crcNauSZXU3t5nUzO2XOxgM5MSk+Kn8x8B6Q6XjQFyqu5DfB/2BdnZcHl9D dKM9iUZ2JEp5jOyfQXsZxaw5eSfIW3eF98QNEmmWkCIXZrbHPP4WbjAZv7xNXeL+Jlko9G +gUBHhIwbOH3JCBCKwGCJWIr8MAEO0wyuqqMmuhDo+JPnQkAiBPAdt8B1wP0RBdoKgj3Ux 6qUZrNEMSMxldg9d/TiGRRxKFCbxWl4zupQH7pU8+QS6EqJO7IuMkncHxdDc2B1kG0y4lz T5FYxh9Y0BTAKghkvNCRUmtsQQPleIHZbFQOUhsbIbujrxA+729GQfrV7jT/gw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1666724886; a=rsa-sha256; cv=none; b=PXQuo6w8oVxDxi9U6qvEpFODOYQvZA/dK90RkDwmPcLh8jiW8UYftevzz0sFs7eEly9e/a Hb70NE6vmVf2UW3XgtY2YMvhII4sVaT4CcN0t6wAv49MF0bQmAvtLIwEyqgo3q5AT1Kojm RAvGdtgI6M2jJWnEdZlmYoZy4ixCEHBmmw+ZDMC07l4ctC6bZYIY86MPBA6KLu1jvTfWzF dTcLjTvspVwSK8HZ6LW7R8e9w7KyxkMvlNE8o1NMnjoYzlYric1B/6Iq9u1Va4g2Lk+wVX Mq4Fcf0id4rt+OLwZQZR23YS5j/ayLB09bLuj3qlJPx/IOXWq83m94wRAjxqZQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=pEZYMowo; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.91 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=pEZYMowo; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 6C6D74582 X-Spam-Score: -3.91 X-Migadu-Scanner: scn0.migadu.com X-TUID: fqJI3kJ+ofaC Hi Bruno, glad to hear that it works for you. Ad 'org-babel-script-escape': I use Org version 9.6. I do not temper with 'org-babel-script-escape', it is used by the respective babel modules --- 'ob-haskell' in this case. The error also occurs with 'cabal-repl' as process type. Ad 'haskell-process-type': When I use 'haskell-process-type' 'auto', it chooses 'cabal-repl' which will also fire up 'ghci' but the setup is faulty, because it does not find any modules, as I described. I just checked and this is not a fault of org-mode. The command 'cabal repl' also fails to access any modules when executed in the terminal. I think it requires a `.cabal` file, which I usually do not have when using an Org file. I quote the help text from 'cabal repl': Open an interactive session for a component within the project. I think this is not the correct default for Org mode, because usually there is no "project", but just an Org file. If I use 'haskell-process-type' 'ghci', all modules I have installed along with GHC are found, as I expect them to be. Ad scrambling: The scrambling happens with multi-line input. For example #+begin_src haskell :exports both :results output let x = 10 let y = 12 x*y [x,y] #+end_src #+results: : : ghci> 120 : [10,12] Do you get syntax highlighting when the source code is indented (for example in list items). Thanks for your reply! Dominik Bruno Barbier writes: > Hi, > > Dominik Schrempf writes: > >> ... >> However, the result output is still scrambled (e.g., empty >> lines, unnecessary "ghci>" prompts in results) >> > > For me, ghci is selected by default. > > Here is the config I've used to test it: > > | emacs-version | 28.1 | > | org-version | 9.5.2 | > | haskell-process-type | auto | > | org-babel-script-escape | | > > > Here is my simple test: > > #+begin_src haskell > 1+2 > #+end_src > > #+RESULTS: > : 3 > > The variable 'org-babel-script-escape' doesn't exist in the version that > I'm using. And, the prompt is not "ghci>" but the current module name. > > Which version of org are you using ? Could you try with a recent version > and provide a minimal complete example using a minimal configuration ? > (see the org mode manual (info "(org)Feedback")). > > Thanks, > > > Bruno