From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id OCcaDnlgpl5aGAAA0tVLHw (envelope-from ) for ; Mon, 27 Apr 2020 04:32:57 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 2Kf9J4Bgpl4RbAAA1q6Kng (envelope-from ) for ; Mon, 27 Apr 2020 04:33:04 +0000 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 7A71A9430D4 for ; Mon, 27 Apr 2020 04:33:03 +0000 (UTC) Received: from localhost ([::1]:52584 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jSvS1-0005Rv-Rx for larch@yhetil.org; Mon, 27 Apr 2020 00:33:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49238) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jSvRc-0005Rj-EW for emacs-orgmode@gnu.org; Mon, 27 Apr 2020 00:32:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jSvRb-0000dM-OK for emacs-orgmode@gnu.org; Mon, 27 Apr 2020 00:32:36 -0400 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]:39859) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jSvRb-0000d8-C0 for emacs-orgmode@gnu.org; Mon, 27 Apr 2020 00:32:35 -0400 Received: by mail-ej1-x633.google.com with SMTP id s3so13007589eji.6 for ; Sun, 26 Apr 2020 21:32:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=IJy/YW+bQ+xlopQLOo4ppJDTkI6BHeWtmQjKv/aFngg=; b=C6Rdo8lrNjpBhn0sjJCbym6pQJUNNk4sc0fnQEraZGolqPnEoN1PHX02+G8qlw1Ktp nuswaJ4294/g7NQ6VbnkoWho4I+Cu2uZwPUhakVqIDGBYvqRQC75XOtMN7pSEXrJxszC IKzakUmlsJvprQLiHCbRdUsWgAqMsE9y3Es10sE71jl4rdgu3HNVAHIL8yXapy0+y48C 3i0VCuuT+FBYfyR7sC3UckdP0VqQv5s7sqhL3Fn4E5e/uuNSD4+5priEQu+neXWA+hr6 z1yx1nHdBnD5akhZRvX3Qx+UEiDrIe0mM3FdsjWlwwA6WqA0Aw/Ziww0o/awloxYY/+R /bGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=IJy/YW+bQ+xlopQLOo4ppJDTkI6BHeWtmQjKv/aFngg=; b=P1XCh1kEe1XdAdeT8TVh1jGiuN4T+4GkOAZaErfG1IqHMpiXBYenYOJwYATe5n5DwC POc7PJ+JCMutFGku2zes2axUHT6LwmZx6IhThj14+bV6C4jpmXOVTKttKbaTmcwlIqzx uvAAPR+7vmNGC6qFBJIUKfB7o6+5QpHyHuaxBVR4JbOMAReCvkHqqgupPEvLqLqKWZor X3WZRIIhZjCLX4IF5mv5N4goHnAcIdxmIfDApzwriaqUBhvKpPK4VKVohr/ZhgB1dA7Q jesdkfs229QFy9E6MUDiz9h5oSeiGREKgRYbtAQsc9hceA6QkfJz4BMnAVn0bkGxSyUe G5bA== X-Gm-Message-State: AGi0PubcYdGykTJlMCl2xGSLO0n2Iw9B7O3PMpppPLWg9deNA9IiJAri r2hxY1OUj5mxHscPFbARJ9dFCq6WSrvYM93xqho= X-Google-Smtp-Source: APiQypJtMxe6KkjZuCSV/X18ctcrEuCW6veBbPCe0ZAMq2Q2Ixr/HJcpEWhlvLqsRThvC5aQf4izGJQFsBxSxDEEvmo= X-Received: by 2002:a17:906:1d4c:: with SMTP id o12mr18530452ejh.357.1587961953523; Sun, 26 Apr 2020 21:32:33 -0700 (PDT) MIME-Version: 1.0 References: <87imhl7ein.fsf@kyleam.com> In-Reply-To: <87imhl7ein.fsf@kyleam.com> From: Vladimir Nikishkin Date: Mon, 27 Apr 2020 12:32:21 +0800 Message-ID: Subject: Re: Specifying the execution function and/or nested major mode for babel blocks To: Kyle Meyer Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::633; envelope-from=lockywolf@gmail.com; helo=mail-ej1-x633.google.com X-detected-operating-system: by eggs.gnu.org: Error: [-] PROGRAM ABORT : Malformed IPv6 address (bad octet value). Location : parse_addr6(), p0f-client.c:67 X-Received-From: 2a00:1450:4864:20::633 X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 X-Spam-Score: -0.21 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=C6Rdo8lr; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Scan-Result: default: False [-0.21 / 13.00]; GENERIC_REPUTATION(0.00)[-0.55616094182036]; MX_INVALID(1.00)[cached]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.51.188.0/24:c]; FREEMAIL_FROM(0.00)[gmail.com]; DWL_DNSWL_BLOCKED(0.00)[gmail.com:dkim,209.51.188.17:from]; IP_REPUTATION_HAM(0.00)[asn: 22989(0.19), country: US(-0.00), ip: 209.51.188.17(-0.56)]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; MAILLIST(-0.20)[mailman]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; RCVD_IN_DNSWL_FAIL(0.00)[209.51.188.17:server fail]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:22989, ipnet:209.51.188.0/24, country:US]; TAGGED_FROM(0.00)[larch=yhetil.org]; FROM_NEQ_ENVFROM(0.00)[lockywolf@gmail.com,emacs-orgmode-bounces@gnu.org]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; RCVD_COUNT_FIVE(0.00)[6]; FROM_HAS_DN(0.00)[]; URIBL_BLOCKED(0.00)[kyleam.com:email]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[emacs-orgmode@gnu.org]; HAS_LIST_UNSUB(-0.01)[]; FORGED_SENDER_MAILLIST(0.00)[] X-TUID: 8yKnyjeZya3q >> (add-to-list 'org-src-lang-modes '("f90" . fortran)) Language alignment is fine. What needs to be done is to make org-babel use org-babel-execute:fortran for both begin_src fortran, and for begin_src f90. =D0=BF=D0=BD, 27 =D0=B0=D0=BF=D1=80. 2020 =D0=B3. =D0=B2 12:12, Kyle Meyer = : > > Vladimir Nikishkin writes: > > > This is fine most of the time, however, there are exceptions. > > The one I am interested in is fortran/f90. There are separate > > fortran-mode and f90-mode, however, afaiu, just a single > > ob-fortran.el, which works fine with both of those. > > In that case, you'd just need (fortran . t) in org-babel-load-languages, > I think. > > > #+begin_src fortran > > #+end_src > > or turns on syntax highlighting for fortran-mode, not for f90-mode. > > I can make blocks like: > > #+begin_src f90 > > #+end_src > > This makes syntax highlighting work, but evaluation doesn't, because > > org doesn't know that f90 and fortran have the same evaluation > > (compilation) function. > > > > I feel that this is a super minor thing that can be solved in, like, > > one line of code. But I don't seem to be able to find which one. > > > > Any suggestions? > > Perhaps you're looking for org-src-lang-modes? This (untested) might do > what you want: > > (add-to-list 'org-src-lang-modes '("f90" . fortran)) --=20 Yours sincerely, Vladimir Nikishkin