Paul Stansell <paulstans...@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>

Reply via email to