|
|
@@ -207,7 +207,50 @@ would then be [[#sandbox][the sandbox]].
|
|
|
#+end_src
|
|
|
|
|
|
|
|
|
-* Tasks [38/59]
|
|
|
+* Tasks [38/61]
|
|
|
+** TODO new reference syntax *inside* source code blocks
|
|
|
+This is from an email discussion on the org-mode mailing list with
|
|
|
+Sébastien. The goal here is to mimic the source-block reference style
|
|
|
+of Nuweb. Upon export and/or tangle these references could be
|
|
|
+replaced with the actual body of the referenced source-code block.
|
|
|
+
|
|
|
+See the following for an example.
|
|
|
+
|
|
|
+#+srcname: ems-ruby-print-header
|
|
|
+#+begin_src ruby
|
|
|
+puts "---------------------------header---------------------------"
|
|
|
+#+end_src
|
|
|
+
|
|
|
+#+srcname: emacs-ruby-print-footer
|
|
|
+#+begin_src ruby
|
|
|
+puts "---------------------------footer---------------------------"
|
|
|
+#+end_src
|
|
|
+
|
|
|
+#+srcname: ems-ruby-print-message
|
|
|
+#+begin_src ruby :file ruby-nuweb.rb
|
|
|
+ # <<ems-ruby-print-header>>
|
|
|
+ puts " Ruby "
|
|
|
+ # <<ems-ruby-print-footer>>
|
|
|
+#+end_src
|
|
|
+
|
|
|
+Upon export the previous source-code block would result in a file
|
|
|
+being generated at =ruby-nuweb.rb= with the following contents
|
|
|
+
|
|
|
+: puts "---------------------------header---------------------------"
|
|
|
+: puts " Ruby "
|
|
|
+: puts "---------------------------footer---------------------------"
|
|
|
+
|
|
|
+** TODO re-work tangling system
|
|
|
+Sometimes when tangling a file (e.g. when extracting elisp from a
|
|
|
+org-mode file) we want to get nearly every source-code block.
|
|
|
+
|
|
|
+Sometimes we want to only extract those source-code blocks which
|
|
|
+reference a indicate that they should be extracted (e.g. traditional
|
|
|
+literate programming along the Nuweb model)
|
|
|
+
|
|
|
+I'm not sure how we can devise a single simple tangling system that
|
|
|
+naturally fits both of these use cases.
|
|
|
+
|
|
|
** PROPOSED raise elisp error when source-blocks return errors
|
|
|
Not sure how/if this would work, but it may be desirable.
|
|
|
|