From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: [PATCH] Fix :include bug in org-publish Date: Mon, 16 Aug 2010 17:27:50 +0200 Message-ID: References: Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=50831 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ol1lj-0001iW-EF for emacs-orgmode@gnu.org; Mon, 16 Aug 2010 11:38:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Ol1bP-0006Fi-95 for emacs-orgmode@gnu.org; Mon, 16 Aug 2010 11:27:56 -0400 Received: from mail-ey0-f169.google.com ([209.85.215.169]:34612) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ol1bP-0006Fa-26 for emacs-orgmode@gnu.org; Mon, 16 Aug 2010 11:27:55 -0400 Received: by eyg7 with SMTP id 7so1557634eyg.0 for ; Mon, 16 Aug 2010 08:27:54 -0700 (PDT) In-Reply-To: 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: Julien Barnier Cc: emacs-orgmode@gnu.org Hi Julien, I have applied a modified version of your patch, thanks. - Carsten On Aug 16, 2010, at 4:11 PM, Julien Barnier wrote: > 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 > > > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode - Carsten