0

I seem to not be understanding something fundamental. I am not able to get R output to come through with the :results output header argument. Here is a reproducible example from emacs -Q.

Here is my simple config used with emacs -Q:

;; Install Straight -- per straight documentation
(defvar bootstrap-version)
(let ((bootstrap-file
       (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
      (bootstrap-version 5))
  (unless (file-exists-p bootstrap-file)
    (with-current-buffer
        (url-retrieve-synchronously
         "https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
         'silent 'inhibit-cookies)
      (goto-char (point-max))
      (eval-print-last-sexp)))
  (load bootstrap-file nil 'nomessage))

;; Install use-package through straight 
;; Now use-package will use straight.el to automatically install
;; missing packages if you provide :straight t:
(straight-use-package 'use-package)

; This is only needed once, near the top of the file
(eval-when-compile
  ;; Following line is not needed if use-package.el is in ~/.emacs.d
  ;; (add-to-list 'load-path "<path where use-package is installed>")
  (require 'use-package))


(straight-use-package 'org)
(straight-use-package '(org-contrib :type git :host github :repo "emacsmirror/org-contrib"))

(use-package org
         :config
    (org-babel-do-load-languages
     'org-babel-load-languages
     '((R . t)
       (emacs-lisp . t)
       (latex . t)
       (org . t)))
    (add-to-list 'org-export-backends 'org)
    )
(straight-use-package 'ess)
(use-package ess)     

Here is my simple file I am trying to export to a Beamer PDF.

# -*- eval: (setq-local ess-startup-directory default-directory) -*-
#+TITLE:     foo
#+AUTHOR:    foo
#+DATE:      
#+DESCRIPTION: 
#+KEYWORDS: 
#+LANGUAGE:  en
#+BEAMER_THEME: Boadilla
#+BEAMER_HEADER: 
#+latex_class: beamer
#+latex_class_options:
#+latex_header: 
#+latex_header_extra:
#+latex_compiler: pdflatex
#+OPTIONS: H:2 toc:nil
#+BEAMER_HEADER: \AtBeginSection[]{\begin{frame}<beamer>\vfill\centering\usebeamerfont{title}\insertsectionhead\vfill\end{frame}}
#+BEAMER_HEADER: \usepackage{pdfpages}
#+BEAMER_HEADER: \setbeamercolor{background canvas}{bg=}
#+BEAMER_HEADER: \makeatletter\beamer@ignorenonframefalse\makeatother
#+BEAMER_HEADER: \usepackage{caption}
#+BEAMER_HEADER: \usepackage{subcaption}
#+BEAMER_HEADER: \usepackage{multicol}
#+BEAMER_HEADER: \beamertemplatenavigationsymbolsempty
#+BEAMER_HEADER: \usepackage{amssymb}
#+BEAMER_HEADER: \definecolor{links}{HTML}{4167E1}
#+BEAMER_HEADER: \hypersetup{colorlinks,linkcolor=,urlcolor=links}
#+STARTUP: beamer
#+OPTIONS: d:(not "RELATED") ^:nil
* foo
** Slide
#+begin_src R :exports both :session "*R*" :results output
  x <- 45
  x
#+end_src

Here is the output of the relevant slide: notice that there should be a line saying that the output of this block is the number 45 but it only shows the code. It works if I change :results output to :results value but then its an org-formatted table which I don't want.

slide that gets exported

1 Answer 1

0

Seems like this is a recent bug that has been reported and fixed in the most recent versions of Org:

https://list.orgmode.org/[email protected]/

The problem was fixed by downlading the current head of the org git repo and loading that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.