From acebe9a2829dcb53958e6fb5cfe3dddd9ca63b44 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Thu, 29 Dec 2016 21:14:23 +0100 Subject: [PATCH] ox-publish: Fix :base-extension set to `any' * lisp/ox-publish.el (org-publish-get-project-from-filename): Handle case when :base-extension is `any'. (org-publish-project-alist): Improve docstring. Reported-by: Arun Isaac --- lisp/ox-publish.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lisp/ox-publish.el b/lisp/ox-publish.el index d001b3da1..c6cd75156 100644 --- a/lisp/ox-publish.el +++ b/lisp/ox-publish.el @@ -104,7 +104,8 @@ Most properties are optional, but some should always be set: Extension (without the dot!) of source files. This can be a regular expression. If not given, \"org\" will be used as - default extension. + default extension. If it is `any', include all the files, + even without extension. `:publishing-directory' @@ -540,7 +541,10 @@ matching filenames." (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 "\\)$"))) + (xm (concat "\\`" b + (if r ".+" "[^/]+") + (and (not (eq x 'any)) + (format "\\.\\(%s\\)\\'" x))))) (when (or (and i (member filename -- 2.11.4.GIT