ox: Fix regression in INCLUDE keywords
commitbeeb4bf23fd2b2339c2354457840d52c52d6dff5
authorNicolas Goaziou <mail@nicolasgoaziou.fr>
Mon, 19 Mar 2018 22:48:38 +0000 (19 23:48 +0100)
committerNicolas Goaziou <mail@nicolasgoaziou.fr>
Mon, 19 Mar 2018 22:48:38 +0000 (19 23:48 +0100)
treeb7c8d17a351229e08867d60a95231a643ce24ad3
parent0de3f78c28827bb84e7a4fad637694cbcbe0a317
ox: Fix regression in INCLUDE keywords

* lisp/ox.el (org-export--prepare-file-contents): Activate Org mode in
  temporary buffer so all regexps are set.  Also, be more strict when
  updating links, i.e., do not bother if both includer and includee
  belong to the same directory, or if there's no includer at all.
  Eventually, only update links within lines specifications, if any.

* testing/lisp/test-ox.el (test-org/expand-include/links): Add tests.

Reported-by: Kaushal Modi <kaushal.modi@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2018-03/msg00394.html>
lisp/ox.el
testing/lisp/test-ox.el