42 hours agoMerge branch 'maint' of into maint maint
Rasmus [Mon, 23 May 2016 07:06:56 +0000]
Merge branch 'maint' of into maint

42 hours agoox-latex: Detect languages irrespective of case
Rasmus [Mon, 23 May 2016 06:45:54 +0000]
ox-latex: Detect languages irrespective of case

* ox-latex.el (org-latex-guess-babel-language):
* ox-latex.el (org-latex--format-spec): Detect languages correctly
  irrespective of case.

2 days agoorg-table: Fix 4914f89
Nicolas Goaziou [Sun, 22 May 2016 23:19:29 +0000]
org-table: Fix 4914f89

* lisp/org-table.el (orgtbl-setup): Fix improper key binding

Reported-by: Alex <>

2 days agoorg-list: Fix `org-list-send-list' in LaTeX buffers
Nicolas Goaziou [Sun, 22 May 2016 23:12:51 +0000]
org-list: Fix `org-list-send-list' in LaTeX buffers

* lisp/org-list.el (org-list-send-list): Find correct translator.

Reported-by: Charles Millar <>

2 days agoox-html: Find preamble-spec case-insensitively
Rasmus [Sun, 22 May 2016 13:30:11 +0000]
ox-html: Find preamble-spec case-insensitively

* ox-html.el (org-html--build-pre/postamble): Find the spec based on the
  language case-insensitively.

Note that the default org-html-preamble-format and
org-export-default-language are incompatible.

3 days agoorg-table: Fix DEL using orgtbl minor mode in prog derived mode
Nicolas Goaziou [Sat, 21 May 2016 12:39:26 +0000]
org-table: Fix DEL using orgtbl minor mode in prog derived mode

* lisp/org-table.el (orgtbl-setup): Hijack DEL key.  We also hijack
  `delete-backward-char' but major modes derived from `prog-mode'
  usually bypass it.

Reported-by: Alex G <>

4 days agoorg-table: Fix orgtbl-self-insert-command on white spaces
Nicolas Goaziou [Fri, 20 May 2016 21:03:18 +0000]
org-table: Fix orgtbl-self-insert-command on white spaces

* lisp/org-table.el (orgtbl-self-insert-command): Properly overwrite
  white spaces when there is room for it.  This is on par with what
  `org-self-insert-command' does in Org tables.

Reported-by: Alex <>

5 days agoorg-agenda: Fix agenda filter by empty tag string
Nicolas Goaziou [Thu, 19 May 2016 08:31:27 +0000]
org-agenda: Fix agenda filter by empty tag string

* lisp/org-agenda.el (org-agenda-filter-make-matcher-tag-exp): Handle
  empty tag strings.

Reported-by: Eric Abrahamsen <>

8 days agoorg-capture: Support all capture template target-file variants in Customize
Phil Hudson [Mon, 16 May 2016 08:34:30 +0000]
org-capture: Support all capture template target-file variants in Customize

* lisp/org-capture.el (`org-capture-templates'): Adjust the
  `org-capture-templates' defcustom template to support specifying the capture
  target file using either a literal pathname, a function, a variable or a
  form, as documented.  Previously the Customize UI supported specifying only a
  literal pathname.
  (org-capture-templates): Clarify the documentation for the `function' method
  for setting up the capture target.

