From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id YIkZAgb29mT1FwAAauVa8A:P1 (envelope-from ) for ; Tue, 05 Sep 2023 11:33:58 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id YIkZAgb29mT1FwAAauVa8A (envelope-from ) for ; Tue, 05 Sep 2023 11:33:58 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 9E0DD519EA for ; Tue, 5 Sep 2023 11:33:57 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=MY6b1FFx; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1693906438; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=+Gqpw5VBAtx5NtsJYRXlJbGUTR4WUzJuoL+MUkGjUpY=; b=T2CvPeyvdHN3eb0Mx2uaHKwgcAg1d1hLkjo/Of6Ld9v27AvVgXGbvyngRxJj2imKd3ZI7U PpZA+dl0a1TSpa+6ZwFWA6ubN5ThUw45j1ElgjJk4a81slbLEhsqImJZJwqYIJmK2DuI09 MsmKiyqJMmOAjC8DiLxGt6h4Qxbar/Gr/wa4UrKDSsnY71GOhkSG+Xd+NY7eB9gzYw3fwt zn5rJVy84q/eBF9agg+yNUnA86v0+d1xJa48wBdb92kXoqkrQOoWREfT3c0ASfEHfCf11/ dGLtohTpWcv38RQIGyvuz7nxsENT0ySLmYp7ZJ8Z6xiKQD6mqKgCq5R6hZr5xA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1693906438; a=rsa-sha256; cv=none; b=uGUcQ6XdwlGyJzJo3Kzpfti3u+Qh9NZ8X+t91bL1sIyX/Dd/V2X68cN3+dK7ApOKYQTZtE taktYtj0eqNO1CwUihns6E7LdSZ5Gm6fmaZg8+BF9mIyeUOZvIkL9RPGgYhy4TMK0QGBxF dag50SAwy32vxJBoJy5BMHN5Xn8GVpPXqGotzoIZcNr44NLc4mMCe+Tv8HoR4TYahTglx9 ulLkvjGy01pc5O17rRkB41IPzMvd+I+NoKQojzqt6n5lGcKlvJM7Zm6qJlhUDzgW5cCIXg S02KvN7ZPNiGymVY55BI4oJjxfVKqHVylbFITO4p2/HqHfk5FJrVyLiXO0IIIQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=MY6b1FFx; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qdSQb-0000qt-4J; Tue, 05 Sep 2023 05:32:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qdSQY-0000qR-La for emacs-orgmode@gnu.org; Tue, 05 Sep 2023 05:32:54 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qdSQV-0008DH-WB for emacs-orgmode@gnu.org; Tue, 05 Sep 2023 05:32:54 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 74ABB240103 for ; Tue, 5 Sep 2023 11:32:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1693906367; bh=Je/gPs91fm3jyQIw3jmWEHqoN45Y7z7Jx8PhbND5fw8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=MY6b1FFxjmM2N2S6Qm/NbUlXQU+r/bu72sN4Gi2jRu4ok81Hg7PanqywRdM9Ac8Xo 7+y0mq+q0wkFnQHZbpK+W8v7SkR2FTfMES7P4NHxf1J5emuT/GDyENQw+T3czbCqZ7 y3NuW8zFC6IofyTHXaOBYq/R++HDNcqw6nFS8X+jjh9Vr33PujiOVNZMW9wPLe9F6t eDVsJjkGIUv9OZZHSIEXAO+MurPn9kJacoEN73rqOHzpD2P+uO931hpw9gr54CyzIB qOGkjrzMYx+kHgut3K9a6oX46xRnvq8fPud7PWVS4GB/rjdhbOv9Fd4ZIqY3D0RgjO 4vpwbygUA43Mg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Rg0fQ3LZ2z9rxP; Tue, 5 Sep 2023 11:32:46 +0200 (CEST) From: Ihor Radchenko To: Paul Stansell Cc: emacs-orgmode@gnu.org Subject: Re: [BUG] tangle breaks fortran modules [9.7-pre (release_9.6.7-581-gd38ca5)] In-Reply-To: References: <87msy2wev2.fsf@localhost> Date: Tue, 05 Sep 2023 09:33:31 +0000 Message-ID: <875y4pvuac.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx2.migadu.com X-Spam-Score: -9.26 X-Migadu-Queue-Id: 9E0DD519EA X-Migadu-Spam-Score: -9.26 X-TUID: j8OnkHIOBoVW Paul Stansell 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 . Support Org development at , or support my work at