Commit Graph

9324 Commits

Author SHA1 Message Date
Bastien Guerry c31ad79326 ox.el: Remove reference to the obsolete variable `org-export-language-setup'
* ox.el: Remove reference to the obsolete variable
`org-export-language-setup'.
2013-07-24 01:37:16 +02:00
Nicolas Goaziou 814755a2d7 ox: Fix small bug
* lisp/ox.el (org-export--get-inbuffer-options): Fix small bug
  introduced in 908d42c9b6.
2013-07-22 16:06:47 +02:00
Nicolas Goaziou 908d42c9b6 ox: Multiple options can be set through the same keyword
* lisp/ox.el (org-export--get-inbuffer-options): Multiple options can
  now be set through the same buffer keyword.
* testing/lisp/test-ox.el: Add test.
2013-07-22 15:15:01 +02:00
Nicolas Goaziou 95dd398f6a Merge branch 'maint'
Conflicts:
	testing/lisp/test-org-element.el
2013-07-21 15:54:08 +02:00
Nicolas Goaziou b4a8ec9321 org-element: Fix infloop when parsing a list at the end of buffer
* lisp/org-element.el (org-element-plain-list-parser): Fix infloop
  when parsing a list at the end of buffer, if buffer doesn't end at
  a line beginning.
* testing/lisp/test-org-element.el: Add test.
2013-07-21 15:51:14 +02:00
Nicolas Goaziou 17b584df89 Merge branch 'maint' 2013-07-20 13:53:35 +02:00
Nicolas Goaziou 21dd83661b org-element: Do not url-decode parsed links
* lisp/org-element.el (org-element-link-parser): Do not url-decode
  parsed links.

The function now assumes link at point is correctly encoded if needed.
`org-insert-link' already automatically url-encode generated links,
and link types not handled by this function (e.g., custom-id links) do
not need such encoding.
2013-07-20 13:51:18 +02:00
Nicolas Goaziou 3386033165 Merge branch 'maint' 2013-07-18 15:57:15 +02:00
Nicolas Goaziou 40b44e4505 org-pcomplete: Remove spurious white spaces in block completion
* lisp/org-pcomplete.el (pcomplete/org-mode/file-option): Remove
  spurious white spaces, excepted for source blocks' opening string.
  Small refactoring.
2013-07-18 15:54:15 +02:00
Andreas Leha 0b770b125f add *.tikz files as possible result files for latex blocks
* lisp/ob-latex.el (org-babel-execute:latex) add a tizk option
  that copies the body of the block into a tikz file
2013-07-17 15:44:49 -06:00
Eric Schulte 8d5ad6553f make java executable configurable for ditaa blocks
* lisp/ob-ditaa.el (org-babel-ditaa-java-cmd): Make java executable
  configurable for ditaa blocks.
2013-07-17 08:20:37 -06:00
Eric Schulte f6ac1a2078 fix bug in ob-sh when dealing with list variables
* lisp/ob-sh.el (org-babel-sh-var-to-string): Fix bug in ob-sh when
  dealing with list variables.
2013-07-17 08:15:41 -06:00
Nicolas Goaziou e8766c33f8 Merge branch 'maint' 2013-07-15 17:43:24 +02:00
Nicolas Goaziou 1af5a8a7c8 org-pcomplete: Fix completion for block boundaries
* lisp/org-pcomplete.el (pcomplete/org-mode/file-option): Remove
  spurious colons from block boundaries.
2013-07-15 17:42:13 +02:00
Feng Shu 2a94fca6ca Fix generating LaTeX formula images
* lisp/ox-odt.el (org-odt--translate-latex-fragments): Fix imagemagick support.
* lisp/ox-html.el (org-html-latex-environment)
(org-html-latex-fragment): Fix imagemagick support.
* org.el (org-create-formula-image-with-imagemagick): Generate correct
size formula image.
(org-format-latex-header): Change pagestyle command position.
* doc/org.texi (@LaTeX{} fragments)
(Previewing @LaTeX{} fragments)
(Math formatting in HTML export)
(Working with @LaTeX{} math snippets): Add document about creating
formula image with imagemagick.
2013-07-15 15:31:38 +02:00
Eric Schulte ca56230fc1 more robust sbe macro 2013-07-14 16:20:49 -06:00
Eric Schulte 4899c79e66 org-src-lang-modes in block demarcation options
* lisp/ob-core.el (org-babel-demarcate-block): Include
  org-src-lang-modes in block demarcation options.
2013-07-13 12:37:09 -06:00
Eric Schulte 7f5288780f removed modification of org-babel-load-languages
* lisp/ob-C.el: Don't modify `org-babel-load-languages' from ob-* files.
2013-07-13 11:05:45 -06:00
rasmus 6727f1aa75 Better C++ recognition
* ob-C.el: Added =C++= to =`org-babel-load-languages'=
automatically after loading =C=.
* org-src.el (org-src-lang-modes): Added association between
language =C++= and =`c++-mode'=.

=C++= is added to org-babel-load-languages to make
`org-babel-demarcate-block' recognize =C++= as a proper language.
2013-07-13 10:35:34 -06:00
Nicolas Goaziou 0c233ae4e9 Merge branch 'maint' 2013-07-12 15:12:01 +02:00
Nicolas Goaziou 7fcf4995af ox-publish: Fix :recursive parameter ignoring extension restriction
* lisp/ox-publish.el (org-publish-find-date): Also return date for
  directories.
(org-publish-get-base-files-1): Fix :recursive parameter ignoring
extension restriction.
2013-07-12 15:09:58 +02:00
Nicolas Goaziou 44082746da Merge branch 'maint' 2013-07-12 09:19:24 +02:00
Nicolas Goaziou 956837087b ox-beamer: Remove strange indentation in default header
* lisp/ox-beamer.el: Remove strange indentation in default header.
2013-07-12 09:18:47 +02:00
Nicolas Goaziou 0cdf2eb7ce Merge branch 'maint'
Conflicts:
	contrib/lisp/ox-koma-letter.el
2013-07-12 09:10:26 +02:00
Nicolas Goaziou a2a5c8fd5b ox-beamer/latex/koma-letter: Fix missing newlines in header
* contrib/lisp/ox-koma-letter.el (org-koma-letter-template): Fix
  missing newlines in header.
* lisp/ox-beamer.el (org-beamer-template): Fix missing newlines in
  header.
* lisp/ox-latex.el (org-latex-template): Fix missing newlines in
  header.
2013-07-12 09:07:23 +02:00
Eric Schulte 9f3bed367b optional svg output for latex code blocks
* lisp/ob-latex.el (org-babel-latex-htlatex): Set this variable to
  "htlatex" (or path to said) to enable svg generation from latex code
  blocks.
  (org-babel-latex-htlatex-packages): Libraries required for automatic
  svg generation.
  (org-babel-execute:latex): Generate SVG images directly from latex
  code blocks (assumes tikz).
2013-07-11 10:05:13 -06:00
Bastien Guerry 918551cec8 Merge branch 'maint' 2013-07-11 14:33:18 +02:00
Bastien Guerry 202c5895b1 org.el (org-set-regexps-and-options-for-tags): Fix concatenation of the tags list
* org.el (org-set-regexps-and-options-for-tags): Fix
concatenation of the tags list.

Thanks to Nick for reporting this bug and to Rainer for confirming the fix.
2013-07-11 14:33:08 +02:00
Nicolas Goaziou 203f4c9b05 ox: Fix "wrong-type-argument" error in template insertion
* lisp/ox.el (org-export-insert-default-template): Fix
  "wrong-type-argument" error in template insertion.

Thanks to Eric Abrahamsen for reporting this.
2013-07-11 08:48:36 +02:00
Nicolas Goaziou 5074999605 Merge branch 'maint' 2013-07-10 14:14:18 +02:00
Nicolas Goaziou 136081a0d4 Use empty commented lines as separators when filling comments
* lisp/org.el (org-fill-paragraph): Use empty commented lines as
  separators when filling comments.  This mimics default behaviour
  from "newcomment.el", which is not used in Org.
* testing/lisp/test-org.el: Add tests.
2013-07-10 14:13:39 +02:00
Bastien Guerry 044c8c5ebb Merge branch 'maint' 2013-07-10 12:13:09 +02:00
Bastien Guerry 681bd0cfd9 ox-odt.el (org-odt-pixels-per-inch): Use 96.0 as the default
* ox-odt.el (org-odt-pixels-per-inch): Use 96.0 as the default.

Thanks to Vincent Liard for this patch.
2013-07-10 12:12:59 +02:00
Nicolas Goaziou 020eb8eaef ox-html: Fix inline image attributes
* lisp/ox-html.el (org-html-link): Add image attributes to "img" tag,
  not to the "a" container.  Also fix spacing for attributes.

Thanks to Robert Eckl for reporting it.
2013-07-10 10:12:43 +02:00
Kodi Arfer 535bf4a1f2 ox-html: Under html5-fancy, use <nav> for the ToC
* lisp/ox-html.el (org-html-toc): Use <nav> instead of <div>
  for the root element when appropriate.

TINYCHANGE
2013-07-09 22:51:18 +02:00
Kodi Arfer 03040dd44d ox-html: Allow "Figure %d:", etc. to be styled
* lisp/ox-html.el (org-html-paragraph): Wrap "Figure %d:" in
  <span class="figure-number">.
  (org-html-list-of-tables, org-html-table): Wrap "Table %d:" in
   <span class="table-number">.
  (org-html-list-of-listings): Wrap "Listing %d:" in
  <span class="listing-number">.
* doc/org.text (CSS support): Mention .figure-number,
  .listing-number, and .table-number.

I didn't change org-html-style-default, so these labels won't
appear special by default.

TINYCHANGE
2013-07-09 22:28:53 +02:00
Nicolas Goaziou d5c11e6b5a Merge branch 'maint' 2013-07-09 13:53:36 +02:00
Nicolas Goaziou c78fa35252 Fix error when filling consecutive comments
* lisp/org.el (org-fill-paragraph): Do not mix consecutive comments
  when filling any of them.
* testing/lisp/test-org.el: Add test.

Thanks to Samuel Wales for reporting it.
2013-07-09 13:52:00 +02:00
Nicolas Goaziou fe8bfb8bd9 Merge branch 'maint' 2013-07-08 22:27:35 +02:00
Nicolas Goaziou eb37142b14 ox-html: Fix number of arguments when setting `org-html-format-headline-function'
* lisp/ox-html.el (org-html-format-headline--wrap): Fix number of
  arguments when setting `org-html-format-headline-function'.

Thanks to Jisang Yoo for reporting it.
2013-07-08 22:27:03 +02:00
Bastien Guerry fdaa996e90 org.el (org-refile): Allow to only copy the subtree without moving it
* org.el (org-refile): With a numeric prefix argument of `3',
emulate (setq org-refile-keep t) and copy the subtree to the
target location, don't delete it.

