Commit Graph

459 Commits

Author SHA1 Message Date
Bastien Guerry fc717f3eb7 Fix compiler warnings. 2012-03-20 13:04:55 +01:00
Bastien Guerry 57e677d444 Merge branch 'hotfix-7.8.06' 2012-03-20 02:54:14 +01:00
Eric Schulte 9e30393125 fix bug in src name regexp when using *org-babel-use-quick-and-dirty-noweb-expansion*
* lisp/ob.el (org-babel-expand-noweb-references): Fix bug in src name
  regexp when using *org-babel-use-quick-and-dirty-noweb-expansion*.
2012-03-20 02:40:36 +01: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
Eric Schulte 3f4383baa4 add "eval" option to noweb
* lisp/ob.el (org-babel-merge-params): Add "eval" as acceptable noweb
  argument.
  (org-babel-noweb-p): The "eval" argument only expands during
  evaluation.
2012-03-14 15:12:44 -04:00
Eric Schulte 07ac15ef72 Merge branch 'origin-maint'
Conflicts:
	lisp/org-src.el
2012-03-14 09:56:52 -04:00
Eric Schulte 4542824f2c fix compiler warnings
* lisp/ob.el (org-strip-protective-commas): Declared.
* lisp/org-agenda.el (org-agenda-filtered-by-category): Declared.
  (org-agenda-filter-apply): Capture free variable.
* lisp/org-footnote.el (org-skip-whitespace): Declared.
* lisp/org-mobile.el (org-agenda-filter): Declared.
* lisp/org-src.el (org-strip-protective-commas): Declared.
2012-03-14 09:55:04 -04:00
Eric Schulte de09874a27 Merge branch 'origin-maint' 2012-03-12 08:41:38 -04:00
Eric Schulte d5e21f43fc Ensure correct order for empty result wrapping blocks.
* lisp/ob.el (org-babel-insert-result): Ensure correct order for empty
  result wrapping blocks.
2012-03-12 08:40:43 -04:00
Bastien Guerry 0630d89a0c Merge branch 'maint' of orgmode.org:org-mode 2012-03-05 21:10:22 +01:00
Eric Schulte efe039db93 fix two bugs related to calling tangle with a prefix argument
* lisp/ob-tangle.el (org-babel-tangle): Don't prompt for a file name
  if :tangle is specified.
* lisp/ob.el (org-babel-expand-noweb-references): Widen buffer when
  expanding noweb references.
2012-03-05 08:22:35 -07:00
Eric Schulte 9915dc8905 fix code block replacement with results
* lisp/ob.el (org-babel-find-named-result): Fix code block replacement
  with results.
2012-03-03 07:45:20 -07:00
Eric Schulte 951a6f2506 fix code block replacement with results
* lisp/ob.el (org-babel-find-named-result): Fix code block replacement
  with results.
2012-03-03 07:35:31 -07:00
Eric Schulte 451f7cc31f Merge branch 'origin-maint' 2012-03-01 13:15:06 -07:00
Eric Schulte 5bcf0c16da Don't miss a code block when there are confounding spaces after the result name.
* lisp/ob.el (org-babel-find-named-result): Don't miss a code block
  when there are confounding spaces after the result name.
2012-03-01 13:15:00 -07:00
Eric Schulte 1ed518109e Merge branch 'origin-maint' 2012-03-01 11:38:24 -07:00
Eric Schulte 9e3b41d1a4 Fixed bug in examplization
* lisp/ob.el (org-babel-examplize-region): Fixed bug in examplization.
2012-03-01 11:38:05 -07:00
Eric Schulte e5fa93c9be fix two build complaints 2012-02-29 09:28:34 -07:00
Andreas Leha 87216ffa56 enhancements to org-babel-goto-named-src-block
> attached is a patch that enhances org-babel-goto-named-src-block (bound
> to C-c C-v g by default).  Included are two enhancements:
>
>  1. the point is pushed to the org-mark-ring, such that returning with
>     C-c & becomes possible
>  2. the target src block is guessed from
>      a) noweb-reference
>      b) #+call:
>      c) #+results:
>      d) symbol-at-point
>     if one of these is found (in that order)

* lisp/ob.el (org-babel-goto-named-src-block): Pushing the point to
  the org-mark-ring and guessing at the code block name to jump to.
2012-02-25 09:36:15 -07:00
Martyn Jago 50a35c42db Fix `org-babel-result-end' command to provide consistent result removal where result is type `wrap'.
* lisp/ob.el:

Fix `org-babel-result-end' command to provide consistent result
removal where result is type `wrap'. Prior to this fix
multiple (org-ctrl-c-ctrl-c) commands will add multiple newlines to
the end of results (one newline per block execution).

This fixes the test `test-ob/org-babel-remove-result--results-wrap'

* testing/lisp/test-ob.el:

Uncomment test since it now passes.

Conflicts:

	testing/lisp/test-ob.el
2012-02-19 08:27:56 -07:00
Eric Schulte 5a24348778 Merge branch 'origin-maint' 2012-02-18 10:39:04 -07:00
Eric Schulte 19f1bf6bce unified stripping of protective commas -- idempotent org-edit-src-code
* lisp/ob.el (org-babel-strip-protective-commas): Use
  `org-strip-protective-commas'.
