Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You could put all the common headers in a property drawer of top-level heading, and all child source code blocks inside that heading will inherit them.

    * Notebook
    :PROPERTIES:
    :header-args:R: :colnames yes
    :END:

    #+begin_src R
    words <- tolower(scan("intro.org", what="", na.strings=c("|",":")))
    t(sort(table(words[nchar(words) > 3]), decreasing=TRUE)[1:10])
    #+end_src
As for making the block delimiter look different, there are various ways of making the text display differently from the actual text. For example, you could use the built-in `prettify-symbol-mode` with this config:

    (setq prettify-symbols-alist
          '(("#+begin_src" . ?)
            ("#+end_src"   . ?―))


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: