[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [BUG] tangle breaks fortran modules [9.7-pre (release_9.6.7-581-gd38
From: |
Ihor Radchenko |
Subject: |
Re: [BUG] tangle breaks fortran modules [9.7-pre (release_9.6.7-581-gd38ca5)] |
Date: |
Tue, 05 Sep 2023 09:33:31 +0000 |
Paul Stansell <paulstansell@gmail.com> writes:
>>
>> I opened the latest Org git repo, ran make repro, opened the file,
>> clicked on "tangle" link, moved to the linked source code, and executed
>> it. It worked.
>>
>> So, I am unable to reproduce the problem on my system.
>>
>
> Thanks for investigating. Can you please post your tangled file named
> circle.f90.
>
> Mine looks like this
>
> program main
Never mind my previous message. I forgot the provided init.el file,
which makes all the difference.
Confirmed.
By default, ob-fortran (and at least ob-C) wrap the src block body to
become a standalone function unless you put :main no header argument.
The default behaviour is mostly useful during execution, but not when
tangling.
I will need to think about the best way to approach this. A tentative
fix would be handling :main header argument only during block evaluation.
Meanwhile, you can set :main no as default header argument for fortran.
--
Ihor Radchenko // yantar92,
Org mode contributor,
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>