From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [PATCH 2/2] fix SETUPFILE pathname expansion from within an INCLUDE Date: Fri, 25 Sep 2015 13:58:08 +0200 Message-ID: <87si62d833.fsf@nicolasgoaziou.fr> References: <56047142.1060404@bbn.com> <1443133241-501-1-git-send-email-rhansen@bbn.com> <1443133241-501-2-git-send-email-rhansen@bbn.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57220) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfRc5-0007iq-G1 for emacs-orgmode@gnu.org; Fri, 25 Sep 2015 07:56:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZfRc4-0006fY-Gx for emacs-orgmode@gnu.org; Fri, 25 Sep 2015 07:56:29 -0400 Received: from relay3-d.mail.gandi.net ([2001:4b98:c:538::195]:36154) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfRc4-0006fU-AY for emacs-orgmode@gnu.org; Fri, 25 Sep 2015 07:56:28 -0400 In-Reply-To: <1443133241-501-2-git-send-email-rhansen@bbn.com> (Richard Hansen's message of "Thu, 24 Sep 2015 18:20:41 -0400") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Richard Hansen Cc: emacs-orgmode@gnu.org Hello, Richard Hansen writes: > * lisp/ox.el (defun org-export-expand-include-keyword): cd instead of > passing DIR to expand-file-name so that if the INCLUDE file has a > SETUPFILE line with a relative pathname the full pathname to the > SETUPFILE will be expanded properly. SETUPFILE within INCLUDE doesn't do what you think. Org first includes contents from all INCLUDE keyword, then reads read SETUPFILE keywords. > > Assume the following files: > > /home/foo/a.org: > #+INCLUDE: subdir/b.org > > /home/foo/subdir/b.org: > #+SETUPFILE: c.org > > /home/foo/subdir/c.org: > stuff In your example, a.org becomes #+SETUPFILE: c.org So, it is meant to look after /home/foo/c.org. Regards, -- Nicolas Goaziou