In Org Babel, in a bash code block, it seems impossible to get both :results header arg with both raw and replace. Is that expected?
The docs for shell Babel seem to suggest the only options for :results are file, list, and table. It seems weird that there is no way to just show the string sent to stdout by the shell code.
raw seems to work as an argument, but it makes replace not work. For instance in
#+begin_src bash :results raw replace
tree .
#+end_src
where both list and table garble the result.
:results outputseems to do the job. The docs mention thatoutputis the default, however that info seems wrong, as it looks likeoutput listis the actual default .rawdoes the job, in the sense thatreplace(which is the default) can figure out where the results end so that they can be cleared before the new results are inserted.rawjust does not provide any markers to allowreplaceto do that. I've recommendeddrawerin the past instead ofraw. @dalanicolai:outputis a different kettle of fish - it's independent of the format (I can have:results output rawor:results output drawere.g.); what it contrasts with is:results value.outputis the default for many languages but not all (e.g. forelisp...)elispthe default isvalue- in fact there are various claims thatvalueis the default for most languages, but I prefer to set it explicitly when I don't know for sure). Most of these things are described in Results of Evaluation but the default value for theCollectionhas to be dug up from the specific language doc (or maybe its implementation - not every language is documented).tree .output (I realize now, that this is just 'normal' org behavior, also without thelistoutput value). For some reason,:results outputprevents the output from getting formatted as a list. I now realize that this should not make a difference (AFAIK) but it does, as it makes the output to get wrapped as an example block.as it makes the output to get wrapped as an example block: that is standard behavior for output that is longer than 10 lines (configurable throughorg-babel-min-lines-for-block-output). Trytree . | sed 5q.