unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* org-babel: how to evaluate code block with "alias" language?
@ 2022-11-22 20:29 North Year
  2022-11-23 20:35 ` Bastien
  0 siblings, 1 reply; 4+ messages in thread
From: North Year @ 2022-11-22 20:29 UTC (permalink / raw)
  To: help-gnu-emacs


suppose I want to evaluate the following code block in an org file:

#+begin_src r
data.frame(
    dog = rnorm(5),
    cat = rnorm(5)
)
#+end_src

then I will get the following error:
"org-babel-execute-src-block: No org-babel-execute function for r!"

I tried the following config in my init file, but they does not to work

#+begin_src emacs-lisp

(org-babel-do-load-languages
 'org-babel-load-languages
 '((R . t)))

(add-to-list 'org-src-lang-modes '("r" . R))
#+end_src

and the following elisp

#+begin_src emacs-lisp
(org-babel-do-load-languages
 'org-babel-load-languages
 '((r . t)))
#+end_src

will yield error:
"failed to provide feature ‘ob-r’"

I know this problem is trivial to solve by simply replace "r" by "R".
However aliases are something expected to frequently happened and
can anyone has idea on how to make evaluating code blcok with "alias" language work?



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-11-24  5:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-22 20:29 org-babel: how to evaluate code block with "alias" language? North Year
2022-11-23 20:35 ` Bastien
2022-11-24  2:03   ` North Year
2022-11-24  5:23   ` tomas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).