* lisp/org-exp.el (org-export-select-backend-specific-text): Use
  `org-strip-protective-commas'.
* lisp/org-src.el (org-edit-src-code): Use
  `org-strip-protective-commas'.
* lisp/org.el (org-strip-protective-commas): Single definition for
  this functionality.
2012-02-18 10:38:32 -07: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 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 4b59c36b03 adding default argument to org-babel-noweb-wrap
This makes it easier to keep consistent behavior.

* lisp/ob-tangle.el (org-babel-tangle-clean): Just use default value.
* lisp/ob.el (org-babel-noweb-wrap): Add default value.
  (org-babel-expand-noweb-references): Just use default value.
2012-02-01 08:19:29 -07:00
Eric Schulte 4743d7146a Merge branch 'origin-maint'
Conflicts:
	lisp/ob.el
2012-01-30 18:33:50 -07:00
Eric Schulte 7b59410c30 don't allow newlines in source names in noweb references
* lisp/ob.el (org-babel-expand-noweb-references): Don't allow newlines
  in source names in noweb references.
2012-01-30 18:27:33 -07:00
Eric Schulte 742c4e976b Merge branch 'origin-maint' 2012-01-27 16:31:11 -07:00
Eric Schulte 3451d35fcd allow *any* punctuation to proceed an inline src block
Thanks to Martyn Jago for this change.

* lisp/ob.el (org-babel-get-inline-src-block-matches): Allow *any*
  punctuation to proceed an inline src block.
