Commit Graph

10826 Commits

Author SHA1 Message Date
Nicolas Goaziou 381ad4b33a Small refactoring
* lisp/org.el (org-fill-paragraph): Avoid calling
  `fill-region-as-paragraph' if BEG is equal to END.
2014-08-03 09:57:37 +02:00
Nicolas Goaziou d649b792c0 Small refactoring
* lisp/org.el (org-fill-paragraph): Small refactoring.
2014-08-02 23:16:05 +02:00
Nicolas Goaziou cbb82d0c6e Speed up paragraph filling
* lisp/org.el (org-fill-paragraph): Do not parse objects in whole
  paragraph if none looks like a line break.
2014-08-02 22:49:24 +02:00
Nicolas Goaziou 604b93892c ox: Title fallbacks to nil instead of file name
* lisp/ox.el (org-export--get-inbuffer-options):
(org-export-as): Remove title default value handling.
(org-export--get-buffer-attributes): Remove unnecessary property.

* doc/org.texi (Document title):
(Export settings):
* doc/orgguide.texi (Export options): Update documentation.

* testing/lisp/test-ox.el (test-org-export/set-title): Update tests
  according to new specifications.
2014-08-02 21:14:22 +02:00
Nicolas Goaziou 6ba05e3200 ox-html: Fix missing <span> block around section number
* lisp/ox-html.el (org-html-headline): Add <span> element around
  section number.

http://permalink.gmane.org/gmane.emacs.orgmode/89369
2014-08-02 15:36:42 +02:00
Moritz Kiefer 91eee36742 ox-latex.el: Add page number of link when exporting to latex
* lisp/ox-latex.el (org-latex--inline-image): Use page
number (:search-option) of pdf links as page option in
includegraphics.

TINYCHANGE
2014-08-02 10:24:41 +02:00
Bastien Guerry 296d82a383 New alias `org-toggle-latex-fragment' for `org-preview-latex-fragment'
* org.el (org-ellipsis, org-remove-highlights-with-change):
Enhance docstring.
(org-preview-latex-fragment): Make obsolete.  Alias to the new
name `org-toggle-latex-fragment'.
(org-mode, org-mode-map): Use `org-toggle-latex-fragment'.
2014-08-01 13:52:32 +02:00
Nicolas Goaziou cdb85242d6 Fix block hiding
* lisp/org.el (org-hide-block-toggle): Correctly find boundaries of
  the block at point.  Fix `off' argument behavior.  Allow to hide
  a block when at any affiliated keyword.

* testing/lisp/test-org.el (test-org/hide-block-toggle): New test.

Thanks to Andrea Rossetti for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/89324
2014-08-01 10:50:36 +02:00
Nicolas Richard 350fdfd676 ox: Signal an error if keyword is unknown while defining backends
* lisp/ox.el (org-export-define-backend):
(org-export-define-derived-backend): Signal an error if keyword is
unknown.
2014-07-31 12:22:00 +02:00
Nicolas Goaziou 5ec0468e0a Merge branch 'maint'
Conflicts:
	lisp/org-element.el
2014-07-31 12:19:40 +02:00
Nicolas Goaziou f5065b2ff6 org-element: Fix docstring
* lisp/org-element.el (org-element-headline-parser): Add missing
  `:post-blank' property in docstring.
2014-07-31 12:17:35 +02:00
Nicolas Goaziou cc7d757571 ox-html: Fix missing section number in ids
* lisp/ox-html.el (org-html-headline): Fix missing section number in
  div ids.

Thanks to Matt Lundin for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/89291
2014-07-31 10:59:58 +02:00
Matt Lundin 282d8c86e7 Fix broken links in html publishing
* lisp/ox-html.el: Fix incorrect property name in :options-alist of
  html backend definition.
2014-07-30 09:57:18 +02:00
Bastien Guerry 3b6f386795 Merge branch 'maint' 2014-07-29 23:28:34 +02:00
Achim Gratz 60bfafcb0c org.el (org-refresh-category-properties): Enhance regexp
* org.el (org-refresh-category-properties): Enhance regexp.
2014-07-29 23:28:08 +02:00
Matt Lundin a40f568f19 Protect open buffers when publishing sitemap
* lisp/ox-publish.el: (org-publish-find-title) (org-publish-find-date)
  Make sure to call org-export-get-environment in copy of buffer if
  emacs is already visiting. Otherwise, #+bind variables meant for
  export can be set in live buffers.

This patch also optimizes the above functions by inhibiting
org-startup on buffers emacs visits temporarily.
2014-07-29 23:20:19 +02:00
Matt Lundin dc4942442c Fix docstring of org-agenda-inhibit-startup
* lisp/org.el: org-agenda-inhibit-startup: fix docstring to reflect
  default value
2014-07-29 23:19:10 +02:00
Bastien Guerry 2558de0ab3 Merge branch 'master' of orgmode.org:org-mode 2014-07-29 23:18:49 +02:00
Achim Gratz ec231c5db2 Fix 600d3bb56b
* lisp/org-table.el: The reference has been saved in `formrpl', not
  `repl'.
2014-07-29 21:35:43 +02:00
York Zhao 12d5d5f775 org-table.el (org-table-eval-formula): Fix variable name typo 2014-07-29 19:27:57 +02:00
Bastien Guerry 8d8dfacfc6 Fix code typo in 3af4949a 2014-07-29 16:56:44 +02:00
Nicolas Goaziou c9ca0b6df8 ox-html: Use options instead of hard-coded variables
* contrib/lisp/ox-s5.el (org-s5--format-toc-headline): Apply signature
  change.

* lisp/ox-md.el (org-md-headline): Apply signature change.

* lisp/ox-html.el (org-html-format-drawer-function,
  org-html-publish-to-html): Small reformatting.

(org-html-infojs-install-script, org-html--build-meta-info,
org-html--build-mathjax-config, org-html-format-spec,
org-html--build-pre/postamble, org-html-template, org-html-toc,
org-html--format-toc-headline, org-html-list-of-listings,
org-html-list-of-tables, org-html-bold, org-html-drawer,
org-html-headline, org-html-inlinetask, org-html-italic,
org-html-checkbox, org-html-inline-image-p, org-html-link,
org-html-section, org-html-strike-through, org-html-table-cell,
org-html-table-row, org-html-underline, org-html-verbatim,
org-html-final-function, org-html-export-to-html): Do not use
hard-coded variable names.

(org-html-format-headline-function,
org-html-format-inlinetask-function): Change default value.  Require
an additional argument.

(org-html-format-footnote-reference,
org-html-format-footnotes-section,
org-html-format-footnote-definition, org-html-format-headline,
org-html-format-headline--wrap, org-html-format-section): Remove
functions.

(org-html-footnote-section, org-html-footnote-reference): Apply
function removal.  Do not use hard-coded variable names.

(org-html--anchor, org-html--todo, org-html--tags): Change signature.
Do not use hard-coded variable names.

(org-html-radio-target, org-html-target): Apply signature change.

(org-html-format-headline-default-function,
org-html-format-inlinetask-default-function): New functions.
2014-07-29 15:45:18 +02:00
Nicolas Goaziou 3c22bb19e0 ox-odt: Use options instead of hard-coded variables
* lisp/ox-odt.el (org-odt-styles-dir,
  org-odt-create-custom-styles-for-srcblocks, org-odt-table-styles,
  org-odt-get-table-cell-styles): Fix docstring.
(org-odt-format-headline-function,
org-odt-format-inlinetask-function): Change default value.

(org-odt-template, org-odt-drawer, org-odt-format-headline--wrap,
org-odt-inlinetask, org-odt--enumerate, org-odt--image-size,
org-odt--enumerable-image-p, org-odt--enumerable-latex-image-p,
org-odt--enumerable-formula-p, org-odt-link, org-odt-table-style-spec,
org-odt-timestamp): Use option instead of hard-coded variables.

(org-odt-format-headline): Remove function.

(org-odt-do-format-code): Change signature.  Use options instead of
hard-coded variables.
(org-odt-fixed-width, org-odt-latex-environment,
org-odt-link--inline-image, org-odt-format-code): Apply signature
change.

(org-odt-format-headline-default-function,
org-odt-format-inlinetask-default-function): New functions.

(org-odt-link--inline-image): Fix indentation.
2014-07-29 15:45:18 +02:00
Nicolas Goaziou 0540dccadd Use options instead of hard-coded variables
* lisp/ox-beamer.el (org-beamer--format-frame,
  org-beamer--format-block, org-beamer-template): Use options instead
  of hard-coded variables.

* lisp/ox-man.el (org-man-inline-src-block, org-man-src-block,
  org-man-table, org-man-table-cell): Use options instead of
  hard-coded variables.

* lisp/ox-md.el (org-md-headline): Use options instead of hard-coded
  variables.

* lisp/ox-texinfo.el (org-texinfo-format-headline-function,
  org-texinfo-format-inlinetask-function): Change default value.
(org-texinfo--text-markup, org-texinfo--format-menu): Change signature
(org-texinfo--build-menu, org-texinfo-bold, org-texinfo-code,
org-texinfo-comment, org-texinfo-italic, org-texinfo-verbatim): Apply
signature change.

(org-texinfo-template, org-texinfo-clock, org-texinfo-drawer,
org-texinfo-link, org-texinfo-plain-list, org-texinfo-planning,
org-texinfo-table, org-texinfo-table-cell, org-texinfo-timestamp): Use
options instead of variable names.

(org-texinfo-format-headline-default-function,
org-texinfo-format-inlinetask-default-function): New functions.
(org-texinfo-headline, org-texinfo-inlinetask): Use new functions.
2014-07-29 15:45:18 +02:00
Nicolas Goaziou fd448cb1e2 Remove some options associated to variables
* lisp/ox-html.el: Remove options.

* lisp/ox-icalendar.el: Remove options.

* lisp/ox-latex.el (org-latex-guess-inputenc, org-latex-compile,
  org-latex--collect-warnings): Use full variable name instead of an
  option.

* lisp/ox-man.el: Remove options.