* org.texi (Refile and copy): Document `C-3 C-c C-w' and add
an index entry for `org-refile-keep'.
2013-07-08 10:19:03 +02:00
Bastien Guerry 878d6c35e3 Merge branch 'maint' 2013-07-06 16:15:36 +02:00
Bastien Guerry 4269178827 org.el (org-set-regexps-and-options-for-tags): Fix the setting of tag groups when relying on `org-tag-alist'
* org.el (org-set-regexps-and-options-for-tags): Fix the
setting of tag groups when relying on `org-tag-alist', not on
tags directly set in the buffer with the #+TAGS option.

Thanks to Maurice for reporting this.
2013-07-06 16:15:18 +02:00
Nicolas Goaziou 0bab94dedf Merge branch 'maint' 2013-07-06 00:41:04 +02:00
Nicolas Goaziou 0aa0fdd971 org-element: Fix interpretation of empty items
* lisp/org-element.el (org-element-item-interpreter): This patch fixes
  "(wrong-type-argument arrayp nil)" error when trying to interpret
  empty items.
* testing/lisp/test-org-element.el: Add test.
2013-07-06 00:39:28 +02:00
Nicolas Goaziou acb351444e Merge branch 'maint' 2013-07-05 21:14:43 +02:00
Nicolas Goaziou e5630add27 org-element: Fix "*" itemized plain lists interpretation
* lisp/org-element.el (org-element-item-interpreter): Correctly
  interpret back plain lists with "*" items.  This fixes "This is not
  a list" error returned in this case.
* testing/lisp/test-org-element.el: Add test.
2013-07-05 21:12:47 +02:00
Bastien Guerry 2629b767b1 Merge branch 'maint' 2013-07-05 14:30:59 +02:00
Bastien Guerry 848240c1cf Merge branch 'maint' of orgmode.org:org-mode into maint 2013-07-05 14:30:48 +02:00
Bastien Guerry ce08e04629 org-agenda.el (org-agenda-archive-with): Save window excursion
* org-agenda.el (org-agenda-archive-with): Save window
excursion.
2013-07-05 14:29:51 +02:00
Nicolas Goaziou 7e1799e5fc ox-latex: Update a docstring
* lisp/ox-latex.el (org-latex-listings): Update docstring.
2013-07-05 13:57:46 +02:00
Bastien Guerry aab08b5e36 Merge branch 'maint' 2013-07-04 22:11:57 +02:00
Bastien Guerry eeb1323933 Fix commit 19af72
Thanks to Rainer Stengele for reporting this.
2013-07-04 22:11:46 +02:00
Eric Schulte bec8839cd6 prologue and epilogue for R blocks 2013-07-04 08:37:02 -06:00
Bastien Guerry a09835d844 Merge branch 'maint' 2013-07-04 15:26:35 +02:00
Bastien Guerry 9bec9f1cd0 org.el (org-forward-element, org-backward-element): Throw a message instead of an error
* org.el (org-forward-element, org-backward-element): Throw a
message instead of an error when trying to move from a
position where there is no element.
2013-07-04 15:26:25 +02:00
Nicolas Goaziou ba7c193978 Fix completions related to new export back-end definition
* lisp/org-pcomplete.el (pcomplete/org-mode/file-option/options):
  Apply changes to export back-end definiton.
* lisp/org.el (org-get-export-keywords): Apply changes to export
  back-end definiton..
2013-07-04 14:17:50 +02:00
Nicolas Goaziou 758a545fb6 Export back-ends: Apply changes to back-end structure
* lisp/ox-html.el (org-html--format-toc-headline): Make use of
  anonymous back-ends.
* lisp/ox-odt.el (org-odt-footnote-reference): Make use of anonymous
  back-ends.
(org-odt-format-label, org-odt-toc, org-odt-format-headline--wrap):
  Use `org-export-with-backend' instead of
  `org-export-with-translations'.
* contrib/lisp/ox-freemind.el (org-freemind--build-node-contents): Use
  `org-export-with-backend' instead of `org-export-with-translations'.
2013-07-04 14:17:49 +02:00
Nicolas Goaziou cea0434c4f ox: Change back-ends internal representation to structures
* lisp/ox.el (org-export--registered-backends): Renamed from
  `org-export-registered-backends'.
(org-export-invisible-backends): Removed variable.
(org-export-get-backend, org-export-get-all-transcoders
org-export-get-all-options, org-export-get-all-filters): New
functions.  It replaces `org-export-backend-translate-table'.
(org-export-barf-if-invalid-backend, org-export-derived-backend-p,
org-export-define-backend, org-export-define-derived-backend):
Rewrite functions using new representation.
(org-export-backend-translate-table): Remove function.
(org-export-get-environment): Use new function.
(org-export--get-subtree-options, org-export--parse-option-keyword,
org-export--get-inbuffer-options, org-export--get-global-options,
org-export-to-buffer org-export-to-file, org-export-string-as
org-export-replace-region-by): Update docstring.
(org-export-data-with-translations): Remove function.  Use
`org-export-data-with-backend' with a temporary back-end instead.
(org-export-data-with-backend, org-export-as): Reflect new definition
for back-ends.
(org-export--dispatch-action, org-export--dispatch-ui): Reflect new
definition for back-ends and variable removal.  Refactoring.
(org-export-filter-apply-functions): Call functions with
current back-end's name, not full back-end.
* lisp/org.el (org-export-backends, org-create-formula--latex-header):
Use new structure and variables.
* testing/lisp/test-ox.el: Update tests.

This patch separates back-end definition from its registration.  Thus,
it allows to use anonymous or unregistered back-ends.
2013-07-04 14:17:49 +02:00
Bastien Guerry 0e99027575 Merge branch 'maint' 2013-07-04 10:32:45 +02:00
Bastien Guerry 17b6b708ba org.el (org-clock-is-active): Fix docstring
* org.el (org-clock-is-active): Fix docstring.

Thanks to Łukasz Stelmach for pointing this.
2013-07-04 10:32:33 +02:00
Bastien Guerry 6f4e06e54b org-list.el (org-sort-list): Use `x' instead of `c' for sorting plain list by checked status
* org-list.el (org-sort-list): Use `x' instead of `c' for
sorting plain list by checked status.
2013-07-04 01:33:02 +02:00
Bastien Guerry b13135c293 Merge branch 'maint' 2013-07-03 19:46:23 +02:00
Bastien Guerry a42c099a26 org.el (org-structure-template-alist): Fix custom type and default value
* org.el (org-structure-template-alist): Fix custom type and
default value.

Thanks to Nick Dokos for reporting this and providing the fix.
2013-07-03 19:46:13 +02:00
Bastien Guerry 7046ad18ee Merge branch 'maint' 2013-07-03 17:03:28 +02:00
Bastien Guerry 19af726090 Fix wrong setting of `org-tag-alist' with #+setupfile:.
* org.el (org-set-regexps-and-options-for-tags): Enhance
docstring.
(org-set-regexps-and-options): Make sure not to add
`org-tag-alist' twice when setting this variable through et
#+setupfile: directive.

