emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Specifying the execution function and/or nested major mode for babel


From: Kyle Meyer
Subject: Re: Specifying the execution function and/or nested major mode for babel blocks
Date: Mon, 27 Apr 2020 04:12:48 +0000

Vladimir Nikishkin <address@hidden> 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))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]