* doc/org.texi (Template elements): Clarify the `function' method for setting up
  the capture target.

9 days agoFix remaining declare-function issues
Kyle Meyer [Sun, 15 May 2016 21:42:47 +0000]
Fix remaining declare-function issues

* lisp/ob-shell.el (org-babel-comint-in-buffer):
* lisp/org-table.el (org-export-create-backend):
* lisp/org.el (org-babel-do-in-edit-buffer): Indicate that FN is not a
* lisp/ob-tangle.el (org-string-nw-p):
* lisp/org-table.el (org-export-create-backend):
(org-export-table-row-is-special-p): Correct source file name.
* lisp/ob-R.el (ess-wait-for-process):
* lisp/org-clock.el (calendar-iso-to-absolute):
* lisp/org-list.el (org-previous-line-empty-p):
* lisp/org-pcomplete.el (org-entry-properties):
* lisp/org-table.el (org-export-data-with-backend):
* lisp/org.el (org-element-interpret-data): Correct argument list.

9 days agoorg-compat: Quiet font-lock-fontify-buffer warning
Kyle Meyer [Sun, 15 May 2016 20:02:02 +0000]
org-compat: Quiet font-lock-fontify-buffer warning

* lisp/org-compat.el (org-font-lock-ensure): Quiet byte compiler warning
  about font-lock-fontify-buffer.

9 days agoorg-compat: Check for w32-focus-frame
Kyle Meyer [Sun, 15 May 2016 17:53:14 +0000]
org-compat: Check for w32-focus-frame

* lisp/org-compat.el (org-select-frame-set-input-focus): Check for
  w32-focus-frame to quiet byte compiler.

Don't use declare-function because this function was marked obsolete in
Emacs 23.1 (44fe0f6).

9 days agoorg-gnus: Check nnimap-group-overview-filename
Kyle Meyer [Sun, 15 May 2016 16:56:29 +0000]
org-gnus: Check nnimap-group-overview-filename

* lisp/org-gnus.el (org-gnus-nnimap-cached-article-number): Check that
  nnimap-group-overview-filename, which was removed from Emacs in 2010,
  is defined before calling.

9 days agoFix up last backport
Kyle Meyer [Sun, 15 May 2016 16:24:59 +0000]
Fix up last backport

* lisp/org.el (org-export-backend-options): Add back removed
declare-function call.
* lisp/ob-awk.el (orgtbl-to-generic):
* lisp/ob-core.el (orgtbl-to-generic):
* lisp/ob-gnuplot.el (orgtbl-to-generic): Remove BACKEND argument from
declare-function calls.

The last backport added this argument to match orgtbl-to-generic's
signature in Emacs's version of Org, but the BACKEND argument to
orgtbl-to-generic was later removed in 9209aa3 (org-table: Use "ox.el"
internally for radio tables, 2014-08-24).

9 days agoBackport commit 65c8c7c from Emacs
Paul Eggert [Sun, 15 May 2016 02:56:53 +0000]
Backport commit 65c8c7c from Emacs

* lisp/ob-awk.el (orgtbl-to-generic):
* lisp/ob-core.el (orgtbl-to-generic):
* lisp/ob-exp.el (org-element-context):
* lisp/ob-gnuplot.el (org-time-string-to-time)
* lisp/ob-haskell.el (org-export-to-file):
* lisp/ob-latex.el (org-create-formula-image)
* lisp/ob-python.el (run-python):
* lisp/ob-tangle.el (org-link-escape, org-back-to-heading):
* lisp/org-colview.el (org-agenda-redo):
* lisp/org-feed.el (url-retrieve-synchronously):
* lisp/org-info.el (Info-find-node):
* lisp/org-list.el (org-previous-line-empty-p):
* lisp/org-macs.el (org-string-match-p):
* lisp/org.el (org-beamer-mode):
Fix prototype to match current definition.
* lisp/ob-comint.el (tramp-flush-directory-property):
* lisp/ob-tangle.el (org-babel-update-block-body):
* lisp/org-bibtex.el (org-babel-trim):
* lisp/org-pcomplete.el (org-export-backend-options):
* lisp/org-protocol.el (org-publish-get-project-from-filename):
Fix file name in declare-function.
* lisp/ob-comint.el (with-parsed-tramp-file-name)
* lisp/ob-core.el (with-parsed-tramp-file-name):
* lisp/org.el (org-beamer-mode):
Append ‘t’ to declare-function, since the declaration isn’t a defun.
* lisp/ob-core.el (org-save-outline-visibility):
Remove; not needed.
* lisp/ob-scheme.el (run-geiser, geiser-mode)
(geiser-eval-region, geiser-repl-exit):
* lisp/ox-org.el (htmlize-buffer):
Prepend "ext:" to file name, since it is not part of Emacs.
* lisp/org-gnus.el (nnimap-group-overview-filename):
Remove decl, since function was removed.
* lisp/org-macro.el (org-with-wide-buffer):
Omit unnecessary (and mismatching) decl.
* lisp/org-clock.el (calendar-iso-to-absolute):
Declare calendar-iso-to-absolute instead, since it is the
non-obsolete version of this function.
* lisp/org-compat.el (w32-focus-frame):
Remove decl, since function is now obsolete.

Pacify ‘make check-declare’
Paul Eggert
Sat May 14 19:57:44 2016 -0700

11 days agoox-rss: Prevent dropping lower level headlines
Arun Isaac [Thu, 12 May 2016 03:51:18 +0000]
ox-rss: Prevent dropping lower level headlines

* contrib/lisp/ox-rss.el (org-rss-headline): Transcode lower level
  headlines (headlines with level > 1) using the html backend.  Do not
  drop them.

Previously, lower level headlines were dropped and did not appear in the
exported RSS output.

13 days agoorg-agenda: Fix `org-agenda-bulk-custom-functions' supported Customize type
Nicolas Goaziou [Wed, 11 May 2016 20:49:25 +0000]
org-agenda: Fix `org-agenda-bulk-custom-functions' supported Customize type

* org-agenda.el (`org-agenda-bulk-custom-functions'): Change the defcustom
  template to recognize that the code expects this alist's elements to be
  two-element lists like (?a b), not conses like (?a . b).

The Customize UI previously incorrectly presented the latter.  When
saved, this led to the agenda bulk-commands menu correctly presenting
the accelerator key 'a' but then erroring when it tried to execute the
associated command 'b'.

13 days agoorg-clock: Fix `org-clock-drawer-name'
Nicolas Goaziou [Wed, 11 May 2016 16:44:02 +0000]
org-clock: Fix `org-clock-drawer-name'

* lisp/org-clock.el (org-clock-drawer-name): When
  `org-clock-into-drawer' is a number and `org-log-into-drawer' is t,
  default to "LOGBOOK".

* testing/lisp/test-org-clock.el (test-org-clock/into-drawer):
(test-org-clock/drawer-name): New tests.

