Forráskód Böngészése

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.
Carsten Dominik 16 éve
szülő
commit
9524d5ea96
2 módosított fájl, 5 hozzáadás és 3 törlés
  1. 2 2
      doc/org.texi
  2. 3 1
      lisp/org-publish.el

+ 2 - 2
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

+ 3 - 1
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