emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* ob-haskell support for haskell-ts-mode?
@ 2025-01-19  8:12 Pranshu Sharma via General discussions about Org-mode.
  2025-01-19  8:22 ` Ihor Radchenko
  0 siblings, 1 reply; 9+ messages in thread
From: Pranshu Sharma via General discussions about Org-mode. @ 2025-01-19  8:12 UTC (permalink / raw)
  To: emacs-orgmode


Can we also remove the requirment of haskell-mode to run code?

-- 
Pranshu Sharma <https://p.bauherren.ovh>


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: ob-haskell support for haskell-ts-mode?
  2025-01-19  8:12 ob-haskell support for haskell-ts-mode? Pranshu Sharma via General discussions about Org-mode.
@ 2025-01-19  8:22 ` Ihor Radchenko
  2025-01-19  9:14   ` Pranshu via General discussions about Org-mode.
  0 siblings, 1 reply; 9+ messages in thread
From: Ihor Radchenko @ 2025-01-19  8:22 UTC (permalink / raw)
  To: Pranshu Sharma; +Cc: emacs-orgmode

Pranshu Sharma via "General discussions about Org-mode."
<emacs-orgmode@gnu.org> writes:

> Can we also remove the requirment of haskell-mode to run code?

AFAIU, it is not strictly required, unless you need session support.
If you do not use sessions, things should work without haskell-mode.

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: ob-haskell support for haskell-ts-mode?
  2025-01-19  8:22 ` Ihor Radchenko
@ 2025-01-19  9:14   ` Pranshu via General discussions about Org-mode.
  2025-01-19  9:27     ` Ihor Radchenko
  0 siblings, 1 reply; 9+ messages in thread
From: Pranshu via General discussions about Org-mode. @ 2025-01-19  9:14 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: emacs-orgmode

On 19 January 2025 1:52:28 pm GMT+05:30, Ihor Radchenko <yantar92@posteo.net> wrote:
>Pranshu Sharma via "General discussions about Org-mode."
><emacs-orgmode@gnu.org> writes:
>
>> Can we also remove the requirment of haskell-mode to run code?
>
>AFAIU, it is not strictly required, unless you need session support.
>If you do not use sessions, things should work without haskell-mode.

When I tried to run code normally, without session, it still required haskell mode 



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: ob-haskell support for haskell-ts-mode?
  2025-01-19  9:14   ` Pranshu via General discussions about Org-mode.
@ 2025-01-19  9:27     ` Ihor Radchenko
  2025-01-19  9:50       ` Pranshu via General discussions about Org-mode.
  0 siblings, 1 reply; 9+ messages in thread
From: Ihor Radchenko @ 2025-01-19  9:27 UTC (permalink / raw)
  To: Pranshu; +Cc: emacs-orgmode

Pranshu <pranshu@bauherren.ovh> writes:

>>AFAIU, it is not strictly required, unless you need session support.
>>If you do not use sessions, things should work without haskell-mode.
>
> When I tried to run code normally, without session, it still required haskell mode 

May you show a reproducer?

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: ob-haskell support for haskell-ts-mode?
  2025-01-19  9:27     ` Ihor Radchenko
@ 2025-01-19  9:50       ` Pranshu via General discussions about Org-mode.
  2025-01-19 10:02         ` Ihor Radchenko
  0 siblings, 1 reply; 9+ messages in thread
From: Pranshu via General discussions about Org-mode. @ 2025-01-19  9:50 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: emacs-orgmode

On 19 January 2025 2:57:20 pm GMT+05:30, Ihor Radchenko <yantar92@posteo.net> wrote:
>Pranshu <pranshu@bauherren.ovh> writes:
>
>>>AFAIU, it is not strictly required, unless you need session support.
>>>If you do not use sessions, things should work without haskell-mode.
>>
>> When I tried to run code normally, without session, it still required haskell mode 
>
>May you show a reproducer?

Just uninstall haskell mode, restart emacs, execute babel haskell code block without session and see what happens.

