27 hours agoFix multiple groups of mutually exclusive tags maint
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 <>

3 days 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 <>

3 days 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

3 days 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 <>

6 days 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 <>

10 days 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 <>

11 days 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.

13 days 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 <>

13 days 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 <>

2 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.

2 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 <>

2 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 <>

2 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.

3 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 <>

3 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 <>

4 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 <>

4 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.

4 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 <>

5 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)

5 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.

5 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.

5 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 <>

5 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 <>

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

5 weeks 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 <>

5 weeks 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 <>

6 weeks 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.

6 weeks 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.

6 weeks 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

6 weeks 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 <>

6 weeks 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.

6 weeks 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.

6 weeks 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 <>

6 weeks 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.

7 weeks 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 <>

7 weeks 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.

7 weeks 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" <>

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

8 weeks 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

8 weeks 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 <>

8 weeks 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 <>

2 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.


2 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.


2 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.

2 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 <>

2 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 <>

2 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 <>

2 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

2 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.

2 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.

2 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 <>

2 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.

2 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 <>

2 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 <>

2 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.

2 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 <>

2 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" <>

2 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 <>

2 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 <>

2 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.


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

2 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.

2 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.

3 months agoFix (wrong-type-argument listp org-link) error
Nicolas Goaziou [Mon, 25 Jan 2016 12:54:47 +0000]
Fix (wrong-type-argument listp org-link) error

* lisp/org.el (org-activate-plain-links): `face' property doesn't not
  necessarily is a list.

Reported-by: gongzhitaao <>

3 months agoorg-crypt: Fix comment typo from Emacs's fbce475
Kyle Meyer [Sun, 24 Jan 2016 21:21:53 +0000]
org-crypt: Fix comment typo from Emacs's fbce475

3 months agoBackport commit fbce475 from Emacs
Alan Mackenzie [Sun, 24 Jan 2016 20:30:39 +0000]
Backport commit fbce475 from Emacs

Expunge "allow" + infinitive without direct object from source and doc.
Alan Mackenzie
Sun Jan 24 20:30:39 2016 +0000

3 months agoFix plain links fontification in a narrowed buffer
Nicolas Goaziou [Sun, 24 Jan 2016 17:22:00 +0000]
Fix plain links fontification in a narrowed buffer

* lisp/org.el (org-activate-plain-links): Fix fontification when buffer
  is narrowed and (point-min) is no longer 1.

3 months agoFix `org-format-latex' with $$...$$ snippets
Nicolas Goaziou [Sun, 24 Jan 2016 17:08:23 +0000]
Fix `org-format-latex' with $$...$$ snippets

* lisp/org.el (org-format-latex): Transform $$...$$ into \[...\] before
  processing with mathjax.

3 months agolisp/org.el: correct filemode, changed in b3fbd31f17
Achim Gratz [Sun, 24 Jan 2016 11:09:03 +0000]
lisp/org.el: correct filemode, changed in b3fbd31f17

3 months agoFix fontification of plain links at beginning of buffer
Rafael Laboissiere [Fri, 22 Jan 2016 23:16:56 +0000]
Fix fontification of plain links at beginning of buffer

* lisp/org.el (org-activate-plain-links): Ensure that a valid buffer
  position is given as first argument to get-text-property, in
  particular when the plain link is at the very beginning of the buffer.


3 months agoox-icalendar: Fix timezone export bug
Richard Lawrence [Fri, 22 Jan 2016 01:28:58 +0000]
ox-icalendar: Fix timezone export bug

* ox-icalendar.el (org-icalendar-export-current-agenda): Correct
  argument order in call to org-icalendar--vcalendar (timezone should be
  third, description fourth).


3 months agoUse `org-back-to-heading' instead of `outline-back-to-heading'
Nicolas Goaziou [Thu, 21 Jan 2016 09:42:03 +0000]
Use `org-back-to-heading' instead of `outline-back-to-heading'

* lisp/org-agenda.el (org-search-view):
* lisp/org-clock.el (org-with-clock):
* lisp/org.el (org-entry-beginning-position): Use `org-back-to-heading'
  instead of `outline-back-to-heading'.

Reported-by: Derek Feichtinger <>

3 months agoorg-colview: Fix column view editing
Nicolas Goaziou [Wed, 20 Jan 2016 23:51:13 +0000]
org-colview: Fix column view editing

* lisp/org-colview.el (org-columns-next-allowed-value): Fix error when
  trying to edit a column from a headline starting at the very beginning
  of the buffer.

This patch also prepares for lexical binding.

Reported-by: "T.F. Torrey" <>

