Commit Graph

9324 Commits

Author SHA1 Message Date
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
Eric Schulte 6e417dd2f5 improved gnuplot handling of special header args
Both declare them, and then actually retrieve them from the params
  association list (which is not a p list).

* lisp/ob-gnuplot.el (org-babel-header-args:gnuplot): Declare them.
  (org-babel-expand-body:gnuplot): Params is an alist not a plist.
2013-05-17 08:51:35 -06:00
Eric Schulte 1f42ea516a added :missing values header argument to gnuplot
* lisp/ob-gnuplot.el (org-babel-header-args:gnuplot): Declare
  gnuplot-specific header argument.
  (*org-babel-gnuplot-missing*): Dynamic variable used to hold the value
  of the missing header argument.
  (org-babel-gnuplot-process-vars): Wrap in local binding for missing
  value.
  (org-babel-gnuplot-quote-tsv-field): Replace missing value with the
  missing header argument value when present.
2013-05-17 08:51:35 -06:00
Bastien Guerry 3ce5b3bb22 Merge branch 'maint' 2013-05-16 17:07:32 +02:00
Bastien Guerry 37d526e06e Fix commit b83c03 2013-05-16 17:07:21 +02:00
Bastien Guerry ab3f45cece Merge branch 'maint' 2013-05-16 10:33:42 +02:00
Bastien Guerry b83c0309a7 Fix handling of setup file wrt setting tags
* org.el (org-set-regexps-and-options-for-tags): Return a list
with tag-related variables.
(org-set-regexps-and-options): Append tags from a setup file
to the local tags of the file.
(org-agenda-prepare-buffers): Set tags from a setup file by
calling `org-set-regexps-and-options' when necessary.

Thanks to Anupam Sengupta for reporting this.
2013-05-16 10:33:32 +02:00
Nicolas Goaziou 15baadd8af Merge branch 'maint' 2013-05-15 21:20:29 +02:00
Nicolas Goaziou b70e77343a Fix options bug introduced in 16f12e
* lisp/ox.el (org-export-options-alist): Change default value
  for :title property.
(org-export--default-title): New dynamically scoped variable.
(org-export-store-default-title): New function.
(org-export--get-buffer-attributes): Remove title handling.
(org-export--get-global-options): Revert "ox: Fix default
title" (16f12e0aef).  Refactor code.
* testing/lisp/test-ox.el: Update a test.
2013-05-15 21:19:28 +02:00
Bastien Guerry 8b15ff9d07 Merge branch 'maint' 2013-05-15 16:31:54 +02:00
Bastien Guerry c5abc7e0ba org.el (org-set-regexps-and-options): Fix regexps
* org.el (org-set-regexps-and-options): Fix
`org-deadline-time-hour-regexp' and
`org-scheduled-time-hour-regexp'.

Thanks to Nick Daly for reporting this.
2013-05-15 16:28:30 +02:00
Bastien Guerry 0c31a4fcb6 org-table.el: Rename a variable and a function
* org-table.el (org-table-TBLFM-begin-regexp): Rename from
`org-TBLFM-begin-regexp'.
(org-table-calc-current-TBLFM): Rename from
`org-calc-current-TBLFM'.

* org.el (org-ctrl-c-ctrl-c): Require org-table if needed.
2013-05-15 16:18:37 +02:00
Nicolas Goaziou 1f7b310142 Merge branch 'maint' 2013-05-14 19:01:20 +02:00
Nicolas Goaziou f371e5da0d ox-html: Fix org-export-string-as when org-html-with-latex is dvipng
* lisp/ox-html.el (org-html-format-latex): Provide a prefix for
  temporary file when using dvipng, even if the current buffer isn't
  associated to a file.
2013-05-14 18:59:05 +02:00
Bastien Guerry ad1e98a23c Merge branch 'maint' 2013-05-14 16:07:38 +02:00
Bastien Guerry 2ae3e91076 org.el (org-refresh-properties): Put the text property on the whole subtree, not just on the headline
* org.el (org-refresh-properties): Put the text property on
the whole subtree, not just on the headline.

Thanks to Ivan Kanis for reporting this and to Miguel Ruiz for confirming
the bug.
2013-05-14 16:07:21 +02:00
Achim Gratz 86fab4ce35 Merge branch 'maint' 2013-05-14 08:40:20 +02:00
Achim Gratz bc1e3e18c9 ob-sh: detect tables correctly
* lisp/ob-sh.el (org-babel-sh-var-to-sh): When detecting a table, the
  first line could be the symbol `hline' rather than a list of table
  cells, so check for that as well.

Thanks to Paul Stansell for pointing out the error.
2013-05-14 08:37:23 +02:00
Achim Gratz 646f1ac426 org-table: several cleanups
* lisp/org.el (org-table-clean-did-remove-column),
  lisp/org-table.el (org-table-clean-did-remove-column): Move defvar,
  this dynamic variable is only used in org-table.
* lisp/org-table.el (org-table-colgroup-info): Remove unused defvar
  for `org-table-colgroup-info'.
  (org-table-clean-before-export): Let-bind regular expression strings
  and remove unused matching group.  Use
  `org-table-clean-did-remove-column' in cond statement rather than
  branching via if to avoid code duplication.  Remove the code
  associated with the removed `org-table-colgroup-info'.
  (orgtbl-export): Remove unused internal function.
2013-05-12 21:10:19 +02:00
Nicolas Goaziou 7dc2babf29 Merge branch 'maint' 2013-05-12 20:45:01 +02:00
Nicolas Goaziou 48e51fe5d9 ox: Ignore whitespace differences when resolving a radio link
* lisp/ox.el (org-export-resolve-radio-link): Ignore whitespace
  differences when resolving a radio link.
* testing/lisp/test-ox.el: Add test.
2013-05-12 20:42:30 +02:00
Nicolas Goaziou d542097aa3 Merge branch 'maint' 2013-05-12 17:56:14 +02:00
Nicolas Goaziou e7cd6f1875 ox: Fix radio target resolution
* lisp/ox.el (org-export-resolve-radio-link): Fix radio target
  resolution.
* testing/lisp/test-ox.el: Add test.
2013-05-12 17:54:56 +02:00
Nicolas Goaziou a09d968d30 Merge branch 'maint' 2013-05-12 17:16:41 +02:00
Nicolas Goaziou 7d37898371 org-element: Be stricter when matching arguments in LaTeX environments
* lisp/org-element.el (org-element--current-element): Be stricter when
  matching arguments in LaTeX environments.  In particular, do not
  allow anything else than options and arguments in the opening line.
* testing/lisp/test-org-element.el: Add tests.
2013-05-12 17:15:06 +02:00
Christopher Schmidt 0ea11e26e4 org.el: Make orgstruct++-mode overwrite local non-org vars again.
* org.el (orgstruct++-mode): Overwrite local non-org vars again.
2013-05-12 16:54:36 +02:00
Nicolas Goaziou 38de30ad8e Merge branch 'maint' 2013-05-12 14:39:09 +02:00
Nicolas Goaziou a8d0e76b7d ox-html: Remove code relative to bibliography
* lisp/ox-html.el (org-html-inner-template): Remove code relative to
  bibliography.
(org-html-bibliography): Remove function.

Bibliography is handled by the contrib/ package "ox-bibtex.el".
2013-05-12 14:38:10 +02:00
Nicolas Goaziou 824e95540d Merge branch 'maint' 2013-05-12 09:57:42 +02:00
Nicolas Goaziou bffc94c0b1 ox-latex: Fix regular caret protection
* lisp/ox-latex.el (org-latex-plain-text): Protect ^ char with \^{},
  not only \^, so it doesn't become a diacritic.
2013-05-12 09:56:26 +02:00
Carsten Dominik ea98942eec Avoid using `case' in default value of defcustom
* lisp/org-ctags.el (org-ctags-path-to-ctags): Avoid usine `case'.
2013-05-12 06:08:09 +02:00
Carsten Dominik 4e0fad540f Fix point adjustment after beginning/end of line commands
* lisp/org.el (org-beginning-of-line,org-end-of-line): Set
  disable-point-adjustment when the command ends next to invisible
  text.
2013-05-10 08:59:07 +02:00
Carsten Dominik b3a88babf1 Merge branch 'fix-types' 2013-05-09 15:24:43 +02:00
Carsten Dominik a84c01642b Fix customization types of variables
* contrib/lisp/org-wl.el (org-wl-namazu-default-index): Fix custom type.
* lisp/ob-lob.el (org-babel-lob-files): Fix custom type.
* lisp/org-agenda.el (org-agenda-export-html-style):
(org-agenda-ndays):
(org-agenda-inactive-leader):
(org-agenda-day-face-function):
(org-agenda-auto-exclude-function): Fix custom type.
* lisp/org-bibtex.el (org-bibtex-prefix): Fix custom type.
* lisp/org-clock.el (org-clock-heading-function):
(org-show-notification-handler): Fix custom type.
* lisp/org-footnote.el (org-footnote-auto-adjust): Fix custom type.
* lisp/org-protocol.el (org-protocol-default-template-key): Fix custom type.
* lisp/org.el (org-make-link-description-function):
(org-link-translation-function):
(org-link-frame-setup):
(org-refile-target-verify-function):
(org-get-priority-function):
(org-use-fast-tag-selection):
(org-columns-modify-value-for-display-function):
(org-sparse-tree-default-date-type): Fix custom type.
* lisp/ox-html.el (org-html-postamble):
(org-html-postamble-format):
(org-html-preamble-format): Fix custom type.
* lisp/ox-odt.el (org-odt-content-template-file): Fix custom type.
* lisp/ox.el (org-export-with-archived-trees):
(org-export-initial-scope): Fix custom type.

Thanks to Glenn Moris for reporting these.  He used cus-test.el
to find them.
2013-05-09 15:19:02 +02:00
Nicolas Goaziou ce59889673 ox-html: Fix code typo
* lisp/ox-html.el (org-html--build-meta-info): Fix code typo.
2013-05-09 08:26:38 +02:00
Nicolas Goaziou 800ea286c4 Merge branch 'maint' 2013-05-08 18:20:08 +02:00
Nicolas Goaziou 7e4c7edb8a ox: Small refactoring
* lisp/ox.el (org-export-expand-include-keyword): Avoid using `read'
  to determine file name.