* lisp/ox-odt.el: Remove options.

* lisp/ox-texinfo.el: Remove options.

* doc/org.texi (Publishing options): Update documentation accordingly.

These variables are meant to be used outside (or on the fringe) of the
export process, where information channel is not available.

remove
2014-07-29 15:45:18 +02:00
Nicolas Goaziou 011df55c70 ox-latex: Use options instead of hard-coded variables
* lisp/ox-latex.el (org-latex-format-inlinetask-function): Change
  default value.
(org-latex-guess-inputenc, org-latex--text-markup, org-latex-template,
org-latex-clock, org-latex-drawer, org-latex-footnote-reference,
org-latex-headline, org-latex-inline-src-block, org-latex-keyword,
org-latex--inline-image, org-latex-link, org-latex-planning,
org-latex-src-block, org-latex-table, org-latex--org-table,
org-latex--table, org-latex--math-table, org-latex-table-cell,
org-latex-table-row, org-latex-timestamp, org-latex-compile,
org-latex--collect-warnings): Use options instead of hard-coded
variables.

(org-latex-format-inlinetask-default-function): New function.
(org-latex-inlinetask): Use new function.

(org-latex--text-markup): Change signature.
(org-latex-bold, org-latex-code, org-latex-italic,
org-latex-strike-through, org-latex-underline, org-latex-verbatim):
Apply signature change.
2014-07-29 15:45:18 +02:00
Bastien Guerry 06aa1b615c org.el (org-yank): Small docstring enhancement
* org.el (org-yank): Small docstring enhancement.
2014-07-29 15:35:39 +02:00
Malcolm Purvis 3af4949a07 org.el (org-refresh-category-properties): Regexp enhancement
* org.el (org-refresh-category-properties): Regexp enhancement.

TINYCHANGE
2014-07-29 15:22:54 +02:00
Bastien Guerry a98a6afe56 Merge branch 'maint' 2014-07-29 15:21:31 +02:00
Matt Lundin 507244d56b Remove unnecessary invocations of org-mode
* lisp/ox-publish.el: (org-publish-find-title) (org-publish-find-date)
  Fix unnecessary invocations of org-mode with
  org-inhibit-startup.

The functions above call org-mode with org-inhibit-startup in org
buffers that are already open. The result is that these open buffers
lose some crucial local variables during publishing. For instance,
an open buffer will lose its dir-local-variables-alist setting
during publishing. There is no need to call org-mode here, because
org-mode is a) either already initialized in the buffer or b)
initialized via earlier call to find-file-no-select.

This looks to me like a relic of some past time when these functions were
called in temporary buffers that contained copies of the file's contents.
2014-07-29 15:21:21 +02:00
Bastien Guerry 2dbb338ad3 Merge branch 'maint' 2014-07-28 19:23:04 +02:00
Bastien Guerry 812a889657 org-agenda.el (org-agenda-prepare): Reset preset filters
* org-agenda.el (org-agenda-prepare): Reset preset filters
when using sticky agendas.

Thanks to Thomas Morgan for reporting this.
2014-07-28 19:22:53 +02:00
Bastien Guerry f8b42e8ebe Don't use an overlay for src blocks backgrounds
* org-faces.el (org-block-background): Delete.

* org.el (org-fontify-meta-lines-and-blocks-1): Don't use an
overlay for the block background.
(org-in-src-block-p): Check against the `src-block' text
property, not against an overlay.

The overlay was introduced here:
http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=27d98d879
and fixed here
http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=69811ff44

But (1) it makes fontification slowler, (2) it makes
`org-in-src-block-p' slower and it prevents correct ps-printing
of Org buffers.

If we want to use a different background color, we need another
solution than using overlays.
2014-07-28 18:54:00 +02:00
Bastien Guerry 98295a8a25 Remove useless declaration 2014-07-28 18:29:24 +02:00
Bastien Guerry e56ea43008 Merge branch 'maint'
Conflicts:
	lisp/org-agenda.el
2014-07-28 18:22:29 +02:00
Bastien Guerry 6efe8eacf0 org-agenda.el (org-agenda-get-sexps): Don't add tags as text properties
* org-agenda.el (org-agenda-get-sexps): Don't add tags as text
properties.

Thanks to Raimund Berger for reporting this.
2014-07-28 18:21:58 +02:00
Bastien Guerry 7f21cfc658 Merge branch 'maint' 2014-07-28 18:08:44 +02:00
Bastien Guerry 1387694888 org-capture.el (org-capture-fill-template): Small fix
* org-capture.el (org-capture-fill-template): Take
`org-extend-today-until' into account when setting the format
time string.
2014-07-28 18:08:34 +02:00
Bastien Guerry 63160e9aab org-clock.el: Various improvements
* org-clock.el (org-clock-display-default-range): New option.
(org-clock-display): Use the new option.
(org-clock-sum-custom): New parameters `range' and `propname'.
(org-clock-special-range): Allow to enter a special range
through the calendar.
2014-07-28 17:43:15 +02:00
Bastien Guerry e8b51c0ce5 org.el (org-self-insert-command): Use `yas-expand'
* org.el (org-self-insert-command): Use `yas-expand' as
yas/expand is obsolete since Yasnippet 0.8.

Thanks to Craig Tanis for reporting this.
2014-07-28 17:28:54 +02:00
Nikolai Weibull 5512bedee6 org-agenda.el (org-agenda-insert-diary-make-new-entry): Fix ordering
* org-agenda.el (org-agenda-insert-diary-make-new-entry):
Fix ordering.

TINYCHANGE
2014-07-28 16:22:04 +02:00
Nicolas Richard 3d7a9f8517 Make org-get-limited-outline-regexp usable outside of org.
This allows org-narrow-to-subtree to function in Outline mode.

* lisp/org-macs.el (org-get-limited-outline-regexp): Use
  outline-regexp instead of org-outline-regexp when not in Org mode.
2014-07-28 16:14:39 +02:00
Bastien Guerry 2cd70ef915 org.el (org-set-font-lock-defaults): Highlight COMMENT
* org.el (org-set-font-lock-defaults): Highlight COMMENT in
headlines with `org-special-keyword'.
2014-07-28 16:03:05 +02:00
Bastien Guerry 31c7e3f065 org.el (org-comment-dwim): Fix docstring location
* org.el (org-comment-dwim): Fix docstring location.
2014-07-28 16:00:23 +02:00
Bastien Guerry c259952b9e Merge branch 'master' of orgmode.org:org-mode 2014-07-28 15:41:14 +02:00
Bastien Guerry 8b7b2f6600 org.el (org-open-at-point): Also open links in comment blocks
* org.el (org-open-at-point): Also open links in comment blocks.
2014-07-28 15:40:49 +02:00
Nicolas Goaziou b459972435 Merge branch 'maint' 2014-07-28 15:27:02 +02:00
Nicolas Goaziou d83bf0e800 ox-latex: Fix defcustoms
* lisp/ox-latex.el (org-latex-table-scientific-notation): Set
  appropriate value.
(org-latex-listings-options): Fix docstring.
2014-07-28 15:25:50 +02:00
Bastien Guerry 44aaaad8c0 ox-html.el (org-html-fontify-code): Possibly deactivate fci-mode
* ox-html.el (org-html-fontify-code): Possibly deactivate fci-mode.

Thanks to Kaushal for suggesting this.
2014-07-28 11:07:03 +02:00
Bastien Guerry 9139521186 Complete commit 9e006d11
* org.el (org-preview-latex-fragment): Remove LaTeX fragments
overlays when they are displayed.  Fix message.
2014-07-28 01:24:56 +02:00
Bastien Guerry 96323cf2aa Merge branch 'maint' 2014-07-28 01:03:03 +02:00
Bastien Guerry d8a0ee7aad org.el (org-paste-subtree): Fix match subexpression
* org.el (org-paste-subtree): Fix match subexpression.

Thanks to Anders Johansson for reporting this.
2014-07-28 01:02:50 +02:00
Bastien Guerry aef3b6c3f9 org-refile: Don't copy the refiled subtree to the clipboard
* org.el (org-paste-subtree): New parameter `remove', to
remove the pasted subtree from the `kill-ring'.
(org-refile): Use the new parameter of `org-paste-subtree'.

Thanks to Samuel Wales for suggesting this.
2014-07-28 00:49:01 +02:00
Bastien Guerry 99f999944e org-src.el (org-src-font-lock-fontify-block): Do not use `font-lock-ensure'
* org-src.el (org-src-font-lock-fontify-block): Use
`font-lock-fontify-buffer' instead of `font-lock-ensure',
otherwise fonts are not displayed for src blocks.

Thanks to Mathäus Meyer for reporting this.
2014-07-28 00:34:55 +02:00
Bastien Guerry 8f3a1f3d22 Fix trailing whitespace in previous commit 2014-07-28 00:01:23 +02:00
Rainer M. Krug 4c415f38a5 Make transfer of values from R type aware
* lisp/ob-R.el (org-babel-R-assign-elisp): Add different cases for
transfering integer, float, string and other variables to R so that
integer values are transferred as integers (L) and stored in R as
such.  This change is backward compatible as integer values are
numerical values in R.

