From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id iAfcL+Rbpl40agAA0tVLHw (envelope-from ) for ; Mon, 27 Apr 2020 04:13:24 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id cAR9BOxbpl5AFgAAB5/wlQ (envelope-from ) for ; Mon, 27 Apr 2020 04:13:32 +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 90BD294385B for ; Mon, 27 Apr 2020 04:13:30 +0000 (UTC) Received: from localhost ([::1]:52398 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jSv98-0007oD-D2 for larch@yhetil.org; Mon, 27 Apr 2020 00:13:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47740) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jSv8c-0007nx-0g for emacs-orgmode@gnu.org; Mon, 27 Apr 2020 00:12:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jSv8a-0002YD-Il for emacs-orgmode@gnu.org; Mon, 27 Apr 2020 00:12:57 -0400 Received: from pb-smtp20.pobox.com ([173.228.157.52]:51210) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jSv8Z-0002WH-SY for emacs-orgmode@gnu.org; Mon, 27 Apr 2020 00:12:56 -0400 Received: from pb-smtp20.pobox.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id A36AFB0E3B; Mon, 27 Apr 2020 00:12:52 -0400 (EDT) (envelope-from kyle@kyleam.com) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to :subject:in-reply-to:references:date:message-id:mime-version :content-type; s=sasl; bh=4+i4zmYrf4JWLfuQ18hLOrUkb4I=; b=PEDDoX MGvbHU0lIbNFy6CPmRdKq+S2XSZ6232S37qrrc8jHj90Utgq+qKBPP8lvOV1hzEq 3DJA+mMP/jUhzWkeFcXhAU1vnMQkSneSfrUvHy0DddYEqXOvKLfMdOhXmIpQERt/ RZnQBAPSrl2D4MZVE3BQGY8iIA1xLt+qGEHd4= Received: from pb-smtp20.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id 9D44FB0E3A; Mon, 27 Apr 2020 00:12:52 -0400 (EDT) (envelope-from kyle@kyleam.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=kyleam.com; h=from:to:subject:in-reply-to:references:date:message-id:mime-version:content-type; s=mesmtp; bh=JtSEvqJsol+fqBBM4cstWWKzDXC2YQ3mfe1xu3hN7QU=; b=JEoETqKRd3de0Vhqpx0/q5eEQMxSJX3WjAD6tmnEhf4yRQCV8RhsYPRjjC3qInxwngNzu4X6gIh61XpAW8Bpsu6GG3xntSXvymH3Uu+nmG+arh/0e+5HDsPih19wTgJZgb/DWPNX6VxsQMGsMpDPz7PjWmcoqlIkO8w00/o7dd8= Received: from localhost (unknown [45.33.91.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp20.pobox.com (Postfix) with ESMTPSA id 1102EB0E39; Mon, 27 Apr 2020 00:12:50 -0400 (EDT) (envelope-from kyle@kyleam.com) From: Kyle Meyer To: Vladimir Nikishkin , emacs-orgmode@gnu.org Subject: Re: Specifying the execution function and/or nested major mode for babel blocks In-Reply-To: References: Date: Mon, 27 Apr 2020 04:12:48 +0000 Message-ID: <87imhl7ein.fsf@kyleam.com> MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 5BAF3CA2-883D-11EA-8F79-B0405B776F7B-24757444!pb-smtp20.pobox.com Received-SPF: pass client-ip=173.228.157.52; envelope-from=kyle@kyleam.com; helo=pb-smtp20.pobox.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/04/27 00:12:52 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 173.228.157.52 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: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 X-Spam-Score: 0.29 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=pobox.com header.s=sasl header.b=PEDDoX M; dkim=pass header.d=kyleam.com header.s=mesmtp header.b=JEoETqKR; dmarc=none; 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.29 / 13.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; GENERIC_REPUTATION(0.00)[-0.55616870285858]; MX_INVALID(1.00)[cached]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.51.188.0/24:c]; IP_REPUTATION_HAM(0.00)[asn: 22989(0.19), country: US(-0.00), ip: 209.51.188.17(-0.56)]; DWL_DNSWL_BLOCKED(0.00)[kyleam.com:dkim,209.51.188.17:from]; DKIM_TRACE(0.00)[pobox.com:+,kyleam.com:+]; RCPT_COUNT_TWO(0.00)[2]; MAILLIST(-0.20)[mailman]; FREEMAIL_TO(0.00)[gmail.com,gnu.org]; 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]; MID_RHS_MATCH_FROM(0.00)[]; TAGGED_FROM(0.00)[larch=yhetil.org]; FROM_NEQ_ENVFROM(0.00)[kyle@kyleam.com,emacs-orgmode-bounces@gnu.org]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[pobox.com:s=sasl,kyleam.com:s=mesmtp]; URIBL_BLOCKED(0.00)[kyleam.com:dkim,pobox.com:dkim]; FROM_HAS_DN(0.00)[]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[kyleam.com]; HAS_LIST_UNSUB(-0.01)[]; RCVD_COUNT_SEVEN(0.00)[8]; FORGED_SENDER_MAILLIST(0.00)[] X-TUID: RYwkbeo/0bcH 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))