2013-05-08 18:13:06 +02:00
Nicolas Goaziou 77368d13fa Merge branch 'maint' 2013-05-08 16:01:45 +02:00
Nicolas Goaziou 16f12e0aef ox: Fix default title
* lisp/ox.el (org-export--get-global-options): Properly set default
  title, i.e. when to TITLE keyword is provided.
* testing/lisp/test-ox.el: Add tests.
2013-05-08 16:00:18 +02:00
Nicolas Goaziou 5a14001b5e Merge branch 'maint' 2013-05-08 10:11:07 +02:00
Nicolas Goaziou be794a2a30 org-element: Fix visible-only parsing
* lisp/org-element.el (org-element--parse-elements): Also parse
  visible headlines within an otherwise compacted headline.
* testing/lisp/test-org-element.el: Add test.
2013-05-08 10:10:29 +02:00
Lawrence Mitchell 69dabd48bc ox-html: Ensure space between tag and attribute when closing tags
* lisp/ox-html.el (org-html-close-tag): Add space before attr.

We might get an attribute to a tag with no space at its start.  Rather
than auditing all callers, unconditionally separate the tag from its
attributes with a space when closing the tag.
2013-05-07 22:04:53 +02:00
Nicolas Goaziou 29ab1bb74e Merge branch 'maint' 2013-05-07 17:49:01 +02:00
Nicolas Goaziou bd27a005bb ox: Tolerate included file names without double quotes
* lisp/ox.el (org-export-expand-include-keyword): Tolerate included
  file names without double quotes.
2013-05-07 17:47:59 +02:00
Bastien Guerry eceb2ff7d1 Merge branch 'maint' 2013-05-07 15:11:59 +02:00
Bastien Guerry 0df6bcdf2a org.el (org-get-outline-path): Remove statistical and checkboxes cookies
* org.el (org-get-outline-path): Remove statistical and
checkboxes cookies.

Thanks to Marcel van der Boom for reporting this.
2013-05-07 15:11:47 +02:00
Alan Schmitt 706a546fcf Babel ocaml: fix bug where the first exported result would end up in the ocaml
buffer

* lisp/ob-ocaml.el (org-babel-prep-session:ocaml): use `save-window-excursion'
around the code starting the tuareg process.
2013-05-07 14:15:33 +02:00
Max Mikhanosha 0f5cbc1019 Add option to always show DONE days as green on consistency graph. It can be enabled by setting `org-habit-show-done-alwyays-green' variable to t.
* lisp/org-habit.el (org-habit-get-faces): Add show done days green option.
2013-05-07 12:30:15 +02:00
Alan Schmitt 6871bdc8e7 Babel ocaml: allow ocaml code to run during asynchronous export
* lisp/ob-ocaml.el: Add a custom variable `org-babel-ocaml-command' to specify
the name of the toplevel to run.
(org-babel-prep-session:ocaml): Directly call `tuareg-run-process-if-needed'
with `org-babel-ocaml-command' as argument.
2013-05-07 09:55:15 +02:00
Alan Schmitt 69464bf135 Babel ocaml: Fix the interaction with the toplevel
* lisp/ob-ocaml.el (org-babel-execute:ocaml): Always append ";;" at the end of
the expression before sending it to the toplevel.
(org-babel-execute:ocaml): Do not remove the type information if "verbatim" is a
results parameter of the code block.
(org-babel-ocaml-parse-output): Make sure the complete type is taken into
account when matching against known types.
2013-05-07 09:55:14 +02:00
Sebastien Vauban e79e8943de Fix priority order for inheriting header arguments
* ob-core.el (org-babel-parse-src-block-match): Fix order of list of header
arguments.
2013-05-06 16:32:22 -04:00
Eric Schulte 30c0ceb8ec allow insertion of non-strings into Org code blocks
* lisp/ob-org.el (org-babel-expand-body:org): Allow insertion of
  non-strings into Org code blocks.
2013-05-06 16:31:53 -04:00
Christopher Schmidt 741bc5c645 org.el: Execute org-insert-heading and org-insert-heading-respect-content in
orgstruct++-mode when the context around point is an item-body.

* org.el (orgstruct-make-binding): Execute org-insert-heading
and org-insert-heading-respect-content when the context around
point is an item-body.
2013-05-06 18:25:00 +02:00
Eric Abrahamsen 9bc55c7d00 Export to various flavors of (X)HTML
* lisp/ox-html.el: (org-html-doctype-alist): New variable holding an
alist of (X)HTML doctypes
(org-html-xhtml-p): New function
(org-html-html5-p): New function
(org-html-close-tag): New function
(org-html-html5-fancy): New export option, determining whether or not to
use HTML5-specific elements.
(org-html-html5-elements): New variable, new HTML5 elements.
(org-html-special-block): Export special blocks to new HTML5 elements.
(org-html-format-inline-image): Use <figure> and <figcaption> for
standalone images.
(org-html-format-inline-image,org-html--build-meta-info)
(org-html--build-head,org-html--build-pre/postable,org-html-template)
(org-html-horizontal-rule,org-html-format-list-item)
(org-html-line-break,org-html-table,`org-html-verse-block): Changes to
allow flavored export.