Moved definition of R functions for transfer of tables into defconst
ob-R-transfer-variable-table-with-header and
ob-R-transfer-variable-table-without-header.
2014-07-28 00:01:00 +02:00
Rainer M. Krug fdfb59454a lisp/ob-R.el: Fix tangling with tables
* lisp/ob-R.el (org-babel-R-assign-elisp): Fix variable transfer of
tables by using text connections in R instead of files.  Variable
transfer of tables does not depend on files anymore, i.e. works also
when tangling.
2014-07-28 00:00:52 +02:00
Bastien Guerry da8b695b2b ob-core.el (org-babel-insert-header-arg): Tiny message fix
* ob-core.el (org-babel-insert-header-arg): Tiny message fix.
2014-07-27 23:25:41 +02:00
Bastien Guerry ac4b11e565 ox-html.el (org-html-protect-char-alist): Make a defvar
* ox-html.el (org-html-protect-char-alist): Make a defvar.
2014-07-27 19:55:49 +02:00
Bastien Guerry 9e006d1128 org.el (org-ctrl-c-ctrl-c): Don't remove LaTeX fragments overlays
* org.el (org-ctrl-c-ctrl-c): Don't remove LaTeX fragments overlays.
2014-07-27 19:44:40 +02:00
Rainer M. Krug 2aec9fddd4 ox-latex.el (org-latex-listings-langs): Add `(makefile "make")'
* ox-latex.el (org-latex-listings-langs): Add `(makefile "make")'.
2014-07-27 16:20:45 +02:00
Bastien Guerry 3aef08ddeb org.el (org-activate-plain-links): Don't activate :elisp: and 🐚 tags
* org.el (org-activate-plain-links): Don't activate :elisp:
and 🐚 tags as links.  Enhance the docstring.
(org-activate-angle-links, org-activate-footnote-links)
(org-activate-bracket-links, org-activate-dates)
(org-activate-target-links): Minor docstrings enhancement.

Thanks to Andrea Rossetti for reporting this.
2014-07-27 15:58:13 +02:00
Bastien Guerry d4799ebfc1 org-table.el (org-table-eval-formula): Better error throwing
* org-table.el (org-table-eval-formula): Throw an error when
trying to replace a wrong formula specifier.

Thanks to Alejandro Suarez for reporting this.
2014-07-27 15:05:48 +02:00
Nicolas Goaziou fbc7097ffa Merge export and special blocks within back-ends
* lisp/ox-ascii.el (org-ascii-export-block): Remove function.
(org-ascii-special-block): Handle raw special blocks.

* lisp/ox-beamer.el (org-beamer-export-block): Remove function.

* lisp/ox-html.el (org-html-export-block): Remove function.
(org-html-special-block): Handle raw special blocks.

* lisp/ox-latex.el (org-latex-export-block): Remove function.
(org-latex-special-block): Handle raw special blocks.

* lisp/ox-man.el (org-man-export-block): Remove function.
(org-man-special-block): Handle raw special blocks.

* lisp/ox-md.el (org-md-export-block): Remove function.

* lisp/ox-odt.el (org-odt-export-block): Remove function.
(org-odt-special-block): Handle raw special blocks.

* lisp/ox-texinfo.el (org-texinfo-export-block): Remove function.
(org-texinfo-special-block): Handle raw special blocks.

* contrib/lisp/ox-groff.el (org-groff-export-block): Remove function.
(org-groff-special-block): Handle raw special blocks.

* contrib/lisp/ox-koma-letter.el (org-koma-letter-export-block):
  Remove function.
2014-07-27 14:29:24 +02:00
Nicolas Goaziou bc43228e6d Remove `export-block' syntax type
* lisp/org-element.el (org-element-all-elements): Remove
  `export-block' type.
(org-element-block-name-alist): Make it a defconst since it is not
meant to be changed anymore.
(org-element-export-block-parser,
org-element-export-block-interpreter): Remove functions.

* lisp/ox.el (org-export-filters-alist): Remove export block filter.
(org-export-register-backend): Do not alter
`org-export-block-name-alist' anymore.
(org-export-define-backend, org-export-define-derived-backend): Update
docstring.
(org-export-filter-export-block-functions): Remove variable.

* testing/lisp/test-org-element.el (test-org-element/export-block-parser,
  test-org-element/export-block-interpreter): Remove tests.

* testing/lisp/test-ox.el (test-org-export/define-backend): Update test.
2014-07-27 14:29:21 +02:00
Nicolas Goaziou 173ade7078 org-element: Add `:raw-value' property to special blocks
* lisp/org-element.el (org-element-special-block-parser): Add
  `:raw-value' property.
2014-07-27 14:29:17 +02:00
Nicolas Goaziou b77a026a24 Merge branch 'maint' 2014-07-27 14:28:53 +02:00
Nicolas Goaziou 2160b3d242 ox: Implement predicate for export blocks
* lisp/ox.el (org-export-raw-special-block-p): New function.

* testing/lisp/test-ox.el (test-org-export/raw-special-block-p): New
  test.

This patch is a forward-compatibility measure since the function is
mandatory for export back-ends in Org 8.3. It makes it easier for
back-end maintainers to provide a back-end compatible with both Org
8.2 and 8.3.
2014-07-27 14:25:44 +02:00
Nicolas Goaziou 451e20d982 Merge branch 'maint'
Conflicts:
	testing/lisp/test-org-element.el
2014-07-26 15:10:22 +02:00
Nicolas Goaziou 38ff96ecc3 org-element: Fix parsing multi-line links
* lisp/org-element.el (org-element-link-parser): Properly handle
  multi-line links according to RFC 3986 when enclosed within square
  brackets.

* testing/lisp/test-org-element.el (test-org-element/link-parser): Add
  test.
2014-07-26 15:08:23 +02:00
Nicolas Goaziou ef3c574715 org-element: Update regexps
* lisp/org-element.el (org-element--cache-sensitive-re): Update
  regexps.
2014-07-25 20:37:37 +02:00
Nicolas Goaziou 214ef7d461 Merge branch 'maint' 2014-07-25 15:24:45 +02:00
Nicolas Goaziou 0e01e3eb13 org-element: Fix object parsing in captions
* lisp/org-element.el (org-element-parse-secondary-string): Clone all
  local variables from current buffer before parsing a secondary
  string.  Small refactoring.
(org-element-object-variables): Remove variable.

* testing/lisp/test-org-element.el (test-org-element/secondary-string-parsing):
  Add test.

Thanks to Thomas S. Dye for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/88850
2014-07-25 15:11:10 +02:00
Nicolas Goaziou b15a9c0c1c ox-ascii: Fix line break preservation
* lisp/ox-ascii.el (org-ascii--justify-element): Fix line break
  preservation.

Thanks to Miguel Ruiz for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/88866
2014-07-25 14:05:58 +02:00
Nicolas Goaziou dd6b4ffcef ox-ascii: Use options instead of defcustoms in code
* lisp/ox-ascii.el (org-ascii--current-text-width,
  org-ascii--build-title, org-ascii--build-toc,
  org-ascii--list-listings, org-ascii--list-tables,
  org-ascii-template--document-title, org-ascii-inner-template,
  org-ascii-template, org-ascii-code, org-ascii-drawer,
  org-ascii-headline, org-ascii-inline-src-block,
  org-ascii-format-inlinetask-default, org-ascii-inlinetask,
  org-ascii-link, org-ascii-paragraph, org-ascii-quote-block,
  org-ascii-section, org-ascii-src-block, org-ascii-table,
  org-ascii--table-cell-width, org-ascii-table-cell,
  org-ascii-verbatim, org-ascii-verse-block,
  org-ascii-filter-headline-blank-lines,
  org-ascii-filter-paragraph-spacing): Use options instead of
  hard coded variables.
2014-07-25 13:48:28 +02:00
Nicolas Goaziou f4455f4902 Merge branch 'maint' 2014-07-25 11:21:56 +02:00
Nicolas Goaziou 43a8b979f8 ox-odt: Silence byte-compiler
* lisp/ox-odt.el (org-odt--format-paragraph): Change signature to
  include info.
(org-odt-footnote-reference, org-odt-paragraph): Apply signature
change.
2014-07-25 11:20:49 +02:00
Nicolas Goaziou ced4fa3205 Merge branch 'maint' 2014-07-25 11:05:49 +02:00
Nicolas Goaziou bacfe5b4f7 org-clock: Update syntax for indentation in clock tables
* lisp/org-clock.el (org-clocktable-indent-string): Use "\emsp"
  instead of "\__", which is not supported anymore since Org 8.0.

Thanks to Buddy Butterfly for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/88842
2014-07-25 11:02:55 +02:00
Nicolas Goaziou 010d105b04 Merge branch 'maint' 2014-07-24 15:01:25 +02:00
Nicolas Goaziou 776972cfe8 ox-odt: Fix handling of quoted and centered paragraphs
* lisp/ox-odt.el (org-odt--paragraph-style): New function.
(org-odt--format-paragraph): Use new function to get proper style to
apply.

Thanks to Baptiste for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/88798
2014-07-24 14:59:24 +02:00
Nick Dokos db0130468b Merge branch 'maint' 2014-07-23 23:58:13 -04:00
Nick Dokos c9613c0cad When editing a table formula, point is not necessarily on its referent.
* org-table.el (org-table-show-reference): Call `set-window-start'
  with the calculated values `min' and `max', not with
  (point-min) and (point-max).

