summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Dominik <carsten.dominik@gmail.com>2009-02-13 17:54:19 +0100
committerCarsten Dominik <carsten.dominik@gmail.com>2009-02-13 17:54:19 +0100
commit9524d5ea965ff9125c140cce168f11a18eda43a9 (patch)
tree19598c9c90afffedf2ba0cba37582465747f66e6
parentb4353a3d5caf4aa6dfd627a866110d98d983d586 (diff)
downloadorg-mode-9524d5ea965ff9125c140cce168f11a18eda43a9.tar.gz
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.
-rw-r--r--doc/org.texi4
-rw-r--r--lisp/org-publish.el4
2 files changed, 5 insertions, 3 deletions
diff --git a/doc/org.texi b/doc/org.texi
index 1f322ec..39c5071 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 5a72df7..705efa8 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