From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Bug: Determining file name of included files for ox-publish caching Date: Thu, 18 Jan 2018 23:44:49 +0100 Message-ID: <87efmmrdlq.fsf@nicolasgoaziou.fr> References: <16EF618A-3AA6-42E0-AECF-B8D3E5144C76@ucsc.edu> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50954) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecIvV-0004K6-D6 for emacs-orgmode@gnu.org; Thu, 18 Jan 2018 17:44:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ecIvU-0003sT-Dc for emacs-orgmode@gnu.org; Thu, 18 Jan 2018 17:44:53 -0500 Received: from relay2-d.mail.gandi.net ([2001:4b98:c:538::194]:33330) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ecIvU-0003rK-6z for emacs-orgmode@gnu.org; Thu, 18 Jan 2018 17:44:52 -0500 In-Reply-To: <16EF618A-3AA6-42E0-AECF-B8D3E5144C76@ucsc.edu> (Joseph Carter Osborn's message of "Thu, 18 Jan 2018 10:19:42 -0800") 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" To: Joseph Carter Osborn Cc: emacs-orgmode@gnu.org Hello, Joseph Carter Osborn writes: > I have an org-mode document that imports sections from other org-mode > documents, like so: > > #+BEGIN_QUOTE > > * Part 1 > #+INCLUDE: "./other.org::*Heading" > # and so on > > #+END_QUOTE > > > I set up publishing for this document and encounter errors like this in > my *messages* buffer: > > #+BEGIN_QUOTE > org-publish-cache-ctime-of-src: No such file: "/Users/jcosborn/path/to/project/./other.org" > #+END_QUOTE > > > If I leave off the "::*..." component of the include I have no such > errors. I believe the culprit is the capture in the regular expression > on ox-publish.el:1173, but I'm not sure why the bug exhibits in this > particular way with the stray quote being thrown into the string. > It seems like the regular expression should treat included org files > specially and split the string to avoid treating searches as part of the > file. > > A minimal example has two org files "including.org" and "included.org", > where "included.org" has a heading "* Hello" and "including.org" just > has '#+INCLUDE: "./included.org::*Hello"'. > > Then set up a trivial project like: > > #+BEGIN_SRC elisp > (setq org-publish-project-alist > '(("test" > :base-directory "~/test/" > :publishing-directory "~/test/" > :publishing-function org-latex-publish-to-latex))) > #+END_SRC > > > and try to publish it, or run: > > #+BEGIN_SRC elisp > (org-publish-cache-file-needs-publishing "including.org") > #+END_SRC > > And you, too, should encounter the same error. Fixed. Thank you. Regards, -- Nicolas Goaziou