Thanks to Anupam Sengupta for reporting this.
2013-07-03 17:03:08 +02:00
Bastien Guerry 74974ab34b Merge branch 'maint' 2013-07-03 16:01:14 +02:00
Bastien Guerry f0c2a68056 org.el (org-tags-expand): Use `with-syntax-table'
* org.el (org-tags-expand): Use `with-syntax-table'.
2013-07-03 16:01:03 +02:00
Bastien Guerry b0174feaa1 Merge branch 'maint' 2013-07-03 15:06:39 +02:00
Nicolas Richard f12976440a Move `org-set-font-lock-defaults' from `org-set-regexps-and-options' to `org-mode'
* org.el (org-set-regexps-and-options): Don't set font-lock
defaults here.
(org-mode): Set font-lock defaults here.

This fixes the bug reported here:
http://article.gmane.org/gmane.emacs.orgmode/73429
2013-07-03 15:06:26 +02:00
Bastien Guerry 82a9f66f46 Merge branch 'master' of orgmode.org:org-mode 2013-07-03 14:57:30 +02:00
Bastien Guerry f80e262967 org-list.el (org-sort-list): Implement sorting by "checked" status for check lists
* org-list.el (org-sort-list): Implement sorting by "checked"
status for check lists.

* org.texi (Plain lists): Add index entry for sorting plain
list.  Document sorting by checked status for check lists.
2013-07-03 14:57:19 +02:00
rasmus 733fb0713e Some language support for Danish, Swedish and Norwegian
* ox.el (org-export-smart-quotes-alist): Added ("da" "no" "nb" "nn"
"sv").
* ox.el (org-export-dictionary): Added some entries ("da" "no" "nb"
"nn" "sv").

These languages are rather unrestricted, so some changes may to some
extend reflect my preferences.
2013-07-03 13:49:05 +02:00
rasmus e7609fb904 Extended org-export-default-language docstring
* ox.el (org-export-default-language): mention other variables
affected by language.
2013-07-03 13:49:05 +02:00
rasmus 7ff935bb60 Bugfix for Norwegian in ox.el
* ox-latex.el (org-latex-babel-language-alist): Added 'nb', 'nn', and
'no' for Norwegian.  Removed 'no-no'.

In ox.el Norwegian is given by 'no' for Norwegian, 'nb' for bokmål,
and 'nn' for nynorsk, correspond to the ISO-2 language codes.  'no-no'
is not defined in ox.el.
2013-07-03 13:49:02 +02:00
Bastien Guerry 7be5f737f8 Merge branch 'maint' 2013-07-03 10:18:35 +02:00
Bastien Guerry 244aaa3d72 org-table.el (org-table-sum): Fix rounding error when summing times
* org-table.el (org-table-sum): Fix rounding error when
summing times.

Thanks to Paul Stansell for reporting this and to Nick Dokos for
providing the fix.

See http://mid.gmane.org/87ppv2atvf.fsf%40gmail.com for the
discussion of this bug.
2013-07-03 10:18:22 +02:00
Nicolas Goaziou 1b42e9d8b2 ox-html: Fix standalone hyperlinked images
* lisp/ox-html.el (org-html-inline-images): Change default value and
  remove `maybe'.
(org-html-format-inline-image): Remove functions.
(org-html--wrap-image, org-html--format-image,
org-html-inline-image-p): New functions.
(org-html-latex-environment, org-html-latex-fragment): Use new
functions.
(org-html-standalone-image-p): Use new functions.  Also remove an
unused optional argument.
(org-html-link, org-html-paragraph): Correctly export hyperlinked
images.

This patch permits the back-end to recognize links like:

  [[http://orgmode.org][http://orgmode.org/img/org-mode-unicorn-logo.png]]

as standalone, so they can get wrapped within a proper environment and
get captions.

Thanks to Kodi Arfer for reporting it.
2013-07-02 21:06:43 +02:00
Feng Shu 9795d6d258 ox: add Simplified Chinese translations for `org-export-dictionary'
* lisp/ox.el: (org-export-dictionary): Add Simplified Chinese translations for
`org-export-dictionary'

TINYCHANGE
2013-07-02 19:01:16 +02:00
Feng Shu 7767f8eae1 Add `:caption' attribute to #+ATTR_LATEX property
* lisp/ox-latex.el (org-latex--caption/label-string): Add ability,
which can build a caption string from `:caption' attribute of #+ATTR_LATEX.
(org-latex--inline-image,org-latex--org-table): Tiny change.
* doc/org.texi (@LaTeX{} specific attributes): Document `:caption'
attribute of #+ATTR_LATEX.

This feature is very useful when you export org to latex with custom
caption command, for example:

\#+ATTR_LATEX: :caption \BiTableCaption{caption 1}{caption 2}
|---+---|
| x | y |
|---+---|
| 1 | 2 |
|---+---|
2013-07-02 19:01:15 +02:00
Bastien Guerry 25f4e5f7f7 Merge branch 'maint' 2013-07-02 09:32:09 +02:00
Bastien Guerry 13c4d7f6e1 Fix commit e31955.
Thanks to Samuel for reporting this.
2013-07-02 09:31:51 +02:00
Bastien Guerry 116a66c5be Merge branch 'maint' 2013-07-01 23:13:03 +02:00
Bastien Guerry c419d1134e Fix compiler warnings. 2013-07-01 23:12:54 +02:00
Bastien Guerry 818e865db8 ob-scheme.el (org-babel-scheme-execute-with-geiser): Fix code typo and add declarations
* ob-scheme.el (org-babel-scheme-execute-with-geiser): Fix
code typo.  Add declarations.
2013-07-01 23:08:08 +02:00
Bastien Guerry f9be7f3422 Merge branch 'master' of orgmode.org:org-mode 2013-07-01 22:57:41 +02:00
Achim Gratz 8387b3b07e Merge branch 'maint' 2013-07-01 22:21:47 +02:00
Achim Gratz 8cf4ceb304 ob-core: fix regression when org-confirm-babel-evaluate is a functionp
* lisp/ob-core.el (org-babel-check-confirm-evaluate): Return result of
  evaluating the function pointed to by`org-confirm-babel-evaluate'
  when it is a functionp and its value as a variable otherwise.

This fixes a regression introduced in 5fe486807e and restores the fix
applied earlier in 8d272b0d3b (and then replaced by a cond form in
ece347e32c, which later got factored out again).
2013-07-01 22:20:48 +02:00
Bastien Guerry 99f7f5def3 ox-html.el (org-html-link-use-abs-url): New option
* ox-html.el (org-html-link-use-abs-url): New option.
(org-html-link): Use it to prepend relative links with the
value of HTML_LINK_HOME, when defined.
2013-07-01 16:06:37 +02:00
Eric Schulte ef8039f189 Use lob call name when exporting.
* lisp/ob-exp.el (org-babel-exp-non-block-elements): Use lob call name
  when exporting.
2013-07-01 07:10:09 -06:00
Bastien Guerry 0c4f81dee1 Merge branch 'maint' 2013-07-01 14:32:27 +02:00
Bastien Guerry 79ce6174fd Revert "ox-html.el (org-html-plain-list): Handle alphabetical ordered list"
This reverts commit 8012d88db7.

See http://mid.gmane.org/87wqpaqz3c.fsf%40gmail.com for the discussion
about whether this feature should go in or not.
2013-07-01 14:31:41 +02:00
Bastien Guerry 683e1db203 Merge branch 'master' of orgmode.org:org-mode 2013-07-01 12:16:50 +02:00
Bastien Guerry 163350117b Merge branch 'maint' 2013-07-01 09:41:40 +02:00
Vladimir Lomov 5e5d89ac10 Fix commit 6abc11.
TINYCHANGE
2013-07-01 09:40:54 +02:00
Eric Schulte b61ef4b432 fix whitespace and indentation in ob-scheme
* lisp/ob-scheme.el (org-babel-scheme-get-repl): Fix whitespace and
  indentation.
  (org-babel-scheme-make-session-name): Fix whitespace and indentation.
  (org-babel-scheme-execute-with-geiser): Fix whitespace and
  indentation.
  (org-babel-execute:scheme): Fix whitespace and indentation.
2013-06-30 18:08:02 -06:00
Michael Gauland 4c13e8a827 Use geiser for babel scheme evaluation. 2013-06-30 18:04:50 -06:00
Eric Schulte 5c7e28a1bc Revert "use org-babel-result-cond in scheme code blocks"
This reverts commit 92e32755fd.
2013-06-30 18:04:43 -06:00
Eric Schulte 895bae8774 fix bug when replacing results hashes
* lisp/ob-core.el (org-babel-set-current-result-hash): Updated the
  match-string holding the hash data, and correct overlay maintenance.
2013-06-30 17:57:13 -06:00
Eric Schulte 884f5ced13 named call lines insert results like code blocks
* lisp/ob-core.el (org-babel-find-named-result): Call lines are not
  results.
  (org-babel-where-is-src-block-result): Don't implicitly name the
  results of call lines.

* lisp/ob-exp.el (org-babel-exp-non-block-elements): There is now
  another element on the call line info list.
* lisp/ob-lob.el (org-babel-lob-get-info): Return the name (if any)
  at the end of the info list.
  (org-babel-lob-execute): Pass the name through to execution.
2013-06-30 17:46:32 -06:00
Bastien Guerry bf5f896bc2 Merge branch 'maint' 2013-07-01 01:16:48 +02:00
Bastien Guerry 5381ebd910 org.el (org-refile): Fix refiling the active region within an list
* org.el (org-refile): Fix refiling the active region within
an list.

Thanks to Jeff Horn and Samuel Wales.
2013-07-01 01:16:38 +02:00
Bastien Guerry 2ccd6d9887 Merge branch 'maint' 2013-07-01 00:36:17 +02:00
Bastien Guerry e3195550fc org.el (org-refile): Don't store the last refiled subtree in the kill ring
* org.el (org-refile): Don't store the last refiled subtree in
the kill ring.

Thanks to Samuel for reporting this.
2013-07-01 00:35:53 +02:00
Bastien Guerry 648c1f8712 org.el (org-mode-map): Remap `forward-paragraph' and `backward-paragraph' to `org-forward-element' and `org-backward-element'
* org.el (org-mode-map): Remap `forward-paragraph' and
`backward-paragraph' to `org-forward-element' and
`org-backward-element'.

Thanks to Samuel for raising this.
2013-07-01 00:34:38 +02:00
Bastien Guerry 8012d88db7 ox-html.el (org-html-plain-list): Handle alphabetical ordered list
* ox-html.el (org-html-begin-plain-list): New parameter
`ordered-num' to tell whether the list is ordered numerically.
(org-html-plain-list): Handle alphabetical ordered list.
2013-07-01 00:33:25 +02:00
Bastien Guerry 6abc114f18 org-agenda.el (org-batch-agenda): Let-bind `org-agenda-sticky' to nil during batch export
* org-agenda.el (org-batch-agenda): Let-bind
`org-agenda-sticky' to nil during batch export.

