summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2016-12-29 21:14:23 +0100
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2016-12-29 21:16:13 +0100
commitacebe9a2829dcb53958e6fb5cfe3dddd9ca63b44 (patch)
treec585e9438b285debb5e6ffaac1044372db2d5883
parent3e68d01bdd3deeb9c81b7e9e03cb15989f4917fc (diff)
downloadorg-mode-acebe9a2829dcb53958e6fb5cfe3dddd9ca63b44.tar.gz
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 <arunisaac@systemreboot.net> <http://permalink.gmane.org/gmane.emacs.orgmode/111085>
-rw-r--r--lisp/ox-publish.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/ox-publish.el b/lisp/ox-publish.el
index d001b3d..c6cd751 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