fix SETUPFILE pathname expansion with subdirectories
commit11bba63dc32efb2a74beeab2e0bf8f3c3e1bc460
authorRichard Hansen <rhansen@bbn.com>
Sun, 20 Sep 2015 05:28:53 +0000 (20 01:28 -0400)
committerNicolas Goaziou <mail@nicolasgoaziou.fr>
Thu, 24 Sep 2015 08:16:04 +0000 (24 10:16 +0200)
treea120046b0be129da17789618c316a398b14ec122
parent2e1b93db418e0ab2b0f481543187960e0d3f92ce
fix SETUPFILE pathname expansion with subdirectories

* lisp/org-macro.el (org-macro--collect-macros): cd to the directory
containing the SETUPFILE before recursing so that relative pathnames
in the SETUPFILE are expanded properly.

* lisp/org.el (org--setup-collect-keywords): cd to the directory
containing the SETUPFILE before recursing so that relative pathnames
in the SETUPFILE are expanded properly.

* lisp/ox.el (org-export--get-inbuffer-options,
org-export--list-bound-variables): cd to the directory containing the
SETUPFILE before recursing so that relative pathnames in the SETUPFILE
are expanded properly.

If /path/to/foo.org contains:

    #+SETUPFILE: settings/beamer.org

and /path/to/settings/beamer.org contains:

    #+SETUPFILE: common.org

then we want to read /path/to/settings/common.org, not
/path/to/common.org.

TINYCHANGE
lisp/org-macro.el
lisp/org.el
lisp/ox.el
testing/examples/setupfile.org
testing/examples/setupfile3.org [copied from testing/examples/setupfile.org with 100% similarity]
testing/examples/subdir/setupfile2.org [new file with mode: 0644]