From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Clemente Subject: [PATCH] default base-extension .org for org-publish Date: Mon, 05 Jul 2010 10:14:59 +0200 Message-ID: <87sk3y2vlo.wl%n142857@gmail.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: Received: from [140.186.70.92] (port=33823 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OVgpX-0000yf-IV for emacs-orgmode@gnu.org; Mon, 05 Jul 2010 04:15:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OVgpT-0000Q5-7Y for emacs-orgmode@gnu.org; Mon, 05 Jul 2010 04:15:07 -0400 Received: from mail-ww0-f41.google.com ([74.125.82.41]:59575) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OVgpT-0000Po-2J for emacs-orgmode@gnu.org; Mon, 05 Jul 2010 04:15:03 -0400 Received: by wwb17 with SMTP id 17so931710wwb.0 for ; Mon, 05 Jul 2010 01:15:01 -0700 (PDT) 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: org-mode Mailinglist Org-publish: correctly find files in projects which didn't define a base-extension. Previously, (org-publish-get-project-from-filename "~/org/file.org") would return nil because the constructed regular expression "^/home/dc/org/.+\\.\\(\\)$" required a dot at the end. #+BEGIN_QUOTE diff --git a/lisp/org-publish.el b/lisp/org-publish.el index b387e7b..a50cf56 100644 --- a/lisp/org-publish.el +++ b/lisp/org-publish.el @@ -466,7 +466,7 @@ matching filenames." ;; [[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)) + (x (or (plist-get (cdr prj) :base-extension) "org")) (e (plist-get (cdr prj) :exclude)) (i (plist-get (cdr prj) :include)) (xm (concat "^" b (if r ".+" "[^/]+") "\\.\\(" x "\\)$"))) #+END_QUOTE