Thanks to Rainer for spotting this.
2013-07-01 00:31:33 +02:00
Bastien Guerry ce0269fb6b org.el (org-copy-subtree): Fix typo in docstring
* org.el (org-copy-subtree): Fix typo in docstring.
2013-07-01 00:30:03 +02:00
Kodi Arfer abacffb3e0 ox-html: Restore wrongly omitted table attributes under HTML5
* lisp/ox-html.el (org-html-table): For HTML5,
  omit :html-table-attributes but not :id or :attr_html.

TINYCHANGE
2013-06-30 09:30:23 +02:00
Nicolas Goaziou 41068a59d2 ox: Update some translations
* lisp/ox.el (org-export-dictionary): Update some translations.
2013-06-29 15:46:31 +02:00
Nicolas Goaziou f7f874006e ox-odt: Fix internationalization of some labels
* lisp/ox-odt.el (org-odt-label-styles, org-odt-category-map-alist):
  Fix docstring.
(org-odt-format-label): Add docstring.  Internationalize prefix.
* lisp/ox.el (org-export-dictionary): Add entry for colons.
2013-06-29 15:29:24 +02:00
Nicolas Goaziou 4309062580 ox-odt: Remove unused function
* lisp/ox-odt.el (org-odt--suppress-some-translators): Remove
  function.
2013-06-29 15:23:34 +02:00
Nicolas Goaziou cb9c1dd668 ox-html: Tiny refactoring
* lisp/ox-html.el (org-html-link): Remove left-over binding.
2013-06-29 14:48:08 +02:00
Nicolas Goaziou f3168ff90a ox-beamer: Allow to add raw title in environment definition
* lisp/ox-beamer.el (org-beamer-environments-extra): Allow to add raw
  title in environment definition.
(org-beamer--format-block): Handle new placeholders.
2013-06-29 14:35:36 +02:00
Nicolas Goaziou 29aec9448a ox-html: Small refactoring
* lisp/ox-html.el (org-html-link): Small refactoring.
2013-06-29 14:26:48 +02:00
Yoshinari Nomura 6037c0da46 ox: add Japanese translations for figures and tables
* lisp/ox.el: (org-export-dictionary): Add Japanese translations for
figures and tables

TINYCHANGE
2013-06-29 14:03:18 +02:00
Yoshinari Nomura 5cd065df88 ox: add dictionary entry for numbered figures
* lisp/ox.el: (org-export-dictionary): Add "Figure %d:" entry
in the same manner with "Table %d:".

TINYCHANGE
2013-06-29 14:03:15 +02:00
Yoshinari Nomura d5f3f41c7a ox-html: add figure and table numbers to HTML captions
* lisp/ox-html.el: (org-html--has-caption-p): New function.
(org-html-link--inline-image),
(org-html-table): Prepend ordinal number to caption.
(org-html-link): Make numbered link by counting captioned figures and tables.
2013-06-29 13:58:12 +02:00
Carsten Dominik 91a4c8fb1a Merge branch 'org-column-patch' 2013-06-28 10:51:57 +02:00
Carsten Dominik 7ac34c8a6d Set colview width to fixed just before display.
* lisp/org-colview.el (org-columns-display-here): Enforce fixed width font.
* lisp/org-faces.el (org-column): Setting font width has been shifted
to org-colview.el.

Thanks to Xiao-Yong Jin for this patch.
2013-06-28 09:50:27 +02:00
Achim Gratz 911c5d7093 Merge branch 'maint' 2013-06-27 20:17:55 +02:00
Achim Gratz 30581835bd do not use mapcar* for transposing tables
* lisp/ob-core.el (org-babel-get-rownames),
  lisp/org-table.el (org-table-transpose-table-at-point): Replace the
  inadvertent use of mapcar* (from cl) by plain mapcar and direct cons
  manipulation.

The error was not caught at compilation time since both source files
require cl during compilation for using cl macros.  These were the
only uses of mapcar* in Org, but I didn't check for other cl
_functions_ (as opposed to macros, which would need to be checked if
their implementation uses cl functions).
2013-06-27 20:17:22 +02:00
Bastien Guerry 85edec1886 Merge branch 'maint' 2013-06-27 17:45:35 +02:00
Gustav Wikström edcf9c95eb org-agenda.el (org-agenda-filter-by-category): Display all filtered out categories
* org-agenda.el (org-agenda-filter-by-category): Display all
filtered out categories.

TINYCHANGE
2013-06-27 17:44:50 +02:00
Bastien Guerry 4a704a77ff Merge branch 'maint' 2013-06-27 17:37:50 +02:00
Ilya Zonov b0059198c3 org-mouse: Fix incorrect replacement for checkbox lists
* org-mode: Add correct newtext parameter in `org-mouse-context-menu'
  function for "All Set" and "All Clear" menu items.

TINYCHANGE
2013-06-27 17:37:38 +02:00
Bastien Guerry 370a2bfb4f Merge branch 'maint' 2013-06-27 17:02:50 +02:00
Bastien Guerry be4e4ba989 org-agenda.el (org-agenda-skip-eval): Fix typo in docstring
* org-agenda.el (org-agenda-skip-eval): Fix typo in docstring.
2013-06-27 16:36:29 +02:00
Bastien Guerry eb7c370556 org.el (org-scan-tags): Don't disable `case-fold-search' too early
* org.el (org-scan-tags): Don't disable `case-fold-search' too
early.

