5

Github's org parser has a bug where they mistakenly show


#+begin_src bsh.dash :results verbatim :exports both
echo | time possiblycat 1000
#+end_src

#+RESULTS:
:
: possiblycat 1000  0.00s user 0.00s system 75% cpu 0.006 total; max RSS 1852

as

enter image description here

(I have reported this on Github.)

I want to workaround this by quoting the result:

#+RESULTS:
#+begin_example
...
#+end_example

How can I do this automatically?

2 Answers 2

4

The org-babel-min-lines-for-block-output variable will help you accomplish this.

I've set the following in my configuration files in order to make #+RESULTS code blocks be always enclosed within #+begin_example blocks

(setq org-babel-min-lines-for-block-output 0)

Here's an example

#+begin_src cpp
#include <iostream>

int main() {
  std::cout << "a";
  return 0;
}
#+end_src

#+RESULTS:
#+begin_example
a
#+end_example

6

I found the answer:


#+begin_src bsh.dash :results verbatim :exports both :wrap "example"
echo | time possiblycat 1000
#+end_src

#+RESULTS:
#+begin_example

possiblycat 1000  0.00s user 0.00s system 68% cpu 0.005 total; max RSS 1888
#+end_example

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.