emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Dominik Schrempf <dominik.schrempf@gmail.com>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: Bruno Barbier <brubar.cs@gmail.com>, emacs-orgmode@gnu.org
Subject: Re: Org Haskell code blocks
Date: Wed, 26 Oct 2022 08:24:03 +0200	[thread overview]
Message-ID: <87k04nxew8.fsf@gmail.com> (raw)
In-Reply-To: <87lep3qksl.fsf@localhost>

Dear Ihor,

thank you, these are great news!

Syntax highlighting is not working, for example, with the following
snippet and code block:

begin_snippet

- An example of a function:

  #+begin_src haskell :exports code :results none
  f :: a -> b
  #+end_src

end_snippet

Note the indentation. The code block is indented by 2 spaces, because it
belongs to the list item above. The indentation makes the syntax
highlighting fail. It may well be that this is non-standard usage of
code blocks, but it is very convenient to preserve indentation in this
way.

I also fixed the detection of 'haskell-process-type'. It turns out, I
had some local configuration preferring 'cabal-repl', even without the
required project files. 'haskell-process-type' 'auto' works correctly, I
apologize.

Thank you for your help!

Dominik

Ihor Radchenko <yantar92@posteo.net> writes:

> Dominik Schrempf <dominik.schrempf@gmail.com> writes:
>
>> 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]
>
> I am unable to reproduce on the latest main.
> Likely because of recent fixes in ob-comint.
>
>> Do you get syntax highlighting when the source code is indented (for
>> example in list items).
>
> I have the above code fontified.
> Could you please provide an example of the code that is not being fontified?


  reply	other threads:[~2022-10-26  6:46 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
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 [this message]
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=87k04nxew8.fsf@gmail.com \
    --to=dominik.schrempf@gmail.com \
    --cc=brubar.cs@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=yantar92@posteo.net \
    /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).