2 weeks agoorg-clock: Fix generated drawer when `org-clock-into-drawer' is numerical
Nicolas Goaziou [Tue, 10 May 2016 20:29:53 +0000]
org-clock: Fix generated drawer when `org-clock-into-drawer' is numerical

* lisp/org-clock.el (org-clock-find-position): Create a default
  "LOGBOOK" drawer when `org-clock-into-drawer' is a numeric value.

Reported-by: Carlos Noguera <>

2 weeks agoFix `org-occur' when regexp matches a single char
Nicolas Goaziou [Thu, 5 May 2016 08:18:21 +0000]
Fix `org-occur' when regexp matches a single char

* lisp/org.el (org-occur): Fix infloop when regexp matches a single
  char.  Improve docstring.

(org-check-dates-range): Match correct object since point may be at the
beginning of the next one.

* testing/lisp/test-org.el (test-org/occur): New test.

2 weeks agoFix `org-occur' when called non-interactively
Nicolas Goaziou [Thu, 5 May 2016 09:45:35 +0000]
Fix `org-occur' when called non-interactively

* lisp/org.el (org-first-headline-recenter): Check if current buffer is
  actually displayed in a window before trying to recenter view.

2 weeks agoorg-agenda: Fix error on empty headlines
Nicolas Goaziou [Wed, 4 May 2016 11:34:08 +0000]
org-agenda: Fix error on empty headlines

* lisp/org-agenda.el (org-agenda-get-timestamps):
(org-agenda-get-blocks): Handle empty headlines.

3 weeks agoFix `org-flag-drawer' with optional argument
Nicolas Goaziou [Sat, 30 Apr 2016 23:27:30 +0000]
Fix `org-flag-drawer' with optional argument

* lisp/org.el (org-flag-drawer): Do not require point to be at a drawer
  in order to call the function with an optional argument.

* testing/lisp/test-org.el (test-org/flag-drawer): Narrow test.

3 weeks agoFix multiple groups of mutually exclusive tags
Nicolas Goaziou [Thu, 28 Apr 2016 20:04:49 +0000]
Fix multiple groups of mutually exclusive tags

* lisp/org.el (org-set-tags): Use a subtler mechansim to remove
  duplicate tags.  This fixes a bug introduced in 77b4fad.

Reported-by: Christoph LANGE <>

4 weeks agoFix storing links to headlines containing multiple links
Nicolas Goaziou [Tue, 26 Apr 2016 18:59:33 +0000]
Fix storing links to headlines containing multiple links

* lisp/org.el (org-store-link): Fix storing links to headlines
  containing multiple links.

* testing/lisp/test-org.el (test-org/store-link): New test.

Reported-by: Georgiy Tugai <>

4 weeks agoFix links to elements with a name
Nicolas Goaziou [Tue, 26 Apr 2016 16:58:01 +0000]
Fix links to elements with a name

* lisp/org.el (org-store-link): Properly handle elements with a NAME

4 weeks agoox-ascii: Fix spurious links
Nicolas Goaziou [Tue, 26 Apr 2016 11:23:47 +0000]
ox-ascii: Fix spurious links

* lisp/ox-ascii.el (org-ascii--unique-links): Fix spurious links.

Reported-by: Samuel Wales <>

4 weeks agoorg-yank: Correct docstring
Kyle Meyer [Sat, 23 Apr 2016 21:36:11 +0000]
org-yank: Correct docstring

* lisp/org.el (org-yank): Update docstring for change in default value
  of org-yank-adjusted-subtrees.

The default value was changed to nil in 2949012 (Change default values
of some variables., 2009-02-01).

Reported-by: Jorge Peixoto de Morais Neto <>

5 weeks agoox-odt: Fix styles location
Nicolas Goaziou [Tue, 19 Apr 2016 19:30:39 +0000]
ox-odt: Fix styles location

* lisp/ox-odt.el (org-odt-styles-dir-list): Point to correct location
  for styles.

Reported-by: Colin Baxter <>

5 weeks agoRemove duplicate candidates when setting tags
Nicolas Goaziou [Mon, 18 Apr 2016 23:34:27 +0000]
Remove duplicate candidates when setting tags

* lisp/org.el (org-set-tags): Remove duplicate candidates from menu.

5 weeks agoFix "Invalid time zone specification" error
Nicolas Goaziou [Sat, 16 Apr 2016 09:33:28 +0000]
Fix "Invalid time zone specification" error

* lisp/org.el (org-timestamp-change): Correctly handle `encode-time'

Suggested-by: Derek Feichtinger <>
Reported-by: Eric Abrahamsen <>

5 weeks agoorg.texi: Fix typo
Nicolas Goaziou [Sat, 16 Apr 2016 09:30:31 +0000]
org.texi: Fix typo

* doc/org.texi (Timers): Fix typo.

Reported-by: Lee <>

5 weeks agoFix typo
Nicolas Goaziou [Thu, 14 Apr 2016 07:17:34 +0000]
Fix typo

* lisp/org.el (org-property--local-values): Fix typo in doc string.

5 weeks agoorg-capture: Fix invalid table line specification
Nicolas Goaziou [Wed, 13 Apr 2016 21:47:36 +0000]
org-capture: Fix invalid table line specification

