5

I would like to load TODO objects from individual files using org-babel and elisp. I have a working snippet that produces this output.

#+RESULTS: import_file
:   * TODO Go to grocery store
:   * TODO Go to bank
:   * TODO Go to dry cleaners

The : in the output causes org-mode not to recognize the TODO keywords. I want the output to look like this:

#+RESULTS: import_file
* TODO Go to grocery store
* TODO Go to bank
* TODO Go to dry cleaners

Is there an org-babel configuration item that accomplishes this? If not, is there another way to accomplish this without modifying org-babel?

2
  • 1
    If you want results to be inserted without any kind of formatting, then you would add that information to the source block header, viz. :results raw. The problem with this method is that repeated calls to the same block will not remove the previous results. You could also use :result org, which would insert it as a Org source (editable as other source blocks). Also, see this: orgmode.org/worg/org-contrib/babel/header-args.html
    – wvxvw
    Jan 9, 2016 at 14:32
  • I need an option of both raw and replace. :results org produces comma delimited output for some reason.
    – nathan
    Jan 11, 2016 at 15:21

1 Answer 1

10

Sorry, this is super old, but I thought I'd post the solution for people who find this in the future.

use :wrap "x"

Put whatever text you want in for x. This gives similar results for raw, but doesn't have the repeating issue.

#+name: hello-world 
#+BEGIN_SRC latex :wrap "test"
\LaTeX
#+END_SRC

#+RESULTS: hello-world
#+BEGIN_test
\LaTeX
#+END_test

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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