Thanks to Nicolas Richard for the patch:
http://mid.gmane.org/87d2rfsvby.fsf%40yahoo.fr
2013-06-27 16:20:05 +02:00
Bastien Guerry eff77aa85e org-capture.el (org-capture-set-target-location): Don't throw an error when `org-time-was-given' is not bound
* org-capture.el (org-capture-set-target-location): Don't
throw an error when `org-time-was-given' is not bound.

Thanks to Eric S Fraga for reporting this.
2013-06-27 15:35:22 +02:00
Nicolas Goaziou b7710ddcbd Merge branch 'maint' 2013-06-26 09:45:10 +02:00
Nicolas Goaziou d7f9f9da56 Revert "ox-odt: Fix internationalization of "Table" and "Listing""
This reverts commit 95b16b1aa5.
2013-06-26 09:44:36 +02:00
Eric Schulte 685b296724 evaluate elisp header args at original call site
* lisp/ob-core.el (org-babel-execute-src-block): Ensure that the
  location is set before anything else is done.
* lisp/ob-ref.el (org-babel-ref-parse): Evaluate Emacs Lisp values in
  header arguments at the location of the original code block.
* testing/lisp/test-ob.el (test-ob/location-of-header-arg-eval): Test
  defending the new header argument evaluation behavior.
2013-06-25 09:59:56 -06:00
Nicolas Goaziou acb00702d5 Merge branch 'maint' 2013-06-25 17:38:43 +02:00
Nicolas Goaziou 838e849bf7 org-element: Fix org-meta-return error at the end of buffer
* lisp/org-element.el (org-element--current-element): Fix
  org-meta-return error at the end of buffer.
* testing/lisp/test-org-element.el: Add test.

Thanks to Nicolas Richard for reporting this.
2013-06-25 17:37:48 +02:00
Nicolas Goaziou ec8f3f987e Merge branch 'maint' 2013-06-25 09:33:39 +02:00
Nicolas Goaziou 95b16b1aa5 ox-odt: Fix internationalization of "Table" and "Listing"
* lisp/ox-odt.el (org-odt-category-map-alist): Fix
  internationalization of "Table" and "Listing".

Bug reported by Georg Lehner.
2013-06-25 09:30:18 +02:00
Nicolas Goaziou a52a35779f ox: Remove useless dictionary entries
* lisp/ox.el (org-export-dictionary): Remove useless dictionary entries.
* lisp/ox-ascii.el (org-ascii--build-caption): Apply removal.
2013-06-25 09:29:18 +02:00
Nicolas Goaziou 42a9473aed ox: Add spanish and german translations
* lisp/ox.el (org-export-dictionary): Add spanish and german
  translations.

Patch suggested by Georg Lehner.
2013-06-25 09:15:24 +02:00
Nicolas Goaziou 41a0f2fa9e ox-odt: Links to headlines are more consistent with other back-ends
* lisp/ox-odt.el (org-odt-link): Fuzzy links to an headline with
  a description always use that description, even if the description
  is the same as the headline title.

Reported by Georg Lehner.
2013-06-25 09:05:46 +02:00
Nicolas Goaziou b4f90c687d ox-odt: Allow to turn smart quotes off
* lisp/ox-odt.el (org-odt-plain-text): Allow to turn smart quotes off.

Patch suggested by Georg Lehner.
2013-06-25 08:35:25 +02:00
Nicolas Goaziou d3ef263895 Merge branch 'maint' 2013-06-24 17:25:23 +02:00
Nicolas Goaziou b4fb00a21a ox-latex: Remove unused function
* lisp/ox-latex.el (org-latex--get-footnote-counter): Remove function.
  This function is not necessary anymore since
  7b8a79326f.
2013-06-24 17:24:42 +02:00
Nicolas Goaziou f3955d5367 org.el: Slight change to filling mechanism
* lisp/org.el (org-setup-filling): Set `paragraph-start' and
  `paragraph-separate'.
(org-fill-paragraph-separate-nobreak-p): Remove function.
(org-mode): Do not set `paragraph-start'.
2013-06-24 08:22:49 +02:00
Achim Gratz 90b168705e ob-core: evaluate header-args[:lang] properties at point of call
* lisp/ob-core.el (org-babel-params-from-properties): Use
  `org-babel-current-src-block-location' for evaluating new-style
  header-argument properties.  Remove superfluous save-match-data
  clauses.  Comment which properties get evaluated where.
2013-06-23 19:35:11 +02:00
Achim Gratz 68276fd62d org.el: implement org-property-re using org-re-property
* lisp/org.el (org-re-property): Re-implement using full regex for
  `org-re-property'.  Add optional argument LITERAL to flag when
  PROPERTY should to be regex-quoted.  Move before definition of
  `org-re-property'.  (org-re-property-keyword): Remove, functionality
  is subsumed by `org-re-property'.  (org-property-re): Define using
  `org-re-property'.  (org-entry-get, org-property-values): Adjust
  match number for PROPVAL.  (org-entry-put): Use `org-re-property'
  instead of `org-re-property-keyword'

This completes the refactoring started in 3c933adaf6.
2013-06-23 19:35:09 +02:00
Eric Schulte 56ac8f8b69 prolog and epilog header arguments
* lisp/ob-gnuplot.el (org-babel-expand-body:gnuplot): Use new header
  arguments.
* lisp/ob-core.el (org-babel-common-header-args-w-values): Mention new
  header arguments.
  (org-babel-expand-body:generic): Use new header arguments.
* doc/org.texi (Specific header arguments): Document new header
  arguments.
2013-06-22 14:09:24 -06:00
rasmus 2d98dd80a4 Let =`latexmk'= be an option to =`org-latex-pdf-process'=.
* ox-latex.el (org-latex-pdf-process): let =`latexmk'= be a
  preconfigured choice and change the wording of the docstring.

TINYCHANGE
2013-06-21 23:52:44 +02:00
Eric Schulte d34813c64a more robust matching of examplized ranges
* lisp/ob-core.el (org-babel-read-result): More robust matching of
  examplized ranges.
  (org-babel-result-end): More robust matching of examplized ranges.
2013-06-21 13:40:38 -06:00
Nicolas Goaziou 70b9b93feb ox-html: Use OPTIONS items instead of keywords for booleans
* lisp/ox-html.el (html): Replace "HTML_HTML5_FANCY",
  "HTML_INCLUDE_STYLE" and "HTML_INCLUDE_SCRIPTS" with, respectively,
  ":html5-fancy", "html-style" and "html-scripts" options.
(org-html-html5-fancy): Reformat docstring.
* doc/org.texi (HTML doctypes): Reflect keyword removal.
(CSS support): Reflect keyword removal.

The reasoning behind this change is that keywords can only store
strings as value.  Therefore, they are not suited for toggles ("nil"
vs nil problem).
2013-06-21 19:17:47 +02:00
Eric Schulte e1f0232f33 gnuplot, close output terminal when opened
* lisp/ob-gnuplot.el (org-babel-expand-body:gnuplot): Gnuplot, close
  output terminal when opened.
2013-06-21 10:06:19 -06:00
Eric Schulte c5cc342e1c smarter gnuplot file extension to terminal mapping
* lisp/ob-gnuplot.el (*org-babel-gnuplot-terms*): Smarter gnuplot file
  extension to terminal mapping.
  (org-babel-expand-body:gnuplot): Smarter gnuplot file extension to
  terminal mapping.
2013-06-21 09:02:12 -06:00
Eric Schulte 7f05b315f5 customization variable prefix gnuplot code blocks
* lisp/ob-gnuplot.el (*org-babel-gnuplot-prefix*): Customization
  variable prefix gnuplot code blocks.
  (org-babel-expand-body:gnuplot): Customization variable prefix gnuplot
  code blocks.
2013-06-21 09:02:12 -06:00
Nicolas Goaziou ab40235826 Merge branch 'maint' 2013-06-20 20:19:55 +02:00
Nicolas Goaziou f9ae004aca ox-html: Fix typo preventing insertion of link up/link home anchors
* lisp/ox-html.el (org-html-template): Fix typo preventing insertion
  of link up/link home anchors.

Thanks to Daniel G. Gerber for noticing it.
2013-06-20 20:18:55 +02:00
Eric Schulte a79fd4be28 fix babel merge params bug from commit 693dda67
The `org-babel-params-from-properties' command was calling
  `org-babel-merge-params', the output of which was then being fed back
  to another call to `org-babel-merge-params'.  The merge params
  function is not designed to allow this form of recursive calling, and
  as a result many variables were being set to empty values.

  The first noticed side effect of this bug was the breakage of the
  org-babel-load-file command, which relies on default header
  arguments (namely :tangle), which were overwritten by the bug above.

  The fix involved having the `org-babel-params-from-properties'
  function return a list of alists, which may then all be handed to the
  top-level merge-params call.

* lisp/ob-core.el (org-babel-params-from-properties): Now returns a list
  of alists and does *not* call `org-babel-merge-params'.
  (org-babel-parse-src-block-match): Handle new list of lists output of
  `org-babel-params-from-properties'.
  (org-babel-parse-inline-src-block-match): Handle new list of lists
  output of `org-babel-params-from-properties'.
* lisp/ob-exp.el (org-babel-exp-src-block): Handle new list of lists
  output of `org-babel-params-from-properties'.
  (org-babel-exp-non-block-elements): Handle new list of lists output of
  `org-babel-params-from-properties'.