Reported by Luke Crook (http://article.gmane.org/gmane.emacs.orgmode/88610)
	    Thorsten Grothe (http://thread.gmane.org/gmane.emacs.orgmode/88698)
	    and Robert Klein in the latter thread.

Robert Klein bisected it down to 30220ffcdc.
2014-07-23 23:57:06 -04:00
Rasmus 0be96db56e org-element.el: Allow one-line LaTeX environments
* org-element.el (org-element--latex-begin-environment,
org-element--latex-end-environment): New format strings to identify
beginning and ending of LaTeX environments.
(org-element-latex-environment-parser, org-element-paragraph-parser,
org-element--current-element): Use `org-element--latex-begin-environment'
and `org-element--latex-end-environment'.

* test-org-element.el (test-org-element/latex-environment-parser):
Add tests.
2014-07-23 10:24:10 +02:00
Nicolas Goaziou 29f3662035 Merge branch 'maint' 2014-07-23 10:09:04 +02:00
Nicolas Goaziou d0959d410b org-element: Fix test failure
* lisp/org-element.el (org-element--current-element): Fix regexp.
2014-07-23 10:07:55 +02:00
Nicolas Goaziou 02f2d5b42a Merge branch 'maint' 2014-07-22 11:55:33 +02:00
Nicolas Goaziou ec0e3cf70b org-element: Fix regexp matching LaTeX environments
* lisp/org-element.el (org-element--current-element): Fix regexp
  matching latex environments.  Discrepancy with regexp used in
  `org-element-latex-environment-parser' introduced matching errors.
2014-07-22 11:52:32 +02:00
Nicolas Goaziou 8feb8b93d5 org-element: Small optimization
* lisp/org-element.el (org-element--cache-for-removal): Do not remove
a robust element whenever only its contents are modified.  Remove
inlinetasks as robust elements since modifying a node property inside
implies to parse the task again.
2014-07-20 19:35:52 +02:00
Nicolas Goaziou 3c14db8685 org-element: Fix infloop in cache
* lisp/org-element.el (org-element--cache-process-request): Take into
  consideration changes to come so as to avoid parsing elements with
  false beginning positions.
(org-element--cache-sync): Change signature.

Thanks to Thorsten Jolitz for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/88673
2014-07-20 19:09:52 +02:00
Nicolas Goaziou 7bd8fafe7a org-element: Better collision handling in cache sync requests
* lisp/org-element.el (org-element--cache-process-request): Handle
  cases where procesing the first request brings us past the start of
  the next one.
2014-07-20 19:08:58 +02:00
Nick Dokos 335e97f5ab Merge branch 'maint'
Merge bug fix for org-table.el:org-table-clean-before-export.
2014-07-18 23:47:03 -04:00
Nick Dokos 79873390ed org-clean-before-export matches non-special columns spuriously
* org-table.el (org-table-clean-before-export): The regexes match
  spaces in addition to the special characters that might be used in
  the first column as special marking characters.  Remove the space
  from the character class.

  In addition, the `special' variable included a backslash which
  afaict does nothing: delete it.

  The function itself takes an optional parameter which is not used by
  any of the callers: get rid of it.  Getting rid of it allows a small
  simplification of the code.

The bug was found by Thorsten Grothe:

    http://thread.gmane.org/gmane.emacs.orgmode/88634
2014-07-18 23:44:46 -04:00
Nicolas Goaziou 05be573e92 org-element: Fix re-parenting during cache synchronization
* lisp/org-element.el (org-element--cache-process-request): Correctly
  re-parent elements in cache in some corner cases.
* testing/lisp/test-org-element.el (test-org-element/cache): Add tests.
2014-07-17 18:12:59 +02:00
Nicolas Goaziou 33a344be33 org-element: Fix corner case in cache synchronization
* lisp/org-element.el (org-element--cache-submit-request): When
  changes happen before first know element, start from phase 1 instead
  of phase 2 in order to properly re-parent subsequent elements, if
  needed.
(org-element--cache-process-request): Do not propagate beginning
position since it is already available to the request.
2014-07-17 18:12:49 +02:00
Nicolas Goaziou 476ea10a70 org-element: Fix "wrong-type-argument" error in cache
* lisp/org-element.el (org-element--cache-sync): Do not copy phase
  number into next request.  This is a special case that deserves to
  be handled locally.  See below.
(org-element--cache-process-request): Properly transfer phase in
a special case, which is now commented.  Also fix phase numbers in
comments.  Small refactoring.

Thanks to Alan Schmitt for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/88406
2014-07-17 16:34:06 +02:00
Nicolas Goaziou 8d0f7340ed ox: Fix inline footnote definitions
* lisp/ox.el (org-export-collect-tree-properties): Make sure changes
  to the parse tree propagate to the value of
  `org-export-get-footnote-definition'.

Thanks to Florian Beck for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/88419
2014-07-16 16:11:52 +02:00
Nicolas Goaziou baa2c5943a org-element: Avoid using a slow regexp
* lisp/org-element.el (org-element-latex-fragment-parser): Avoid using
  a slow regexp.
2014-07-06 23:55:48 +02:00
Nicolas Goaziou 4235718d79 org-element: Small optimizations
* lisp/org-element.el (org-element-latex-fragment-parser): Avoid
  matching twice regexps in some cases.
(org-element--object-lex): Avoid making a funcall if a line break
isn't possible.

This patch also removes the limit on the number of lines a latex
fragment with a single dollar can span over.
2014-07-06 23:15:44 +02:00
Nicolas Goaziou 0ce82e53a1 org-element: Fix docstring
* lisp/org-element.el (org-element-footnote-reference-interpreter):
  Fix docstring.
2014-07-06 19:06:54 +02:00
Nicolas Goaziou ca6ecf9e49 org-element: Remove :inline-definition from inline footnotes
* lisp/org-element.el (org-element-recursive-objects): Add
  `footnote-reference'.
(org-element-secondary-value-alist): Remove reference to
`footnote-reference'.
(org-element-footnote-reference-parser): Definition for inline
references is stored as the contents of the reference, not in
a secondary string.
(org-element-footnote-reference-interpreter): Apply changes from
parser.

* lisp/ox.el (org-export-get-footnote-definition,
  org-export-get-environment): Apply changes from parser.

* testing/lisp/test-org-element.el (test-org-element/footnote-reference-parser):
  Update test.
(test-org-element/context): Add test.

Storing definition in a secondary string was a poor design choice as
there is no "primary" string anyway.  This also prevents
`org-element-context' from finding objects within the inline
definition.
2014-07-06 11:24:12 +02:00
Nicolas Goaziou df9ccbd119 org-element: Reach orphaned elements during cache sync
* lisp/org-element.el (org-element--cache-sync-requests): Change
  pattern.
(org-element--cache-sync, org-element--cache-submit-request): Update
request pattern.
(org-element--cache-process-request): Remove orphaned elements during
first phase.

An orphaned element is an element not directly altered by changes to
buffer but with one of its parent removed.
2014-07-05 10:54:09 +02:00
Nicolas Goaziou f1433d82ae org-element: Fix buffer positions when merging requests
* lisp/org-element.el (org-element--cache-submit-request): Correctly
  compute buffer positions where cache is missing, taking into account
  the request not yet applied.
2014-07-05 10:54:09 +02:00
Eric Schulte fdc673dac0 remove extra escape org-emphasis-regexp-components
specifically in the second 'post' element

* lisp/org.el (org-emphasis-regexp-components): Remove extra escape
  org-emphasis-regexp-components, specifically in the second 'post'
  element.
2014-07-03 07:59:15 -04:00
Nicolas Goaziou 126e2bcebd org-element: Fix corner case
* lisp/org-element.el (org-element--cache-for-removal): Fix corner
  case when changes happen in a robust element (e.g., a center block)
  within a fragile element (e.g., a plain list).  Do not assume that
  all parents from a robust element are also robust.
2014-06-30 23:47:37 +02:00
Nicolas Goaziou ef8e9cf045 org-element: Fix bug in sync request submission
* lisp/org-element.el (org-element--cache-submit-request): Do not
  modify ending position twice.
2014-06-30 23:47:37 +02:00
Nicolas Goaziou d1f2d73b08 org-element: Improve sychronization request submission
* lisp/org-element.el (org-element--cache-submit-request): Store
  parent of first element to delete, if any.  This saves a call to
  `org-element--cache-find' in a very common use case.
(org-element--cache-sync-requests): Update docstring accordingly.
2014-06-30 23:47:36 +02:00
Nicolas Goaziou 67c1e54a5b org-element: Tiny refactoring
* lisp/org-element.el (org-element--cache-submit-request): Tiny
  refactoring.
2014-06-30 23:47:36 +02:00
Nicolas Goaziou 093d455f7f org-element: Better threshold computation during synchronization
* lisp/org-element.el (org-element--cache-process-request): Threshold
  is based off beginning of the first element to shift instead of the
  end of the changes.
2014-06-30 23:47:36 +02:00
Nicolas Goaziou 1a9b074d9f org-element: Simplify request processing
* lisp/org-element.el (org-element--cache-process-request): Do not try
  to find orphans for now.  Remove useless comments.  Refactor code.
2014-06-30 23:45:20 +02:00
Nicolas Goaziou ba9c43fc81 org-element: Do not trust a stored request after cache sync
* lisp/org-element.el (org-element--cache-submit-request): Do not
  trust a stored request after calling `org-element--cache-sync' since
  it may as well not exist anymore (i.e., the synchronization was
  complete).
2014-06-30 23:44:51 +02:00
Nicolas Goaziou 815c218f22 org-element: Small fix
* lisp/org-element.el (org-element--cache-submit-request): Fix off by
  one error when updating cache.  Changes happening at the beginning
  to the previous ones, which are always located at the beginning of
  an element, imply to delete previous element.  Also do not call
  `org-element--cache-sync' if there's nothing to synchronize.
2014-06-29 17:17:23 +02:00
Nicolas Goaziou f12f9543fc org-element: Tiny fix
* lisp/org-element.el (org-element-headline-parser): Do not assume
  property drawers are correctly formed.
2014-06-29 15:25:54 +02:00
Nicolas Goaziou 49f3c6e558 org-element: Fix inlinetask parsing
* lisp/org-element.el (org-element-inlinetask-parser): Do not infloop
  when parsing property drawer in an inlinetask.

* testing/lisp/test-org-element.el (test-org-element/headline-properties):
  Add test.

Thanks to Aaron Ecay for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/88133
2014-06-29 15:23:22 +02:00
Nicolas Goaziou 2824502e2e org-element: Fix cache corruption when altering a drawer
* lisp/org-element.el (org-element--cache-submit-request): Correctly
  update cache when changes alter the contents of a greater
  element (e.g. a property drawer).

Thanks to Alan Schmitt for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/88086
2014-06-28 00:28:45 +02:00
Nicolas Goaziou 2ae77c5e50 org-element: Fix parsing path starting with ~
* lisp/org-element.el (org-element-link-parser): Do not prepend "//"
  to paths starting with "~".

Since b1dcd0fb0b, link parser doesn't
expand file names anymore. We need to prevent it from "fixing" paths
starting with "~", as it can cause trouble to some
exporters (e.g. latex).
2014-06-27 17:28:56 +02:00
Nicolas Goaziou 16c71d6b78 org-element: Small refactoring
* lisp/org-element.el (org-element--cache-generate-key): Small
  refactoring.
2014-06-26 22:00:27 +02:00
Nicolas Goaziou db995f2b9d org-element: Use full range of integers for cache keys
* lisp/org-element.el (org-element--cache-generate-key): Allow
  negative numbers in keys.  Small refactoring.
2014-06-26 21:13:43 +02:00
Nicolas Goaziou afa759f27c Merge branch 'maint' 2014-06-26 12:18:35 +02:00
Nicolas Goaziou a5beff869f ox-ascii: Fix tables with a width cookie
* lisp/ox-ascii.el (org-ascii--table-cell-width): Correctly export
  tables with width cookies.
2014-06-26 12:17:28 +02:00
Nicolas Goaziou d5bc5859af org-element: Fix typo
* lisp/org-element.el (org-element--cache-generate-key): Fix typo in
  docstring.
2014-06-26 01:11:26 +02:00
Nicolas Goaziou d40dbc6ca2 org-element: More refactoring
* lisp/org-element.el (org-element--cache-generate-key): Refactor key
  computation.
(org-element--cache-default-key): Remove variable.
2014-06-26 01:08:15 +02:00
Nicolas Goaziou 03040f109f org-element: Refactoring
* lisp/org-element.el (org-element--cache-sensitive-re): New variable
(org-element--cache-opening-line, org-element--cache-closing-line):
Removed variables.
(org-element--cache-before-change, org-element--cache-after-change):
Refactoring.  Also simplify process.
2014-06-25 23:53:23 +02:00
Nicolas Goaziou e46c62d96f org-element: Small cache fix
* lisp/org-element.el (org-element--cache-before-change): Ignore case
  sensitivity when looking for a modified sensitive line.
2014-06-25 23:51:04 +02:00
Nicolas Goaziou c9eaea360a Fix `org-drag-element-backward'
* lisp/org.el (org-drag-element-backward): Correcly drag elements in
  a drawer or a block.
* testing/lisp/test-org.el (test-org/drag-element-backward): Add test.
2014-06-25 10:49:52 +02:00
Eric Schulte 1c3bdbb80a inhibit <p> wraps on a whole-list basis
* lisp/ox-html.el (org-html-paragraph): Extend the special case of
  inhibiting <p> wrappers to only perform such inhibition when *every*
  element of the list is a single paragraph long.  Otherwise unsightly
  spacing results.
2014-06-23 20:08:09 -04:00
Eric Schulte 518b60aa42 allow square brackets in emphasis post-match
* lisp/org.el (org-emphasis-regexp-components): Allow square brackets
  in the emphasis post match.
2014-06-23 17:47:03 -04:00
Nicolas Goaziou 77e234e578 org-element: Fix thinko
* lisp/org-element.el (org-element--cache-key-less-p): Fix thinko.
2014-06-23 23:45:00 +02:00
Achim Gratz 6d15cd3b89 ob-shell: honor the specified shell for :session
* lisp/ob-shell.el: Remove defcustom `org-babel-sh-command' and
  replace with `shell-file-name' throughout.
  (org-babel-variable-assignments:sh): Make check for bash work in more
  cases.

The original code and the patched version rely on the shell being
available via PATH.  Instead the shell name should be mapped to the
appropriate executable via an alist and invoked via an absolute
filename.  For security reasons the permissible shells should probably
be taken from /etc/shells or equivalent by default.  Instead of
checking for bash, the same or another alist could provide the
information of whether or not the shell supports arrays (which indeed
were introduced by ksh originally).
2014-06-23 20:53:22 +02:00
Achim Gratz 2685f31a50 ob-shell: stratify shell variable quoting
* lisp/ob-shell.el: Remove unused defcustom
  `org-babel-sh-var-quote-fmt'.
  (org-babel-variable-assignments:bash_array):
  (org-babel-variable-assignments:bash_assoc): Remove superfluous
  `mapcar' and double quotes around parameters.
  (org-babel-sh-var-to-sh): Single-quote the whole string and escape
  all single quotes in the original string.
2014-06-23 20:53:16 +02:00
Matt Lundin 4a4dbe16d8 Fix speedkeys to move subtrees up and down
* lisp/org.el (org-speed-commands-default): Bind "U" and "D" to
`org-metaup' and `org-metadown'.

Org speed keys were not updated to reflect the recent changes to
org-shiftmetaup and org-shiftmetadown.  As a result the default
bindings for speedkeys "U" and "D" were destructive, since they moved
only single lines.  Binding them to org-metaup and org-metadown fixes
the problem.

Thanks to Marco Wahl for reporting the problem:
http://permalink.gmane.org/gmane.emacs.orgmode/87873
2014-06-23 16:55:21 +02:00
Nicolas Goaziou 69773248c5 org-element: Fix cache
* lisp/org-element.el (org-element--cache-after-change): Preserve
  match data.

Thanks to Matt Lundin for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/87871
2014-06-23 12:28:11 +02:00
Rasmus def0361b7b ox-latex.el: Extends `org-latex-logfiles-extensions'
ox-latex.el (org-latex-logfiles-extensions): Add more extensions.
2014-06-23 11:26:17 +02:00
Bastien Guerry ddb536e833 Merge branch 'maint' 2014-06-23 09:45:48 +02:00
Bastien Guerry be9a1638af Fix typos: backport revision r117377 from emacs trunk 2014-06-23 09:40:19 +02:00
Eric Schulte 8ad20618d1 map alternate code blocks shell names to sh-mode
* lisp/org-src.el (org-src-lang-modes): Map alternate shell names to
  sh-mode.
2014-06-22 19:50:31 -04:00
Achim Gratz 22410544c7 org: correct package-version for org-structure-template-alist
* lisp/org.el (org-structure-template-alist): Package version should
  be a symbol name, not a string.

Fixes ce41c076c0.
2014-06-22 10:26:43 +02:00
Aaron Ecay 551945e396 lisp/ox-latex.el (org-latex-logfiles-extensions): add more extensions
* lisp/ox-latex.el (org-latex-logfiles-extensions): Add several more
file extensions.

- biber: bcf, blg, run.xml
- tikz externalize: figlist
- xelatex -no-pdf: xdv
2014-06-22 00:14:47 -04:00
Aaron Ecay ce41c076c0 org.el: insert missing quote 2014-06-21 23:32:18 -04:00
Aaron Ecay 5ee0d29f57 Remove another vestige of org-mtags
* lisp/org-src.el (org-edit-src-find-region-and-lang): Remove old
<foo>-style tags.

This completes commit 94939bd
2014-06-21 21:38:32 -04:00
Aaron Ecay 94939bd473 org-mtags: remove
* contrib/lisp/org-mtags.el: Delete file.
* lisp/org.el (org-structure-template-alist): Remove <foo>-style tags.
(org-complete-expand-structure-template): Don't handle <foo>-style tags.
2014-06-21 20:48:46 -04:00
Bastien Guerry ce2359eb80 Merge branch 'maint'
Conflicts:
	lisp/org.el
2014-06-20 08:44:06 +02:00
Bastien Guerry 4b0557bdd8 org.el: Delete `org-fix-ellipsis-at-bol'
* org.el (org-fix-ellipsis-at-bol): Delete.
(org-mode, org-show-context, org-isearch-end): Don't use
`org-fix-ellipsis-at-bol'.
2014-06-20 08:41:34 +02:00
Nicolas Goaziou f336de2f82 org-element: Tweak cache parameters
* lisp/org-element.el (org-element-cache-sync-idle-time,
  org-element-cache-sync-break): Increase values as synchronizing
  cache too makes editing somewhat sluggish without any benefit.
2014-06-19 22:32:23 +02:00
Nicolas Goaziou 8e49c823fd org-element: Optimize cache
* lisp/org-element.el (org-element--cache-for-removal): New function.
(org-element--cache-submit-request): Do not synchronize cache when
changes can be merged with next request.

This shortcut is particularly useful when many changes happen in the
same area, which is expensive to parse (e.g., a large list).
2014-06-19 22:32:23 +02:00
Nicolas Goaziou b2f200f0a1 org-element: Sync cache after changes instead of before them
* lisp/org-element.el (org-element--cache-sync,
  org-element--cache-process-request): Change signature.
(org-element--cache-before-change): Do not synchronize cache
preemptively.
(org-element--cache-submit-request): Synchronize cache preemptively.

This change makes possible to skip cache preemptive synchronization
under some circumstances.
2014-06-19 22:32:22 +02:00
Nicolas Goaziou 87dbce239d org-element: Extend format for cache sync requests
* lisp/org-element.el (org-element--cache-sync-requests): Also store
  beginning position for buffer modifications.
(org-element--cache-sync, org-element--cache-process-request)
(org-element--cache-submit-request): Adapt to new request template.

This change is required for a future cache optimization.
2014-06-19 22:32:22 +02:00
Nicolas Goaziou 2084ff06d8 org-element: Tiny refactoring
* lisp/org-element.el (org-element--cache-sync): Do not check return
  value from `org-element--cache-process-request'.
(org-element--cache-process-request): Throw `interrupt' when the
request cannot be processed.
(org-element--cache-process-request): Do not catch interruption from
  `org-element--parse-to'.
(org-element--parse-to): Throw `interrupt' when the process stops
before finding the result.
2014-06-19 22:32:22 +02:00
Nicolas Goaziou 8b959237fc ox: Small refactoring
* lisp/ox.el (org-export-get-category): Refactor code.
2014-06-18 23:30:54 +02:00
Nicolas Goaziou ab145f0df5 org-element: Properly parse headline properties
* lisp/org-element.el (org-element-headline-parser,
  org-element-inlinetask-parser): First find appropriate property
  drawer in order to read properties.

* testing/lisp/test-org-element.el (test-org-element/headline-properties):
  Add tests.

Thanks to Sébastien Vauban for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/87701
2014-06-18 23:28:19 +02:00
Nicolas Goaziou b1dcd0fb0b org-element: Do not expand file name when parsing links
* lisp/org-element.el (org-element-link-parser): Do not expand file
  name when parsing links so that Tramp doesn't kick in.

Thanks to Sébastien Vauban for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/87696
2014-06-18 19:22:21 +02:00
Thierry Banel 25fc4d8344 Make C, C++, D, Java, Groovy compilers customizable
* ob-C.el (org-babel-C-compiler):
	(org-babel-C++-compiler):
	(org-babel-D-compiler): changed defvar to defcustom
	* ob-java.el (org-babel-java-command):
	(org-babel-java-compiler): changed defvar to defcustom
	* ob-groovy.el (org-babel-groovy-command):
	changed defvar to defcustom
2014-06-16 11:05:01 -04:00
Bastien Guerry d100d590e1 org-agenda.el (org-agenda-filter-by-tag): Don't refresh the agenda
* org-agenda.el (org-agenda-filter-by-tag): Don't refresh the
agenda.
2014-06-16 11:44:25 +02:00
Bastien Guerry 1c9aa1e78e Merge branch 'maint' 2014-06-16 11:41:36 +02:00
Bastien Guerry 5556865893 org-agenda.el (org-agenda-filter-apply): Fix setting of `org-agenda-filtered-by-category'
* org-agenda.el (org-agenda-filter-apply): Fix setting of
`org-agenda-filtered-by-category'.
2014-06-16 11:41:14 +02:00
Bastien Guerry b414844daa Merge branch 'maint' 2014-06-15 10:49:36 +02:00
Bastien Guerry 88036251eb org.el (org-fontify-meta-lines-and-blocks-1): Fix handling of `org-hidden-keywords'
* org.el (org-fontify-meta-lines-and-blocks-1): Fix handling
of `org-hidden-keywords'.

Thanks to Leu Zhe for reporting this.
2014-06-15 10:49:01 +02:00
Bastien Guerry e30c6cc44b Merge branch 'maint' 2014-06-15 10:43:47 +02:00
Bastien Guerry af8ee5fcf2 org-agenda.el (org-cmp-ts): Fix agenda entry type checking
* org-agenda.el (org-cmp-ts): Fix agenda entry type checking.

Thanks to Trevor Murphy for reporting this.
2014-06-15 10:43:17 +02:00
Bastien Guerry 49d59859f0 Merge branch 'master' of orgmode.org:org-mode 2014-06-15 10:38:18 +02:00
Bastien Guerry e966070396 Merge branch 'maint' 2014-06-15 10:37:09 +02:00
Bastien Guerry e26e47c8a1 org-agenda.el (org-entries-lessp): Fix inactive timestamp comparison
* org-agenda.el (org-entries-lessp): Fix inactive timestamp
comparison.
2014-06-15 10:36:59 +02:00
Nicolas Goaziou 7a8de7d1e3 ox-beamer: Remove `org-beamer-insert-options-template'
* lisp/ox-beamer.el (beamer): Re-order keywords.
(org-beamer-insert-options-template): Remove function.

* doc/org.texi (Beamer export): Remove reference to the previous
  function.

Use the generic insertion mechanism provided in "ox.el"
instead (`org-export-insert-default-template') in order to avoid code
duplication.
2014-06-15 10:26:40 +02:00
Nicolas Goaziou 03dfc23505 Merge branch 'maint' 2014-06-15 09:30:54 +02:00
Bernt Hansen 61e06a038a org-macs: Remove restriction when locating markers
* org-macs.el: Remove restriction when locating markers

Allows org-with-point-at to locate point outside the current
restriction.
2014-06-15 09:27:16 +02:00
Bastien Guerry 8d613e9c4f ob-C.el: Tiny formatting fix 2014-06-14 14:36:10 +02:00
Eric Schulte f652196723 fix bug in ob-C
* lisp/ob-C.el (org-babel-C-val-to-C-type): Fix miss-named variable
  bug.
2014-06-13 07:46:29 -04:00
Bastien Guerry 74c252c905 org-gnus.el: silent compiler 2014-06-13 12:26:10 +02:00
Bastien Guerry 4104ec2591 Minor code clean-up
Thanks to Thorsten for this.
2014-06-13 12:24:50 +02:00
Eric Abrahamsen 7eba1c2f54 Create org-gnus links from original group, not virtual
* lisp/org-gnus.el (org-gnus-store-link): When in a virtual group,
use the real group instead.
2014-06-13 11:54:33 +02:00
Eric Schulte 6900ec41e3 customizable parameter to raise more noweb errors
* lisp/ob-core.el (org-babel-noweb-error-all-langs): Raise noweb
  errors regardless of language.
  (org-babel-expand-noweb-references): Make use of the new
  `org-babel-noweb-error-all-langs' variable.
2014-06-12 19:39:32 -04:00
Bastien Guerry 560c3adedb Merge branch 'maint' 2014-06-12 15:25:56 +02:00
Bastien Guerry feca87b9ac Fix 30220ff 2014-06-12 15:25:42 +02:00
Bastien Guerry bb61df9d91 Merge branch 'maint'
Conflicts:
	lisp/org-agenda.el
2014-06-12 15:08:53 +02:00
Bastien Guerry 2e9c2d7128 org-agenda.el: Fix bug when redoing sticky agendas with log mode and/or clockreport mode on
* org-agenda.el (org-agenda-mode): Let `org-agenda-redo' DTRT
when agenda are sticky.
(org-agenda-tag-filter-while-redo): Delete.
(org-agenda-list, org-agenda-redo, org-agenda-filter-by-tag):
Remove unused code.
(org-agenda-clockreport-mode, org-agenda-set-mode-name): Don't
consider tag filters.

Thanks to Bernt Hansen for reporting this.
2014-06-12 15:07:35 +02:00
Bastien Guerry 4014947f31 Merge branch 'maint' 2014-06-12 12:05:00 +02:00
Bastien Guerry 30220ffcdc Prefer `set-window-start' over `recenter' in some places.
* org-agenda.el (org-agenda-show-1):
* org-table.el (org-table-show-reference):
* org.el (org-fix-ellipsis-at-bol)
(org-first-headline-recenter): Use `set-window-start' instead
of `recenter'.

* org-agenda.el (org-recenter-heading): Delete.
2014-06-12 12:04:24 +02:00
Nicolas Goaziou 39d0433637 Small optimization
* lisp/org.el (org-adaptive-fill-function): Do not compute fill prefix
  if point is at a heading or an inlinetask.  Also change "? " into
  "?\s" for better code readability.
2014-06-11 22:42:31 +02:00
Nicolas Goaziou c9a5ba09f1 ob-exp: Fix export error
* lisp/ob-exp.el (org-babel-exp-process-buffer): Fix error when
  `org-confirm-babel-evaluate' is set to a function.

Thanks to Charles C. Berry for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/87403
2014-06-11 22:12:15 +02:00
Bastien Guerry a3f58c8891 Merge branch 'maint'
Conflicts:
	lisp/org.el
2014-06-11 17:46:40 +02:00
Bastien Guerry 6c9b3ad91f org.el (org-insert-heading): Be more consistent in respecting content
* org.el (org-insert-heading): With one universal prefix
argument or `org-insert-heading-respect-content' set to `t',
always respect the content, i.e. don't insert a list item and
don't convert normal lines into headings.  Update docstring.
(org-insert-heading-respect-content): Remove unused arg.
(org-insert-todo-heading-respect-content): Don't use
`org-insert-todo-heading-respect-content', use the second
argument of `org-insert-todo-heading' instead.

* org-mobile.el (org-mobile-edit): Use only one arg.

Thanks to Bernt Hansen for reporting this.
2014-06-11 17:45:13 +02:00
Bastien Guerry b88c5464db org.el (org-overview): Don't call `recenter'
* org.el (org-overview): Don't call `recenter'.

Thanks to Nicolas Richard for suggesting this.
2014-06-10 16:20:47 +02:00
Nicolas Goaziou 5cca90edf8 Merge branch 'maint'
Conflicts:
	lisp/org.el
	testing/lisp/test-org.el
2014-06-09 18:11:19 +02:00
Nicolas Goaziou 8cc4e09950 Fix `org-insert-heading' before first headline
* lisp/org.el (org-insert-heading): Fix error when inserting
  a headline before first headline, with point not at bol.  Remove
  source block check for consistency with behavior after first
  headline.  Tiny fix to docstring.

* testing/lisp/test-org.el (test-org/meta-return): Remove unnecessary
  test (not testing specifications).
(test-org/insert-heading): New test.
2014-06-09 18:07:07 +02:00
Thierry Banel 54ab0e1c60 Babel C, C++, D support for non-homogeneous input tables
* ob-C.el: handling of non-homogeneous tables,
        support for table header,
        support for iterating over table cells.
        (org-babel-expand-body:C++): uncomment
        (org-babel-C-execute): cosmetic changes
        (org-babel-C-expand-C): add support for table columns names,
        add support for table dimensions,
        add standard includes
        (org-babel-C-val-to-C-type): rewrite to support non-homogeneous
        tables cells
        (org-babel-C-table-sizes-to-C): new function to gain access
        to the table dimensions
        (org-babel-C-utility-header-to-C):
        (org-babel-C-header-to-C): new functions to generate
        support for table header.

        * ob-C-test.org: added D sibling tests similar to C++,
        added non-homogeneous table example for C++ and D

        * test-ob-C.el: new tests for D and non-homogeneous tables
        (ob-C/simple-program):
        (ob-C/simple-program):
        (ob-D/simple-program):
        (ob-C/integer-var):
        (ob-D/integer-var):
        (ob-C/two-integer-var):
        (ob-D/two-integer-var):
        (ob-C/string-var):
        (ob-D/string-var):
        (ob-C/preprocessor):
        (ob-C/table):
        (ob-D/table):
        (ob-C/list-var):
        (ob-D/list-var):
        (ob-C/vector-var):
        (ob-D/vector-var):
        (ob-C/list-list-var):
        (ob-D/list-list-var):
        (ob-C/inhomogeneous_table):
        (ob-D/inhomogeneous_table): add compiler availability check
        (ob-D/simple-program):
        (ob-D/integer-var):
        (ob-D/two-integer-var):
        (ob-D/string-var):
        (ob-D/table):
        (ob-D/list-var):
        (ob-D/vector-var):
        (ob-D/list-list-var):
        (ob-D/inhomogeneous_table): add D unit tests
        (ob-C/inhomogeneous_table):
        (ob-D/inhomogeneous_table): add non-homogeneous table
        unit tests
2014-06-08 19:20:16 -04:00
Achim Gratz 47c5701172 ob-exp: forward declare function
* lisp/ob-exp.el (org-id-get): Forward declare `org-id-get'.
2014-06-07 18:11:34 +02:00
Achim Gratz 4ed554196b ox: implement additional #+INCLUDE markup
* lisp/ox.el (org-export-expand-include-keyword): Change parsing so
  that arbitrary blocks around the included content can be used.
  Content is not code-escaped unless it is a literal block, this
  applies to "src" and "example".
* doc/org.texi (Include files): Document the additional markup.
* testing/lisp/test-ox.el (test-org-export/expand-include): Add test
  for an #+INCLUDE with "html" and "center" markup.
* testing/examples/include.html: New file, used for testing
  "#+INCLUDE html".
2014-06-07 18:02:52 +02:00
Eric Schulte a3745c375b tangle option to not post-process tangle comments
* lisp/ob-tangle.el (org-babel-tangle-comment-format-beg): Mention the
  new `org-babel-tangle-uncomment-comments' variable in the
  documentation.
  (org-babel-tangle-comment-format-end): Mention the new
  `org-babel-tangle-uncomment-comments' variable in the documentation.
  (org-babel-tangle-uncomment-comments): New customization variable to
  inhibit the post-processing of tangle comments.
  (org-babel-spec-to-string): Post-processing of tangle comments is
  now dependent upon a customization variable.
2014-06-07 11:29:03 -04:00
Eric Schulte c3e497f394 awk code blocks handle tabular input
Protected by a new unit test.

* lisp/ob-awk.el (org-babel-execute:awk): Use the
  `org-babel-awk-var-to-awk' function instead of a simple format
  string.
2014-06-07 11:16:55 -04:00
Nicolas Goaziou 4357dde362 org-element: Small fix
* lisp/org-element.el (org-element--cache-generate-key): Small fix.
  Check if UPPER is non nil before comparing its car with 1.  This is
  a safety feature, though, as a key shouldn't end on 0 anyway.
2014-06-07 15:32:47 +02:00
Eric Schulte 6fb033c791 fix a bug in new ob-awk code
thank you test suite

* lisp/ob-awk.el (org-babel-execute:awk): Don't need to apply the
  append, just need to append.

* testing/lisp/test-ob-awk.el (ob-awk/input-src-block-1): Renamed to
  avoid name duplication and over-definition.
  (ob-awk/input-src-block-2): Renamed to avoid name duplication and
  over-definition.
2014-06-06 13:11:46 -04:00
Eric Schulte 7469454f54 improved variable handling for awk code blocks
Thanks to Greg Minshall for suggesting these changes.

* lisp/ob-awk.el (org-babel-expand-body:awk): Simply return the body
  unmodified.
  (org-babel-execute:awk): Assign variables on the command line using
  the `-v' command line option to awk.
2014-06-06 12:50:14 -04:00
Eric Schulte 0ba8b4f2ea un-duplicate ditaa eps file name generation
* lisp/ob-ditaa.el (org-babel-execute:ditaa): Un-duplicate ditaa eps
  file name generation.
2014-06-06 12:21:56 -04:00
Anders Johansson 11ffc4f80e generate intermediate EPS on ditaa pdf generation
TINYCHANGE

* lisp/ob-ditaa.el (org-babel-execute:ditaa): When generating a pdf,
  ensure that an intermediate EPS file is generated first.
2014-06-06 12:21:01 -04:00
Eric Schulte 266233164f when present resolve orig-buffer headlines w/IDs
* lisp/ob-exp.el (org-babel-exp-in-export-file): Instead of using the
  headline text use the headline ID when one is present.  This fixes a
  bug in the resolution of code block headers in properties during
  export when multiple headlines with the same name are present.
2014-06-06 12:04:04 -04:00
Eric Schulte ac7c465766 TODO in ob-exp.el 2014-06-06 08:35:52 -04:00
Bastien Guerry a5991acd69 Remove useless code 2014-06-05 12:16:23 +02:00
Nicolas Goaziou 9263654e5b Merge branch 'maint' 2014-06-03 23:28:56 +02:00
Nicolas Goaziou 88f2625f28 Fix typo
* lisp/org.el (org-scan-tags): Fix typo in docstring.
2014-06-03 23:28:08 +02:00
Nicolas Goaziou 38ac0d8b56 Merge branch 'maint'
Conflicts:
	lisp/ox.el
2014-06-03 22:13:31 +02:00
Nicolas Goaziou 0fbc4893ed ox: Fix priority bug in :title property
* lisp/ox.el (org-export--get-inbuffer-options): Return the empty
  string instead of nil when TITLE keywords has no value.
(org-export--get-buffer-attributes): Do not set :title property
early.
(org-export--get-global-options): Do not ignore anymore nil values.
Small refactoring.
(org-export-as): Correctly set :title here.

Thanks to Nicolas Richard for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/87149
2014-06-03 22:07:35 +02:00
Bastien Guerry 3969268e2a Merge branch 'maint' 2014-06-02 20:00:20 +02:00
Bastien Guerry 6f64027fee org-agenda.el (org-agenda-custom-commands-local-options): Fix misquoted values
* org-agenda.el (org-agenda-custom-commands-local-options):
Fix misquoted values.

Thanks to Thomas Morgan for reporting this.
2014-06-02 19:59:36 +02:00
Bastien Guerry 3518403790 Merge branch 'maint'
Conflicts:
	lisp/org.el
2014-06-02 15:57:41 +02:00
Bastien Guerry 89cb26ed17 org.el: Fix setting and deleting properties with a null value
* org.el (org-property-re): Also match null properties by
default.
(org-entry-delete): Also delete null properties.
(org-read-property-value): Allow the empty string as a new
value.
(org-delete-property): Throw a message when there is not
property to delete.

Thanks to Andrea Rossetti for reporting this.
2014-06-02 15:40:04 +02:00
Achim Gratz 8978ca05b2 Reverting "org-footnote: forward declare functions"
Revert "org-footnote: forward declare functions"

This reverts commit 814188ac7e.

Accidentally applied to the wrong branch.
2014-06-01 14:28:13 +02:00
Achim Gratz 2b980a4257 Merge branch 'maint' 2014-06-01 14:23:18 +02:00
Achim Gratz 8e4b52235c ob-J: Do not use cl or cl-lib functions at runtime
* lisp/ob-J.el: Do not use `second', `third', `fourth', `minusp' and
  `plusp'.
2014-06-01 14:22:42 +02:00
Achim Gratz 108658e94f org: forward declare functions
* lisp/org.el: Forward declare `org-clock-sum',
  `org-table-end-of-field', `org-element-cache-refresh'.

These have been introduced with b5554077cb, b76071f2b6 and 6eb940a8dc.
2014-06-01 14:22:42 +02:00
Achim Gratz e6883dd03d org-compat: Provide compatibility definition for font-lock-ensure
* lisp/org-compat.el: Provide compatibility definition for
  `font-lock-ensure' falling back to `font-lock-fontify-buffer' via an
  alias.

This fallback fixes f36b19eef6.  Using a simple alias means we can't
use the optional arguments for `font-lock-ensure' or would have to
provide a macro if we ever want to use them.
2014-06-01 14:22:42 +02:00
Achim Gratz 814188ac7e org-footnote: forward declare functions
* lisp/org-footnote.el: Forward declare `org-element-context',
  `org-element-property' and `org-element-type'.

Introduced with 51e1131ff8.
2014-06-01 14:21:58 +02:00
Nicolas Goaziou 38aebc8c24 Merge branch 'maint' 2014-06-01 14:20:51 +02:00
Nicolas Goaziou 198fc8d483 org-list: Fix typo in docstring
* lisp/org-list.el (org-list-repair): Fix typo in docstring.
2014-06-01 14:20:12 +02:00
Nicolas Goaziou 51e1131ff8 org-footnote: On C-c C-x f, offer menu instead of returning an error
* org-footnote.el (org-footnote-action): When point is at a position
where no footnote can be inserted, offer the menu instead.
2014-06-01 08:42:09 +02:00
Bastien Guerry 14dd4c56f2 Don't use the org-warning face for the wrong install warning 2014-05-31 16:47:37 +02:00
Bastien Guerry c189850bb1 Merge branch 'master' of orgmode.org:org-mode 2014-05-31 14:32:17 +02:00
Bastien Guerry 75ca2a0e0d org-agenda.el (org-agenda-todo): Mark the clocking task
* org-agenda.el (org-agenda-todo): Mark the clocking task.
2014-05-31 14:32:06 +02:00
Bastien Guerry dd17e9d299 org.el (org-todo): When changing from one state to the same state, throw a more accurate message
* org.el (org-todo): When changing from one state to the same
state, throw a more accurate message.
2014-05-31 14:31:46 +02:00
Nicolas Goaziou 857222323b Revert "org-footnote.el: Allow to inline external footnotes"
This reverts commit 8738f173e5.
2014-05-31 11:26:37 +02:00
Bastien Guerry 66db8836b5 org-table.el (org-table-copy-down): Fix bug
* org-table.el (org-table-copy-down): When the text above does
not contain a number, fall back on incrementing by one.
2014-05-31 10:47:55 +02:00
Bastien Guerry 9f5e698679 org-agenda.el (org-agenda-goto): Go to the beginning of the true heading of the entry at point
* org-agenda.el (org-agenda-goto): Go to the beginning of the
true heading of the entry at point.  Update docstring.
2014-05-30 19:28:04 +02:00
Bastien Guerry 8738f173e5 org-footnote.el: Allow to inline external footnotes
* org-footnote.el (org-footnote-new): When point is at a
position where no footnote can be inserted, offer the menu
from `org-footnote-action' instead.
(org-footnote-inline-footnotes): New command.
(org-footnote-action): Make the new command accessible through
the menu.

Thanks to Leonard Randall for the suggestion.
2014-05-30 14:54:11 +02:00
Bastien Guerry a060fb0a08 Merge branch 'maint' 2014-05-30 14:02:46 +02:00
Bastien Guerry c53aeda585 org-agenda.el (org-agenda-insert-diary-make-new-entry): Fix docstring
* org-agenda.el (org-agenda-insert-diary-make-new-entry): Fix
docstring.

Thanks to Nikolai Weibull for reporting this.
2014-05-30 13:58:50 +02:00
Bastien Guerry 63ce68af06 org.el: Don't quote lambdas and known functions. Fix indentation.
* org.el (org-confirm-shell-link-function)
(org-todo-keywords, org-time-stamp-rounding-minutes)
(org-file-contents, org-update-radio-target-regexp)
(org-hide-block-toggle-all, org-hide-block-all)
(org-open-at-point, org-sparse-tree, org-timestamp-change)
(org-create-formula-image, org-insert-comment)
(org-comment-or-uncomment-region, org-comment-dwim): Don't
quote lambdas and known functions.
2014-05-30 08:52:19 +02:00
Bastien Guerry f86d99a292 Merge branch 'maint' 2014-05-30 08:47:26 +02:00
Bastien Guerry 822dcfc881 org.el: Fix bug when setting properties with a null value
* org.el (org-re-property): New parameter `allow-null' to
match property with a null value.
(org-entry-put): Correctly update a property with a null
value.

Thanks to Andrea Rossetti for reporting this and suggesting a fix.
2014-05-30 08:46:39 +02:00
Bastien Guerry 554c9e3228 org.el (org-refresh-effort-properties): New function
* org.el (org-refresh-effort-properties): New function.
(org-agenda-prepare-buffers, org-mode): Use it.
2014-05-29 23:46:11 +02:00
Bastien Guerry f36b19eef6 org.el: Send a warning when org-loaddefs.el could not be found
* org.el: Send a warning when org-loaddefs.el could not be
found in the directory where this org.el file is loaded from.

* ox-org.el (org-org-publish-to-org):
* ox-odt.el (org-odt-do-format-code):
* ox-html.el (org-html-fontify-code):
* org.el (org-fontify-like-in-org-mode):
* org-src.el (org-src-font-lock-fontify-block):
* org-clock.el (org-clock-get-clocktable): Use
`font-lock-ensure' instead of `font-lock-fontify-buffer'.

* org.el (org-outline-level, org-copy-subtree)
(org-sort-entries, orgstruct-setup, org-show-context)
(org-create-formula-image-with-dvipng)
(org-create-formula-image-with-imagemagick)
(org-goto-sibling, org-goto-first-child, org-show-entry): Use
`ignore-errors' instead of (condition-case nil ... (error nil)).

People trying to load org.el when org-loaddefs.el is not available
has been a major cause of trouble when installing Org.  The warning
tells them what they need to do.
2014-05-29 22:08:43 +02:00
Bastien Guerry db9d63d313 Merge branch 'maint' 2014-05-29 21:21:11 +02:00
Bastien Guerry 34c2365081 ox-md.el (org-md-headline): Add anchors when exporting with a table of contents
* ox-md.el (org-md-headline): When exporting with a HTML table
of contents, add HTML anchors to Markdown headlines.

Thanks to Marko Dimjašević for reporting this.
2014-05-29 21:20:55 +02:00
Bastien Guerry 029b393032 Merge branch 'maint' 2014-05-29 19:49:07 +02:00
Bastien Guerry d8034c3b19 org.el (org-insert-heading): Don't insert an item when called with two universal prefix arguments
* org.el (org-insert-heading): Don't insert an item when
called with two universal prefix arguments.
2014-05-29 19:48:47 +02:00
Bastien Guerry b978abb485 org.el (org-shiftmetaup, org-shiftmetadown): Update behavior
* org.el (org-shiftmetaup, org-shiftmetadown): Don't move the
subtree or list item at point up or down, as this feature is
already accessible through `org-metaup' and `org-metadown'.
Update the docstrings to reflect the new behavior.
2014-05-29 19:25:08 +02:00
Bastien Guerry 8772a2eb49 Merge branch 'maint' 2014-05-29 09:57:34 +02:00
Bastien Guerry ee9053ee04 org-agenda.el (org-agenda-finalize): Remove duplicate check for 'org-hd-marker
* org-agenda.el (org-agenda-finalize): Remove duplicate check
for 'org-hd-marker.
2014-05-29 09:57:19 +02:00
Bastien Guerry ab857a3b80 Fix aa86e4bc again 2014-05-28 21:20:29 +02:00
Bastien Guerry 9022b4c5e1 Fix aa86e4bc
Thanks to Achim Gratz for pointing this.
2014-05-28 21:15:44 +02:00
Achim Gratz 5bf928bae7 Merge branch 'maint'
Conflicts:
	lisp/ob-core.el
	lisp/org.el
	lisp/ox.el
2014-05-28 16:23:08 +02:00
Achim Gratz 3d973cdc6e org: add forward declarations
* lisp/org.el: Add forward declarations for a number of functions that
  the compiler otherwise warns about as potentially undefined at
  runtime.
2014-05-28 15:18:24 +02:00
Nicolas Goaziou 92197690ed ox-latex: Fix again 7a956c3880
* lisp/ox-latex.el (latex): Update property name.
* doc/org.texi (Publishing options): Update documentation.
2014-05-28 15:12:42 +02:00
Nicolas Goaziou ba2a5ba9f6 ox-latex: Fix 7a956c3880
* lisp/ox-latex.el (latex): Change property name.  It fixes
  7a956c3880.
(org-latex-template): Use new property.

* doc/org.texi (Publishing options): Update documentation.  Also fix
  typo.
2014-05-28 15:06:31 +02:00
Nicolas Goaziou 7a956c3880 Associate all defcustoms to options in back-end definitions
* lisp/ox-ascii.el:
* lisp/ox-beamer.el:
* lisp/ox-html.el:
* lisp/ox-latex.el:
* lisp/ox-man.el:
* lisp/ox-md.el:
* lisp/ox-odt.el:
* lisp/ox-org.el:
* lisp/ox-texinfo.el: All defcustoms are defined as options in the
  back-end.
* lisp/ox-icalendar.el (icalendar): Ditto.  Also rename :with-vtodo
  property to :icalendar-include-todo.

* doc/org.texi (Publishing options): Update back-end specific
  properties.  Remove @vindex entries so as not to clobber variables
  index.

This change allows to change default value for any defcustom on the
fly when publishing.  It also normalizes how to choose and name what
variables to define as back-end options.
2014-05-28 14:53:29 +02:00
Achim Gratz 790f5b4d3a ob-core, ob-exp, ob-haskell, ob-python: declarations for org-src-preserve-indentations
* lisp/ob-core.el: Add comment to forward declaration of
  'org-src-preserve-indentations'.
* lisp/ob-exp.el: Require org-src to import
  'org-src-preserve-indentations'.
* lisp/ob-haskell.el, lisp/ob-python.el: Remove superfluous forward
  declaration of 'org-src-preserve-indentations', since it gets
  imported by other requires.
2014-05-28 14:52:14 +02:00
Achim Gratz 61b8091596 ob-core:forward declare org-every
* lisp/ob-core.el (org-every): Forward declare 'org-every'.
2014-05-28 14:47:23 +02:00
Achim Gratz 310b9dd2b6 ob-C: lexical-let requires cl at compilation time
* lisp/ob-C.el: Require cl during compilation so that lexical-let is
  known.
2014-05-28 14:40:52 +02:00
Achim Gratz 3a736c51bc org-entities: forward declaration of org-toggle-pretty-entities and org-pretty-entities
* lisp/org-entities.el: Remove superfluous require of org-macs.
  Forward declare 'org-toggle-pretty-entities' and
  'org-pretty-entities'.
2014-05-28 14:16:21 +02:00
Achim Gratz 6c1b41bd68 org, ox: move defsubst before first use
* lisp/ox.el (org-export-get-parent): Move definition of
  'org-export-get-parent' before first use.  Leave comment at original
  place of definition.

* lisp/org.el (org-uniquify): Move definition of 'org-uniquify' before
  first use.  Leave comment at original place of definition.
2014-05-28 13:44:53 +02:00
Bastien Guerry aa86e4bc9f org-agenda.el: Implement new effort filter
* org-agenda.el (org-agenda-custom-commands-local-options):
Add `org-agenda-effort-filter-preset'.
(org-agenda-filter-effort-default-operator): Delete.
(org-agenda-local-vars): Add `org-agenda-effort-filter'.
(org-agenda-mode-map): Use "_" to filter by effort.
(org-agenda-effort-filter, org-agenda-effort-filter-preset):
New variables.
(org-agenda-prepare-window, org-agenda-prepare)
(org-agenda-finalize, org-agenda-redo)
(org-agenda-filter-remove-all, org-agenda-filter-apply)
(org-agenda-set-mode-name, org-agenda-reapply-filters): Handle
effort filter.
(org-agenda-finalize-entries): Use
`org-sort-agenda-noeffort-is-high'.
(org-agenda-limit-entries): Get the property from the correct
location.
(org-agenda-limit-interactively): Throw a user error on wrong
input.
(org-agenda-filter-by-effort): New command.
(org-agenda-filter-by-tag): Don't filter by effort.
(org-agenda-filter-make-matcher): Handle effort filter.
(org-agenda-compare-effort): Don't handle the "?" operator.
(org-agenda-filter-show-all-effort): New command.

Note: This calls for some refactoring in the filter area.
2014-05-28 12:26:54 +02:00
Bastien Guerry 7dceecbb30 Small refactoring and fix a bug in `org-timer-set-timer'
* org.el (org-refresh-property): New function.
(org-refresh-properties, org-set-effort)
(org-property-next-allowed-value): Use it.

* org-timer.el (org-timer-set-timer): Get the correct number
of minutes from text properties, both in an `org-mode' and
`org-agenda-mode' buffer.
2014-05-28 10:47:05 +02:00