From 9524d5ea965ff9125c140cce168f11a18eda43a9 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Fri, 13 Feb 2009 17:54:19 +0100 Subject: [PATCH] Publish: Allow to select all files, even without extension Selecting files for publishing was strictly based on extension. Richard Klinda provided this patch to allow the symbol `any' as an indicator to actually take all files in a directory. --- doc/org.texi | 4 ++-- lisp/org-publish.el | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/org.texi b/doc/org.texi index 1f322ecb0..39c50718b 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -8746,8 +8746,8 @@ properties @multitable @columnfractions 0.25 0.75 @item @code{:base-extension} @tab Extension (without the dot!) of source files. This actually is a -regular expression. Set this to th symbol @code{any} if you want to select -any files, even without extension. +regular expression. Set this to the symbol @code{any} if you want to get all +files in @code{:base-directory}, even without extension. @item @code{:exclude} @tab Regular expression to match file names that should not be diff --git a/lisp/org-publish.el b/lisp/org-publish.el index 5a72df787..705efa83f 100644 --- a/lisp/org-publish.el +++ b/lisp/org-publish.el @@ -454,7 +454,9 @@ matching filenames." (include-list (plist-get project-plist :include)) (recurse (plist-get project-plist :recursive)) (extension (or (plist-get project-plist :base-extension) "org")) - (match (concat "^[^\\.].*\\.\\(" extension "\\)$"))) + (match (if (eq extension 'any) + "^[^\\.]" + (concat "^[^\\.].*\\.\\(" extension "\\)$")))) (setq org-publish-temp-files nil) (org-publish-get-base-files-1 base-dir recurse match ;; FIXME distinguish exclude regexp -- 2.11.4.GIT