Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EXAMPLE blocks will not be rendered if they follow a #+RESULTS: marker #62

Open
chemmi opened this issue Jan 10, 2019 · 5 comments
Open

Comments

@chemmi
Copy link

chemmi commented Jan 10, 2019

This constellation especially occurs when working with org-babel and execution of in-buffer source code.

Example gist

@tdehaeze
Copy link

Same problem for me for inline images.
Quite anoying when using litterate programming and exporting figures.

@tdehaeze
Copy link

I made some quite extensive test to find out where does this problem come from.
It seems that it does not take into account things like #+PROPERTY: header-args:latex+ :exports both.
If you manually add :exports both to you SCR block it will work :)

@livtanong
Copy link

Can confirm that the workaround works.

@benley
Copy link

benley commented Apr 26, 2019

Unfortunately this workaround doesn't help when the src block is actually a #+CALL macro invocation:

#+NAME: diff
#+BEGIN_SRC bash :results verbatim :exports results :wrap example diff
  # macro used to generate inline diffs in this document
  diff --new-line-format='+%L' \
       --old-line-format='-%L' \
       --unchanged-line-format=' %L' \
       <(echo "$in") <(echo "$out") ;:
#+END_SRC

#+NAME: a
#+BEGIN_SRC yaml :exports none
foo:
  - bar
#+END_SRC

#+NAME: b
#+BEGIN_SRC yaml :exports none
foo:
  - bar
  - bas
#+END_SRC

#+NAME: blarg
#+CALL: diff(in=a, out=b)

This won't show up correctly:

#+RESULTS: blarg
#+begin_example diff
 foo:
   - bar
+  - bas
#+end_example

Here's what that looks like in a gist:
https://gist.github.com/benley/7e808222c219a53dab59e9f4e096f9db
Screenshot Capture - 2019-04-26 - 17-54-18

Adding :exports results or :exports both to the #+CALL: line doesn't help.

@benley
Copy link

benley commented Apr 26, 2019

(not only is it failing to display the example block, it appears to be rendering its contents as ... a bulleted list with no text?)

allarm added a commit to allarm/git_babel_labs that referenced this issue Nov 10, 2020
fanshi1028 added a commit to fanshi1028/youtube-mpv that referenced this issue Dec 31, 2023
fanshi1028 added a commit to fanshi1028/youtube-mpv that referenced this issue Jan 12, 2024
fanshi1028 added a commit to fanshi1028/youtube-mpv that referenced this issue Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants