From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Barnier Subject: [PATCH] Fix :include bug in org-publish Date: Mon, 16 Aug 2010 14:11:01 +0000 (UTC) Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=34572 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ol0PC-0003Sm-JB for emacs-orgmode@gnu.org; Mon, 16 Aug 2010 10:11:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Ol0PB-0002ZN-5n for emacs-orgmode@gnu.org; Mon, 16 Aug 2010 10:11:14 -0400 Received: from lo.gmane.org ([80.91.229.12]:46057) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ol0PA-0002ZA-Ul for emacs-orgmode@gnu.org; Mon, 16 Aug 2010 10:11:13 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Ol0P7-0000rV-Ku for emacs-orgmode@gnu.org; Mon, 16 Aug 2010 16:11:09 +0200 Received: from zone129host186.ens-lsh.fr ([zone129host186.ens-lsh.fr]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 16 Aug 2010 16:11:09 +0200 Received: from julien by zone129host186.ens-lsh.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 16 Aug 2010 16:11:09 +0200 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: emacs-orgmode@gnu.org Hi all, Today I just noticed a small bug in org-publish. As the manual says, the :include parameter in a project specification should be a list of files, but it is treated as a regexp in (org-publish-get-project-from-filename), thus making it impossible to use org-publish-current-file or org-publish-current-project if an :include directive is present. The small attached patch should fix this. Sincerely, Julien * lisp/org-publish.el (org-publish-get-project-from-filename): Consider :include as a list, not a regexp. --- lisp/org-publish.el | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/lisp/org-publish.el b/lisp/org-publish.el index 6324eba..0656f8b 100644 --- a/lisp/org-publish.el +++ b/lisp/org-publish.el @@ -471,7 +471,13 @@ matching filenames." (i (plist-get (cdr prj) :include)) (xm (concat "^" b (if r ".+" "[^/]+") "\\.\\(" x "\\)$"))) (when (or - (and i (string-match i filename)) + (and + i + (member filename + (mapcar + (lambda (arg) + (concat (file-name-as-directory b) arg)) + i))) (and (not (and e (string-match e filename))) (string-match xm filename))) -- 1.7.1