* lisp/org-capture.el (org-capture-place-table-line): Move point in
  front of the table before trying to analyze it.

Reported-by: Christian Moe <>

5 weeks agoox-ascii: Fix export of links in headlines
Nicolas Goaziou [Wed, 13 Apr 2016 21:16:25 +0000]
ox-ascii: Fix export of links in headlines

* lisp/ox-ascii.el (org-ascii--unique-links):
(org-ascii-section): Fix export of links in headlines.

Reported-by: Samuel Wales <>

6 weeks agoUpdate format-time-string calls for argument change
Kyle Meyer [Mon, 11 Apr 2016 04:32:08 +0000]
Update format-time-string calls for argument change

* lisp/org.el (org-timestamp-format):
* lisp/ox-icalendar.el (org-icalendar-convert-timestamp): Specify t for
  the ZONE argument of format-time-string to indicate UTC.

As of Emacs's af32fa9 (New optional ZONE arg for format-time-string
etc., 2015-07-26), UTC is indicated by passing t as the third argument
to format-time-string rather than any non-nil value.

This change is in place of a backport of Emacs's b787d55 (More
format-time-string change fixups, 2016-04-02), which would not work for
earlier versions of Emacs.

6 weeks agoorgguide: Fix mis-uses of itemx
Nicolas Goaziou [Fri, 8 Apr 2016 20:51:04 +0000]
orgguide: Fix mis-uses of itemx

* doc/orgguide.texi (Agenda commands): Fix mis-uses of itemx.

Reported-by: Jean-Christophe Helary <>

6 weeks agoox-texinfo: Fix erroneous count of blank lines in menu
Nicolas Goaziou [Wed, 6 Apr 2016 20:26:08 +0000]
ox-texinfo: Fix erroneous count of blank lines in menu

* lisp/ox-texinfo.el (org-texinfo-section):
(org-texinfo--build-menu): Normalize empty lines in generated menu.

Reported-by: Jonas Bernoulli <>

7 weeks agoox-html: Fix planning info export
Nicolas Goaziou [Wed, 30 Mar 2016 15:17:07 +0000]
ox-html: Fix planning info export

* lisp/ox-html.el (org-html-planning): Properly escape angle brackets in

Reported-by: Keith Sutton <>

7 weeks agoFix indentation bug
Nicolas Goaziou [Wed, 30 Mar 2016 13:34:24 +0000]
Fix indentation bug

* lisp/org.el (org--get-expected-indentation): Return correct columns
  when at the end of an empty item.
* testing/lisp/test-org.el (test-org/indent-line): Add test.

8 weeks agoox-html: Fix Usenet links
Nicolas Goaziou [Mon, 28 Mar 2016 09:06:56 +0000]
ox-html: Fix Usenet links

* lisp/ox-html.el (org-html-link): Properly export Usenet links.

Reported-by: Michael Welle <>

8 weeks agoob-C: use size_t in babel D
Thierry Banel [Sun, 20 Mar 2016 14:24:14 +0000]
ob-C: use size_t in babel D

* lisp/ob-C.el (org-babel-C-header-to-C): change ulong to size_t for
  indexing a table as mandated by the latest version of the D language
  (thanks to Chris Andrews)

8 weeks agoorg-table: Add tests
Nicolas Goaziou [Fri, 25 Mar 2016 23:20:08 +0000]
org-table: Add tests

* testing/lisp/test-org-table.el (test-org-table/eval-formula):
(test-org-table/last-rc): New tests.
(test-org-table/first-rc): Add tests.

8 weeks agoorg-table: Fix docstrings
Nicolas Goaziou [Fri, 25 Mar 2016 22:11:34 +0000]
org-table: Fix docstrings

* lisp/org-table.el (org-table-eval-formula): Nowadays, Calc is
  installed with Emacs, so there is no need to specify this.  Also
  remove hard-coded "C-u".
(org-table-recalculate): Fix code typo.

8 weeks agoorg-table: Fix #ERROR in table formula with "@>"
Nicolas Goaziou [Fri, 25 Mar 2016 21:17:08 +0000]
org-table: Fix #ERROR in table formula with "@>"

* lisp/org-table.el (org-table-eval-formula): Expand first and last
  references into proper fields coordinates before replacing ranges.

Reported-by: Pablo S. Casas <>

8 weeks agoorg.texi: Fix typo
Nicolas Goaziou [Fri, 25 Mar 2016 13:26:09 +0000]
org.texi: Fix typo

* doc/org.texi (HTML doctypes): Special block names are case-sensitive.

Reported-by: Guilherme Gondim <>

2 months agoorg-table: Silence byte-compiler
Nicolas Goaziou [Thu, 24 Mar 2016 21:12:58 +0000]
org-table: Silence byte-compiler

2 months agoorg.texi: Fix typo
Nicolas Goaziou [Thu, 24 Mar 2016 13:02:24 +0000]
org.texi: Fix typo

* doc/org.texi (@LaTeX{} specific attributes): Fix typo.

Reported-by: Eduardo Mercovich <>

