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 <brubar...@gmail.com> writes: > Hi, > > Dominik Schrempf <dominik.schre...@gmail.com> 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 | <not available> | > > > 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