* lisp/ob-lob.el (org-babel-lob-execute): Handle new list of lists
  output of `org-babel-params-from-properties'.
2013-06-20 09:53:56 -06:00
Nicolas Goaziou bd987e3804 org: Replace AUTO with appropriate language when previewing snippets
* lisp/org.el (org-create-formula--latex-header): Replace AUTO with
  appropriate language when previewing snippets.
2013-06-19 19:31:06 +02:00
Nicolas Goaziou 4788a58e71 Merge branch 'maint' 2013-06-18 22:48:08 +02:00
Nicolas Goaziou 7b8a79326f ox-latex: Allow hyperref and footnotemark in items description tags
* lisp/ox-latex.el (org-latex-item): Allow hyperref and footnotemark
  in items description tags.  Also remove a unnecessary hack allowing
  footnotemark with an optional argument in the tag.

Initial patch from Rick Frankel.
2013-06-18 22:46:43 +02:00
Nicolas Goaziou 60899b1a2f ox: Fix fuzzy link resolution before first headline
* lisp/ox.el (org-export-resolve-fuzzy-link): Fix link resolution when
  link lives before the first headline.
* testing/lisp/test-ox.el: Add test.
2013-06-18 22:29:49 +02:00
Nicolas Goaziou 5e3c3f93bf Merge branch 'maint' 2013-06-17 17:17:24 +02:00
Nicolas Goaziou dffdc499ea org-element: Fix special block parsing
* lisp/org-element.el (org-element-special-block-parser): Fix typo in
  regexp matching block type.  Also quote the type so it can contain
  special characters.
* testing/lisp/test-org-element.el: Add test.
2013-06-17 17:15:55 +02:00
Nicolas Goaziou 0e354321f5 Merge branch 'maint' 2013-06-16 22:49:56 +02:00
Nicolas Goaziou 0c789fd39e ox-latex: Remove -c argument from compilation with texi2dvi
* lisp/ox-latex.el (org-latex-pdf-process): This argument can cause
  problem with links with a relative path, since compilation happens
  in a different directory.
2013-06-16 22:48:49 +02:00
Nicolas Goaziou 7346dbe79b Merge branch 'maint' 2013-06-14 21:42:42 +02:00
Nicolas Goaziou 4fc03ec1fe ox-latex: Use "ulem" package for both underline and strike through
* lisp/org.el (org-latex-default-packages-alist): Load "ulem" package
  by default.  Use "[normalem]" option to preserve \emph definition.
* lisp/ox-latex.el (org-latex-text-markup-alist): Use "\uline" and
  "\sout" commands from "ulem" package.
2013-06-14 19:46:15 +02:00
Eric Schulte 172061373f list term as a gnuplot header argument
* lisp/ob-gnuplot.el (org-babel-header-args:gnuplot): Term is a gnuplot
  header argument.
2013-06-12 23:44:15 -06:00
rasmus.pank 755251fdad ox-latex: Allow AUTO argument to org-latex-guess-babel-language
* ox-latex.el (org-latex-guess-babel-language): replace AUTO with
  language if AUTO is the option of the LaTeX package Babel.
(org-latex-classes): updated documentation with respect
to `org-latex-guess-babel-language'.

TINYCHANGE
2013-06-12 15:23:21 +02:00
Eric Schulte 1a8ad7dab1 fixed bug in tangle-file
* lisp/ob-tangle.el (org-babel-tangle): Fixed bug in tangle-file.
2013-06-11 11:59:43 -06:00
Bastien Guerry ef98a614f6 org-compat.el: Fix indentation. 2013-06-11 03:17:27 +02:00
Achim Gratz 693dda67e6 ob-core: allow language specific header arguments in properties
* lisp/ob-core.el (org-babel-insert-header-arg,
  org-babel-parse-src-block-match): Replace `if' with empty else part
  by `when' for readability.  (org-babel-params-from-properties):
  Inquire for language specific and default header properties.
  Language specific header properties take precedence over default
  header properties and old-style header property specifications.

This allows for header arguments to be specified as
properties (including inheritance).

#+PROPERTY: header-args :cache "no"
#+PROPERTY: header-args:R :session "*R-property*"

:PROPERTIES:
:header-args:   :cache "yes"
:header-args:R: :session "*R-drawer*"
:END:
2013-06-10 20:53:19 +02:00
Achim Gratz 2e4bcfc50d org-compat: XEmacs actually needs the argument lists...
org-compat (define-obsolete-variable-alias,
define-obsolete-function-alias): Re-introduce argument lists as
XEmacs' byte-compiler otherwise stops compilation.

This means that no other advices must modify these functions with a
different argument list.
2013-06-10 20:47:41 +02:00
Achim Gratz d7eed32784 org-compat: remove argument lists from defadvice, use positional arguments instead
org-compat (custom-handle-keyword, define-obsolete-variable-alias,
define-obsolete-function-alias): Remove argument lists from defadvice
and use positional arguments instead of named arguments.
2013-06-10 20:13:43 +02:00
Achim Gratz 66057bd2a8 org-compat: strip last argument from define-obsolete-{function,variable}-alias for XEmacs
* lisp/org-compat.el (define-obsolete-variable-alias,
  define-obsolete-function-alias): Actually remove the third (and any
  following) argument from the argument list before calling the
  advised function.
2013-06-10 19:45:55 +02:00
Eric Schulte 5c6f4fd130 change file modes once after tangling
* lisp/ob-tangle.el (org-babel-tangle): Collect tangle modes, and only
  apply them to the file after all tangling has completed, including the
  post-tangle-hook.
2013-06-10 09:56:43 -06:00
Nicolas Goaziou 8e9c10ada4 Merge branch 'maint' 2013-06-09 11:30:51 +02:00
Aurélien Aptel 56b864b265 lisp/ox-html.el: Minimal encoding for code and verbatim text
* lisp/ox-html.el: Remove fancy string replacements for code and
verbatim text when exporting to html.

Exporting =--option= or ~--option~ to html used to replace -- with a
ndash.

TINYCHANGE
2013-06-09 11:29:49 +02:00
Nicolas Goaziou efccedbf65 Merge branch 'maint' 2013-06-09 11:14:28 +02:00
Nicolas Goaziou 84de2396c3 ox-latex: Use \ul (from soul package) instead of \underline
* lisp/org.el (org-latex-default-packages-alist): Document need for
  "soul" package.
* lisp/ox-latex.el (org-latex-text-markup-alist): Use \ul (from "soul"
  package) instead of \underline for underline text.
2013-06-09 11:11:13 +02:00
Eric Schulte 04a1b98e5e do not read #-prefix header-arg value as emacs lisp
* lisp/ob-core.el (org-babel-read): Do not read #-prefix header-arg
  value as emacs lisp.
2013-06-08 15:13:52 -06:00
Achim Gratz 8d3e672b38 ob-fortran: declare org-every
* lisp/ob-fortran.el (org-every): Declare.
2013-06-08 21:45:38 +02:00
Achim Gratz 3c933adaf6 org.el: improve org-property-re and use it throughout
* lisp/org.el (org-property-re): Improve definition so that this regex
  can be used in all situations.  Extend docstring with explanation of
  matching groups.
  (org-at-property-p): Implement using `org-element-at-point'.
  (org-entry-properties, org-buffer-property-keys, org-indent-line):
  Use `org-property-re' and adjust match group numbers accordingly.

* lisp/org-element.el (org-element-node-property-parser): Use
  `org-property-re' and adjust match group numbers accordingly.  Move
  `looking-at' out of the let clause to not rely on the unspecified
  evaluation order inside the let.
2013-06-08 21:38:24 +02:00
Eric Schulte c3711b14d6 org-babel-current-exec-src-block-head -> org-babel-current-src-block-location
* lisp/ob-core.el (org-babel-current-src-block-location): Rename
  org-babel-current-exec-src-block-head to
  org-babel-current-src-block-location.
(org-babel-execute-src-block): Rename
  org-babel-current-exec-src-block-head to
  org-babel-current-src-block-location.
* lisp/ob-exp.el (org-babel-exp-results): Rename
  org-babel-current-exec-src-block-head to
  org-babel-current-src-block-location.
* lisp/ob-lob.el (org-babel-lob-execute): Rename
  org-babel-current-exec-src-block-head to
  org-babel-current-src-block-location.
2013-06-08 13:19:38 -06:00
Eric Schulte 2a73e06a6d adding a new global tangle-mode header argument
* doc/org.texi (Top): Documentation for new tangle-mode header argument.
  (Specific header arguments): Documentation for new tangle-mode header
  argument.
  (rownames): Documentation for new tangle-mode header argument.
  (tangle-mode): Documentation for new tangle-mode header argument.

* lisp/ob-core.el (org-babel-common-header-args-w-values): Adding the
  new :tangle-mode header argument.
  (org-babel-read): Read values starting with a "#" character as emacs
  lisp.

* lisp/ob-tangle.el (org-babel-tangle): Use the new :tangle-mode header
  argument.

* lisp/org-pcomplete.el (pcomplete/org-mode/block-option/src): Use the
  new :tangle-mode header argument.