2 months agoorg-table: Fix LaTeX snippets in radio tables
Nicolas Goaziou [Thu, 24 Mar 2016 12:51:40 +0000]
org-table: Fix LaTeX snippets in radio tables

* lisp/org-table.el (orgtbl-to-generic): Call back-end specific filters.
* testing/lisp/test-org-table.el (test-org-table/to-latex): Add test.

Reported-by: Uwe Brauer <>

2 months agoRemove failing test
Nicolas Goaziou [Thu, 17 Mar 2016 16:15:17 +0000]
Remove failing test

* testing/lisp/test-ox.el (test-org-export/activate-smart-quotes):
  Comment out failing test.

2 months agoFix indentation bug
Nicolas Goaziou [Thu, 17 Mar 2016 15:50:54 +0000]
Fix indentation bug

* lisp/org.el (org--get-expected-indentation): Fix indentation.
* testing/lisp/test-org.el (test-org/indent-line): Add test.

2 months agoox-confluence: Do not generate filled paragraphs
M. P. Ashton [Wed, 16 Mar 2016 21:35:36 +0000]
ox-confluence: Do not generate filled paragraphs

* contrib/lisp/ox-confluence.el: (org-confluence-paragraph): New function.
(confluence): Use new function.

ox-confluence was generating filled paragraphs.  Since Confluence treats
each newline as a line break, this caused unexpected formatting.  Added
a paragraph function to generate unfilled paragraphs (taken from

2 months agoorg-agenda: Fix bulk re-scheduling
Nicolas Goaziou [Wed, 16 Mar 2016 21:07:16 +0000]
org-agenda: Fix bulk re-scheduling

* lisp/org-agenda.el (org-agenda-bulk-action): Fix rescheduling TODO items with `org-log-reschedule' set to `note'.

Reported-by: Allen Li <>

2 months agoDocument the lack of evaluation of inline code blocks in keyword lines
Rafael Laboissiere [Fri, 11 Mar 2016 22:04:00 +0000]
Document the lack of evaluation of inline code blocks in keyword lines

* doc/org.texi (Evaluating code blocks): Add footnote explaining that
inline code blocks are not evaluated inside keyword lines.

2 months agoFix docstring typo
Kyle Meyer [Sat, 12 Mar 2016 16:11:18 +0000]
Fix docstring typo

* lisp/org.el (org-align-all-tags): Fix typo in docstring.

2 months agoorg.texi: Fix org-timer-pause-or-continue's key
Kyle Meyer [Sat, 12 Mar 2016 16:07:18 +0000]
org.texi: Fix org-timer-pause-or-continue's key

* doc/org.texi (Timers): Fix keybinding for org-timer-pause-or-continue.

Reported-by: Tubo Shi <>

2 months agoDisplay quotes in key-bindings as straight quotes
Kaushal Modi [Fri, 11 Mar 2016 17:30:20 +0000]
Display quotes in key-bindings as straight quotes

* lisp/org-agenda.el (org-agenda-show-the-flagging-note):
* lisp/org-footnote.el (org-footnote-goto-definition):
* lisp/org-table.el (org-table-edit-formulas): Fix straight quotes
  rendered as curvy quotes in echoes messages (in emacs 25.1).
* lisp/org-table.el (org-table-align): Fix straight quotes rendered as
  curvy quotes in help echo (in emacs 25.1).

* lisp/org-protocol.el (org-protocol-create-for-org):
* lisp/org-table.el (org-table-sum): Minor reformatting.

The below thread discusses why these changes were needed especially when
using emacs 25.1 or newer emacsen (that added support for rendering
back-quotes and straight quotes as left/right curvy quotes by default):

Fix the quote style displayed when key-bindings are shown in
the echo via (message .. (substitute-command-keys ..)).

So below will render that single quote as curly.

(message "C-c '")

The fix (Reference:
is to print that quote verbatim using the "%s" modifier:

(message "%s" "C-c '")

Also an help-echo text property value was fixed in `org-table-align'.
`substitute-command-keys' should not be used in that.  Instead \\[COMMAND]
should be used directly in the string.

2 months agoox: Fix smart quotes within tables
Nicolas Goaziou [Thu, 10 Mar 2016 09:10:29 +0000]
ox: Fix smart quotes within tables

* lisp/ox.el (org-export--smart-quote-status): Handle smart quotes
  within objects.

* testing/lisp/test-ox.el (test-org-export/activate-smart-quotes): Add

Reported-by: Philipp Middendorf <>

2 months agoorg-crypt: Decrypt entries with a properties drawer
Nicolas Goaziou [Thu, 10 Mar 2016 08:52:53 +0000]
org-crypt: Decrypt entries with a properties drawer

* lisp/org-crypt.el (org-decrypt-entry): Decrypt entries with
  a properties drawer.

This commit propagates changes made to `org-encrypt-entry' in the
previous commit.

2 months agoorg-crypt: Do not encrypt properties drawers
Nicolas Goaziou [Thu, 10 Mar 2016 08:43:36 +0000]
org-crypt: Do not encrypt properties drawers

* lisp/org-crypt.el (org-encrypt-entry): Do not encrypt properties
  drawer, as specified in the manual.

Reported-by: "Daniel E. Doherty" <>

2 months agoFix typo
Nicolas Goaziou [Fri, 4 Mar 2016 00:15:59 +0000]
Fix typo

2 months agoorg-eval-in-calendar: Fix docstring
Kyle Meyer [Wed, 2 Mar 2016 04:31:49 +0000]
org-eval-in-calendar: Fix docstring

* lisp/org.el (org-eval-in-calendar): Fix docstring's description of

2 months agoFix return value for `org-get-outline-path'
Nicolas Goaziou [Tue, 1 Mar 2016 00:01:07 +0000]
Fix return value for `org-get-outline-path'

* lisp/org.el (org--get-outline-path-1): Replace links with their
description, or path, in addition to removing statistics cookies.
(org-get-outline-path): Add an optional argument to include current
headline in path.
(org-refile-get-targets): Make use of new argument.  Remove call to
`org-link-display-format', which is now handled in

* testing/lisp/test-org.el (test-org/get-outline-path): Add tests.

Reported-by: Tobias Getzner <>

2 months agoFix `org-get-outline-path'
Nicolas Goaziou [Mon, 29 Feb 2016 15:25:24 +0000]
Fix `org-get-outline-path'

* lisp/org.el (org--get-outline-path-1): Fix wrong type arrayp error
  when trying to get the outline path of an empty headline.
* testing/lisp/test-org.el (test-org/get-outline-path): Add test.

Reported-by: Tobias Getzner <>

2 months agoox-latex: Remove spurious newline in labels
Nicolas Goaziou [Sat, 27 Feb 2016 08:34:45 +0000]
ox-latex: Remove spurious newline in labels

* lisp/ox-latex.el (org-latex--caption/label-string): Remove spurious
  newline in labels.

Reported-by: Thomas S. Dye <>

2 months agoFix `org-link-display-format'
Nicolas Goaziou [Thu, 25 Feb 2016 17:10:24 +0000]
Fix `org-link-display-format'

* lisp/org.el (org-link-display-format): Replace all links in give
  string instead of the first one only.

2 months agoSilence byte-compiler
Nicolas Goaziou [Thu, 25 Feb 2016 14:10:49 +0000]
Silence byte-compiler

2 months agoTiny refactoring
Nicolas Goaziou [Thu, 25 Feb 2016 13:41:54 +0000]
Tiny refactoring

* lisp/org.el (org-refile-get-targets): Tiny refactoring.

2 months agoFix `org-refile-get-targets'
Nicolas Goaziou [Thu, 25 Feb 2016 13:32:57 +0000]
Fix `org-refile-get-targets'

* lisp/org.el (org-refile-get-targets): Fix bug when using
  `org-refile-target-verify-function'.  Improve speed.

(org-olpa): Remove variable.
(org-outline-path-cache): New variable.

(org--get-outline-path-1): New function.
(org-get-outline-path): Use new function.  This fixes return value when
cache is used and calls are not in the same path.

* testing/lisp/test-org.el (test-org/get-outline-path): New test.

Reported-by: Florian Adamsky <>

3 months agoorg.el: Fix typo in `org-previous-visible-heading' release_8.3.4
Jason Furtney [Sun, 21 Feb 2016 02:29:46 +0000]
org.el: Fix typo in `org-previous-visible-heading'

* lisp/org.el (org-previous-visible-heading): Fix docstring.


3 months agoox-html.el: Fix TOC export of TODO headlines
Austin Walker [Fri, 19 Feb 2016 13:22:08 +0000]
ox-html.el: Fix TOC export of TODO headlines

* lisp/ox-html.el (org-html--todo): Don't show nil in format string for
  TODO class

Use empty string if :html-todo-kwd-class-prefix is not present.


3 months agoFix links in the table of contents of the HTML manual and guide.
Bastien [Fri, 19 Feb 2016 07:38:15 +0000]
Fix links in the table of contents of the HTML manual and guide.

* mk/, mk/ Don't prepend "toc_" to TOC links in
the manual and the guide.

Thanks to Yasushi SHOJI for reporting this.

3 months agoorg-element: Fix search failed error in `org-element-context'
Nicolas Goaziou [Thu, 11 Feb 2016 08:47:54 +0000]
org-element: Fix search failed error in `org-element-context'

* lisp/org-element.el (org-element-context): Make sure point is on tag
  line before searching for it.

* testing/lisp/test-org-element.el (test-org-element/context): Add test.
  Small refactoring.

Reported-by: Kaushal Modi <>

3 months agoorg-archive: Speed-up archiving subtrees
Nicolas Goaziou [Wed, 10 Feb 2016 23:47:55 +0000]
org-archive: Speed-up archiving subtrees

* lisp/org-archive.el (org-toggle-archive-tag): Use `org-flag-subtree',
  which is much faster than outline-hide-subtree'.

Reported-by: Michael Ziems <>

3 months agoox-odt: Fix End of file during parsing error
Nicolas Goaziou [Tue, 9 Feb 2016 20:52:10 +0000]
ox-odt: Fix End of file during parsing error

* lisp/ox-odt.el (org-odt-template): Do not call `read' on an empty

Reported-by: Damien Cassou <>

3 months agoBackport commit ec90220 from Emacs
Alan Mackenzie [Mon, 25 Jan 2016 12:35:15 +0000]
Backport commit ec90220 from Emacs

Expunge "allow" + infinitive from source and doc, part 2.
Alan Mackenzie
Mon Jan 25 12:35:15 2016 +0000

3 months agoorg-capture: Document org-directory
Kyle Meyer [Sun, 7 Feb 2016 16:56:04 +0000]
org-capture: Document org-directory

* lisp/org-capture.el (org-capture-templates):
* doc/org.texi (Template elements): Document org-directory.

3 months agoob-core: fix bug when source block is at bob
Aaron Ecay [Sat, 6 Feb 2016 22:01:22 +0000]
ob-core: fix bug when source block is at bob

* lisp/ob-core.el (org-babel-get-src-block-info): Fix bug.

3 months agoRemove `org-latex-fragment-image-overlays'
Nicolas Goaziou [Fri, 5 Feb 2016 21:47:14 +0000]
Remove `org-latex-fragment-image-overlays'

* lisp/org.el (org-latex-fragment-image-overlays): Remove variable.
(org--format-latex-make-overlay): Do not register anymore created
overlays in the removed variable.
(org--list-latex-overlays): New function.
(org-remove-latex-fragment-image-overlays): Use new function.
(org-context): Work around use of `org-latex-fragment-image-overlays'.

Reported-by: Dima Kogan <>

3 months agoSilence byte-compiler
Nicolas Goaziou [Fri, 5 Feb 2016 17:39:06 +0000]
Silence byte-compiler

* lisp/org.el (org--format-latex-make-overlay): Silence byte-compiler.

3 months agoRemove LaTeX overlay when text below is modified
Nicolas Goaziou [Thu, 4 Feb 2016 08:32:51 +0000]
Remove LaTeX overlay when text below is modified

* lisp/org.el (org--format-latex-make-overlay): New function.
(org-format-latex): Use new function.

Reported-by: Dima Kogan <>

3 months agoorg-agenda: Fix org-agenda-filter-by-tag-refine
Kyle Meyer [Thu, 4 Feb 2016 04:34:26 +0000]
org-agenda: Fix org-agenda-filter-by-tag-refine

* lisp/org-agenda.el (org-agenda-filter-by-tag-refine): Refine rather
  than exlude tags, reverting change from 6c6ae99.  Mark as obsolete
  because this functionality is now redundant with

Reported-by: Viktor Rosenfeld <>

3 months agoFix "it's" typos
Kyle Meyer [Thu, 4 Feb 2016 04:33:28 +0000]
Fix "it's" typos

* lisp/ob-C.el (org-babel-expand-body:cpp):
* lisp/ob-exp.el (org-babel-exp-src-block):
* lisp/ob-fortran.el (org-babel-expand-body:fortran):
* testing/org-test.el (org-test-buffer):
Correct "it's" typo in docstring.

* doc/org.texi:
Correct "it's" typos.

3 months agoorg-compat: Fix error on newest Emacsen (>= 25)
Nicolas Goaziou [Tue, 2 Feb 2016 16:49:23 +0000]
org-compat: Fix error on newest Emacsen (>= 25)

* lisp/org-compat.el (org-move-to-column): Ensure `remove' is called on
a list.

Reported-by: Julien Cubizolles <>

3 months agoorg-element: Disable cache for orgstruct-mode
Nicolas Goaziou [Sun, 31 Jan 2016 23:17:39 +0000]
org-element: Disable cache for orgstruct-mode

* lisp/org-element.el (org-element--cache-active-p):
(org-element-cache-reset): Do not activate cache outside Org buffers,
even if using "orgstruct-mode".

Reported-by: "Mark A. Hershberger" <>

3 months agoob-tangle: Fix :comment org behavior
Nicolas Goaziou [Sun, 31 Jan 2016 22:59:50 +0000]
ob-tangle: Fix :comment org behavior

* lisp/ob-tangle.el (org-babel-spec-to-string): Do not try to comment
  empty text.

Reported-by: Titus von der Malsburg <>

3 months agoox-latex: Fix numbering of source blocks
Nicolas Goaziou [Sun, 31 Jan 2016 22:30:49 +0000]
ox-latex: Fix numbering of source blocks

* lisp/ox-latex.el (org-latex-src-block): Fix numbering reset on source
  blocks when using the listings package.

Reported-by: P-O Gustafsson <>

3 months agoox-html: Properly encode links without a description
Nicolas Goaziou [Sun, 31 Jan 2016 22:21:34 +0000]
ox-html: Properly encode links without a description

* lisp/ox-html.el (org-html-link): Encode URI in default description
  when none is provided.


3 months agoob-core: Silence byte-compiler
Nicolas Goaziou [Sun, 31 Jan 2016 19:57:47 +0000]
ob-core: Silence byte-compiler

3 months agoob-tangle: Fix `org-babel-tangle-jump-to-org'
Nicolas Goaziou [Sun, 31 Jan 2016 10:37:05 +0000]
ob-tangle: Fix `org-babel-tangle-jump-to-org'

* lisp/ob-tangle.el (org-babel-tangle-jump-to-org): Find correct
  location in the Org document.

* testing/lisp/test-ob-tangle.el (ob-tangle/jump-to-org): New test.

3 months agoob: Fix `org-babel-update-block-body'
Nicolas Goaziou [Sun, 31 Jan 2016 10:36:52 +0000]
ob: Fix `org-babel-update-block-body'

* lisp/ob-core.el (org-babel-update-block-body): Correctly handle block
(org-babel-where-is-src-block-head): Accept an optional argument in
order to avoid parsing twice the same element.

* testing/lisp/test-ob.el (org-test-ob/update-block-body): New test.

3 months agoorg-src: Use font-lock-ensure to highlight blocks
Kyle Meyer [Fri, 29 Jan 2016 05:10:08 +0000]
org-src: Use font-lock-ensure to highlight blocks

* lisp/org-src.el (org-src-font-lock-fontify-block): Use
  org-font-lock-ensure instead of font-lock-fontify-buffer.

This replacement has previously been made (f36b19e, d81e6b5) and then reverted
(99f9999, 003a0f1) twice because source blocks were not being reliably
highlighted when font-lock-ensure was used instead of
font-lock-fontify-buffer.  This was due to a bug in font-lock-ensure
that has now been fixed (see Emacs's 21beb19 and bug#22399).

font-lock-ensure was introduced after Emacs 24.5, so this issue only
pertains to users with a developmental version of Emacs.

3 months agoorg-compat: Update font-lock-ensure alias
Kyle Meyer [Fri, 29 Jan 2016 05:07:33 +0000]
org-compat: Update font-lock-ensure alias

* lisp/org-compat.el (org-font-lock-ensure): Add new alias that accepts
  the same number of arguments as font-lock-ensure does.  Use an org-
* lisp/org-clock.el (org-clock-get-clocktable):
* lisp/org.el (org-fontify-like-in-org-mode):
* lisp/ox-html.el (org-html-fontify-code):
* lisp/ox-odt.el (org-odt-do-format-code):
* lisp/ox-org.el (org-org-publish-to-org): Use org-font-lock-ensure.

See Emacs's bug#22399.

3 months agoorg-macro: Fix expansion in narrowed buffers
Nicolas Goaziou [Thu, 28 Jan 2016 23:52:49 +0000]
org-macro: Fix expansion in narrowed buffers

* lisp/org-macro.el (org-macro-replace-all): Expand macro even outside
  narrowed part of the buffer.

* testing/lisp/test-org-macro.el (test-org/macro-replace-all): Add test.

Reported-by: Kaushal Modi <>

3 months agoorg-table: Fix table formulas editing
Nicolas Goaziou [Tue, 26 Jan 2016 23:28:56 +0000]
org-table: Fix table formulas editing

* lisp/org-table.el (org-table-show-reference): Do not move point
  outside the table when editing formulas.  Fix docstring.

Reported-by: Samuel Wales <>

3 months agoox-latex: PDF generation timestamp check
Anthony Cowley [Thu, 14 Jan 2016 23:13:45 +0000]
ox-latex: PDF generation timestamp check

* lisp/ox-latex.el (org-latex-compile): Improve timestamp check on HFS+
  filesystem by only considering 1-second clock resolution.

Previously, the call to (current-time) could return a timestamp with
a non-zero microsecond or picosecond fields, while the file attribute
always has zeros for these fields.  The check that the generated file is
newer than the reference timestamp only succeeded when the time to
generate the file crossed a 1-second clock interval.


3 months agoob-core: Fix comment typo from Emacs's 1203e8a
Kyle Meyer [Tue, 26 Jan 2016 06:13:51 +0000]
ob-core: Fix comment typo from Emacs's 1203e8a

3 months agoBackport commit 1203e8a from Emacs
Stefan Monnier [Mon, 25 Jan 2016 15:11:31 +0000]
Backport commit 1203e8a from Emacs

* lisp/ob-core.el (org-babel-check-confirm-evaluate)
(org-babel-map-src-blocks): Don't emit warnings if added vars are not used.
(*this*): Declare as dyn-bound.
(org-babel-expand-src-block, org-babel-load-in-session)
(org-babel-switch-to-session-with-code, org-babel-get-rownames):
Mark unused args.
(org-babel-combine-header-arg-lists): Remove unused var `args'.

* lisp/org-src.el (org-inhibit-startup):
Declare as dyn-bound.

lisp/org: Fix some compiler warnings
Stefan Monnier
Mon Jan 25 10:11:31 2016 -0500

3 months agoFix logic when activating plain links
Rafael Laboissiere [Mon, 25 Jan 2016 16:09:23 +0000]
Fix logic when activating plain links

* lisp/org.el: Activate plain link when point is outside a tag, instead
  of the other way around.


3 months agoTiny refactoring
Nicolas Goaziou [Mon, 25 Jan 2016 12:58:05 +0000]
Tiny refactoring

* lisp/org.el (org-activate-plain-links): Tiny refactoring.