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: Vladimir Nikishkin
Subject: Re: Specifying the execution function and/or nested major mode for babel blocks
Date: Mon, 27 Apr 2020 12:32:21 +0800

>> (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.

пн, 27 апр. 2020 г. в 12:12, Kyle Meyer <address@hidden>:
>
> 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))



-- 
Yours sincerely, Vladimir Nikishkin



reply via email to

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