3 months agoFix memory leak in `org-agenda-prepare-buffers'
Nicolas Goaziou [Sat, 16 Jan 2016 14:56:03 +0000]
Fix memory leak in `org-agenda-prepare-buffers'

* lisp/org.el (org-agenda-prepare-buffers): Do not use
  `org-uniquify-alist' since it uses `eq' for comparison, whereas where
  are using strings as keys.

Reported-by: Vincent Emanuele <>

3 months agoFix tags looking like plain links
Nicolas Goaziou [Sat, 16 Jan 2016 13:50:25 +0000]
Fix tags looking like plain links

* lisp/org-element.el (org-element-context): Do not look for objects
  within TODO keyword, priority cookie, comment keyword or tags.
* lisp/org.el (org-activate-tags): Fix regexp.

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

Reported-by: John Kitchin <>

3 months agoorg-table: Fix editing multiple TBLFM lines
Nicolas Goaziou [Thu, 14 Jan 2016 20:11:12 +0000]
org-table: Fix editing multiple TBLFM lines

* lisp/org-table.el (org-table-store-formulas):
(org-table-get-stored-formulas): Add an optional argument to handle
subsequent TBLFM lines.
(org-table--fedit-source): New variable.
(org-table-fedit-finish): Handle additional TBLFM lines.

Reported-by: Nick Dokos <>

3 months agoorg-table: Fix a comment
Nicolas Goaziou [Thu, 14 Jan 2016 16:51:39 +0000]
org-table: Fix a comment

* lisp/org-table.el (org-table-end): Fix a comment.

3 months agoorg-table: Fix infloop in `org-table-current-field-formula'
Nicolas Goaziou [Thu, 14 Jan 2016 16:36:39 +0000]
org-table: Fix infloop in `org-table-current-field-formula'

* lisp/org-table.el (org-table-current-field-formula): Fix infloop when
  called from outside the table, e.g., on a TBLFM line.

3 months agoorg-table: Fix `org-table-current-field-formula'
Nicolas Goaziou [Thu, 14 Jan 2016 13:57:46 +0000]
org-table: Fix `org-table-current-field-formula'

* lisp/org-table.el (org-table-current-field-formula): Column formulas
  are stored with a leading dollar sign.  Also raise an error when no
  field applies, unless NOERROR is non-nil.

* lisp/org-table.el (org-table-eval-formula): Remove unnecessary error.

3 months agoorg-table: Fix formula editor
Nicolas Goaziou [Thu, 14 Jan 2016 10:57:09 +0000]
org-table: Fix formula editor

* lisp/org-table.el (org-table-edit-formulas):
(org-table-fedit-finish): Do not remove "$" from column formulas when
exiting the editor.

3 months agoorg-element: Fix footnote definition parsing
Nicolas Goaziou [Thu, 14 Jan 2016 08:31:24 +0000]
org-element: Fix footnote definition parsing

* lisp/org-element.el (org-element--footnote-separator): New variable.
(org-element-footnote-definition-parser): Handle footnotes with
affiliated keywords.

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

3 months agoorg-directory: Update docstring
Kyle Meyer [Wed, 13 Jan 2016 05:42:09 +0000]
org-directory: Update docstring

* lisp/org.el (org-directory): Fix docstring description of where this
  variable is used.

3 months agoorg-bibtex: Fix type error in non-file buffers
Kyle Meyer [Wed, 13 Jan 2016 05:18:42 +0000]
org-bibtex: Fix type error in non-file buffers

* lisp/org-bibtex.el (org-bibtex): Fix type error in cases where the
  buffer is not visiting a file.  In an indirect buffer, use the file
  name for the base buffer.

3 months agoorg-bibtex: Mark filename argument as required
Kyle Meyer [Wed, 13 Jan 2016 05:16:07 +0000]
org-bibtex: Mark filename argument as required

* lisp/org-bibtex.el (org-bibtex): Mark FILENAME argument as required
  because, when called from Lisp, the function does not provide a
  default file name when FILENAME is nil, leading to a type error.

3 months agoMerge remote-tracking branch 'origin/maint' into maint
Kyle Meyer [Tue, 12 Jan 2016 07:22:47 +0000]
Merge remote-tracking branch 'origin/maint' into maint

3 months agoox-bibtex: Fix bibliography location in HTML
Kyle Meyer [Tue, 12 Jan 2016 04:29:03 +0000]
ox-bibtex: Fix bibliography location in HTML

* contrib/lisp/ox-bibtex.el (org-bibtex-process-bib-files): Fix
  insertion location of bibliography in HTML export.

Reported-by: gongzhitaao <>