* doc/org.texi: Document export to (X)HTML flavors.
2013-05-06 09:47:05 +02:00
Michael Brand 9998f2c897 Escape double quotes in URL passed to browse-url
Escape double quotes in URL passed to browse-url

* lisp/org.el (org-link-escape-chars-browser): Add char double quote.
* lisp/org.el (org-open-at-point): Make use of the constant
`org-link-escape-chars-browser'.
* testing/lisp/test-org.el
(test-org/org-link-unescape-ascii-extended-char): Fill paragraph.
(test-org/org-link-escape-url-with-escaped-char): Fill paragraph and
typo.
(test-org/org-link-escape-chars-browser): New test.

This is to make work to open the Org link
[[http://some.host.com/search?q="Org mode"]] in a browser.

From 28726bcc7b7c440d70e2d95ea5a61d0cd5f084ea Mon Sep 17 00:00:00 2001
From: Michael Brand <michael.ch.brand@gmail.com>
Date: Sun, 5 May 2013 17:02:18 +0200
Subject: [PATCH] Escape double quotes in URL passed to browse-url

* lisp/org.el (org-link-escape-chars-browser): Add char double quote.
* lisp/org.el (org-open-at-point): Make use of the constant
`org-link-escape-chars-browser'.
* testing/lisp/test-org.el
(test-org/org-link-unescape-ascii-extended-char): Fill paragraph.
(test-org/org-link-escape-url-with-escaped-char): Fill paragraph and
typo.
(test-org/org-link-escape-chars-browser): New test.