2012-01-27 16:21:49 -07:00
Eric Schulte 25019d8147 Merge branch 'origin-maint' 2012-01-27 16:17:37 -07:00
Eric Schulte 8c69417861 add ( to the list of characters allowed to proceed an inline src block
* lisp/ob.el (org-babel-get-inline-src-block-matches): Add ( to the
  list of characters allowed to proceed an inline src block.
2012-01-27 16:17:21 -07:00
Eric Schulte 3d25553588 allow customization of the noweb reference syntax
Thanks to Sean O'Halpin for suggesting this change.

* lisp/ob-tangle.el (org-babel-tangle-clean): Use the customizable
  noweb wrappers.
* lisp/ob.el (org-babel-noweb-wrap-start): Begin a noweb reference.
  (org-babel-noweb-wrap-end): End a noweb reference.
  (org-babel-noweb-wrap): Apply the customizable noweb wrappers.
  (org-babel-expand-noweb-references): Use the customizable noweb
  wrappers.
2012-01-27 16:04:09 -07:00
Martyn Jago c82ca2f19a Fix `org-babel-result-end' command to provide consistent result removal where result is type `wrap'.
* lisp/ob.el:

Fix `org-babel-result-end' command to provide consistent result
removal where result is type `wrap'. Prior to this fix
multiple (org-ctrl-c-ctrl-c) commands will add multiple newlines to
the end of results (one newline per block execution).

This fixes the test `test-ob/org-babel-remove-result--results-wrap'

* testing/lisp/test-ob.el:

Uncomment test since it now passes.
2012-01-24 09:36:40 -07:00
Eric Schulte afb9860487 Merge branch 'origin-maint' 2012-01-24 09:17:08 -07:00
Eric Schulte 1bb2a3c23a fixed two issues with noweb reference expansion
* lisp/ob.el (org-babel-expand-noweb-references): Only allow
  reference names which start and end with non-whitespace characters.
  Also, raise errors as appropriate given org-babel-noweb-error-langs.
2012-01-24 07:23:43 -07:00
Eric Schulte 2395c3eff1 Merge branch 'origin-maint' 2012-01-24 00:02:52 -07:00
Eric Schulte 11d31e89c4 replace org-babel-noweb-separator variable with :noweb-sep header argument
* doc/org.texi (noweb-sep): Document new header argument.
* lisp/ob.el (org-babel-common-header-args-w-values): Add new header
  argument.
  (org-babel-expand-noweb-references): Use header argument rather than
  customization variable.
2012-01-23 23:57:51 -07:00
Eric Schulte fce92180d1 Merge branch 'origin-maint' 2012-01-23 19:43:28 -07:00
Eric Schulte 269a509615 customizable noweb reference separator
* lisp/ob.el (org-babel-noweb-separator): Custom variable for
  accumulated noweb references.
  (org-babel-expand-noweb-references): Allow separator for noweb
  references.
* doc/org.texi (noweb-ref): Documentation of this new custom variable.
2012-01-23 19:42:06 -07:00
Eric Schulte a9510349ea Merge branch 'origin-maint' 2012-01-23 11:07:36 -07:00
Eric Schulte 978fd46069 don't report valid header arguments as suspicious
* lisp/ob.el (org-babel-check-src-block): Don't report valid header
  arguments as suspicious.
2012-01-23 11:07:27 -07:00
Eric Schulte 10f26fb805 Merge branch 'origin-maint' 2012-01-20 12:00:31 -07:00
Eric Schulte 4f5b6317b5 correctly position point when mapping hits an inline code block
* lisp/ob.el (org-babel-map-executables): Correctly position point when
  mapping hits an inline code block.
2012-01-20 11:59:53 -07:00
Eric Schulte 97e8e03eea Ensure params are incorporated *before* checking if evaluation is legal
* lisp/ob.el (org-babel-execute-src-block): Ensure params are
  incorporated *before* checking if evaluation is legal.
2012-01-20 11:44:12 -07:00
Eric Schulte bded90ba48 Disambiguate intersection name.
* lisp/ob.el (org-babel-noweb-p): Disambiguate intersection name.
2012-01-19 15:04:36 -07:00
Eric Schulte 3be1f755b0 Merge branch 'origin-maint' 2012-01-19 11:07:41 -07:00
Eric Schulte 70c58b93f1 Revert "remove #+name and #+result hiding"
This reverts commit 8a8a56c277.
2012-01-19 11:07:12 -07:00
Eric Schulte b44c08dd45 remove all calls to `gensym'
* lisp/ob.el (org-babel-map-src-blocks): Replace gensym with make-symbol.
  (org-babel-map-inline-src-blocks): Replace gensym with make-symbol.
  (org-babel-map-call-lines): Replace gensym with make-symbol.
  (org-babel-map-executables): Replace gensym with make-symbol.
2012-01-19 11:07:11 -07:00
Eric Schulte 102adf13d4 Merge branch 'origin-maint' 2012-01-12 18:12:19 -07:00
Eric Schulte fc92b2e2fe fix whole-buffer evaluation order and symbol intrusion in related macros
* lisp/ob.el (org-babel-map-src-blocks): Don't pollute symbol space.
  (org-babel-map-inline-src-blocks): Don't pollute symbol space.
  (org-babel-map-call-lines): Don't pollute symbol space.
  (org-babel-map-executables): Map over *all* executable Org-mode
  elements.
  (org-babel-execute-buffer): Execute elements in buffer order instead
  of arbitrarily.
2012-01-12 18:11:52 -07:00
Eric Schulte d8aa48f77b capitalize RESULTS in :wrap'd code block results
* lisp/ob.el (org-babel-insert-result): Capitalize RESULTS in :wrap'd
  code block results.
2012-01-11 19:43:00 -07:00
Eric Schulte 43fb184634 Merge branch 'origin-maint' 2012-01-11 13:54:54 -07:00
Eric Schulte 9ac673c5e2 default to all-caps #+RESULTS: for code-block generated content
* lisp/ob.el (org-babel-results-keyword): New user-configurable
  results keyword.
  (org-babel-where-is-src-block-result): Use new user-configurable
  results keyword.
2012-01-11 13:54:20 -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
Eric Schulte 73b67cd8a5 introduce new ":wrap" header argument for wrapping results in named blocks
* lisp/ob.el (org-babel-common-header-args-w-values): Add the new
  header argument name.
  (org-babel-insert-result): Respect the value of the :wrap header
  argument when inserting results.
  (org-babel-result-end): Find the end of arbitrarily named result
  blocks.
2012-01-10 09:45:43 -07:00
Eric Schulte 37da88caa3 resurrect dropped pieces of a previous patch
* lisp/ob.el (org-babel-expand-noweb-references): Resurrect dropped
  pieces of a previous patch.
2012-01-05 10:44:11 -07:00
Eric Schulte d35c79aca9 resurrect dropped pieces of a previous patch
* lisp/ob.el (org-babel-expand-noweb-references): Resurrect dropped
  pieces of a previous patch.
2012-01-05 10:42:17 -07:00
Eric Schulte 2c2e1a5448 fixed bug in org-babel-balanced-split when run on Emacs22
Thanks to Martyn Jago for the test case

* lisp/ob.el (org-babel-balanced-split): Explicit checking if list
  before calling member.
* testing/lisp/test-ob.el (test-ob/org-babel-balanced-split): Testing
  the new Emacs22-proof behavior.
2012-01-03 11:45:27 -07:00
Eric Schulte 8cffe3aabf fixed bug in org-babel-balanced-split when run on Emacs22
Thanks to Martyn Jago for the test case

* lisp/ob.el (org-babel-balanced-split): Explicit checking if list
  before calling member.
* testing/lisp/test-ob.el (test-ob/org-babel-balanced-split): Testing
  the new Emacs22-proof behavior.
2012-01-03 11:44:46 -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
Bastien Guerry 9167cba326 Merge branch 'master' into maint 2012-01-03 08:31:58 +00:00
Eric Schulte 1471af0b44 Resolve :noweb-ref when set at the property level during noweb expansion
* lisp/ob.el (org-babel-expand-noweb-references): Rather than using a
  pure regexp solution to resolve noweb references, actually check the
  information of every code block in the buffer.  This will cause a
  slowdown in noweb reference expansion, but is necessary for correct
  behavior.
2012-01-03 09:17:03 +01:00
Eric Schulte a2cdccf5cb move `org-babel-lob-one-liner-regexp' into ob.el to fix autoloading error
* lisp/ob.el (org-babel-map-call-lines): Moved this file from
  ob-lob.el into ob.el to ease dependency pains.
2012-01-03 09:12:36 +01:00
Eric Schulte 9e4a6f3781 optional "quick and dirty" :noweb reference expansion
* lisp/ob.el (*org-babel-use-quick-and-dirty-noweb-expansion*):
  Controls the method in which noweb references are expanded.
  (org-babel-expand-noweb-references): Bring back the option for
  regexp-based noweb expansion.
2012-01-02 10:59:53 -07:00
Eric Schulte 18708a2b5a Resolve :noweb-ref when set at the property level during noweb expansion
* lisp/ob.el (org-babel-expand-noweb-references): Rather than using a
  pure regexp solution to resolve noweb references, actually check the
  information of every code block in the buffer.  This will cause a
  slowdown in noweb reference expansion, but is necessary for correct
  behavior.
2011-12-29 12:51:03 -07:00
Eric Schulte 34eb48dc3f move `org-babel-lob-one-liner-regexp' into ob.el to fix autoloading error
* lisp/ob.el (org-babel-map-call-lines): Moved this file from
  ob-lob.el into ob.el to ease dependency pains.
2011-12-17 09:04:20 -07:00
Bastien Guerry e56e2c8760 Silent a few byte-compiler warnings.
* org.el (org-block-regexp)
(org-heading-keyword-regexp-format)
(org-heading-keyword-maybe-regexp-format): Move up to keep the
byte-compiler happy.

* org-special-blocks.el (org-html): Require 'org-html.
(org-open-par, org-close-par-maybe): Declare as functions.

* ob.el (org-reduce): Declare as a function.
(org-current-export-file): Declare.

* ob-ref.el (org-babel-update-intermediate): Make a defvar.
2011-12-12 18:04:15 +01:00
Eric Schulte 3bf8d8fd86 fixed regexp when resolving noweb references
* lisp/ob.el (org-babel-expand-noweb-references): Fixed regexp.
* testing/lisp/test-ob.el (test-ob/noweb-expansion): Test both named
  code block and noweb-ref header argument references.
2011-12-11 12:02:02 -07:00
Eric Schulte 8a8a56c277 remove #+name and #+result hiding
Given that arbitrary regions may already be hidden using a drawer the
ability to hide any named entity is redundant.  In addition the name
based hiding does not mix well with other keywords.

Thanks to Nicolas Goaziou for raising this issue and suggesting the
removal of #+name based hiding.
2011-12-11 09:51:28 -07:00
Eric Schulte 1b58f780cf faster method of collecting continuing code blocks
* lisp/ob.el (org-babel-expand-noweb-references): Rather than collect
  the info from *every* block in the current buffer, simply regexp
  search for those blocks which appear to match the continued source
  name.
2011-12-11 09:51:28 -07:00
Eric Schulte a706d16127 wrap code block results in drawers rather than blocks
* lisp/ob.el (org-babel-insert-result): Do not examplize wrapped
  scalar results, simply wrap them.
  (org-babel-result-end): Find the end of results wrapped in a RESULTS
  drawer.
2011-12-11 09:51:27 -07:00
Bastien Guerry 92d305092a Fix typos (already fixed in Emacs trunk.)
Thanks to Juanma Barranquero for spotting and fixing them in Emacs.
2011-12-06 19:20:21 +01:00
Bastien Guerry 90868e2d88 Fix typo fixed in Emacs trunk.
* ob.el (org-babel-execute-src-block): Fix typo.

Thanks to Juanma Barranquero for spotting this.
2011-11-28 15:13:04 +01:00
Eric Schulte 1234afcc54 correctly toggle visibility of named code blocks
* lisp/ob.el (org-babel-hide-result-toggle): Skip over header argument
  lines when toggling named code block visibility.
2011-11-22 08:05:34 -07:00
Eric Schulte a998cae722 the :eval header argument now takes 4(6) possible values
* doc/org.texi (eval): Documenting the full range of :eval header
  argument values.
* lisp/ob.el (org-babel-confirm-evaluate): Adding support for new
  range of :eval header arguments.
* testing/lisp/test-ob.el (test-ob/eval-header-argument): Testing the
  :eval header argument.
2011-11-22 07:32:39 -07:00
Eric Schulte edef1fa5ca ":eval non-export" inhibits evaluation during export
* doc/org.texi (eval): Documentation of the new :eval option.
* lisp/ob.el (org-babel-confirm-evaluate): Inhibit evaluation during
  export when eval is set to "non-export".
2011-11-21 18:19:45 -07:00
Eric Schulte 82c0f9bf69 Allow spaces around "=" in code block variable specifications
* lisp/ob.el (org-babel-join-splits-near-ch): Rejoins a list of a
  split string when a character appears on either side of the split.
  (org-babel-parse-multiple-vars): Rejoin splits around "=" signs.
2011-11-20 09:40:08 -07:00
Eric Schulte 7c21098323 Don't match partial names when resolving code or data references
* lisp/ob.el (org-babel-named-src-block-regexp-for-name): Ensure that
  partial names are not matched.
  (org-babel-named-data-regexp-for-name): Ensure that partial names
  are not matched.
* testing/lisp/test-ob.el (test-ob/do-not-resolve-to-partial-names-data):
  Test to ensure that partial names are not matched.
2011-11-16 06:15:31 -07:00
Eric Schulte 19884ab280 resolve named code blocks before named data
* lisp/ob-ref.el (org-babel-ref-resolve): Search for named code blocks
  before named data.
* lisp/ob.el (org-babel-named-data-regexp-for-name): New function for
  finding named data.
* testing/lisp/test-ob.el (test-ob/resolve-code-blocks-before-data-blocks):
  Test to ensure that named references are resolved in the correct
  order.
2011-11-15 20:13:41 -07:00
Eric Schulte 8114cf2bc4 Gracefully handle results which are neither lists nor strings.
* lisp/ob.el (org-babel-insert-result): Gracefully handle results
  which are neither lists nor strings.
2011-11-15 15:30:35 -07:00
Eric Schulte 83dfaa5c8f named code blocks are replaced with their results
* lisp/ob.el (org-babel-find-named-result): Downcase "name" before comparison.
* testing/lisp/test-ob.el (test-ob/does-not-replace-a-block-with-the-results):
  Test that named code blocks are replaced with their results.
2011-11-15 08:56:25 -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 3af89e696a property names ending in plus accumulate
This results in the following behavior.

  #+property: var  foo=1
  #+property: var+ bar=2

  #+begin_src emacs-lisp
    (+ foo bar)
  #+end_src

  #+results:
  : 3

  #+begin_src emacs-lisp
    (org-entry-get (point) "var" t)
  #+end_src

  #+results:
  : foo=1 bar=2

  * overwriting a file-wide property
    :PROPERTIES:
    :var:      foo=7
    :END:

  #+begin_src emacs-lisp
    foo
  #+end_src

  #+results:
  : 7

  #+begin_src emacs-lisp
    (org-entry-get (point) "var" t)
  #+end_src

  #+results:
  : foo=7

  * appending to a file-wide property
    :PROPERTIES:
    :var+:      baz=3
    :END:

  #+begin_src emacs-lisp
    (+ foo bar baz)
  #+end_src

  #+results:
  : 6

  #+begin_src emacs-lisp
    (org-entry-get (point) "var" t)
  #+end_src

  #+results:
  : foo=1 bar=2 baz=3

* lisp/org.el (org-update-property-plist): Updates a given property
  list with a property name and a property value.
  (org-set-regexps-and-options): Use org-update-property-plist.
  (org-entry-get): Use org-update-property-plist.
* testing/examples/property-inheritance.org: Example file for testing
  appending property behavior.
* testing/lisp/test-property-inheritance.el: Tests of appending
  property behavior.
* lisp/ob.el (org-babel-balanced-split): Allow splitting on single
  characters as well as groups of two characters.
  (org-babel-parse-multiple-vars): Split variables on single spaces.
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 67a26e0141 execute call lines when executing an entire buffer
* lisp/ob-lob.el (org-babel-map-call-lines): Allow mapping of code
  over all call lines in a buffer.
* lisp/ob.el (org-babel-execute-buffer): Execute call lines when
  executing an entire buffer.
2011-11-09 14:35:04 -07:00
Eric Schulte 4cf9de5ea0 don't disassemble tables twice on export
* lisp/ob.el (org-babel-process-params): Don't disassemble tables
  twice.
2011-11-09 14:12:05 -07:00
Eric Schulte 1134385a87 better handling of multiple-variable :var code block header arguments
* lisp/ob.el (org-babel-parse-multiple-vars): Trimming excess
  white space from split variables.
2011-10-28 13:58:33 -06:00
Bastien Guerry ecf5368afe ob.el: Fix byte-compiler warning about free variable. 2011-10-22 15:28:01 +02:00
Eric Schulte 93bdeb9212 two more quick fixes
* lisp/ob.el (org-babel-balanced-split): Balance both [] and ()
  groupings.
  (org-babel-parse-header-arguments): Be sure to replace removed ":"
  characters.
2011-10-21 11:36:06 -06:00
Eric Schulte 0bcb248ee6 quick fix for a tiny bug
* lisp/ob.el (org-babel-parse-header-arguments): Quick fix for a tiny bug.
2011-10-21 11:21:39 -06:00
Eric Schulte 4c3d289faf Now allow multiple "var" specifications behind a single ":var"
* lisp/ob.el (org-babel-params-from-properties): Now splits multiple
  var arguments behind a single ":var".
  (org-babel-balanced-split): Separated balanced splitting of strings
  out into a new function.
  (org-babel-parse-multiple-vars): Splits multiple var arguments
  behind a single ":var".
2011-10-21 11:15:18 -06: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
Eric Schulte 04a978fde5 removing #+BABEL: lines in favor of general #+PROPERTIES: lines
* lisp/ob.el (org-babel-params-from-buffer): Removing #+BABEL: lines
  in favor of general #+PROPERTIES: lines.

* doc/org.texi (Buffer-wide header arguments): Removing documentation
  of the defunct #+BABEL: structure.
2011-10-20 13:42:31 -06:00
Eric Schulte c1ac640944 fix multi-table bug in code block colname and rowname handling
Thanks to Nick Dokos for suggesting this fix

* lisp/ob.el (org-babel-disassemble-tables): Fix multi-table bug in
  code block colname and rowname handling.
2011-10-18 10:08:48 -06:00
Eric Schulte 3e86300d6d now including language specific header arg values in insertion options
* lisp/ob.el (org-babel-insert-header-arg): Now including language
  specific header arg values in insertion options.
2011-10-09 09:31:32 -06:00
Eric Schulte d7d0230bf4 Fixed typo in org-babel-insert-header-arg.
Thanks to Torsten Wagner for pointing this out and for suggesting
  the original feature.

* lisp/ob.el (org-babel-insert-header-arg): Fixed typo.
2011-10-09 09:11:10 -06:00
Eric Schulte 9135ec76dd New helper function for inserting common code block header arguments
* lisp/ob.el (org-babel-common-header-args-w-values): New variable to
  hold common header arguments and their default values.
  (org-babel-header-arg-names): Redefined using the new common header
  arg variable.
  (org-babel-insert-header-arg): New function to help when inserting
  header arguments.
2011-10-08 16:31:50 -06:00
Eric Schulte 6844094edb Don't delete variable values when checking for assignment.
* lisp/ob.el (org-babel-get-src-block-info): Fixing bug, accidentally
  deleted variable values.
2011-09-16 09:52:34 -06:00
Eric Schulte 267015b24a differentiate between result types and wrappers
* lisp/ob.el (org-babel-merge-params): Differentiate between result
  types and wrappers.
2011-09-15 15:22:14 -06:00
Eric Schulte 11f07576cb Check that functional-syntax variables are initialized.
* lisp/ob.el (org-babel-get-src-block-info): Check that
  functional-syntax variables are initialized.
2011-09-15 09:24:29 -06:00
Eric Schulte f075ada9a1 Adding a note for a future enhancement.
* lisp/ob.el (org-babel-check-src-block): Adding a note for a future
  enhancement.
2011-09-15 09:11:12 -06:00
Eric Schulte 0037ef9261 more robust to code blocks with empty bodies
* lisp/ob.el (org-babel-parse-src-block-match): More robust to code
  blocks with empty bodies.
2011-09-13 09:36:03 -06:00
Eric Schulte 597e1eb4fe Don't error on empty code block body.
* lisp/ob.el (org-babel-parse-src-block-match): Don't error on empty
  code block body.
2011-09-13 08:57:29 -06:00
Eric Schulte a4e881207d better error message for unassigned variables
* lisp/ob.el (org-babel-merge-params): Better error message for
  unassigned variables.
2011-09-08 11:44:49 -06:00
Martyn Jago 223ac13486 Inline source block and test fixes * lisp/ob.el: Fixed late night refactoring error * testing/examples/babel.org: whitespace * testing/lisp/test-ob.el: Fixed test-org-babel/inline-src-block-regexp (regression error) Renamed test-org-babel/parse-header-args2 since duplicate test heading Made test-org-babel/parse-header-args less brittle 2011-09-06 08:53:07 -06:00
Martyn Jago d7d052ec7c Bug fixes to inline source block execution triggering. * lisp/ob.el: Created org-babel-get-inline-src-block-matches() to fix problems with org-ctrl-c-ctrl-c not triggering inline src block execution when point is on or after a space within the inline src block body. Also fixed execution problems where inline src block is on buffer line 1. * testing/examples/babel.org: Test data for org-babel-get-inline-src-block-matches()
* testing/lisp/test-ob.el: Tests for
  org-babel-get-inline-src-block-matches()
2011-09-06 08:52:59 -06:00
Eric Schulte 0d580520cc better code block demarcation
* lisp/ob.el (org-babel-demarcate-block): Copy headers and indent to
  column of point when a block is split.
2011-09-04 17:06:07 -06:00
Eric Schulte 0b6de9a026 corrected file insertion for inline results
* lisp/ob.el (org-babel-insert-result): Corrected file insertion for
  inline results.
2011-09-04 10:51:34 -06:00
Eric Schulte cae9f947be babel: don't check for header arguments in properties with leading ":"s
* lisp/ob.el (org-babel-params-from-properties): Don't check for
  header arguments in properties with leading ":"s.
2011-08-30 14:51:00 -06:00
Nicolas Goaziou 2ff74fc5b6 ob: allow inline src blocks to start at bol
* lisp/ob.el (org-babel-inline-src-block-regexp): Allow regexp to
  start at bol.
2011-08-29 16:05:18 -06:00
Achim Gratz ccc99317de backport copyright and license headers from Emacs trunk 2011-08-24 22:32:38 +02:00
Eric Schulte 21fd1523be Don't require full variable resolution when finding results
* lisp/ob.el (org-babel-where-is-src-block-result): Don't try to
  resolve variables when simply checking if we're inside of a code
  block.
2011-08-23 09:46:32 -06: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 96ad99ba07 ob: idempotent code block evaluation and result removal
* lisp/ob.el (org-babel-remove-result): Idempotent code block
  evaluation and result removal.
2011-08-19 08:58:24 -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 dc904a834d removed use of copy-seq from ob.el
* lisp/ob.el (org-babel-sha1-hash): Removed use of copy-seq.
2011-08-05 14:31:59 -04:00
Eric Schulte 41bf22f4dc Revert "new interactive function for removing code block results"
This reverts commit 72817926d7.
2011-08-01 15:45:58 -06: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
Eric Schulte 274823c858 if a code block has a body, its last character must be a newline
* lisp/ob.el (org-babel-src-block-regexp): If a code block has a body,
  its last character must be a newline.
2011-07-29 16:04:36 -06: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
Eric Schulte 72817926d7 new interactive function for removing code block results
* lisp/ob-keys.el (org-babel-key-bindings): Bound to C-c C-v k.

* lisp/ob.el (org-babel-map-regexp): New generic mapping macro.
  (org-babel-map-inline-src-blocks): Rewritten to use new macro.
  (org-babel-kill-results): Remove some or all results in the current
  file.

* lisp/ob-lob.el (org-babel-map-call-lines): Map over all lob call
  lines in the current file.

* doc/orgcard.tex: Document new keybinding.
2011-07-29 10:31:56 -06:00
emacs 7340cee33a Update website to show 7.7 as current release 2011-07-28 10:33:35 +00:00
Eric Schulte b1724e02fb adding a function for inspecting code block information e.g., header arguments
* lisp/ob.el (org-babel-view-src-block-info): New function to inspect code blocks.
* lisp/ob-keys.el (org-babel-key-bindings): Key bindings for org-babel-view-src-block-info.
* doc/orgcard.tex: Documentation of new Babel function.
2011-07-25 10:50:56 -06:00
Eric Schulte 4b6bfab817 ob: only call copy-seq on proper lists
* lisp/ob.el (org-babel-sha1-hash): Only call copy-seq on proper
  lists.
2011-07-21 11:05:33 -06:00
Eric Schulte 0b9cc74c56 ob: replaced call to defunct function `org-babel-result-hash'
* lisp/ob.el (org-babel-execute-src-block): Replaced call to defunct
  function `org-babel-result-hash'.
2011-07-19 07:25:35 -06: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 b93da58e1f ob.el: Bugfix about `nil' body variable when parsing block.
* ob.el (org-babel-strip-protective-commas): Return `nil'
instead of an error if no argument is given.
(org-babel-parse-src-block-match): Make sure body is defined
in the let construct.
2011-07-16 18:40:36 +02:00
Eric Schulte 8834bde39f ob: strip *single* trailing newline from code block bodies 2011-07-15 09:26:43 -06:00
Eric Schulte c6e69cd85b ob: enforce "verbatim" as synonym for "scalar"
* lisp/ob-awk.el (org-babel-execute:awk): Use "verbatim" as synonym
  for "scalar".
* lisp/ob-sh.el (org-babel-sh-evaluate): Use "verbatim" as synonym for
  "scalar".
* lisp/ob-sqlite.el (org-babel-execute:sqlite): Use "verbatim" as
  synonym for "scalar".
* lisp/ob.el (org-babel-merge-params): Use "verbatim" as synonym for
  "scalar".
2011-07-10 09:42:54 -06:00
Eric Schulte cef17b6340 ob-clojure: parse odd parens when nested isnide lists
* lisp/ob.el (org-babel-script-escape): Parse odd parens when nested
  isnide lists.
2011-07-10 09:42:54 -06:00
Bastien Guerry 9c05a7c781 Bump to version 7.6 2011-07-06 21:06:03 +02:00
Eric Schulte 6ddad0a91a ob: not including export-variable headers in cache sha1
* lisp/ob.el (org-babel-sha1-hash): Improving code layout and removing
  export-variable headers in cache sha1.
2011-07-01 12:56:22 -07:00
Eric Schulte 0a0969303a ob: declare variable to appease compiler
* lisp/ob.el (org-babel-inline-lob-one-liner-regexp): Declare variable
  to appease compiler.
2011-06-29 16:29:19 -07:00
Michael Markert b3e8b3f87c adding optional argument KIND to all org-called-interactively-p function invocations
* lisp/ob.el (org-babel-sha1-hash): Adding optional argument KIND to
  all org-called-interactively-p function invocations.
* lisp/org-agenda.el (org-agenda-redo): Adding optional argument KIND to
  all org-called-interactively-p function invocations.
  (org-agenda-show-1): Adding optional argument KIND to all
  org-called-interactively-p function invocations.
  (org-agenda-set-tags): Adding optional argument KIND to all
  org-called-interactively-p function invocations.
* lisp/org-ascii.el (org-export-as-latin1): Adding optional argument
  KIND to all org-called-interactively-p function invocations.
  (org-export-as-latin1-to-buffer): Adding optional argument KIND to
  all org-called-interactively-p function invocations.
  (org-export-as-utf8-to-buffer): Adding optional argument KIND to all
  org-called-interactively-p function invocations.
  (org-export-region-as-ascii): Adding optional argument KIND to all
  org-called-interactively-p function invocations.
* lisp/org-docbook.el (org-export-region-as-docbook): Adding optional
  argument KIND to all org-called-interactively-p function
  invocations.
* lisp/org-html.el (org-export-region-as-html): Adding optional
  argument KIND to all org-called-interactively-p function
  invocations.
* lisp/org-latex.el (org-export-region-as-latex): Adding optional
  argument KIND to all org-called-interactively-p function
  invocations.
* lisp/org-table.el (org-table-blank-field): Adding optional argument
  KIND to all org-called-interactively-p function invocations.
  (org-table-current-column): Adding optional argument KIND to all
  org-called-interactively-p function invocations.
  (org-table-current-dline): Adding optional argument KIND to all
  org-called-interactively-p function invocations.
  (org-table-sort-lines): Adding optional argument KIND to all
  org-called-interactively-p function invocations.
  (org-table-sum): Adding optional argument KIND to all
  org-called-interactively-p function invocations.
  (org-table-rotate-recalc-marks): Adding optional argument KIND to
  all org-called-interactively-p function invocations.
  (org-table-eval-formula): Adding optional argument KIND to all
  org-called-interactively-p function invocations.
  (orgtbl-send-table): Adding optional argument KIND to all
  org-called-interactively-p function invocations.
* lisp/org.el (org-mode): Adding optional argument KIND to all
  org-called-interactively-p function invocations.
  (org-copy-subtree): Adding optional argument KIND to all
  org-called-interactively-p function invocations.
  (org-paste-subtree): Adding optional argument KIND to all
  org-called-interactively-p function invocations.
  (org-store-link): Adding optional argument KIND to all
  org-called-interactively-p function invocations.
  (org-todo): Adding optional argument KIND to all
  org-called-interactively-p function invocations.
  (org-occur): Adding optional argument KIND to all
  org-called-interactively-p function invocations.
2011-06-29 16:22:58 -07:00
Bastien Guerry 2b7dbee193 Replace interactive-p with the org-called-interactively-p macro.
Interactive-p is an obsolete function as of Emacs 23.2.
`org-called-interactively-p' takes care of the current (x)Emacs
version and use either `interactive-p' (for XEmacs and Emacs<23.2)
or `called-interactively-p'.
2011-06-29 18:24:08 +02:00
Eric Schulte b055f0d372 ob: escaping scripts now treats {} in the same manner as []
* lisp/ob.el (org-babel-script-escape): Treats {} in the same manner
  as [] and allows for forcing string conversion.
2011-06-28 16:38:30 -07:00
Eric Schulte 5b7646ce08 ob: expand noweb references to headline contents
* lisp/ob-ref.el (org-babel-ref-goto-headline-id): Split out into its
  own function.
  (org-babel-ref-headline-body): Split out into its own function.
  (org-babel-ref-resolve): Using new functions, and alignment.
* lisp/ob.el (org-babel-ref-goto-headline-id): Declare function.
  (org-babel-ref-headline-body): Declare function.
  (org-babel-expand-noweb-references): Now expands noweb references to
  headlines during expansion.
2011-06-28 13:04:58 -07:00
Eric Schulte 27c3cad589 ob: preserve the order of variable parameters
* lisp/ob.el (org-babel-merge-params): Ensure variable parameters are
  not reversed.

* lisp/ob-ref.el (org-babel-ref-split-args): Ensure variable
  parameters are not reversed.
2011-06-27 11:31:12 -07:00
Eric Schulte d1f0ae650f ob: fix results insertion for inline blocks which happen to start a line
* lisp/ob.el (org-babel-insert-result): Fix results insertion for
  inline blocks which happen to start a line.
2011-06-27 10:36:27 -07:00
Eric Schulte 9e686bd681 ob: ensure that un-named variables are assigned correctly
* lisp/ob.el (org-babel-merge-params): Do not reverse variable order,
  and be sure to increment variable index as appropriate.
2011-06-25 15:20:05 -07:00
Eric Schulte 1b95d2e9ce ob: unnamed variables are assigned in order
* lisp/ob.el (org-babel-merge-params): If variables are not named they
  are assigned in order.
2011-06-25 14:11:53 -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