Commit Graph

214 Commits

Author SHA1 Message Date
Nicolas Goaziou a5756f5e1d ob-exp: More accurate white space handling when evaluating inline code
* lisp/ob-exp.el (org-babel-exp-non-block-elements): More accurate
white space handling when evaluating inline-src-block, babel-call and
inline-babel-call elements or objects.  Also removed use of
`org-babel-examplize-region' since it would never be called anyway
(return value from `org-babel-exp-do-export' is never nil).
2012-09-16 00:07:15 +02:00
Nicolas Goaziou 4d06f3349d ob-exp: Preserve affiliated keywords when replacing a code block
* lisp/ob-exp.el (org-export-blocks-preprocess): Preserve affiliated
  keywords when replacing a code block.
2012-09-13 20:46:33 +02:00
Nicolas Goaziou 343b648994 ob-exp: Fix block evaluation when results are before the block
* lisp/ob-exp.el (org-export-blocks-preprocess): Fix block evaluation
  when results are before the block.
2012-09-12 22:01:48 +02:00
Nicolas Goaziou 3c6a715bce ob-exp: Improve `org-export-blocks-preprocess'
* lisp/ob-exp.el (org-export-blocks-preprocess): Improve blank lines
  handling in function. Add comments. Remove
  `org-export-blocks-postblock-hook' since it's defined nowhere
  now (and doesn't need to, there's `org-export-before-parsing-hook'
  already).
2012-09-12 17:01:44 +02:00
Nicolas Goaziou 14c3c20b06 Remove org-export-blocks.el
* lisp/org-exp-blocks.el: Delete file.
* lisp/ob-exp.el (org-export-blocks-preprocess): Moved from
  "org-export-blocks.el".
* lisp/ob-ditaa.el (org-ditaa-jar-path): Moved from
  "org-export-blocks.el".
2012-09-12 17:01:44 +02:00
Nicolas Goaziou 3dce21a0a4 Rewrite Babel pre-processing functions
* lisp/ob-exp.el (org-babel-exp-src-block): Remove unused argument.
(org-babel-exp-non-block-elements): Rewrite function using Org Element.
* lisp/org-exp-blocks.el (org-export-blocks-preprocess): Rewrite
  function using Org Element.
2012-09-12 17:01:44 +02:00
Bastien Guerry 9afc2ac56b ob-*.el: Use ̀org-no-properties' instead of `org-babel-clean-text-properties'
* ob.el (org-babel-get-src-block-info)
(org-babel-check-src-block, org-babel-current-result-hash)
(org-babel-parse-src-block-match, org-babel-read-link)
(org-babel-insert-result, org-babel-clean-text-properties):
Use ̀org-no-properties' instead of
`org-babel-clean-text-properties'.
(org-babel-clean-text-properties): Delete redundant function
`org-babel-clean-text-properties'.

* ob-tangle.el (org-babel-tangle-collect-blocks)
(org-babel-tangle-comment-links): Ditto.

* ob-table.el (sbe): Ditto.

* ob-lob.el (org-babel-lob-get-info)
(org-babel-lob-execute): Ditto.

* ob-exp.el (org-babel-exp-non-block-elements): Ditto.
2012-08-15 09:39:24 +02:00
Bastien Guerry e85479aeb1 Don't use `org-flet' in some functions
* ob-ref.el (org-babel-ref-index-list): Use let* and rename
the variable `length' to `lgth'.

* org-plot.el (org-plot/gnuplot-to-grid-data): Don't use
̀org-flet'.

* org-exp.el (org-export-format-source-code-or-example):
Ditto.

* org-exp-blocks.el (org-export-blocks-preprocess): Ditto.

* ob.el (org-babel-view-src-block-info)
(org-babel-execute-src-block, org-babel-edit-distance)
(org-babel-switch-to-session-with-code)
(org-babel-balanced-split, org-babel-insert-result): Ditto.

* ob-ref.el (org-babel-ref-index-list): Ditto.

* ob-python.el (org-babel-python-evaluate-session): Ditto.

* ob-lob.el (org-babel-lob-get-info): Ditto.

* ob-gnuplot.el (org-babel-expand-body:gnuplot): Ditto.

* ob-exp.el (org-babel-exp-do-export): Ditto.
2012-08-09 21:06:33 +02:00
Achim Gratz c2735e7c19 Re-apply (correctly): Move org-element.el from contrib/lisp to lisp/.
* org.el (org-mode-map): Add keybindings to
`org-element-transpose' and `org-narrow-to-element'.
(org-metaup): Fall back on `org-element-drag-backward'.
(org-metadown): Fall back on `org-element-drag-forward'.
Also move chunks of declarations and require statements to
get rid of compiler warnings.

* org-exp-blocks.el (org): Don't require org.  Add declarations.

* org-clock.el (org): Don't require org.

* ob-exp.el (org-list-forbidden-blocks): Add declarations.
2012-07-28 07:06:25 +02:00
Achim Gratz 234df465ad Revert "Move org-element.el from contrib/lisp to lisp/."
This reverts commit abbea59611.
2012-07-28 07:02:21 +02:00
Bastien Guerry abbea59611 Move org-element.el from contrib/lisp to lisp/.
* org.el (org-mode-map): Add keybindings to
`org-element-transpose' and `org-narrow-to-element'.
(org-metaup): Fall back on `org-element-drag-backward'.
(org-metadown): Fall back on `org-element-drag-forward'.
Also move chunks of declarations and require statements to
get rid of compiler warnings.

* org-exp-blocks.el (org): Don't require org.  Add declarations.

* org-clock.el (org): Don't require org.

* ob-exp.el (org-list-forbidden-blocks): Add declarations.
2012-07-28 00:55:45 +02:00
Eric Schulte 63b5f8f2e8 replace flet/labels with org-flet/org-labels
This patch ensure Org-mode will build on all supported versions of
Emacs, after the renaming of the cl macros behind the cl- prefix in the
recent Emacs trunk.

* lisp/org-compat.el (org-flet): Compatibility function now that flet
  has been removed from cl-macs.
  (org-labels): Compatibility function now that labels has been removed
  from cl-macs.
* lisp/ob-R.el (org-compat): Require org-compat.
* lisp/ob-comint.el: Require org-compat.
* lisp/ob-exp.el (org-babel-exp-do-export): Switch to compatibility
  function.
* lisp/ob-gnuplot.el (org-babel-expand-body:gnuplot): Switch to
  compatibility function.
* lisp/ob-lob.el (org-babel-lob-get-info): Switch to compatibility
  function.
  (org-babel-lob-execute): Switch to compatibility function.
* lisp/ob-python.el (org-babel-python-evaluate-session): Switch to
  compatibility function.
* lisp/ob-ref.el (org-babel-ref-index-list): Switch to compatibility
  function.
* lisp/ob-sh.el (org-babel-sh-var-to-string): Switch to compatibility
  function.
* lisp/ob-tangle.el (org-babel-load-file): Switch to compatibility
  function.
  (org-babel-tangle): Switch to compatibility function.
  (org-babel-spec-to-string): Switch to compatibility function.
* lisp/ob.el (org-babel-view-src-block-info): Switch to compatibility
  function.
  (org-babel-execute-src-block): Switch to compatibility function.
  (org-babel-edit-distance): Switch to compatibility function.
  (org-babel-switch-to-session-with-code): Switch to compatibility
  function.
  (org-babel-sha1-hash): Switch to compatibility function.
  (org-babel-balanced-split): Switch to compatibility function.
  (org-babel-join-splits-near-ch): Switch to compatibility function.
  (org-babel-get-rownames): Switch to compatibility function.
  (org-babel-format-result): Switch to compatibility function.
  (org-babel-insert-result): Switch to compatibility function.
  (org-babel-examplize-region): Switch to compatibility function.
  (org-babel-merge-params): Switch to compatibility function.
  (org-babel-noweb-p): Switch to compatibility function.
  (org-babel-expand-noweb-references): Switch to compatibility function.
* lisp/org-bibtex.el (org-bibtex-headline): Switch to compatibility
  function.
  (org-bibtex-fleshout): Switch to compatibility function.
  (org-bibtex-read): Switch to compatibility function.
  (org-bibtex-write): Switch to compatibility function.
* lisp/org-exp-blocks.el (org-export-blocks-preprocess): Switch to
  compatibility function.
* lisp/org-exp.el (org-export-format-source-code-or-example): Switch to
  compatibility function.
* lisp/org-macs.el (org-called-interactively-p): Indentation fix.
* lisp/org-mouse.el (org-mouse-timestamp-today): Switch to compatibility
  function.
  (org-mouse-set-priority): Switch to compatibility function.
  (org-mouse-popup-global-menu): Switch to compatibility function.
  (org-mouse-context-menu): Switch to compatibility function.
* lisp/org-plot.el (org-plot/gnuplot-to-grid-data): Switch to
  compatibility function.
  (org-plot/gnuplot-script): Switch to compatibility function.
* lisp/org.el (org-entry-get): Switch to compatibility function.
  (org-fill-paragraph): Switch to compatibility function.
  (org-auto-fill-function): Switch to compatibility function.
2012-07-25 09:23:57 -06:00
Bastien Guerry 388ccbc435 Fix leftover from wrong merge. 2012-04-02 07:31:06 +02:00
Bastien Guerry e3913a2ab5 Merge branch 'hotfix-7.8.06' 2012-04-02 00:53:37 +02:00
Bastien Guerry 5c38bf0ef7 Fix copyright and authors lines. 2012-04-02 00:53:28 +02:00
Bastien Guerry b891d7a0db Merge branch 'master' of orgmode.org:org-mode 2012-04-01 21:52:38 +02:00
Bastien Guerry 63fdc375a3 Merge branch 'hotfix-7.8.06'
Conflicts:
	lisp/ob-exp.el
2012-04-01 21:52:01 +02:00
Eric Schulte 829285e56f ensure noweb expanded body is used on export
* lisp/ob-exp.el (org-babel-exp-results): Ensure noweb expanded body
  is used on export.
2012-04-01 12:21:13 -04:00
Eric Schulte 90336ceb49 Fixed bug in export of Org-mode code blocks
* lisp/ob-exp.el (org-babel-exp-code): Escape all lines when exporting
  Org-mode blocks.
* lisp/ob.el (org-babel-parse-src-block-match): Make use of the new
  language argument to org-babel-strip-protective-commas.
  (org-babel-parse-inline-src-block-match): Make use of the new
  language argument to org-babel-strip-protective-commas.
  (org-babel-strip-protective-commas): Now accepts a language
  argument.

Conflicts:

	lisp/ob-exp.el
2012-03-31 12:55:23 -04:00
Eric Schulte d6ddb59203 Fixed bug in export of Org-mode code blocks
* lisp/ob-exp.el (org-babel-exp-code): Escape all lines when exporting
  Org-mode blocks.
* lisp/ob.el (org-babel-parse-src-block-match): Make use of the new
  language argument to org-babel-strip-protective-commas.
  (org-babel-parse-inline-src-block-match): Make use of the new
  language argument to org-babel-strip-protective-commas.
  (org-babel-strip-protective-commas): Now accepts a language
  argument.
2012-03-31 12:49:07 -04:00
Eric Schulte cb77b49774 separate noweb handling for code and results on export
* lisp/ob-exp.el (org-babel-exp-src-block): Remove noweb handling from
  the top level.
  (org-babel-exp-code): Noweb handling for code export.
  (org-babel-exp-results): Noweb handling for results export.
2012-03-31 11:28:37 -04:00
Bastien Guerry ecd0562c5f Fix the master branch.
I started from the 78ec8e commit then cherry-picked and squashed
commits that have been done in master since then, except the bad
commits that overwrote the tree (in master) with the tree in maint.

This commit also bumps the version number to 7.8.06.

The only "fix" that was made between 78ec8e and the previous commit
is e0072f which has been reported to break stuff.
2012-03-19 22:01:29 +01:00
Bastien Guerry 6e306f65ff Fix copyright years in maint. 2012-03-17 16:31:04 +01:00
Bastien Guerry de42649f7b Manually revert maint to e85080.
e85080 is the last correct commit in the maint branch
before releasing 7.8.04.  The 7.8.05 release should be
done from this commit.
2012-03-17 16:28:46 +01:00
Bastien Guerry 73bb18ba37 Manually revert to the Release 7.8.04 tag. 2012-03-17 15:52:24 +01:00
Bastien Guerry 38c5045725 Fix copyright years. 2012-03-17 14:36:25 +01:00
Bastien Guerry 6e534f9c61 Manually revert back to commit e85080.
This fixes a wrong merge that should not have happened:
commit 7e903a merges the master branch into the maint branch,
while we really want to keep the maint branch a bugfix-only
branch.

This commit reverts back the maint branch to its state before
merging the master branch.  From there, we will fix remaining
problems with the maint branch (e.g. copyright issues) then
release this maint branch as Org-mode 7.8.05.
2012-03-17 14:34:01 +01:00
Bastien Guerry 04971de4b9 Add version tag "24.1" for options introduced since Emacs 23.4 (and <= 24.1)
* org-exp.el (org-export-kill-product-buffer-when-displayed)
(org-export-initial-scope, org-export-date-timestamp-format)
(org-export-with-tasks, org-export-email-info)
(org-export-table-remove-empty-lines): Add version tag.

* org-mobile.el (org-mobile-files-exclude-regexp)
(org-mobile-use-encryption, org-mobile-encryption-tempfile)
(org-mobile-encryption-password, org-mobile-agendas): Add
version tag.

* ob-plantuml.el (org-plantuml-jar-path): Add version tag.

* org.el (org-babel-load-languages, org-clone-delete-id)
(org-log-buffer-setup-hook)
(org-loop-over-headlines-in-active-region)
(org-use-sub-superscripts, org-startup-with-beamer-mode)
(org-startup-with-inline-images, org-ctrl-k-protect-subtree)
(org-catch-invisible-edits)
(org-link-search-must-match-exact-headline)
(org-confirm-shell-link-not-regexp)
(org-confirm-elisp-link-not-regexp, org-log-refile)
(org-refile-use-cache)
(org-refile-active-region-within-subtree)
(org-todo-repeat-to-state, org-get-priority-function)
(org-agenda-jump-prefer-future)
(org-read-date-force-compatible-dates)
(org-use-effective-time)
(org-complete-tags-always-offer-all-agenda-tags)
(org-properties-postprocess-alist)
(org-format-latex-signal-error)
(org-latex-to-mathml-jar-file)
(org-latex-to-mathml-convert-command)
(org-export-latex-default-packages-alist)
(org-hidden-keywords, org-pretty-entities)
(org-pretty-entities-include-sub-superscripts)
(org-src-fontify-natively, org-effort-durations)
(org-speed-command-hook): Add version tag.

* org-html.el (org-export-html-footnote-separator)
(org-export-html-mathjax-options)
(org-export-html-mathjax-template)
(org-export-html-headline-anchor-format)
(org-export-html-preamble-format)
(org-export-html-postamble-format)
(org-export-html-table-align-individual-fields)
(org-export-html-protect-char-alist, org-export-html-divs):
Add version tag.

* org-ctags.el (org-ctags-path-to-ctags)
(org-ctags-open-link-functions)
(org-ctags-new-topic-template): Add version tag.

* ob-exp.el (org-export-babel-evaluate): Add version tag.

* org-beamer.el (org-beamer-use-parts)
(org-beamer-frame-level, org-beamer-frame-default-options)
(org-beamer-column-view-format, org-beamer-themes)
(org-beamer-environments-extra, org-beamer-fragile-re)
(org-beamer-outline-frame-title)
(org-beamer-outline-frame-options): Add version tag.

* org-wl.el (org-wl-link-remove-filter)
(org-wl-shimbun-prefer-web-links)
(org-wl-nntp-prefer-web-links, org-wl-disable-folder-check)
(org-wl-namazu-default-index): Add version tag.

* org-clock.el (org-task-overrun-text)
(org-clocktable-defaults, org-clock-clocktable-formatter)
(org-clock-clocktable-language-setup)
(org-clock-report-include-clocking-task)
(org-clock-resolve-expert): Add version tag.

* ob-lob.el (org-babel-lob-files): Add version tag.

* org-freemind.el (org-freemind-node-css-style): Add version
tag.

* org-archive.el (org-archive-reversed-order)
(org-archive-subtree-add-inherited-tags): Add version tag.

* org-bibtex.el (org-bibtex-autogen-keys, org-bibtex-prefix)
(org-bibtex-treat-headline-as-title)
(org-bibtex-export-arbitrary-fields)
(org-bibtex-key-property, org-bibtex-tags)
(org-bibtex-tags-are-keywords, org-bibtex-no-export-tags)
(org-bibtex-type-property-name): Add version tag.

* org-timer.el (org-timer-default-timer): Add version tag.

* org-taskjuggler.el (org-export-taskjuggler-extension)
(org-export-taskjuggler-project-tag)
(org-export-taskjuggler-resource-tag)
(org-export-taskjuggler-target-version)
(org-export-taskjuggler-default-project-version)
(org-export-taskjuggler-default-project-duration)
(org-export-taskjuggler-default-reports)
(org-export-taskjuggler-default-global-properties): Add
version tag.

* org-habit.el (org-habit-today-glyph)
(org-habit-completed-glyph): Add version tag.

* org-list.el (org-alphabetical-lists)
(org-list-ending-method, org-list-end-regexp)
(org-list-automatic-rules, org-list-use-circular-motion)
(org-list-indent-offset): Add version tag.

* ob-picolisp.el (org-babel-picolisp-cmd): Add version tag.

* org-icalendar.el (org-icalendar-alarm-time)
(org-icalendar-combined-description)
(org-icalendar-honor-noexport-tag)
(org-icalendar-date-time-format): Add version tag.

* org-src.el (org-src-tab-acts-natively): Add version tag.

* org-exp-blocks.el (org-export-blocks-postblock-hook): Add
version tag.

* org-table.el (org-table-exit-follow-field-mode-when-leaving-table)
(org-table-fix-formulas-confirm)
(org-table-duration-custom-format)
(org-table-formula-field-format): Add version tag.

* org-publish.el (org-publish-sitemap-sort-files)
(org-publish-sitemap-sort-folders)
(org-publish-sitemap-sort-ignore-case)
(org-publish-sitemap-date-format)
(org-publish-sitemap-file-entry-format): Add version tag.

* ob-js.el (org-babel-js-cmd): Add version tag.

* org-docbook.el (org-export-docbook-footnote-separator)
(org-export-docbook-xslt-stylesheet): Add version tag.

* org-entities.el (org-entities-ascii-explanatory)
(org-entities-user): Add version tag.

* ob.el (org-confirm-babel-evaluate)
(org-babel-no-eval-on-ctrl-c-ctrl-c): Add version tag.

* ob-tangle.el (org-babel-tangle-lang-exts)
(org-babel-post-tangle-hook, org-babel-pre-tangle-hook)
(org-babel-tangle-body-hook)
(org-babel-tangle-comment-format-beg)
(org-babel-tangle-comment-format-end)
(org-babel-process-comment-text): Add version tag.

* org-gnus.el (org-gnus-nnimap-query-article-no-from-file):
Add version tag.

* org-crypt.el (org-crypt-disable-auto-save): Add version tag.

* org-inlinetask.el (org-inlinetask-default-state): Add
version tag.

* ob-scheme.el (org-babel-scheme-cmd): Add version tag.

* ob-lisp.el (org-babel-lisp-dir-fmt): Add version tag.

* org-attach.el (org-attach-store-link-p): Add version tag.

* org-capture.el (org-capture-templates)
(org-capture-before-finalize-hook)
(org-capture-after-finalize-hook): Add version tag.

* org-agenda.el (org-agenda-skip-deadline-prewarning-if-scheduled)
(org-agenda-time-leading-zero, org-agenda-follow-indirect)
(org-agenda-menu-two-column, org-agenda-menu-show-matcher)
(org-agenda-timegrid-use-ampm)
(org-agenda-remove-timeranges-from-blocks)
(org-agenda-inactive-leader, org-agenda-current-time-string)
(org-agenda-show-current-time-in-grid)
(org-agenda-search-view-force-full-words)
(org-agenda-search-view-always-boolean)
(org-agenda-clock-consistency-checks)
(org-agenda-include-deadlines)
(org-agenda-move-date-from-past-immediately-to-today)
(org-agenda-day-face-function)
(org-agenda-category-icon-alist)
(org-agenda-bulk-custom-functions)
(org-agenda-insert-diary-extract-time): Add version tag.

* org-latex.el (org-export-latex-inputenc-alist)
(org-export-latex-tag-markup)
(org-export-latex-timestamp-inactive-markup)
(org-export-latex-href-format)
(org-export-latex-hyperref-format)
(org-export-latex-footnote-separator)
(org-export-latex-quotes)
(org-export-latex-table-caption-above)
(org-export-latex-listings-w-names)
(org-export-latex-minted-langs)
(org-export-latex-listings-options)
(org-export-latex-minted-options)
(org-latex-default-figure-position, org-export-pdf-logfiles):
Add version tag.

* org-faces.el (org-faces-easy-properties)
(org-fontify-quote-and-verse-blocks, org-cycle-level-faces):
Add version tag.

* ob-ditaa.el (org-ditaa-jar-option): Add version tag.

Thanks to Glenn Morris for reporting this.
2012-02-13 15:49:28 +01:00
Eric Schulte c55718c377 wrapping new org-current-export-file -> buffer login into a single function
* lisp/ob-exp.el (org-babel-exp-get-export-buffer): Access current
  export buffer.
  (org-babel-exp-in-export-file): Access current export buffer.
  (org-babel-exp-src-block): Access current export buffer.
  (org-babel-exp-inline-src-blocks): Access current export buffer.

Conflicts:

	lisp/ob-exp.el (org-babel-exp-in-export-file): Resolving
	conflicts.
2012-02-03 09:35:57 -07:00
Nicolas Goaziou d2a63a1b17 ob-exp: Allow org-current-export-file to contain a buffer name
* lisp/ob-exp.el (org-babel-exp-in-export-file,
org-babel-exp-src-block, org-babel-exp-inline-src-blocks): Allow
org-current-export-file to contain a buffer.

This allows to resolve references from a buffer not visiting any file
(i.e. a temporary buffer) during export process.

Conflicts:

	lisp/ob-exp.el (org-babel-exp-in-export-file): Allow
	org-current-export-file to contain a buffer name.
2012-02-03 09:33:09 -07:00
Eric Schulte a3e5f97ee7 New strip-export noweb header argument value
* lisp/ob-exp.el (org-babel-exp-src-block): Strip noweb references on
  export when "strip-export".
* lisp/ob.el (org-babel-common-header-args-w-values): New noweb
  header value.
  (org-babel-merge-params): New noweb header value.
  (org-babel-noweb-p): New noweb header value.
* testing/examples/babel.org (an): Testing new noweb header value.
* testing/lisp/test-ob-exp.el (ob-exp/noweb-strip-export-ensure-strips):
  Testing new noweb header value.
* doc/org.texi (noweb): Document new noweb header value.
2012-02-01 08:19:29 -07:00
Eric Schulte 742c4e976b Merge branch 'origin-maint' 2012-01-27 16:31:11 -07:00
Eric Schulte 843ac278f9 Don't insert extra space between inline src block and results on export.
* lisp/ob-exp.el (org-babel-exp-non-block-elements): Don't insert
  extra space between inline src block and results on export.
2012-01-27 16:29:03 -07:00
Eric Schulte 527e6844cc optionally export additional information with call lines
* lisp/ob-exp.el (org-babel-exp-call-line-template): Control export of
  additional call line information.
  (org-babel-exp-non-block-elements): Fancier call line export.
* testing/examples/babel.org (an): Example data to test new call line
  export.
* testing/lisp/test-ob-exp.el (ob-exp/export-call-line-information):
  Test new call line export.
2012-01-23 12:53:15 -07:00
Eric Schulte d3538624e7 Merge branch 'origin-maint'
Conflicts:
	lisp/ob-exp.el
	testing/examples/babel.org
2012-01-23 10:46:03 -07:00
Eric Schulte 43abeaa488 evaluate all executables in buffer order on export
* lisp/ob-exp.el (org-babel-exp-non-block-elements): Map over both
  inline src blocks and call lines on export.
2012-01-23 10:39:38 -07:00
Eric Schulte 10f26fb805 Merge branch 'origin-maint' 2012-01-20 12:00:31 -07:00
Eric Schulte 5a0bf5e7d1 Ensure markers are used during lob export
* lisp/ob-exp.el (org-babel-exp-lob-one-liners): Ensure `end' is a
  marker so it is updated as required during export.
2012-01-20 11:32:49 -07:00
Eric Schulte 94f10ddfd7 don't always replace <<noweb>> references when :exports both
* lisp/ob-exp.el (org-babel-exp-results): Alter a copy of info.
* testing/examples/babel.org (an): Example data for test behavior.
* testing/lisp/test-ob-exp.el (ob-exp/noweb-no-export-and-exports-both):
  Confirm proper behavior.
2012-01-16 20:39:12 -07:00
Eric Schulte 526b3ef9ed ensure code block name is a string on export
* lisp/ob-exp.el (org-babel-exp-code): Ensure code block name is a
  string on export.
2012-01-14 12:50:31 -07:00
Eric Schulte 46cc0f79cf customizeable code block export
* lisp/ob-exp.el (org-babel-exp-code-template): Customizable code
  block export format string.
  (org-babel-exp-code): Customizable code block export.
2012-01-14 12:41:40 -07:00
Eric Schulte abf3060e47 new "no-export" option to :noweb header argument, and consolidated noweb logic
* lisp/ob-exp.el (org-babel-exp-src-block): Use `org-babel-noweb-p'.
  (org-babel-exp-inline-src-blocks): Use `org-babel-noweb-p'.
* lisp/ob-tangle.el (org-babel-tangle-collect-blocks): Use
  `org-babel-noweb-p'.
* lisp/ob.el (org-babel-execute-src-block): Use `org-babel-noweb-p'.
  (org-babel-expand-src-block): Use `org-babel-noweb-p'.
  (org-babel-load-in-session): Use `org-babel-noweb-p'.
  (org-babel-merge-params): Use `org-babel-noweb-p'.
  (org-babel-noweb-p): New function used to determine if noweb
  expansion should be carried out in a given context.
2012-01-11 10:15:20 -07:00
Bastien Guerry e44d2975ff Fix copyright (to 2012) year and Org version (to 7.8.03). 2012-01-03 18:47:01 +01:00
Jérémy Compostella 09982081b5 org-babel-exp-lob-one-liners should not parse the entire buffer.
The org-babel-exp-lob-one-liners search "call" pattern through the entire
buffer instead of the region given as arguments.
2011-11-25 09:32:11 -07:00
Eric Schulte 25a0a02121 no longer strip code and result names during block preprocessing
* lisp/ob-exp.el: Don't add `org-exp-res/src-name-cleanup' to
  `org-export-blocks-postblock-hook'.
2011-11-22 08:18:26 -07:00
Eric Schulte f55810593e don't try to evaluate #+call lines in verbatim blocks
* lisp/ob-exp.el (org-babel-exp-lob-one-liners): Don't limit
  in-verbatim check to inline code blocks, do lob code blocks as well.
* testing/lisp/test-ob-lob.el (test-ob-lob/do-not-eval-lob-lines-in-example-blocks-on-export):
  Test ensuring that #+call lines in verbatim blocks are not evaluated
2011-11-18 11:30:59 -07:00
Eric Schulte 1ed12cac1a passing all tests after code block syntax changes
* lisp/ob-exp.el (org-babel-in-example-or-verbatim): Some valid
  execution contexts (e.g., call lines) look like commented lines.
* lisp/ob.el (org-babel-get-src-block-info): Empty match string
  doesn't count.
  (org-babel-process-params): Always process parameters, even if you
  don't to table splitting.
* testing/lisp/test-ob-C.el (ob-C/table): Ignore failures for this C
  test.
* testing/lisp/test-ob-fortran.el (ob-fortran/input-var): Ignore
  failures for this fortran test.
2011-11-15 08:56:24 -07:00
Eric Schulte 7e93b90f88 Standardized code block keywords
Nick Dokos <nicholas.dokos@hp.com> writes:

> Eric Schulte <schulte.eric@gmail.com> wrote:
>
>> The attached updated patch fixes a bug in the original.
>>
>
> Minor problem in applying:
>
> ,----
> | $ git apply ~/Mail/inbox/724
> | /home/nick/Mail/inbox/724:671: trailing whitespace.
> | #+name:
> | /home/nick/Mail/inbox/724:599: new blank line at EOF.
> | +
> | warning: 2 lines add whitespace errors.
> `----

The attached version fixes these issues, Thanks -- Eric

>From 0e43d59ee8d46a63f86780a502de726271bc39de Mon Sep 17 00:00:00 2001
From: Eric Schulte <schulte.eric@gmail.com>
Date: Fri, 28 Oct 2011 10:44:21 -0600
Subject: [PATCH] removing code block, results and call-line synonyms -- BREAKING CHANGE

Following a round of on-list discussion many code block synonyms have
been removed, moving forward the following syntax is valid.

- call lines are specified with #+call:
- code blocks are named with #+name:
- results are named with #+name:, however results generated by a code
  block may still be labeled with #+results:, and tables named with
  #+tblname: will be considered to be named results

The following function may be used to update an existing Org-mode
buffer to the new syntax.

  (defun update-org-buffer ()
    "Update an Org-mode buffer to the new data, code block and call line syntax."
    (interactive)
    (save-excursion
      (flet ((to-re (lst) (concat "^[ \t]*#\\+" (regexp-opt lst t)
                                  "\\(\\[\\([[:alnum:]]+\\)\\]\\)?\\:[ \t]*"))
             (update (re new)
                     (goto-char (point-min))
                     (while (re-search-forward re nil t)
                       (replace-match new nil nil nil 1))))
        (let ((old-re (to-re '("RESULTS" "DATA" "SRCNAME" "SOURCE")))
              (lob-re (to-re '("LOB")))
              (case-fold-search t))
          (update old-re "name")
          (update lob-re "call")))))

Note: If an old version of Org-mode (e.g., the one shipped with Emacs)
      is installed on your system many of the important variables will
      be pre-defined with a defvar and *will not* have their values
      automatically updated, these include the following.
      - org-babel-data-names
      - org-babel-result-regexp
      - org-babel-src-block-regexp
      - org-babel-src-name-regexp
      - org-babel-src-name-w-name-regexp
      It may be necessary to either remove the source code of older
      versions of Org-mode, or to explicitly evaluate the ob.el file.

* lisp/ob-exp.el (org-exp-res/src-name-cleanup): Updated
  Documentation.
* lisp/ob-lob.el (org-babel-block-lob-one-liner-regexp): Updated
  regular expression.
  (org-babel-inline-lob-one-liner-regexp): Updated regular expression.
* lisp/ob-ref.el (org-babel-ref-resolve): Notice when something that
  looks like a data results may actually be a code block.
* lisp/ob-table.el: Updated documentation.
* lisp/ob.el (org-babel-src-name-regexp): Simplified regexp.
  (org-babel-get-src-block-info): Updated match strings.
  (org-babel-data-names): Simplified acceptable names.
  (org-babel-find-named-block): Indentation.
  (org-babel-find-named-result): Updated to not return a code block as
  a result.
* lisp/org.el (org-fontify-meta-lines-and-blocks-1): Removing
  references to old syntactic elements.
  (org-additional-option-like-keywords): Removing references to old
  syntactic elements.
* contrib/babel/library-of-babel.org: Updated to make use of the new
  syntax.
* testing/examples/babel-dangerous.org: Updated to make use of the new
  syntax.
* testing/examples/babel.org: Updated to make use of the new syntax.
* testing/examples/ob-awk-test.org: Updated to make use of the new
  syntax.
* testing/examples/ob-fortran-test.org: Updated to make use of the new
  syntax.
* testing/lisp/test-ob.el: Removed two bad tests which tested the
  literal values of old regular expressions rather than their
  behavior.
2011-11-15 08:56:24 -07:00
Eric Schulte a4273cbe0e call lines are more careful about being in example or verbatim blocks
* lisp/ob-lob.el (org-babel-lob-execute-maybe): Don't execute a call
  inside a verbatim block.
* lisp/ob-exp.el (org-babel-in-example-or-verbatim): Check for example
  blocks.
2011-11-08 19:43:55 -07:00
Eric Schulte 080e2decbc removing `org-babel-params-from-buffer' and #+PROPERTIES: entirely
* lisp/ob.el: Removing `org-babel-params-from-buffer' and
  #+PROPERTIES: entirely.
* lisp/ob-exp.el (org-babel-exp-src-block): Removing
  `org-babel-params-from-buffer' and #+PROPERTIES: entirely.
* lisp/ob-lob.el (org-babel-lob-execute): Removing
  `org-babel-params-from-buffer' and #+PROPERTIES: entirely.
2011-10-20 15:26:43 -06:00
Achim Gratz ccc99317de backport copyright and license headers from Emacs trunk 2011-08-24 22:32:38 +02:00
Eric Schulte cb449a672e improve export of inline code blocks
* lisp/ob-exp.el (org-babel-exp-inline-src-blocks): Save match data
  around `org-babel-exp-do-export' which now searches in this case.
  (org-babel-exp-results): Position the point in the inline source
  block during export evaluation.
* lisp/ob.el (org-babel-insert-result): More readable code.
2011-08-22 08:23:52 -06:00
Eric Schulte fceb767aea ob-exp: don't examplize inline code blocks which are already escaped
* lisp/ob-exp.el (org-babel-exp-inline-src-blocks): Don't examplize
  inline code blocks which are already escaped.
2011-08-21 14:23:27 -06:00
Nick Dokos 707897c25c Eliminate extra newline(s) after example or src block.
Signed-off-by: Nick Dokos <nick@dokosmarshall.org>
2011-08-21 12:28:33 -06:00
Bastien Guerry 58f1dbccf8 Remove the "Version" header in Org libraries (leave it in org.el).
Also remove blank lines before the ";;; org*el ends here" declarations.

Having a "Version" header forced us to update every file when releasing a
new version of Org; it also forced us to update every file when merging Org
with Emacs trunk, thus cluttering the diffs between the previously merged
version and the new one with useless information.

Glenn Morris suggested this in emacs-devel:
http://lists.gnu.org/archive/html/emacs-devel/2011-08/msg00322.html
2011-08-17 14:42:34 +02:00
Bastien Guerry 7a18799e25 Remove arch-tag at the bottom of files. 2011-08-15 20:04:38 +02:00
Bastien Guerry 904ed18bc2 Fix copyright years for elisp files in core and contrib.
Also add "This file is not part of GNU Emacs." when this is the case.
2011-08-15 15:23:11 +02:00
David Maus 545bfddeea Provide edebug specifications for macros
* org-macs.el (org-with-gensyms, org-called-interactively-p)
(with-silent-modifications, org-bound-and-true-p)
(org-unmodified, org-re, org-preserve-lc)
(org-without-partial-completion, org-with-point-at)
(org-no-warnings, org-if-unprotected, org-if-unprotected-1)
(org-if-unprotected-at, org-with-remote-undo)
(org-no-read-only, org-save-outline-visibility)
(org-with-wide-buffer, org-with-limited-levels)
(org-eval-in-environment): Provide edebug specifications.
* org-src.el (org-src-do-at-code-block): Dto.
* org-publish.el (org-publish-with-aux-preprocess-maybe): Dto.
* org-compat.el (org-xemacs-without-invisibility): Dto.
* org-clock.el (org-with-clock-position, org-with-clock): Dto.
* org-agenda.el (org-agenda-with-point-at-orig-entry)
(org-batch-agenda, org-batch-agenda-csv)
(org-batch-store-agenda-views): Dto.
* ob.el (org-babel-do-in-edit-buffer)
(org-babel-map-src-blocks, org-babel-map-inline-src-blocks): Dto.
* ob-tangle.el (org-babel-with-temp-filebuffer): Dto.
* ob-table.el (sbe): Dto.
* ob-exp.el (org-babel-exp-in-export-file): Dto.
* ob-comint.el (org-babel-comint-in-buffer)
(org-babel-comint-with-output): Dto.
2011-08-12 08:38:59 +02:00
Eric Schulte b8ae6a6bdb Revert "fix compilation errors introduced by most recent changes"
This reverts commit 9ff7f80f51.
2011-08-01 15:31:24 -06:00
Nicolas Goaziou 8c6c6a4f3d Rename `org-in-regexps-block-p' to `org-between-regexps-p'
* lisp/org.el (org-between-regexps-p): previous name implied the
  function was related to blocks, which isn't mandatory.
(org-narrow-to-block, org-in-block-p, org-indent-line-function):
applied the rename.
* lisp/ob-exp.el (org-babel-in-example-or-verbatim): applied
  rename. Also removed a white space.
2011-07-30 09:32:03 +02:00
Eric Schulte 9ff7f80f51 fix compilation errors introduced by most recent changes
* lisp/ob-exp.el (org-babel-inline-src-block-regexp): Declare this variable.
* lisp/ob.el (defvar): Wrap variable declaration in eval-when-compile.
2011-07-29 10:36:39 -06:00
emacs 7340cee33a Update website to show 7.7 as current release 2011-07-28 10:33:35 +00:00
Eric Schulte 8854497c35 ob-exp: on export resolve hashes in the current (not original) file buffer
* lisp/ob-exp.el (org-babel-exp-results): Resolve hashes in the
  current (not original) file buffer.
* lisp/ob.el (org-babel-current-result-hash): More informative name,
  and remove useless optional argument.
2011-07-18 17:08:37 -06:00
Bastien Guerry 9c05a7c781 Bump to version 7.6 2011-07-06 21:06:03 +02:00
Eric Schulte ef42f3cc9c ob-lob: inline calls should export even when preceeded by an "="
* lisp/ob-exp.el (org-babel-in-example-or-verbatim): Also check for in
  verbatim emphasis.
  (org-babel-exp-lob-one-liners): Cleaner checking for escaped call
  lines.
2011-06-28 13:04:57 -07:00
Eric Schulte acec7eb7c3 ob-lob: fix the logic checking if a call line is commented
* lisp/ob-exp.el (org-babel-exp-lob-one-liners): Fix the logic
  checking if a call line is commented.
2011-06-27 10:36:27 -07:00
Eric Schulte dceaf7da4f ob-exp: don't export inline call_ blocks which aren't whitespace padded
* lisp/ob-exp.el (org-babel-exp-lob-one-liners): Don't export inline
  call_ blocks which aren't whitespace padded.
2011-06-25 17:45:06 -07:00
Eric Schulte 4127e53cda ob: remove code comments pointing to online documentation
* lisp/ob.el: Remove code comment about online documentation.
* lisp/ob-exp.el: Remove code comment about online documentation.
* lisp/ob-lob.el: Remove code comment about online documentation.
2011-06-25 13:17:31 -07:00
Eric Schulte 5c3def4713 ob: export of inline call blocks
* lisp/ob-exp.el (org-babel-exp-lob-one-liners): Appropriate
  replacement of inline call blocks with their results.
2011-06-24 15:16:11 -07:00
Eric Schulte 825f6d382d ob-exp: introducing inline call lines to the export engine
* lisp/ob-exp.el (org-babel-exp-lob-one-liners): Calculate length
  appropriately given the style (block or inline) of the lob line.
* lisp/ob-lob.el (org-babel-block-lob-one-liner-regexp): New regexp
  specific for block lob lines.
  (org-babel-inline-lob-one-liner-regexp): New regexp specific for
  inline lob lines.
  (org-babel-lob-one-liner-regexp): Combination of two lob regexps.
  (org-babel-lob-get-info): Return info from *either* the block or
  inline lob lines.
2011-06-24 14:44:28 -07:00
Eric Schulte 6323bbded9 ob-exp: fixed a bug in exportation of #+call lines
* lisp/ob-exp.el (org-babel-exp-lob-one-liners): Corrected the
  structure of the resulting info list.
* lisp/ob-lob.el (org-babel-default-lob-header-args): Export the
  results of call lines by default.
2011-06-24 13:53:25 -07:00
Eric Schulte 40d80baa1b ob-exp: less verbose when in batch mode
* lisp/ob-exp.el (org-babel-exp-src-block): Less verbose when in batch
  mode.
2011-06-22 19:12:20 -07:00
Eric Schulte f1c0042967 removing two currently unused export variables
* lisp/ob-exp.el: We may no longer need to export names along with
  code blocks.
2011-06-13 14:58:19 -07:00
Eric Schulte 120e621443 remove when-let which isn't a real Emacs macro
* lisp/ob-exp.el (org-babel-exp-code): Remove usage of a macro which
  is defined locally on my system, but not globally in Emacs.
2011-05-19 11:05:41 -06:00
Eric Schulte 72c154e38e expand noweb refs when ":noweb yes" during export
* lisp/ob-exp.el (org-babel-exp-do-export): Use `org-babel-exp-code'
  to generate code block output.
  (org-babel-exp-code): Re-create the code block body for exporting
  source code.
2011-05-19 07:37:33 -06:00
Robert P. Goldman a173acf275 Don't prompt for bad links during babel export
* lisp/ob-exp.el (org-babel-exp-in-export-file): Bind
  `org-link-search-inhibit-query' to t to inhibit prompts.
2011-05-05 19:53:20 -06:00
Eric Schulte abbee1635e ob-exp: use source block name when finding cached results.
* lisp/ob-exp.el (org-babel-exp-results): Use code block name when
  finding cached results.
2011-03-23 11:26:53 -06:00
Eric Schulte c6b81ca3a1 ob-exp: no longer requires :session to have an argument for eval on export
* lisp/ob-exp.el (org-babel-exp-do-export): Now runs for empty
  :session arguments.
2011-03-15 07:12:25 -06:00
emacs 11a10bdfe7 Update website to show 7.5 as current release 2011-03-07 14:27:39 +00:00
Eric Schulte 9ce7d60076 ob-exp: fix export for inline source blocks
* lisp/ob-exp.el (org-babel-exp-results): Don't use cached results if
  there is no hash.
2011-03-03 15:53:25 -07:00
Eric Schulte 3755c79485 ob-exp: ensure params are properly processed on export
* lisp/ob-exp.el (org-babel-exp-results): Ensure that processed params
  are send to org-babel-execute-src-block.
2011-03-02 07:32:02 -07:00
Eric Schulte 03a6844054 ob: fix compiler warnings
* lisp/ob-exp.el (org-babel-exp-in-export-file): Now takes the
  language as an argument.
  (org-babel-exp-src-block): Explicitly pass language to
  `org-babel-exp-in-export-file'.
  (org-babel-exp-inline-src-blocks): Removed unused code.
  (org-babel-exp-results): Explicitly pass language to
  `org-babel-exp-in-export-file'.

* lisp/ob.el (org-babel-library-of-babel): declare variable
  (org-babel-tangle-comment-links): declare function
2011-03-01 10:52:35 -07:00
Eric Schulte 075016cdfa ob-exp: resolve result hash in the original file
* lisp/ob-exp.el (org-babel-exp-results): On export, ensure that the
  result hash is resolved in the original org-mode file.
2011-02-28 12:31:56 -07:00
Eric Schulte 563994842d ob-exp: better caching on export
- calling org-babel-process-params on the parameters before the hash
    is calculated
  - calculating the hash before the noweb references are expanded

* lisp/ob-exp.el (org-babel-exp-src-block): When block will eventually
  be evaluated, pre-calculate the hash before noweb expansion, and
  expand the parameters before hash calculation.
  (org-babel-exp-do-export): Pass pre-calculated hash through to
  `org-babel-exp-results'.
  (org-babel-exp-results): Compare pre-calculated hash to results hash.
2011-02-27 11:01:56 -07:00
Dan Davison 88b793946b ob: Fix bug in export of lob one-liners
* lisp/ob-exp.el (org-babel-exp-lob-one-liners): Only replace the
match if a non-nil result is returned
2011-02-07 22:27:14 +00:00
Eric Schulte 5b35351002 ob-exp: simplifications and unification of inline and normal code blocks
* lisp/ob-exp.el (org-babel-exp-do-export): Simplified, no longer need
  to do anything to export code.
  (org-babel-exp-results): No longer returns a replacement for the
  code block.
  (org-babel-exp-inline-src-blocks): Simplified.
  (org-babel-exp-src-block): Removed unnecessary pluralization from
  function name.
2011-01-27 14:55:19 -07:00
Eric Schulte d0ca215105 ob: simplified code block exportation -- same process for inline and regular blocks
* lisp/ob-exp.el (org-babel-exp-inline-src-blocks): Simplified
  exportation of inline code blocks using normal code block execution
  mechanism to insert results.
  (org-babel-exp-results): Results exportation mechanism is unified
  for both inline and regular code blocks.
* lisp/ob.el (org-babel-where-is-src-block-result): Returns the point
  after an inline code block for inline code blocks.
2011-01-27 12:48:45 -07:00
Carsten Dominik 7666ba421f Version number back to 7.4 2010-12-10 18:49:40 +01:00
Carsten Dominik 76a25715c9 Bump version number to 7.5 2010-12-10 18:43:10 +01:00
Dan Davison 666e6ed5e7 babel: Wipe error buffer clean at start of execution
* lisp/ob-eval.el (org-babel-error-buffer-name): Define new variable.

  (org-babel-eval-error-notify): Use new variable `org-babel-error-buffer-name'
  (org-babel-eval): Make temp error buffer invisible to the user with
		    initial space in name.
  (org-babel-eval-wipe-error-buffer): New function to wipe the error message buffer.

* lisp/ob-exp.el (org-babel-eval-wipe-error-buffer): Declare external function
  `org-babel-eval-wipe-error-buffer'.
  (org-babel-exp-results): Wipe error buffer clean at outset of execution

* lisp/ob.el (org-babel-execute-src-block-maybe): Wipe error buffer clean at
  outset of execution
  (org-babel-eval-wipe-error-buffer): Declare external function
				    `org-babel-eval-wipe-error-buffer'.
2010-11-23 13:26:31 +00:00
Eric Schulte c676f62361 passing header arguments through to called code blocks
* lisp/ob-lob.el (org-babel-lob-get-info): including pass-through
  header arguments in results variable header argument string

* lisp/ob.el (org-babel-execute-src-block): working with new header
  argument setup
  (org-babel-parse-header-arguments): only split header argument
  strings when []'s are balanced
2010-11-08 14:18:33 -07:00
Bastien Guerry 6630edbd0f Set version number to 7.3 2010-11-07 14:52:14 +01:00
Carsten Dominik 82af72eef7 Push version number to 7.02trans 2010-10-29 09:11:46 +02:00
Eric Schulte 43c712fccb unifying ob-process-params and ob-expand-variables
* lisp/ob-exp.el (org-babel-exp-results): replaced old function call

* lisp/ob-lob.el (org-babel-lob-execute): replaced old function call

* lisp/ob-ref.el (org-babel-ref-parse): removed obsolete optional
  params argument, also no longer chokes when handed an
  already-resolved reference

  (org-babel-ref-resolve): removed obsolete optional params argument

* lisp/ob.el (org-babel-ref-parse): updated function declaration
  (org-babel-get-src-block-info): replaced old function call
  (org-babel-header-arg-names): indentation
  (org-babel-execute-src-block): now expanding all parameters using
  the newly combined org-babel-process-params
  (org-babel-switch-to-session-with-code): indentation
  (org-mode-hook): indentation
  (org-babel-process-params): now packages all results into the
  parameter alist and does variable expansion, this should no longer
  be called from inside of language functions
  (org-babel-expand-noweb-references): updated function call for newly
  removed obsolete function parameter
2010-10-21 13:06:01 +01:00
Eric Schulte 9931dae20a babel: exporting now working with the new ob-get-src-block-info schema
includes a simple export test

* lisp/ob-exp.el (org-babel-exp-in-export-file): wrapper for
  collecting information from within the original export file

  (org-babel-exp-src-blocks): simplified through use of the above
  macro

  (org-babel-exp-code): simplified through the use of new functions
  for parsing header arguments

  (org-babel-exp-results): simpler high-level organization, also this
  is now where the expansion of variable references takes place during
  export

* lisp/ob.el (org-babel-expand-variables): broke variable replacement
  in a parameter list into it's own function

  (org-babel-get-src-block-info): now using the above function
2010-10-21 13:05:59 +01:00
Eric Schulte c2dce939e8 more lightening 2010-10-21 13:05:58 +01:00
Eric Schulte e1b90eea45 ob-exp: fixed export when headings have links, with tests
also some organization of the test directory

* lisp/ob-exp.el (org-babel-exp-src-blocks): fixed export when
  headings have links, with tests
2010-10-05 11:54:48 -06:00
Eric Schulte 093e8cf58e ob-exp: only jump to export-file if original buffer is visiting a file
Thanks to Puneeth for insisting upon the existence of this error

* lisp/ob-exp.el (org-babel-exp-src-blocks): don't jump back to
  export-file if exporting from a buffer which is not visiting a file
2010-10-04 08:39:10 -06:00
Eric Schulte 8bac197bb3 ob-exp: removed spurious concatenation of "::" to the end of file names on export
Thanks to Giovanni Moretti for pointing out this issue

* lisp/ob-exp.el (org-babel-exp-src-blocks): only append "::" to a
  file name in link construction if there is a heading to follow it.
2010-10-04 07:45:38 -06:00
Dan Davison 0a3a7383b4 Docstring typos
* ob-exp.el (org-export-babel-evaluate): docstring typo
	(org-babel-exp-code): docstring typo
2010-09-26 11:39:43 +01:00
Eric Schulte efdf78172d ob-exp: resolving code block parameters in the original file on export
* lisp/ob-exp.el (org-babel-exp-src-blocks): now switching back to the
  original file before resolving code block parameters to ensure
  headline and buffer wide parameters are taken into consideration
  when only a narrowed portion of the file is exported
2010-09-18 19:57:36 -06:00
Eric Schulte e52909d902 now possible to abort code block evaluation without throwing errors
this makes it possible to export while not evaluating some code
  blocks

* lisp/ob-exp.el (org-babel-exp-do-export): removing hacky ":noeval",
  which is now an alias to ":eval no"

* lisp/ob.el (org-babel-confirm-evaluate): ":noeval" is an alias for
  ":eval no", also no longer throwing errors

  (org-babel-header-arg-names): adding both eval and noeval as general
  header arguments

  (org-babel-execute-src-block): now using the new non-error
  confirmation functionality
2010-08-26 17:14:43 -06:00
Dan Davison c11106a3e5 babel: Fix bug in export of #+lob/#+call lines
* ob-exp.el (org-babel-exp-lob-one-liners): Get parameter
	values from all standard sources when executing #+lob/#+call
	lines
2010-08-19 09:30:40 -04:00
Carsten Dominik 6268cceec3 Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
Eric Schulte a3dfb1c626 ob-exp: check for info before exporting code blocks -- fixes a latex export issue
Thanks for Nicolas Goaziou for pointing this out

* lisp/ob-exp.el (org-babel-exp-src-blocks): don't attempt to export
  blocks when there is no info match -- this fixes a bug in the latex
  export of code blocks located before the first headline
2010-07-16 15:34:57 -07:00
Tom Dye 3807787aa9 More docstring edits 2010-07-13 16:04:47 -07:00
Eric Schulte 433b374c10 babel: enhanced code block movement functions
Thanks to Austin Frank for suggesting these features and to Jonathan
  Arkell for an implementation suggestion

This commit
 - adds `org-babel-goto-named-result' for jumping to named results
 - adds TAB-completion to `org-babel-goto-named-src-block'
 - standardizes on "-src-" instead of "-source-" in all babel functions
 - adds `org-babel-[next/previous]-src-block' functions and keybindings
 - documents the above in orgcard.tex

* doc/orgcard.tex: update documentation of babel keybindings

* lisp/ob-exp.el (org-exp-res/src-name-cleanup): standardized on
  "-src-" instead of "-source-"

* lisp/ob-keys.el (org-babel-key-bindings): updating keybindings for
  new movement functions

* lisp/ob-lob.el (org-babel-lob-ingest): standardized on "-src-"
  instead of "-source-"

* lisp/ob-ref.el (org-babel-ref-resolve-reference): standardized on
  "-src-" instead of "-source-"

* lisp/ob-tangle.el (org-babel-tangle-collect-blocks): standardized on
  "-src-" instead of "-source-"

* lisp/ob.el (org-babel-src-name-regexp): standardized on "-src-"
  instead of "-source-"

  (org-babel-src-name-w-name-regexp): adding regexp for matching
  source names along with their names

  (org-babel-get-src-block-info): using new named source block regexp

  (org-babel-result-regexp): adding optional whitespace after result
  regexp

  (org-babel-result-w-name-regexp): adding regexp for matching results
  which have names

  (org-babel-named-src-block-regexp-for-name): standardized on "-src-"
  instead of "-source-"

  (org-babel-map-src-blocks): standardized on "-src-" instead of
  "-source-"

  (org-babel-where-is-src-block-head): standardized on "-src-" instead of
  "-source-"

  (org-babel-goto-named-src-block): standardized on "-src-" instead of
  "-source-", also added completing read

  (org-babel-src-block-names): collects source block names from a file
  or the current buffer

  (org-babel-goto-named-result): function for jumping to a named
  result

  (org-babel-result-names): returns results names from a file or the
  current buffer

  (org-babel-next-src-block): jump to the next source block

  (org-babel-previous-src-block): jump to the previous source block
2010-07-11 21:37:24 -07:00
Eric Schulte b4825f812b babel: marking the safe value of org-export-babel-evaluate
* lisp/ob-exp.el (org-export-babel-evaluate): marking the safe value
  of org-export-babel-evaluate
2010-07-08 15:11:38 -07:00
Eric Schulte 815b724486 ob-exp: org-export-babel-evaluate can inhibit code block eval on export
* lisp/ob-exp.el (org-export-babel-evaluate): customization variable
  which can be used to inhibit the evaluation of code blocks on export

  (org-babel-exp-results): code block evaluation is now contingent on
  the value of org-export-babel-evaluate
2010-07-08 10:28:47 -07:00
Eric Schulte ec22856978 ob-exp: now returns an empty string when the language can't be evaluated
* lisp/ob-exp.el (org-babel-exp-results): now returns an empty string
  when the language can't be evaluated
2010-07-07 23:01:43 -07:00
David Maus dfd0c7ad2e Fix typo in docstring.
* babel/ob-exp.el (org-babel-exp-inline-src-blocks): Fix typo
in docstring.
2010-07-06 09:14:01 +02:00
Carsten Dominik 0e30108330 Fix typo 2010-07-06 09:12:50 +02:00
Carsten Dominik 6d889cc363 Escape parenthesis at bol in docstring 2010-07-06 08:51:23 +02:00
Eric Schulte d7b7025eac flattening out lisp directory structure
all babel and babel/langs files now live in the base of the lisp directory.
2010-07-05 11:14:49 -07:00
Renamed from lisp/babel/ob-exp.el (Browse further)