From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Re: One org file, multiple exports, is it possible? Date: Wed, 26 May 2010 21:40:40 -0400 Message-ID: <10751.1274924440@gamaville.dokosmarshall.org> References: <855B9DE3-A7FD-42B4-A863-DE036065EBD1@gmail.com> <6B0AFD3C-BF59-4DB6-823F-471107A380F4@tsdye.com> <81206149-B01D-4837-A7A5-0ABF94920FE1@gmail.com> <56FE52EC-18B8-46FE-B0B8-266DE70E0A38@tsdye.com> <646DB2B5-DFE0-422F-BD11-AA2117E76644@tsdye.com> <87632cljw4.fsf@gollum.intra.norang.ca> <36A649F1-C9F6-43C4-9B81-CD6A51F9B515@tsdye.com> <19272.1274909875@alphaville.usa.hp.com> <2FF8A80C-C4F3-4FDE-B0D2-50D03EE4110B@tsdye.com> Reply-To: nicholas.dokos@hp.com Return-path: Received: from [140.186.70.92] (port=38857 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OHS5e-0007yn-Mc for emacs-orgmode@gnu.org; Wed, 26 May 2010 21:40:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OHS5c-0006w0-Hu for emacs-orgmode@gnu.org; Wed, 26 May 2010 21:40:54 -0400 Received: from vms173009pub.verizon.net ([206.46.173.9]:21683) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OHS5c-0006vi-CR for emacs-orgmode@gnu.org; Wed, 26 May 2010 21:40:52 -0400 Received: from gamaville.dokosmarshall.org ([unknown] [173.76.32.106]) by vms173009.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0L320030T1ZSGPX2@vms173009.mailsrvcs.net> for emacs-orgmode@gnu.org; Wed, 26 May 2010 20:40:41 -0500 (CDT) In-reply-to: Message from "Thomas S. Dye" of "Wed, 26 May 2010 12:28:12 -1000." <2FF8A80C-C4F3-4FDE-B0D2-50D03EE4110B@tsdye.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "Thomas S. Dye" Cc: Bernt Hansen , nicholas.dokos@hp.com, kmartino@pobox.com, emacs-orgmode@gnu.org, Carsten Dominik Thomas S. Dye wrote: > On May 26, 2010, at 11:37 AM, Nick Dokos wrote: > ... > perhaps? But I'm shooting from the hip here, so take it with the appropriate > grain of salt. > > > Hi Nick, > > The documentation for org-publish-projects-alist suggests that :include wants a list: > > The :include property may be used to include extra files. Its > value may be a list of filenames to include. The filenames are > considered relative to the base directory. > > When I tried :include "index.org" I got this: > > Debugger entered--Lisp error: (wrong-type-argument sequencep 105) > concat("~/org/temp/" 105) > (expand-file-name (concat base-dir f)) > ... > Yep, shot from the hip and hit my foot. You are right. > I'm not going to pretend I know what I'm talking about here, but AFAICT the variable i in the following code needs some attention before it goes to > string-match. According to the documentation, plist-get just returns the value assigned to a property (or nil) without doing anything to it, so i > should be a list when it is passed to string-match. string-match wants REGEXP here, apparently not as a list. I couldn't persuade emacs to cough up > the definition of REGEXP, but my brief forays into the emacs and org-mode source code lead me to believe it is probably a string. > > (defun org-publish-get-project-from-filename (filename &optional up) > "Return the project FILENAME belongs." > (let* ((filename (expand-file-name filename)) > project-name) > > (catch 'p-found > (dolist (prj org-publish-project-alist) > (unless (plist-get (cdr prj) :components) > ;; [[info:org:Selecting%20files]] shows how this is supposed to work: > (let* ((r (plist-get (cdr prj) :recursive)) > (b (expand-file-name (plist-get (cdr prj) :base-directory))) > (x (plist-get (cdr prj) :base-extension)) > (e (plist-get (cdr prj) :exclude)) > (i (plist-get (cdr prj) :include)) > (xm (concat "^" b (if r ".+" "[^/]+") "\\.\\(" x "\\)$"))) > (when (or > (and i (string-match i filename)) > I think you are right that there is a problem here. Here is an excerpt from the relevant commit: ,---- | commit 339d6fe4bbf7b9858c6323d01f32d0c73a4cd3a8 | Author: Sebastian Rose | Date: Thu May 13 13:43:53 2010 +0200 | | Publishing, cashing and timestamps | | Carsten Dominik writes: | > Hi Sebastian, | > | > sorry for being slow. Could you do me a favor and send me the cache patch one | > more time - if possible updated to the current master. | > | > I am just not sure I have the right patch in my hands. | | Hi Carsten, | | no problem. The patch is attached. | | Here is a list of my ChangeLog entries, redated to today: | | 2010-05-13 Sebastian Rose | | ... | | * org-publish.el (org-publish-get-project-from-filename) does | not depend on a list of files anymore. Instead of laoding all | files of all, we walk `org-publish-project-alist' until we | find a project, where the properties :base-directory, :recursive, | :base-extension, :include and :exclude match. | | ... `---- Maybe Sebastian (I added him to the CC:) can take a look? Thanks, Nick