2013-06-08 12:29:02 -06:00
Eric Schulte 805d1e63d6 save code block location during export
* lisp/ob-exp.el (org-babel-exp-results): Save the code block location
  into `org-babel-current-exec-src-block-head' during export.
2013-06-08 12:00:53 -06:00
Vitalie Spinu 6043de578f avoid file warnings in org-babel-post-tangle-hook
* lisp/ob-tangle.el (org-babel-find-file-noselect-refresh): call
  find-file-noselect with 'nowarn argument to surpress yes-or-no-p
  reversion message.
2013-06-07 07:23:16 -06:00
Eric Schulte 85800d06bb more robust edebug spec
* lisp/ob-comint.el (org-babel-comint-with-output): More robust edebug
  spec.
2013-06-06 12:29:37 -06:00
Rüdiger Sonderfeld cdfcc064d2 ob-C: Add list support.
* lisp/ob-C.el (org-babel-C-var-to-C): Add list support
(org-babel-C-val-to-C-list-type, org-babel-C-val-to-C-type,
org-babel-C-format-val): New functions.
(org-babel-C-ensure-main-wrap, org-babel-execute:C,
org-babel-execute:C++, rg-babel-execute:cpp, org-babel-C++-compiler,
org-babel-C-compiler): Improve docstring.
* testing/examples/ob-C-test.org (string_var): Add required std::
(Array): Add missing ID.
(Matrix): Add tests for list support.
* testing/lisp/test-ob-C.el (ob-C/table): Test succeeds.
(ob-C/list-var, ob-C/vector-var, ob-C/list-list-var): Add tests for
list support.

Signed-off-by: Rüdiger Sonderfeld <ruediger@c-plusplus.de>
2013-06-06 12:06:26 -06:00
Eric Schulte 5dc5143578 inline sets org-babel-current-exec-src-block-head
* lisp/ob-lob.el (org-babel-lob-execute): Set the
  org-babel-current-exec-src-block-head variable when executing inline
  or lob style code.
2013-06-06 10:59:27 -06:00
Eric Schulte d6a9f1aa29 org-babel-current-exec-src-block-head -> outermost
* lisp/ob-core.el (org-babel-execute-src-block): The
  org-babel-current-exec-src-block-head variable should point to the
  outermost code block.
2013-06-06 10:58:52 -06:00
Eric Schulte 52b91acc59 if we have org-every we should have org-some
* lisp/org.el (org-some): An org-mode version of the cl some function.
2013-06-06 10:19:23 -06:00
Eric Schulte 0508d22bac more careful check if values are matrices
* lisp/ob-fortran.el (org-babel-fortran-var-to-fortran): More careful
  check if values are matrices.
2013-06-06 10:16:01 -06:00
Eric Schulte 29e2853870 an Org-mode version of the cl every function
* lisp/org.el (org-every): An Org-mode version of the cl every function.
2013-06-06 10:15:43 -06:00
Vitalie Spinu f301bbcc86 make src block location available to execution backends
* lisp/ob-core.el (org-babel-where-is-src-block-head): return
  point-marker instead of point.

  (org-babel-current-exec-src-block-head): new global variable which is
  bound during `org-babel-execute-src-block-maybe'

  (org-babel-get-src-block-info): return a list of 7 elements, last
  being the header location

Evaluation backends might need to use the exact location of the block in
original org file. For example when inserting the correct source
references for visual debugging. With this patch the information on
current block is available in `org-babel-current-exec-src-block-head'.
2013-06-06 09:13:58 -06:00
Eric Schulte bceb151b7e `org-src-switch-to-buffer' to jump from src to org
* lisp/ob-tangle.el (org-babel-tangle-jump-to-org): Use
  `org-src-switch-to-buffer' to jump from src to org.
2013-06-06 09:11:54 -06:00
Rüdiger Sonderfeld cb630137d5 org-entities: Add support for hbar.
* lisp/org-entities.el (org-entities): Add support for hbar.

Signed-off-by: Rüdiger Sonderfeld <ruediger@c-plusplus.de>
2013-06-05 17:48:45 +02:00
Grégoire Jadi e84299ea6c org.el (org-reftex-citation): Fix a docstring
* lisp/org.el (org-reftex-citation): Fix contrib package name in the
docstring.

Thanks to ruediger on #org-mode for reporting this.
2013-06-05 17:27:27 +02:00
Nicolas Goaziou 221768a768 Merge branch 'maint' 2013-06-05 14:24:58 +02:00
Nicolas Goaziou 4b7006f444 ox: Fix "Wrong argument type" error when attributes start with :key ""
* lisp/ox.el (org-export-read-attribute): Fix "Wrong argument type"
  error when attributes start with :key "".
2013-06-05 14:24:18 +02:00
Litvinov Sergey d7e884d86c Add a matrix input to ob-fortran.el
* lisp/ob-fortran.el: add a branch which handles nested lists
* testing/examples/ob-fortran-test.org: add a test for matrix input
* testing/lisp/test-ob-fortran.el: add a test for matrix input
2013-06-03 22:56:23 -06:00
Nicolas Goaziou 3345817048 Merge branch 'maint' 2013-06-02 10:02:27 +02:00
Nicolas Goaziou 53784ef861 org.el: Fix some docstrings
* lisp/org.el (org-fill-paragraph-separate-nobreak-p,
  org-fill-line-break-nobreak-p,
  org-fill-paragraph-with-timestamp-nobreak-p): Fix docstrings.
2013-06-02 10:01:10 +02:00
Nicolas Goaziou d8b983b85a org-element: Fix failing "plain-list-parser" test
* lisp/org-element.el (org-element--list-struct): Fix failing
  "plain-list-parser" test.
* testing/lisp/test-org-element.el: Update test.
2013-06-01 21:38:15 +02:00
Nicolas Goaziou 45565503dc ox-latex: Extend :float attribute to source blocks and normalize its values
* lisp/ox-latex.el (org-latex-src-block): Handle :float attribute. Its
  value can be set to "t", "multicolumn" or "nil".  Also
  remove :long-listing attribute, which is now replaced with :float
  nil.
(org-latex--org-table): Replace :float table with :float t.
(org-latex--inline-image): Replace :float figure with :float t.
(org-latex-long-listings): Remove variable.
* doc/org.texi (@LaTeX{} specific attributes): Document new :float values.
2013-06-01 15:15:02 +02:00
Achim Gratz d36a933c65 Compatibility: fix XEmacs compilation failures
* lisp/ob-eval.el, lisp/ob.el, lisp/org-macro.el, lisp/org-mhe.el:
  Require org-macs and org-compat as necessary.
* lisp/ob-tangle.el: Declare function `org-store-link' and
  `org-open-link-from-string'.
* lisp/org-compat.el: Extend eval-and-compile clause and add advices
  for functions that have different parameter lists in XEmacs. Add
  variable definitions that XEmacs lacks .
* lisp/org-macs.el (declare-function): Define macro to use autoload
  instead for XEmacs.
* lisp/ox-html.el, lisp/ox-odt.el: XEmacs does not have table.el, so
  use 'noerror on the require form.
* lisp/ox-texinfo.el (org-texinfo-table-column-widths): Fix spliced
  argument list that XEmacs complains about by adding parenthesis.

This fixes all compilation failures on XEmacs and warnings related to
Org that indicate that XEmacs has compiled things wrongly (for
instance it might have interpreted a function as a variable symbol).
There are still many warnings that probably indicate serious problems.
2013-06-01 11:31:07 +02:00
Achim Gratz 0e42f1aae1 ob-tangle: declare org-edit-special
* lisp/ob-tangle.el (org-edit-special): Declare function.

Fixes a byte-compiler warning introduced in d9cfec3040.
2013-06-01 11:31:07 +02:00
Carsten Dominik 24d3fbacaa Turn flyspell off in src blocks.
* lisp/org.el (org-mode-flyspell-verify): Check for src block.

Based on a patch by Trevor Murphy.
2013-06-01 08:34:29 +02:00
Carsten Dominik 29797e921d Fix `interactive' statement in `org-table-convert-region'
* lisp/org-table.el (org-table-convert-region): Fix interactive statement.
2013-06-01 07:46:08 +02:00
Nicolas Goaziou ca99372d83 org-element: Use internal version of `org-list-struct'
* lisp/org-element.el (org-element--list-struct): New function.
(org-element-plain-list-parser, org-element--current-element): Use new
function.

This patch removes dependency on org-list.el to parsing lists. For
now, it leads to code duplication, but, ultimately (i.e., when parsing
will be faster), org-list.el will delegate the parsing job to
org-element. The new implementation is also faster than the previous one.
2013-05-31 20:14:02 +02:00
Eric Schulte d9cfec3040 jump back to the correct point in the code block
* lisp/ob-tangle.el (org-babel-tangle-jump-to-org): Use the existing
  org-edit-src functionality to jump back to the correct point in the
  code block in the original Org-mode buffer.
2013-05-30 18:03:33 -04:00
Nicolas Goaziou 94c48111c9 Merge branch 'maint'
Conflicts:
	lisp/ox-html.el
2013-05-30 21:51:00 +02:00
Nicolas Goaziou 0f2ba793aa Fix commit 0018428c25
* contrib/lisp/ox-groff.el (org-groff-compile): Use appropriate
  argument.
* lisp/ox-man.el (org-man-compile): Use appropriate argument.
* lisp/ox-texinfo.el (org-texinfo-compile): Use appropriate argument.
2013-05-30 21:48:48 +02:00
Kodi Arfer f3ba879079 ox-html: Fix handling of time-stamp-file
* lisp/ox-html.el (org-html--build-meta-info): Insert no timestamp
  when :time-stamp-file is nil.

TINYCHANGE
2013-05-30 21:41:27 +02:00
Kodi Arfer d574bf522d ox-html: Fix handling of time-stamp-file
* lisp/ox-html.el (org-html--build-meta-info): Insert no timestamp
  when :time-stamp-file is nil.

TINYCHANGE
2013-05-30 21:38:34 +02:00
Nicolas Goaziou de0fcdf3b8 Merge branch 'maint' 2013-05-30 20:33:24 +02:00
Nicolas Goaziou 0018428c25 export back-ends: Fix subtree export with a relative path
* lisp/ox-latex.el (org-latex-compile): Properly set working
  directory.
* lisp/ox-man.el (org-man-compile): Properly set working directory.
* lisp/ox-texinfo.el (org-texinfo-compile): Properly set working
  directory.
* contrib/lisp/ox-groff.el (org-groff-compile): Properly set working
  directory.
2013-05-30 20:30:14 +02:00
Nicolas Goaziou 9cc1718dc7 Revert "export backends: Fix "PDF file ... wasn't produced" error with relative paths"
This reverts commit 752a4eb49d.
2013-05-30 20:30:08 +02:00
Sebastien Vauban d4d865db5c ox-latex: Fix `listings' language for `latex' code blocks
* ox-latex.el (org-latex-listings-langs): Update custom variable.
2013-05-30 15:29:00 +02:00
Nicolas Goaziou 4b0f0fdecf Merge branch 'maint' 2013-05-30 15:19:03 +02:00
Nicolas Goaziou 8b431a8021 ob-exp: Tiny cleanup related to 87ab99
* lisp/ob-exp.el (org-babel-exp-process-buffer): Tiny cleanup related
  to 87ab99f563.