The let block in org-babel-execute:haskell function actually defines the variable session two times,  and in the second definition it calls  
org-babel-haskell-initiate-session, which calls run-haskell, a function defined in haskell mode


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: ob-haskell support for haskell-ts-mode?
  2025-01-19  9:50       ` Pranshu via General discussions about Org-mode.
@ 2025-01-19 10:02         ` Ihor Radchenko
  2025-01-19 10:08           ` Pranshu via General discussions about Org-mode.
  0 siblings, 1 reply; 9+ messages in thread
From: Ihor Radchenko @ 2025-01-19 10:02 UTC (permalink / raw)
  To: Pranshu; +Cc: emacs-orgmode

Pranshu <pranshu@bauherren.ovh> writes:

> Just uninstall haskell mode, restart emacs, execute babel haskell code block without session and see what happens.

Ok. I see what happens. haskell-mode is not required only in a single
scenario - when :compile yes header argument is provided. Otherwise, you
have to use haskell-mode.

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: ob-haskell support for haskell-ts-mode?
  2025-01-19 10:02         ` Ihor Radchenko
@ 2025-01-19 10:08           ` Pranshu via General discussions about Org-mode.
  2025-01-19 10:15             ` Ihor Radchenko
  0 siblings, 1 reply; 9+ messages in thread
From: Pranshu via General discussions about Org-mode. @ 2025-01-19 10:08 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: emacs-orgmode

On 19 January 2025 3:32:33 pm GMT+05:30, Ihor Radchenko <yantar92@posteo.net> wrote:
>Pranshu <pranshu@bauherren.ovh> writes:
>
>> Just uninstall haskell mode, restart emacs, execute babel haskell code block without session and see what happens.
>
>Ok. I see what happens. haskell-mode is not required only in a single
>scenario - when :compile yes header argument is provided. Otherwise, you
>have to use haskell-mode.
>

I think being able to customise the run-haskell function and the haskell buffer name should be enough, since they both use comit



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: ob-haskell support for haskell-ts-mode?
  2025-01-19 10:15             ` Ihor Radchenko
@ 2025-01-19 10:14               ` Pranshu via General discussions about Org-mode.
  0 siblings, 0 replies; 9+ messages in thread
From: Pranshu via General discussions about Org-mode. @ 2025-01-19 10:14 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: emacs-orgmode

On 19 January 2025 3:45:05 pm GMT+05:30, Ihor Radchenko <yantar92@posteo.net> wrote:
>Pranshu <pranshu@bauherren.ovh> writes:
>
>> I think being able to customise the run-haskell function and the haskell buffer name should be enough, since they both use comit
>
>No, it is not.
>We use `haskell-mode', `run-haskell', `inferior-haskell-load-file',
>`haskell-prompt-regexp', `inferior-haskell-buffer', and
>`inferior-haskell-root-dir' variables relying on very specific behavior
>of haskell-mode.
>
>Changing things to support alternatives to haskell-mode might be doable,
>but certainly not trivial. Most likely, we can only do it on
>case-by-case basis.
>

I see, I will have a look at trying to make it work later.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: ob-haskell support for haskell-ts-mode?
  2025-01-19 10:08           ` Pranshu via General discussions about Org-mode.
@ 2025-01-19 10:15             ` Ihor Radchenko
  2025-01-19 10:14               ` Pranshu via General discussions about Org-mode.
  0 siblings, 1 reply; 9+ messages in thread
From: Ihor Radchenko @ 2025-01-19 10:15 UTC (permalink / raw)
  To: Pranshu; +Cc: emacs-orgmode

Pranshu <pranshu@bauherren.ovh> writes:

> I think being able to customise the run-haskell function and the haskell buffer name should be enough, since they both use comit

No, it is not.
We use `haskell-mode', `run-haskell', `inferior-haskell-load-file',
`haskell-prompt-regexp', `inferior-haskell-buffer', and
`inferior-haskell-root-dir' variables relying on very specific behavior
of haskell-mode.

Changing things to support alternatives to haskell-mode might be doable,
but certainly not trivial. Most likely, we can only do it on
case-by-case basis.

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-01-19 10:15 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-19  8:12 ob-haskell support for haskell-ts-mode? Pranshu Sharma via General discussions about Org-mode.
2025-01-19  8:22 ` Ihor Radchenko
2025-01-19  9:14   ` Pranshu via General discussions about Org-mode.
2025-01-19  9:27     ` Ihor Radchenko
2025-01-19  9:50       ` Pranshu via General discussions about Org-mode.
2025-01-19 10:02         ` Ihor Radchenko
2025-01-19 10:08           ` Pranshu via General discussions about Org-mode.
2025-01-19 10:15             ` Ihor Radchenko
2025-01-19 10:14               ` Pranshu via General discussions about Org-mode.

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).