Commit Graph

9324 Commits

Author SHA1 Message Date
Nicolas Goaziou 7e1799e5fc ox-latex: Update a docstring
* lisp/ox-latex.el (org-latex-listings): Update docstring.
2013-07-05 13:57:46 +02:00
Bastien Guerry aab08b5e36 Merge branch 'maint' 2013-07-04 22:11:57 +02:00
Bastien Guerry eeb1323933 Fix commit 19af72
Thanks to Rainer Stengele for reporting this.
2013-07-04 22:11:46 +02:00
Eric Schulte bec8839cd6 prologue and epilogue for R blocks 2013-07-04 08:37:02 -06:00
Bastien Guerry a09835d844 Merge branch 'maint' 2013-07-04 15:26:35 +02:00
Bastien Guerry 9bec9f1cd0 org.el (org-forward-element, org-backward-element): Throw a message instead of an error
* org.el (org-forward-element, org-backward-element): Throw a
message instead of an error when trying to move from a
position where there is no element.
2013-07-04 15:26:25 +02:00
Nicolas Goaziou ba7c193978 Fix completions related to new export back-end definition
* lisp/org-pcomplete.el (pcomplete/org-mode/file-option/options):
  Apply changes to export back-end definiton.
* lisp/org.el (org-get-export-keywords): Apply changes to export
  back-end definiton..
2013-07-04 14:17:50 +02:00
Nicolas Goaziou 758a545fb6 Export back-ends: Apply changes to back-end structure
* lisp/ox-html.el (org-html--format-toc-headline): Make use of
  anonymous back-ends.
* lisp/ox-odt.el (org-odt-footnote-reference): Make use of anonymous
  back-ends.
(org-odt-format-label, org-odt-toc, org-odt-format-headline--wrap):
  Use `org-export-with-backend' instead of
  `org-export-with-translations'.
* contrib/lisp/ox-freemind.el (org-freemind--build-node-contents): Use
  `org-export-with-backend' instead of `org-export-with-translations'.
2013-07-04 14:17:49 +02:00
Nicolas Goaziou cea0434c4f ox: Change back-ends internal representation to structures
* lisp/ox.el (org-export--registered-backends): Renamed from
  `org-export-registered-backends'.
(org-export-invisible-backends): Removed variable.
(org-export-get-backend, org-export-get-all-transcoders
org-export-get-all-options, org-export-get-all-filters): New
functions.  It replaces `org-export-backend-translate-table'.
(org-export-barf-if-invalid-backend, org-export-derived-backend-p,
org-export-define-backend, org-export-define-derived-backend):
Rewrite functions using new representation.
(org-export-backend-translate-table): Remove function.
(org-export-get-environment): Use new function.
(org-export--get-subtree-options, org-export--parse-option-keyword,
org-export--get-inbuffer-options, org-export--get-global-options,
org-export-to-buffer org-export-to-file, org-export-string-as
org-export-replace-region-by): Update docstring.
(org-export-data-with-translations): Remove function.  Use
`org-export-data-with-backend' with a temporary back-end instead.
(org-export-data-with-backend, org-export-as): Reflect new definition
for back-ends.
(org-export--dispatch-action, org-export--dispatch-ui): Reflect new
definition for back-ends and variable removal.  Refactoring.
(org-export-filter-apply-functions): Call functions with
current back-end's name, not full back-end.
* lisp/org.el (org-export-backends, org-create-formula--latex-header):
Use new structure and variables.
* testing/lisp/test-ox.el: Update tests.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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