"Thomas S. Dye" <[email protected]> writes: >>> + - [ ] Provide brief [[Examples of Use][Examples of Use]] >> >> Looks like you forgot to check this checkbox. > > I don't remember if I intended to check it. I view many of the > ob-doc-*.org files I've created as stubs for real programmers™ to > augment. If the unchecked box is interpreted as an invitation to > augment the Examples of Use, then that would be a good thing IMHO > :)
I think it is mostly a checkbox to make sure that WORG page has minimum necessary content. Of course, anything in WORG can be augmented. >> #+name: sed-input >> This is test. >> >> #+begin_src sed :stdin sed-input[] >> s/This/That/ >> #+end_src >> >> #+RESULTS: >> : That is test. > > And, this is a good example! I didn't know =name= could be used > this way and, unfortunately, have no sense of how =stdin= is > typically used or how it could be useful for a Babel user. This is a relatively new feature. A more classic way is referring to results of evaluation: #+name: test #+begin_src emacs-lisp :var extra="" (concat "This is test" extra) #+end_src #+begin_src sed :stdin test(extra=" continued here") s/This/That/ #+end_src #+RESULTS: : That is test continued here As for :stdin, it is simply something to be piped as standard input. For sed, as it is typically used from command line (cat foo | sed ...), it is the most natural usage IMHO. (I am not sure how to incorporate these new examples into WORG section...) -- Ihor Radchenko // yantar92, Org mode maintainer, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>
