litorgy-reference.el 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. ;;; litorgy-reference.el --- litorgical functions for referencing external data
  2. ;; Copyright (C) 2009 Eric Schulte, Dan Davison, Austin F. Frank
  3. ;; Author: Eric Schulte, Dan Davison, Austin F. Frank
  4. ;; Keywords: literate programming, reproducible research
  5. ;; Homepage: http://orgmode.org
  6. ;; Version: 0.01
  7. ;;; License:
  8. ;; This program is free software; you can redistribute it and/or modify
  9. ;; it under the terms of the GNU General Public License as published by
  10. ;; the Free Software Foundation; either version 3, or (at your option)
  11. ;; any later version.
  12. ;;
  13. ;; This program is distributed in the hope that it will be useful,
  14. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. ;; GNU General Public License for more details.
  17. ;;
  18. ;; You should have received a copy of the GNU General Public License
  19. ;; along with GNU Emacs; see the file COPYING. If not, write to the
  20. ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  21. ;; Boston, MA 02110-1301, USA.
  22. ;;; Commentary:
  23. ;; Functions for referencing data from the header arguments of a
  24. ;; litorgical block. The syntax of such a reference should be
  25. ;;
  26. ;; #+VAR: variable-name file resource-id:name
  27. ;;
  28. ;; - variable-name :: the name of the variable to which the value
  29. ;; will be assigned
  30. ;;
  31. ;; - file :: path to the file containing the resource, or omitted if
  32. ;; resource is in the current file
  33. ;;
  34. ;; - resource-id :: the id or name of the resource, or 'previous' to
  35. ;; grab the previous table, or 'next' to grab the
  36. ;; next table
  37. ;;
  38. ;; So an example of a simple src block referencing table data in the
  39. ;; same file would be
  40. ;;
  41. ;; #+var: table previous
  42. ;; #+begin_src emacs-lisp
  43. ;; (message table)
  44. ;; #+end_src
  45. ;;
  46. ;;; Code:
  47. (require 'litorgy)
  48. (provide 'litorgy-reference)
  49. ;;; litorgy-reference.el ends here