This is to make work to open the Org link
[[http://some.host.com/search?q="Org mode"]] in a browser.
2013-05-05 18:12:53 +02:00
Nicolas Goaziou 15a72f6256 Merge branch 'maint' 2013-05-04 09:05:49 +02:00
Nicolas Goaziou 3e1d83bf6b ox: Fix caching for fuzzy link resolution
* lisp/ox.el (org-export-resolve-fuzzy-link): Fix caching process.
* testing/lisp/test-ox.el: Add test.
2013-05-04 09:03:00 +02:00
Aaron Ecay c36435b440 Merge branch 'maint' 2013-05-03 04:16:07 -04:00
Aaron Ecay 76349b98a2 ox-latex.el (org-latex-headline): Don’t insert alternate title if identical to regular one
* lisp/ox-latex.el (org-latex-headline): Don’t insert alternate title if
  identical to regular one.
2013-05-03 04:13:57 -04:00
Nicolas Goaziou 1e32d7bf25 Merge branch 'maint' 2013-05-02 14:52:47 +02:00
Lawrence Mitchell b7301bd639 ox: Cache locations of fuzzy links
* ox.el (org-export-resolve-fuzzy-link): Look for fuzzy link in a
  cache before trying to resolve it in the parse tree.

When a document contains a large number of identical fuzzy links, it
doesn't make sense to continually search for them.  Instead, cache the
locations in the position independent case.
2013-05-02 14:50:42 +02:00
Grégoire Jadi 168c5584f5 lisp/org.el: Do not inline images when no graphic display is available
* lisp/org.el (org-preview-latex-fragment)
(org-display-inline-images): Detect whether a graphic display is
available before inlining images to prevent an error.

Thanks to Rick Frankel for the report and the solution.

> `org-startup-with-inline-images' is a customizable variable. The
> problem is that if an org file is visited in a non-graphics buffer (or
> batch), `org-display-inline-images' is called an throws an error
> ("Non-X frame used").
>
> This problem also occurs when e.g., `org-babel-after-execute-hook' is
> set to 'org-display-inline-images (which can be mitigated by not
> setting the hook in a non-x frame).
>
> Since the startup variable is a customization, and causes problems if
> not set programatically, IMHO, the best solution would be to wrap the
> `org-display-inline-images' function in a test so that is is a no-op
> on non graphic displays:
2013-05-02 10:08:14 +02:00
Bastien Guerry 3f81fe855b Merge branch 'maint' 2013-04-29 19:02:26 +02:00
Bastien Guerry a9f590e7b1 org-agenda.el: Fix a bug about narrowing to wrong region boundaries
* org-agenda.el (org-agenda, org-search-view, org-tags-view)
(org-agenda-get-day-entries, org-agenda-set-restriction-lock):
Use (current-buffer) as the value of `org-agenda-restrict'.
Fix a bug about narrowing to wrong region boundaries when
`org-agenda-restrict' is non-nil.

Thanks to Thomas Holst for reporting this bug.
2013-04-29 19:02:13 +02:00
Bastien Guerry 188dc72b2d Merge branch 'maint' 2013-04-29 17:24:09 +02:00
Bastien Guerry c18468798f org.el (org-agenda-text-search-extra-files): Fix typos in docstring
* org.el (org-agenda-text-search-extra-files): Fix typos in
docstring.
2013-04-29 17:23:56 +02:00
Nicolas Goaziou 24aa4ab127 Merge branch 'maint' 2013-04-29 09:40:32 +02:00
Nicolas Goaziou 1ce00aaffd ox-publish: Fix "Invalid time specification" error with timestamps in DATE
* lisp/ox-publish.el (org-publish-find-date): Fix "Invalid time
  specification" error with timestamps in DATE.
2013-04-29 09:39:35 +02:00
Achim Gratz 5ca2ea00b2 Merge branch 'maint' 2013-04-28 10:25:59 +02:00
Achim Gratz 93da18174a fix macro expansion with separators and backslashes
* lisp/org-macro.el (org-macro-expand): Do not try to interpret the
  macro replacement text as a regex so that escaped backslashes and
  commas in macro arguments will be interpreted correctly.
2013-04-28 10:24:59 +02:00
Nicolas Goaziou dac3af93cf Merge branch 'maint' 2013-04-28 09:41:10 +02:00
Nicolas Goaziou 41bd891d48 org-element: Recognize LaTeX environments with options
* lisp/org-element.el (org-element--current-element): Allow the
  opening string of a LaTeX environment to contain additional
  arguments.
* testing/lisp/test-org-element.el: Add tests.
2013-04-28 09:38:01 +02:00
Nicolas Goaziou 79f75b77c4 Merge branch 'maint' 2013-04-26 23:20:08 +02:00
Michael Brand 92f3729857 Allow also "#+NAME: table" for remote references
* lisp/org-table.el (org-table-get-remote-range): Extend regexp to
match "#+NAME: table" additionally to "#+TBLNAME: table".
* testing/lisp/test-org-table.el: Add test.
* testing/org-test.el (org-test-table-target-expect): Allow several
tables to support testing remote references in the last table.
2013-04-26 23:17:48 +02:00
Eric Schulte f285b7ed3d Defcustom controlling the wrapping of inline results
* lisp/ob-core.el (org-babel-inline-result-wrap): Defcustom controlling
  the wrapping of inline results.
  (org-babel-examplize-region): Use new defcustom controlling the
  wrapping of inline results.
2013-04-26 09:38:33 -06:00
Nicolas Goaziou cb42a48a30 Speed-up `org-insert-heading'
* lisp/org.el (org-insert-heading): Refactor to use `org-in-item-p'
  only once.
2013-04-26 16:14:29 +02:00
Nicolas Goaziou 3799de774e Merge branch 'maint' 2013-04-26 15:54:03 +02:00
Nicolas Goaziou eba04bfb3c ox-org: Preserve affiliated keywords
* lisp/ox.el (org-export-expand): Optionally add affiliated keywords
  to results.
* lisp/ox-org.el (org-org-identity): Use new argument for
  `org-export-expand'.
2013-04-26 15:53:05 +02:00
Nicolas Goaziou 74fda6f64d Merge branch 'maint' 2013-04-26 14:29:33 +02:00
Nicolas Goaziou 75c8be1d8b Fix error when filling a table from an affiliated keyword
* lisp/org.el (org-fill-paragraph): Move to table beginning before
  aligning the table when M-q is called from an affiliated keyword.
* testing/lisp/test-org.el: Add test.
2013-04-26 14:27:38 +02:00
Nicolas Goaziou 72febd15f3 Merge branch 'maint' 2013-04-26 14:14:52 +02:00
Nicolas Goaziou 73b7f3192c org-list: Properly update `org-list-allow-alphabetical'
* lisp/org-list.el (org-list-allow-alphabetical): Properly update
  `org-list-allow-alphabetical' when changed after org.el has been
  loaded.
2013-04-26 14:13:24 +02:00
Nicolas Goaziou 3b8f7b42cf Merge branch 'maint' 2013-04-26 10:39:09 +02:00
Nicolas Goaziou 5efd7311e8 org-element: Fix interpretation of empty fixed-width elements
* lisp/org-element.el (org-element-fixed-width-interpreter): Fix
  interpretation of fixed-width elements with a nil or empty string
  value.
* testing/lisp/test-org-element.el: Add tests.
2013-04-26 10:38:05 +02:00
Bastien Guerry 9dfccd3f2b Merge branch 'maint' 2013-04-26 08:52:59 +02:00
Bastien Guerry 8d5198d654 org.el (org-insert-heading): Fix case when there the first heading starts at the beginning of the buffer
* org.el (org-insert-heading): Fix case when there the first
heading starts at the beginning of the buffer.

In this case, `org-backward-heading-same-level' will throw an error in
the let form, and the error would fall back on "*" instead of falling
back on the correct number of stars to add.

Thanks to Jisang Yoo and John Hendy who reported this bug.
2013-04-26 08:52:43 +02:00
Bastien Guerry 267cbe5183 Merge branch 'maint' 2013-04-25 07:30:19 +02:00
Bastien Guerry dcb0ac48a8 Use `org-called-interactively-p' instead of `called-interactively-p'
* org-agenda.el (org-agenda-write):
* ob-core.el (org-babel-expand-src-block): Use
`org-called-interactively-p'.

Thanks to Jason L Wright for reporting this.
2013-04-25 07:30:04 +02:00
Bastien Guerry 38051ce481 Merge branch 'maint' 2013-04-24 16:22:21 +02:00
Bastien Guerry 0e4a4c452e org.el: Delete trailing whitespaces 2013-04-24 16:22:13 +02:00
Viktor Rosenfeld 19e1022e26 org.el: Filter agenda by persistent tags
* org.el (org-agenda-prepare-buffers): Add tags defined in
org-tag-persistent-alist to org-tag-alist-for-agenda.

This makes tag hotkeys defined in `org-tag-persistent-alist' appear when
the user invokes `org-agenda-filter-by-tag-refine'.

TINYCHANGE
2013-04-24 16:21:30 +02:00
Bastien Guerry fb6170ec9c Merge branch 'maint' 2013-04-24 15:43:47 +02:00
Bastien Guerry 778c812535 org.el (org-agenda-prepare-buffers): Avoid duplicates in `org-tag-alist-for-agenda' correctly
* org.el (org-agenda-prepare-buffers): Avoid duplicates in
`org-tag-alist-for-agenda' correctly.

Thanks to Viktor Rosenfeld for debugging this.
2013-04-24 15:43:33 +02:00
Bastien Guerry e87dc9df1a Merge branch 'maint' 2013-04-24 11:36:47 +02:00
Bastien Guerry 253b65c091 org.el (org-read-date-minibuffer-local-map): Check if we are at the beginning of the prompt, not if we are after a whitespace
* org.el (org-read-date-minibuffer-local-map): Check if we are
at the beginning of the prompt, not if we are after a whitespace.
Bind C-. to `calendar-goto-today'.
2013-04-24 11:36:22 +02:00
Bastien Guerry a959d23201 Merge branch 'maint' 2013-04-24 10:47:30 +02:00
Bastien Guerry 3dd3100794 org-clock.el (org-clock-in): Don't forward by one character when setting the marker in the clock history
* org-clock.el (org-clock-in): Don't forward by one character
when setting the marker in the clock history.

This was done to prevent the marker from being broken when a user
manually insert some text right one it.  I cannot reproduce this
manual marker modification problem, so let's remove this ugly
exception, as it is not consistent with other clock markers.

Thanks to Bernt Hansen for pointing this out.
2013-04-24 10:47:16 +02:00
Bastien Guerry 8c1f16d475 Merge branch 'maint' 2013-04-24 10:05:48 +02:00
Bastien Guerry 240d645dbb org.el (org-read-date-minibuffer-local-map): Call `calendar-goto-today' only if there is a space before point in the minibuffer prompt
* org.el (org-read-date-minibuffer-local-map): Call
`calendar-goto-today' only if there is a space before point in
the minibuffer prompt.

Thanks to Michael Brand and others who asked for this regression to be fixed.
2013-04-24 10:05:36 +02:00
Bastien Guerry 0e438a9621 Merge branch 'maint' of orgmode.org:org-mode into maint 2013-04-24 09:55:27 +02:00
Bastien Guerry 862b91e8db org.el (org-insert-heading): Fix bug about wrong conversion of lines with :END: or #+end_ into headlines
* org.el (org-insert-heading): Reveal context when called
interactively.  Fix bug about wrong conversion of lines with
:END: or #+end_ into headlines.
(org-in-drawer-p): New function.
(org-meta-return): Use `org-catch-invisible-edits' and the
`org-in-drawer-p' to check whether we are within a drawer.

Thanks to Muchenxuan Tong and John Hendy who reported these errors.
2013-04-24 09:55:15 +02:00
Nicolas Goaziou bb30de44fd ox-html: Always use provided description in internal links
* lisp/ox-html.el (org-html-link): Don't skip the link description
  when it matches the name of the headline it targets.
2013-04-24 09:54:34 +02:00
Nicolas Goaziou 4f690abdb4 ox-html: Always use provided description in internal links
* lisp/ox-html.el (org-html-link): Don't skip the link description
  when it matches the name of the headline it targets.
2013-04-24 09:52:20 +02:00
Jonathan Leech-Pepin fea4b5c3ad ox-texinfo: Default to buffer-file-coding-system when exporting
* lisp/ox-texinfo.el (org-texinfo-coding-system): Clarify default
  setting.
  (org-texinfo-template): Ensure buffer-file-coding-system is used
  when org-texinfo-coding-system is not set.
2013-04-23 09:25:46 -04:00
Carsten Dominik 0fff0ba6da Fix insert-heading
* lisp/org.el (org-insert-heading): Fix problem with inserting
  heading.

The commit fixes a bug introduced in bb2022.
2013-04-22 20:46:14 +02:00
Carsten Dominik eab949fc4a Merge branch 'master' of orgmode.org:org-mode 2013-04-22 08:29:01 +02:00
Carsten Dominik bb202235df Fix checkbox creation in numbered lists
* lisp/org.el (org-insert-heading): Check for checkbox at the
  beginning of the item, not just at the beginning of the line.

Without this fix, M-RET in numbered lists would create a checkboxed
item because it was using match data from a previous match.  Now we
make sure we go back to the beginning of the item, so that the match
really tells us if there was a checkbox there.
2013-04-22 07:43:45 +02:00
Aaron Ecay 7263b326d4 Add 'light argument to some uses of org-babel-get-src-block-info
* lisp/ob-core.el (org-babel-do-key-sequence-in-edit-buffer)
(org-babel-expand-noweb-references)
* lisp/ob-tangle.el (org-babel-tangle): Use 'light argument to
`org-babel-get-src-block-info'.
2013-04-21 23:45:27 -04:00
Aaron Ecay 9969d3feeb ob-core.el (org-babel-execute-src-block): fixes for :results none
* lisp/ob-core.el (org-babel-execute-src-block): Return nil in case of
`:results none'.  Also run `org-babel-after-execute-hook' in this
circumstance.

Previously, the code returned the string "results silenced" in the case
of =:results none=, as this is the return value of the call to
`message'; additionally, the after-execute hook was not being run.
2013-04-21 23:45:27 -04:00
Aaron Ecay 8993a2f7a9 org-id.el (org-id-locations-save): Bind print-(level,length) to nil
* lisp/org-id.el (org-id-locations-save): Bind print-(level,length) to
nil in this function.

Having these variables set to non-nil values results in an unreadable
result being written to `org-id-locations-file'.
2013-04-21 23:44:53 -04:00
Aaron Ecay 4be6832fdf ob-R.el: allow use of alternative graphics devices
* lisp/ob-R.el (org-babel-R-graphics-devices): New defvar.
(org-babel-R-construct-graphics-device-call): Use it instead of a
hard-coded list of graphics devices.

The `org-babel-R-graphics-devices' variable now holds the association
between graphics file types and R functions.  This allows users by
modifying this alist to choose to use e.g. the Cairo* functions from the
R package “Cairo” or one of several alternative devices for SVG
output (SVGAnnotation, RSVGTipsDevice).
2013-04-21 23:28:26 -04:00
Bastien Guerry e6776ce711 org-list.el (org-sort-list): Fix infloop
* org-list.el (org-sort-list): Fix infloop.

Thanks to Samuel Wales for reporting this.
2013-04-22 00:24:39 +02:00
Nicolas Goaziou 37f94d235d ox-ascii: Minor fixes
* lisp/ox-ascii.el (ascii): Remove inexistant function.
2013-04-21 23:51:54 +02:00
Nicolas Goaziou 648e2a1b95 ox-icalendar: Ignore footnotes
* lisp/ox-icalendar.el (icalendar): Ignore footnotes.
2013-04-21 23:44:18 +02:00
Nicolas Goaziou 7528c726dd ox-icalendar: Small refactoring
* lisp/ox-icalendar.el (org-icalendar--combine-files): Small refactoring.
2013-04-21 23:44:18 +02:00
Nicolas Goaziou d408d721c3 ox: Fix `org-export-with-footnotes' behaviour
* lisp/ox.el (org-export--skip-p, org-export--interpret-p): When
  `org-export-with-footnotes' is nil, ignore completely footnotes
  references and definitions instead of exporting them verbatim.
* testing/lisp/test-ox.el: Add tests.
2013-04-21 23:44:18 +02:00
Bastien Guerry 8a5ac12268 org.el: New maintainer
* doc/orgguide.texi:
* doc/org.texi:
* org.el: New maintainer.
2013-04-21 16:58:01 +02:00
Richard Lawrence 1b0c4cf0f8 org-agenda.el (org-cmp-ts): Avoid error when trying to string-match against nil
* org-agenda.el (org-cmp-ts): Avoid error when trying to
string-match against nil.

TINYCHANGE
2013-04-20 08:58:29 +02:00
Bastien Guerry 2a192ff6c1 org.el (org-clone-subtree-with-time-shift): Update behavior
* org.el (org-clone-subtree-with-time-shift): Unconditionally
ask for a time shift if there is a time-stamp.  Don't ask for
a time shift when called with a universal prefix argument.

Thanks to Ingmar Meissner for raising this issue again.
2013-04-20 08:51:37 +02:00
Nicolas Goaziou bc8d34541b ox-beamer: Do not ignore uppercase environements
* lisp/ox-beamer.el (org-beamer--frame-level): Small refactoring.
(org-beamer--format-block, org-beamer-headline): Do not systematically
downcase environment names as some require upper case in their
names (e.g. noteNH and CJK).

Thanks to James Harkins for reporting the bug.
2013-04-20 08:32:10 +02:00
Bastien Guerry 3d994a602c ob-core.el (org-babel-insert-result): Fix bug when inserting results as a list: ensure we split a string containing "\n"
* ob-core.el (org-babel-insert-result): Fix bug when inserting
results as a list: ensure we split a string containing "\n".

Thanks to Sébastien Vauban for reporting this.
2013-04-19 19:44:40 +02:00
Bastien Guerry 5ef07dc54a ox-html.el: Fix copyright header
* ox-html.el: Fix copyright header.
2013-04-18 19:32:07 +02:00
Bastien Guerry 1e3cb91ccb org.el (org-store-link): Don't add a search string when storing a link from a radio target
* org.el (org-store-link): Don't add a search string when
storing a link from a radio target.
(org-open-at-point): Jump to the radio link (<<<radio>>>), not
to the simple target (<<target>>).
2013-04-18 17:27:17 +02:00
Nicolas Goaziou 60aa1682ce ox: Change scope for `org-export-with-timestamps'
* lisp/ox.el (org-export-with-timestamps): Only applies to isolated
  timestamps, i.e. timestamps in a paragraph containing only
  timestamps and empty strings.
(org-export--skip-p): Skip timestamps according to new behaviour.
* testing/lisp/test-ox.el: Update tests.
2013-04-18 16:58:56 +02:00
Bastien Guerry 2c46ecee4f org-table.el (org-table-get-remote-range): Fix typo
* org-table.el (org-table-get-remote-range): Fix typo.
2013-04-18 15:42:31 +02:00
Bastien Guerry 87e1e9406e Makefile (clean-install): Also remove ox*.el* files
* Makefile (clean-install): Also remove ox*.el* files.
2013-04-18 14:43:45 +02:00
Bastien Guerry 03920a01fa Merge branch 'master-apply-aaron-patch2'
Conflicts:
	lisp/ob-core.el
2013-04-18 12:28:03 +02:00
Aaron Ecay bf29482973 Clean up various org-babel-*-maybe commands
* lisp/ob-core.el (org-babel-when-in-src-block): New macro.
  (org-babel-execute-src-block-maybe)
  (org-babel-expand-src-block-maybe)
  (org-babel-load-in-session-maybe, org-babel-pop-to-session-maybe):
  Use it.

org-babel-get-src-block-info is a potentially expensive operation, which
is why its ‘light’ argument exists.  But in any case, it is overkill to
query the whole info, if all that is needed is whether point is in a
block or not.  Factor the simplified common code out into a macro.
2013-04-18 12:26:23 +02:00
Bastien Guerry ccdfa8ddf8 org-datetree.el: Be more restrictive when finding a year datetree
* org-datetree.el (org-datetree-find-month-create)
(org-datetree-find-day-create): Add a docstring.
(org-datetree-find-year-create): Only match headlines with a
year or a year and one or more tags.

Thanks to Suvayu Ali for reporting this.
2013-04-18 12:20:08 +02:00
Aaron Ecay 4d763f35f5 Fix bug in org-babel-execute-src-block
* lisp/ob-core.el (org-babel-execute-src-block): Use `copy-tree'
to prevent setf from modifying users variables withing let-bound
`info' variable.

Otherwise, the setf calls in this function can reach into and change
other configuration variables, such as the library of babel.
2013-04-18 10:48:57 +02:00
Aaron Ecay 25869e5670 Add 'inline-only option to org-export-babel-evaluate
* lisp/ob-exp.el (org-export-babel-evaluate): Add a 'inline-only option.
  (org-babel-exp-results): Implement 'inline-only for
  `org-export-babel-evaluate'.
* doc/org.texi (Exporting code blocks): Document the 'inline-only setting
  for `org-export-babel-evaluate'.

This is useful because there is no way for inline results to be stored.
The imagined usecase is that all non-inline source blocks will be
evaluated manually by the user.  Inline blocks, however, must be
evaluated during export, or they will be simply deleted by the exporter.
2013-04-18 10:41:47 +02:00
Bastien Guerry 4757c5c8dd Merge branch 'master' of orgmode.org:org-mode 2013-04-18 10:29:12 +02:00
Bastien Guerry 4231cb4b12 Use `org-add-hook' in some places and merge Emacs revno r112320
* ox.el (org-export-stack-mode)
* org-crypt.el (org-crypt-check-auto-save)
(org-crypt-use-before-save-magic): Use `org-add-hook' when the
hooks are local hooks.

* org-indent.el (org-indent-mode)
* org-agenda.el (org-agenda-mode): Use `org-add-hook' and
merge upstream change from Emacs revno r112320.
2013-04-18 10:29:00 +02:00
Bastien Guerry 217d14ecc2 ob-core.el (org-babel-pop-to-session-maybe): Fix docstring
* ob-core.el (org-babel-pop-to-session-maybe): Fix docstring.
(org-babel-pop-to-session-maybe): Use true function's name,
not its alias.
2013-04-18 10:22:34 +02:00
Nicolas Goaziou 77c5710de2 ox-latex: Handle consecutive alterning sub and superscript
* lisp/ox-latex.el (org-latex--script-size): Handle consecutive
  alterning sub and superscript.

This patch fixes export of "a^b_c" constructs.
2013-04-18 00:06:06 +02:00
Nicolas Goaziou 58f7e43821 ox-org.el: Fix some docstrings
* lisp/ox-org.el (org-org-identity): Fix docstring.  Tiny refactoring.
(org-org-headline, org-org-keyword): Fix docstring.
2013-04-17 22:45:07 +02:00
Achim Gratz f6bf19f898 ob-perl: fix result handling
* lisp/ob-perl.el (org-babel-perl-wrapper-method): Select output
  handle only after evaluation so that output is not mixed into
  results eavaluation.
  (org-babel-perl-evaluate): Fix the handling of results for ":results
  output" to also parse tables.  Use the same lambda construction as
  in ob-sh.el to avoid code duplication.
2013-04-17 21:40:15 +02:00
Nicolas Goaziou 99f8821995 ox-latex: Use \text command for subscript and superscript
* lisp/ox-latex.el (org-latex--script-size): Use \text command for
  subscript and superscript.  This is far superior to \mathrm, but it
  requires "amstext" package.  In particular, accented characters are
  now allowed within sub/superscript.
* lisp/org.el (org-latex-default-packages-alist): Add "amstext"
  package.
2013-04-17 20:59:41 +02:00
Nicolas Goaziou d57b9e84e1 ox-latex: Better handling of sub/superscript within sub/superscript
* lisp/ox-latex.el (org-latex--script-size): Fix error when using
  sub/superscript within sub/superscript.
2013-04-17 20:59:41 +02:00
Bastien Guerry 937b4484c6 org-agenda.el: New commands for dragging a line forward/backward
* org-agenda.el (org-agenda-drag-line-forward)
(org-agenda-drag-line-backward): New commands.
(org-agenda-mode-map): Bind the new commands to M-<down> and
M-<up> respectively.

* org.texi (Agenda commands): Add a table heading for dragging
agenda lines forward/backward.
2013-04-17 20:25:02 +02:00
Nicolas Goaziou b335a4fa34 ox-latex: Improve subscript/superscript export
* lisp/ox-latex.el (org-latex--script-size): New function.
(org-latex-subscript, org-latex-superscript): Use new function.
2013-04-17 18:43:01 +02:00
Bastien Guerry d68744f401 org.el (org-insert-heading): Fix insertion of items
* org.el (org-insert-heading): Fix insertion of items.
2013-04-17 10:10:34 +02:00
Bastien Guerry df4ed8e794 org-capture.el (org-capture-use-agenda-date): Fix docstring
* org-capture.el (org-capture-use-agenda-date): Fix docstring.
2013-04-17 07:00:59 +02:00
Bastien Guerry 4e62936ae5 org-agenda.el: (org-agenda-bulk-toggle-all): New command
* org-agenda.el (org-agenda-bulk-toggle): Fix docstring.
(org-agenda-bulk-toggle-all): New command.
(org-agenda-mode-map): Bind `org-agenda-bulk-toggle' to `M-m'
and `org-agenda-bulk-toggle-all' to `M-*'.
(org-agenda-menu): Add `org-agenda-bulk-toggle' and
`org-agenda-bulk-toggle-all'.
(org-agenda-bulk-mark, org-agenda-bulk-unmark): Jump to the
next headline, not the next line.
2013-04-16 22:02:07 +02:00
Bastien Guerry 35b9983107 org-capture.el (org-mks): Fix bug.
* org-capture.el (org-mks): Fix bug: let-bind
`case-fold-search' to nil while matching the first letter of a
multi-letters template.

Thanks to Robert Goldman for reporting this bug and providing the fix.
2013-04-16 18:27:11 +02:00
Bastien Guerry 4f89c37cea org.el (org-store-link): When a bracket link is found in a headline, use the link description or the link path
* org.el (org-store-link): When a bracket link is found in a
headline, use the link description or the link path.
2013-04-16 16:05:55 +02:00
Nicolas Goaziou 407a6acf4d ox/ox-latex: Fix docstrings
* lisp/ox-latex.el: Remove instructions since everything is documented
  in Org manual.
* lisp/ox.el (org-export-with-smart-quotes): Use LATEX instead of
  LaTeX for keywords, the latter being hard to type, somewhat
  difficult to read, and overall just pedantic.
2013-04-16 12:54:05 +02:00
Bastien Guerry 7c2b7b9eef org.el: Use `user-error' instead of `error'
* org.el (org-flag-drawer, org-hide-block-toggle)
(org-goto-left, org-goto-right, org-promote)
(org-paste-subtree, org-narrow-to-block, org-sort-entries)
(org-insert-link, org-offer-links-in-entry, org-open-file)
(org-refile, org-refile-get-location)
(org-refile-check-position, org-prepare-dblock, org-todo)
(org-auto-repeat-maybe, org-show-todo-tree, org-sparse-tree)
(org-occur, org-priority, org-scan-tags)
(org-get-tags-string, org-property-action, org-set-effort)
(org-entry-put, org-insert-drawer)
(org-compute-property-at-point)
(org-property-next-allowed-value, org-evaluate-time-range)
(org-closest-date, org-timestamp-change)
(org-revert-all-org-buffers, org-cycle-agenda-files)
(org-agenda-file-to-front, org-remove-file)
(org-preview-latex-fragment, org-format-latex)
(org-create-math-formula, org-create-formula-image)
(org-speed-command-help, org-check-before-invisible-edit)
(org-modifier-cursor-error, org-hidden-tree-error)
(org-mark-subtree, org-kill-line, org-first-sibling-p)
(org-up-element, org-down-element)
(org-drag-element-backward, org-drag-element-forward)
(org-unindent-buffer, org-speedbar-set-agenda-restriction):
Use `user-error' instead of `error'.
2013-04-16 12:02:35 +02:00
Bastien Guerry 320b633b6e ox-latex.el (latex): Don't force exporting with smart quotes
* ox-latex.el (latex): Don't force exporting with smart
quotes.

* ox.el (org-export-with-smart-quotes): Mention the need to
use the relevant Babel package when setting this option to
non-nil.

Before the fix, if the user used #+LANGUAGE: fr with no other
customization, the quotes would disappear from the PDF output.
That's because smart quotes were enforced, while the .tex file
needs \usepackage[french]{babel} to display the quotes.

We now don't force the smart quotes and give more explanations
in `org-export-with-smart-quotes'.
2013-04-16 11:39:41 +02:00
Bastien Guerry 7790a97cdd org-src.el (org-edit-src-turn-on-auto-save): New option
* org-src.el (org-edit-src-turn-on-auto-save): New option.
(org-edit-src-code): Use it.
(org-edit-src-auto-save-idle-delay): Enhance docstring.

* doc/org.texi (Editing source code): Document
`org-edit-src-auto-save-idle-delay' and
`org-edit-src-turn-on-auto-save'.

Thanks to Charles C. Berry for bringing this up again.
2013-04-16 10:38:01 +02:00
Bastien Guerry 8546254ce5 org-capture.el (org-mks): Make cursor invisible
* org-capture.el (org-mks): Make cursor invisible.
2013-04-16 09:23:45 +02:00
Bastien Guerry 8546ef131d org.el (org-link-expand-abbrev): Save match data before before calling the replacement function
* org.el (org-link-expand-abbrev): Save match data before
before calling the replacement function.
2013-04-16 09:15:45 +02:00
Bastien Guerry 7c466e470c org-list.el (org-sort-list): Don't move point when matching time values
* org-list.el (org-sort-list): Don't move point when matching
time values.

Thanks to Samuel Wales for reporting this bug.
2013-04-16 08:23:52 +02:00
Carsten Dominik cb658482c3 Fix typo in docstring of `org-small-year-to-year'
* lisp/org.el (org-small-year-to-year): Fix typo in docstring
2013-04-16 05:59:27 +02:00
Nicolas Goaziou 5e0c969381 Better document LATEX_HEADER_EXTRA keywords
* doc/org.texi (Header and sectioning): Add a footnote about the
  different between LATEX_HEADER_EXTRA and LATEX_HEADER.
* lisp/ox-latex.el (org-latex-classes): Be more explicit about
  LATEX_HEADER_EXTRA.
2013-04-15 23:24:53 +02:00
Bastien Guerry b019cab9de Merge branch 'master' of orgmode.org:org-mode 2013-04-15 22:57:33 +02:00
Bastien Guerry 4b236f2043 org-bibtex.el: Fix email address 2013-04-15 22:57:26 +02:00
Rick Frankel db8d3f5dcf Allow setting :HTML_CONTAINER as a per-headline property.
* lisp/ox-html.el (org-html-headline): Use (new) org-html--container
  function to set container element.
(org-html--container): Returns appropriate element for headline
container:
        1. The element set on the headline :HTML_CONTAINER property.
        2. the :html-container element (if the relative headline level
        is 1.)
        3. The default ("div").
2013-04-15 13:59:16 -04:00
Bastien Guerry 6e1a39bd6e Merge branch 'master' of orgmode.org:org-mode 2013-04-15 18:34:14 +02:00
Bastien Guerry 5e3964d5b4 org.el (org-shifttab): Show the correct number of empty headlines
* org.el (org-shifttab): Show the correct number of empty
headlines when called with a numeric prefix argument.  Enhance
docstring.

Thanks to Michael Crouch for reporting this bug and providing the fix.
2013-04-15 18:32:30 +02:00
Nicolas Goaziou 4c812675d0 ox-html: Fix invalid syntax in html attributes
* lisp/ox-html.el (org-html--build-meta-info): Fix invalid characters
  in html attributes.
2013-04-15 17:54:13 +02:00
Bastien Guerry f6d7230ca2 Merge branch 'master' of orgmode.org:org-mode 2013-04-15 10:45:03 +02:00
Bastien Guerry ab8689d261 org.el: Tiny cosmetic change. 2013-04-15 10:44:53 +02:00
Nicolas Goaziou df2807b59d ox: Remove macro filters
* lisp/ox.el (org-export-filters-alist): Remove macro filter.
(org-export-filter-macro-functions): Remove variable.

Macro filters are never called since macro expansion happens before
the export process.
2013-04-15 08:22:51 +02:00
Bastien Guerry ef4bbe5608 org.el (org-uniquify): Use `copy-sequence'
* org.el (org-uniquify): Use `copy-sequence'.

Thanks to Thomas Dye for reporting this.
2013-04-15 01:11:03 +02:00
Bastien Guerry 4d77fb7696 ox.el: Fix tiny typo. 2013-04-15 00:55:26 +02:00
Eric Schulte 06294c8dac ox-beamer: Ensure nil is not passed to regexp function
* lisp/ox-beamer.el (org-beamer--format-frame): If contents is nil, then
  replace it with an empty string.
2013-04-14 19:26:01 +02:00
Florian Beck f9555eef69 Unescape :help-echo for links
* lisp/org.el (org-activate-bracket-links): Remove escapes
from the help string.

TINYCHANGE
2013-04-14 12:20:02 +02:00
Bastien Guerry 0ffeb8709e org.el (org-adaptive-fill-function, org-fill-paragraph): Throw a useful error message
* org.el (org-adaptive-fill-function, org-fill-paragraph):
Throw a useful error message when parse an element fails in
the current buffer.

This can happen for example in a `message-mode' buffer when using
orgstruct-mode.  If you insert a line like:

SCHEDULED: <2013-04-13 Sat> is blablabla

then org-element-at-point will fail and the user will get an error
he cannot understand.
2013-04-14 11:46:45 +02:00
Bastien Guerry 7c048fd886 ox.el (org-export-with-planning): Enhance docstring
* ox.el (org-export-with-planning): Enhance docstring.
2013-04-14 11:46:45 +02:00
Bastien Guerry d06ecf54f5 org.el (org-closed-keep-when-no-todo): New option
* org.el (org-closed-keep-when-no-todo): New option.
(org-todo): Use the new option.

Thanks to Brian van den Broek for asking for this.
2013-04-14 11:46:44 +02:00
Bastien Guerry 2fd5120364 org.el (org-open-line): Rename from `org-ctrl-o'
* org.el (org-open-line): Rename from `org-ctrl-o'.
(org-mode-map): Use `remap'.

Thanks to Sean O'Halpin for pointing this.
2013-04-14 11:46:44 +02:00
Nicolas Goaziou acc0d01563 ox-beamer: Install a default class set-up when loading library
* lisp/ox-beamer.el (beamer): Install a default class set-up when
  loading library.

This change should provide a meaninfgul export even if user forgot to
set-up `org-latex-classes'.
2013-04-14 11:41:42 +02:00
Bastien Guerry c6f8cb1518 org.el: Minor code clean-up: fix dangling parentheses
* org.el (org-cycle-emulate-tab, org-file-apps)
(org-set-font-lock-defaults)
(org-translate-link-from-planner, org-link-search)
(org-refile-get-targets, org-read-date-get-relative): Minor
code clean-up: fix dangling parentheses.
2013-04-13 15:54:38 +02:00
Bastien Guerry 0f0d0ecf01 org-agenda.el (org-agenda-entry-text-mode): Also check against regexp filters
* org-agenda.el (org-agenda-entry-text-mode): Also check
against regexp filters.
2013-04-13 12:28:24 +02:00
Bastien Guerry 4a603bcd28 org-agenda.el (org-timeline): Handle `org-agenda-show-log'
* org-agenda.el (org-timeline): Handle `org-agenda-show-log'.

Thanks to Derek Upham for reporting this bug.
2013-04-13 11:46:16 +02:00
Bastien Guerry 13deb41a3a org-clock.el (org-clock-select-task): Remove successive duplicates in the clock history to consider
* org-clock.el (org-clock-select-task): Remove successive
duplicates in the clock history to consider.

Thanks to Sébastien Vauban for pointing at this.
2013-04-13 10:21:16 +02:00
Bastien Guerry 9c141cfd8c org.el (org-uniquify-alist): Improve docstring
* org.el (org-uniquify-alist): Improve docstring.
2013-04-13 10:02:29 +02:00
Achim Gratz 56bf3d7891 Babel: avoid superfluous confirmation for internal wrapper
* lisp/ob-exp.el (org-babel-exp-results): Suppress user confirmation
  of the emacs-lisp wrapper execution around a lob call.

* lisp/ob-lob.el (org-babel-lob-execute): Suppress user confirmation
  of the emacs-lisp wrapper execution around a lob call.
2013-04-13 08:06:58 +02:00
Sacha Chua e82fb4402c Change relative weekday specifications (ex: fri or -tue) to exclude today
* lisp/org.el (org-read-date-get-relative): Handle positive and
negative weekday specifications so that they don't return today.
If today is Friday, "fri" should mean next Friday. This changes
the previous behavior, which required you to specify "+2fri" in
order to mean next Friday if today was Friday. If you want to
schedule something for today, you can use ".".

* doc/org.texi (The date/time prompt): Update the documentation
to reflect the new way `org-read-date-get-relative' handles
weekdays.

TINYCHANGE
2013-04-13 02:09:45 +02:00
Bastien Guerry afaaff4439 org.el (org-tags-expand): Prevent circular replacement of group tags
* org.el (org-make-tags-matcher, org-change-tag-in-region):
Add buffer's tags to the tags completion table.
(org-tags-expand): Prevent circular replacement of group tags.
Tiny docstring formatting.
(org-uniquify): Make a defsubst.  Use `delete-dups' instead of
`add-to-list'.

Thanks to Christian Moe for reporting the bug about group tags.
2013-04-12 19:19:46 +02:00
Bastien Guerry 02ddc594f2 org.el (org-todo): Also remove the CLOSED planning information when removing the TODO keyword
* org.el (org-todo): Also remove the CLOSED planning
information when removing the TODO keyword.

Thanks to Samuel Wales for reporting this.
2013-04-12 17:54:43 +02:00
Bastien Guerry 9a1511de6b org.el (org-forward-heading-same-level): Fix bug
* org.el (org-forward-heading-same-level): Fix bug when
forwarding to a hidden subtree of the same level.

Thanks to Bernt Hansen for reporting this bug.
2013-04-12 17:52:24 +02:00
Bastien Guerry bccda67ce4 org.el (org-tags-expand): Use word delimiters when building the tag search regexp
* org.el (org-tags-expand): Use word delimiters when building
the tag search regexp.

Thanks to Christian Moe for reporting this bug.
2013-04-12 10:45:31 +02:00
Bastien Guerry 78b5dd8d56 org-clock.el (org-clock-insert-selection-line): Don't display the clockout time
* org-clock.el (org-clock-insert-selection-line): Don't
display the clockout time.

This partially reverts commit ff4b7a47, which introduced this, but
Bernt Hansen confirmed this was not practical in some circumstances.
2013-04-12 08:21:48 +02:00
Bastien Guerry dc577b253b org.el (org-emphasis-regexp-components): Make a defvar
* org.el (org-emphasis-regexp-components): Make a defvar.

This used to be a defcustom (Org <8.0) but allowing the users to
set this option proved cumbersome.  See this message/thread:
http://article.gmane.org/gmane.emacs.orgmode/68681
2013-04-12 08:05:28 +02:00
Nicolas Goaziou 94518a95ba ox-latex: Update a docstring
* lisp/ox-latex.el (org-latex-classes): Update docstring.
2013-04-12 00:02:15 +02:00
Bastien Guerry 9c42cd37dc org.el (org-emphasis-alist): New default value: don't set HTML tags
* org.el (org-emphasis-alist): New default value: don't set
HTML tags.
(org-emphasize, org-set-emph-re): Use the new value of
`org-emphasis-alist'.
2013-04-11 19:06:31 +02:00
Bastien Guerry 5d1025f5ec org-mobile.el (org-mobile-edit): Insert new headings at the end of the parent subtree
* org-mobile.el (org-mobile-edit): Insert new headings at the
end of the parent subtree.  Use `org-at-heading-p' instead of
the obsolete `org-on-heading-p'.

Thanks to James Harkins for reporting this.
2013-04-11 01:05:26 +02:00
Bastien Guerry 78567ef2d3 Silent compiler warning 2013-04-11 00:53:24 +02:00
Bastien Guerry 52016d651f org.el (org-insert-heading): When called from a list item and `org-insert-heading-respect-content' is non-nil, insert a heading
* org.el (org-insert-heading): When called from a list item
and `org-insert-heading-respect-content' is non-nil, insert a
heading, not an item.
2013-04-11 00:50:18 +02:00
Bastien Guerry 3fe47611c9 Merge branch 'master' of orgmode.org:org-mode 2013-04-11 00:35:39 +02:00
Bastien Guerry 3449c6d001 org.el (org-insert-heading): Convert the current line into a headline
* org.el (org-insert-heading-respect-content): Fix docstring.
(org-insert-heading): When in a non-empty non-headline line,
convert the current line into a headline.

Thanks to Bernt Hansen for reporting this issue.
2013-04-11 00:35:31 +02:00
Bastien Guerry 9ac7fabb46 org-table.el (org-table-copy-down): Don't move cursor when getting the field
* org-table.el (org-table-copy-down): Don't move cursor when
getting the field.

This prevents the point from moving when inadvertently calling
S-RET outside of a table.
2013-04-11 00:32:33 +02:00
Nicolas Goaziou a9da959ae6 ox-latex: Remove specific default image width for floats
* lisp/ox-latex.el (org-latex--inline-image): Remove specific default
  image width for floats.  If no width nor height is provided, it
  should default to `org-latex-image-default-width' value.
2013-04-10 22:03:32 +02:00
Nicolas Goaziou d6e1dd8ec5 Remove two unused functions
* lisp/org.el (org-extract-attributes-from-string,
  org-attributes-to-string): Remove functions.
2013-04-10 21:42:04 +02:00
Nicolas Goaziou bc269f01f3 ox-html: attributes lines are more comprehensive
* lisp/ox-html.el (html): Rename :html-table-tag property
  into :org-table-attributes.
(org-html-table-default-attributes): New variable.
(org-html-table-tag): Removed variable.
(org-html--make-attribute-string): New function.
(org-html-link--inline-image, org-html-table): Use new function.
* doc/org.texi: Document variable changes.

It is now possible to write properties and values in attributes lines
without falling back on `:options':

  #+attr_html: :border 1
  | a |
2013-04-10 21:29:13 +02:00
Nicolas Goaziou adb439dea9 ox-html: Remove unused functions
* lisp/ox-html.el (org-html-splice-attributes,
  org-export-splice-style): Remove functions.
2013-04-10 19:39:31 +02:00
Nicolas Goaziou 986c4ad96e ox-html: Fix docstring
* lisp/ox-html.el (org-html-inline-image-rules): Remove out of context
  part of the docstring.
2013-04-10 19:19:21 +02:00
Nicolas Goaziou 659edb40a5 ox: Allow to use empty strings in attributes
* lisp/ox.el (org-export-read-attribute): Allow to use empty strings
  in attributes.
* testing/lisp/test-ox.el: Add tests.

With this patch,

  #+attr_backend: :a "" becomes (:a "")
  #+attr_backend: :a """" becomes (:a "\"\"")
  ...
2013-04-10 18:50:52 +02:00
Bastien Guerry 69ebb265be ox-icalendar.el (org-icalendar-export-current-agenda): Do not evaluate babel code blocks
* ox-icalendar.el (org-icalendar-export-current-agenda): Do
not evaluate babel code blocks.

Thanks to Nicolas for directions about this.
2013-04-10 18:40:47 +02:00