2013-05-30 15:18:17 +02:00
Nicolas Goaziou 6a788618e3 Merge branch 'maint'
Conflicts:
	contrib/lisp/ox-deck.el
2013-05-30 14:33:47 +02:00
Nicolas Goaziou 752a4eb49d export backends: Fix "PDF file ... wasn't produced" error with relative paths
* lisp/ox-latex.el (org-latex-compile): Make sure generated file can
  be found by `file-exists-p'.
* contrib/lisp/ox-groff.el (org-groff-compile): Make sure generated
  file can be found by `file-exists-p'.
* lisp/ox-man.el (org-man-compile): Make sure generated file can be
  found by `file-exists-p'.
* lisp/ox-texinfo.el (org-texinfo-compile): Make sure generated file
  can be found by `file-exists-p'.
2013-05-30 14:28:59 +02:00
Rick Frankel 9d22167c68 Refactor fetching html doctype from alist into function so it can be reused in inherited exporters.
* lisp/ox-html.el (org-html-doctype): Add new function `org-html-doctype'.
(org-html-template): Use `org-html-doctype' function instead of inline
code.

* contrib/lisp/ox-deck.el (org-deck-template): Use `org-html-doctype'
  function instead of inline code.

* contrib/lisp/ox-s5.el (org-s5-template): Use `org-html-doctype'
  function instead of inline code.
2013-05-29 15:23:04 -04:00
Nicolas Goaziou 60ca9e782b Merge branch 'maint' 2013-05-28 10:49:44 +02:00
Nicolas Goaziou d3f9b1cb7b ox-md: Fix error when exporting underline objects
* lisp/ox-md.el (md): Delegate underscore transcoding to HTML
  back-end.
2013-05-28 10:48:08 +02:00
Christopher Schmidt 8a3e48bd21 org.el (orgstruct-setup): Bind all intermediate key translations.
* org.el (orgstruct-setup): Bind all intermediate key
translations.
2013-05-26 17:31:49 +02:00
Nicolas Goaziou 847637f4bd Merge branch 'maint' 2013-05-25 22:03:48 +02:00
Nicolas Goaziou 206762bd34 org-element: Small optimization
* lisp/org-element.el (org-element--remove-indentation): Small
  optimization.
2013-05-25 22:02:26 +02:00
Nicolas Goaziou 43cc5beca2 Merge branch 'maint' 2013-05-25 17:08:57 +02:00
Nicolas Goaziou 10169054eb org-element: Fix a docstring
* lisp/org-element.el (org-element--remove-indentation): Fix
  docstring.
2013-05-25 17:08:01 +02:00
Nicolas Goaziou d3eaa6abb6 Merge branch 'maint' 2013-05-25 14:37:01 +02:00
Nicolas Goaziou 87ab99f563 org-element/ox: Fix src-block indentation when it should be preserved
* lisp/org-element.el (org-element--remove-indentation): New function.
(org-element-example-block-parser, org-element-src-block-parser): Use
new function.
(org-element-src-block-interpreter): Update function according to
change.
* lisp/ox.el (org-export-unravel-code): Do not remove any indentation
  since it now happens at the parser level.
* testing/lisp/test-org-element.el: Add tests.
* testing/lisp/test-ox.el: Refactor tests.
2013-05-25 14:35:24 +02:00
Eric Schulte 06cdb2d228 respect org-html-table-caption-above 2013-05-21 14:30:12 -06:00
Bastien Guerry f1b99adbaf Merge branch 'maint' 2013-05-21 12:40:52 +02:00
Bastien Guerry 030e968982 Fix previous commit 2013-05-21 12:37:05 +02:00
Bastien Guerry 9eb5fd5dc0 org-clock.el (org-clock-modify-effort-estimate): Clarify docstring
* org-clock.el (org-clock-modify-effort-estimate): Clarify
docstring.

Thanks to Ken Mankoff for raising this.
2013-05-21 12:33:36 +02:00
Rasmus bb9233ef8a ox-latex.el: Support for pgf files
* ox-latex.el (org-latex--inline-image): pgf is recognized as an
inline image and treated the same way tikz files.

Python matplotlib and pgfprint for Octave generates pgf plots
rather than TiKZ plots.  They need just be included via \input{.}.

TINYCHANGE
2013-05-21 08:20:36 +02:00
Nicolas Goaziou 419b69a435 Merge branch 'maint' 2013-05-20 11:34:59 +02:00
Nicolas Goaziou 4daf9d60d9 ox: Small fix to cell width caching mechanism
* lisp/ox.el (org-export-table-cell-width): Be sure to use cache even
  when stored value is nil.
2013-05-20 11:33:11 +02:00
Achim Gratz 885d1d6786 ob-octave: Emacs 24.4 will ditch octave-inf in favor for octave
* lisp/ob-octave.el (org-babel-octave-initiate-session): If octave-inf
  can't be loaded, try octave instead before giving up.  Emacs 24.3.50
  and upwards replaces octave-inf with just plain octave.
2013-05-19 21:08:00 +02:00
Achim Gratz 66316436dd org-id: autoload `org-id-update-id-locations'
* lisp/org-id.el (org-id-update-id-locations): Autoload interactive
  function.
2013-05-19 21:07:55 +02:00
Achim Gratz 3768cec391 Babel: complete fix for priority order of header arguments from e79e8943de
* lisp/ob-core.el (org-babel-parse-inline-src-block-match),
  lisp/ob-exp.el (org-babel-exp-src-block): Give header arguments from
  properties priority over default header arguments.

The previous commit e79e8943de did fix this only in
ob-core.el (org-babel-parse-src-block-match).  It was already correct
in ob-lob.el (org-babel-lob-execute).
2013-05-19 21:06:53 +02:00
Nicolas Goaziou a5872b9eca Merge branch 'maint' 2013-05-19 09:54:18 +02:00
Nicolas Goaziou aafb2d2b46 ox: Fix "Symbol's value as variable is void: org-export--default-title"
* lisp/ox.el (org-export--default-title): Fix "Symbol's value as
  variable is void: org-export--default-title".

Bug was introduced in b70e77343a.
2013-05-19 09:52:57 +02:00
Nicolas Goaziou 63531fb2cc Merge branch 'maint' 2013-05-18 18:26:56 +02:00
Nicolas Goaziou c22f5f632b ox-ascii: Improve speed wrt table export
* lisp/ox-ascii.el (org-ascii--table-cell-width): Cache results of
  this internal function since it is called at each cell, though its
  value only change column wise.
2013-05-18 18:22:15 +02:00
Nicolas Goaziou 62296ceb88 ox: Improve speed wrt table export
* lisp/ox.el (org-export-resolve-fuzzy-link): Change property name
  holding cache.
(org-export-table-has-header-p, org-export-table-row-group,
org-export-table-cell-width, org-export-table-cell-alignment): Cache
results.
(org-export-table-cell-address): Refactor.
(org-export-get-parent): Inline function.
* testing/lisp/test-ox.el: Update tests.
2013-05-18 18:20:46 +02:00
Eric Schulte 0194fd0cdc only wrap gnuplot data values in " when necessary
* lisp/ob-gnuplot.el (org-babel-gnuplot-quote-tsv-field): Only wrap
  gnuplot data values in " when necessary.
2013-05-17 14:36:10 -06:00
Eric Schulte aae20884c1 replace missing values with blank space in gnuplot
* lisp/ob-gnuplot.el (org-babel-gnuplot-quote-tsv-field): Replace
  missing values with blank space in gnuplot.
2013-05-17 08:57:20 -06:00
Eric Schulte 6630b116e6 indentation <80 char lines
* lisp/ob-gnuplot.el (org-babel-expand-body:gnuplot): Indentation <80
  char lines.
  (org-babel-gnuplot-quote-timestamp-field): Indentation <80 char lines.
2013-05-17 08:51:35 -06:00