DONE allow customization of shebang lines and commenting through header argument

  • State "DONE" from "TODO" 2010-02-05 Fri 19:05
  • State "TODO" from "" 2010-02-03 Wed 13:07

this is from suggestions coming through the mailing list

\nbsp\nbsp\nbsp\nbsp\nbsp\nbsp\nbsp\nbsp Do you think this is the sort of thing that would need to be
\nbsp\nbsp\nbsp\nbsp\nbsp\nbsp\nbsp\nbsp customized on a per-block or per-file/subtree basis?

Yes, I think it would be useful. An example would be if I want to create two scripts, where one is
running on my local computer, and the other on a cluster, in which the paths might be different.
Also: there is, in addition to R, also Ra, with Just-In-Time compiling functionality. It might be
useful to be able to have two R scripts, one using R, the other Ra, for e.g. profiling. Another
example would be to try different versions of e.g. R.

So yes, I think it would be very useful to define the two additional header arguments for each
block:

:shebang NIL for default, other string for the shebang line
:headers NIL for default, NONE for no headers, other string for custom headers


\nbsp\nbsp\nbsp\nbsp\nbsp\nbsp\nbsp\nbsp If so we may want to move this customization behind a header argument.

That would be great

I think the best names for these new header-arguments would be :shebang (which could be multiple lines long if stored in an elisp variable) and (to me at least) :comments is more intuitive than :headers to control the insertion of org-babel comments with links back to the original tangling document.

This is now implemented using the :shebang and :comments header arguments, so for example the following block will tangle with no comments

#+begin_src emacs-lisp :comments no
  (message "I should have no comments")
#+end_src

and the following will tangle using a custom shebang line

#+begin_src ruby :shebang #!/usr/bin/ruby
  puts :nonstandard_shebang
#+end_src

>>>>>>> origin/master:development.org