emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Dominik Schrempf <dominik.schrempf@gmail.com>
To: Emacs Org Mode Mailing List <emacs-orgmode@gnu.org>
Subject: Re: Org Haskell code blocks
Date: Tue, 25 Oct 2022 17:08:22 +0200	[thread overview]
Message-ID: <87ilk8szv4.fsf@gmail.com> (raw)
In-Reply-To: <87r0ywvtqp.fsf@gmail.com>

I apologize, the settings described in Point 1 actually have no effect.
Multi line input works out of the box (at least with "ghci" as
described). However, the result output is still scrambled (e.g., empty
lines, unnecessary "ghci>" prompts in results)

Dominik

Dominik Schrempf <dominik.schrempf@gmail.com> writes:

> Hello,
>
> I have trouble using Haskell code blocks in Org Mode.
>
> 1. I need to use the following Org Mode file header:
>
> #+property: :header-args:haskell: :prologue ":{\n" :epilogue ":}\n"
>
> #+begin_src haskell :exports none :results none
> :set prompt-cont ""
> #+end_src
>
> Otherwise, the results of Haskell code blocks are scrambled.
>
> 2. I need to set `haskell-process-type' to `ghci'. The default
> interpreter `cabal-repl' does not find any external modules (even core
> modules included with GHC).
>
> However, I get the error message "org-babel-script-escape:
> ‘org-babel-script-escape’ expects a string", when executing the first
> code block which starts the interpreter. Seemingly, the error has no
> effect because everything works fine.
>
> 3. I have to set `org-edit-src-content-indentation` to 0, and always put
> the source code to text column 0, otherwise syntax highlighting does not
> work.
>
> Do others have the same problems? If so, have there been discussions
> about how to improve this situation?
>
> Thank you for your help!
>
> Dominik


  reply	other threads:[~2022-10-25 15:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-25 14:47 Org Haskell code blocks Dominik Schrempf
2022-10-25 15:08 ` Dominik Schrempf [this message]
2022-10-25 18:06   ` Bruno Barbier
2022-10-25 18:51     ` Dominik Schrempf
2022-10-26  4:19       ` Ihor Radchenko
2022-10-26  6:24         ` Dominik Schrempf
2022-10-26  6:57           ` Ihor Radchenko
2022-10-26  9:11             ` Dominik Schrempf
2022-10-27  3:32               ` Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ilk8szv4.fsf@gmail.com \
    --to=dominik.schrempf@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).