summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2008-03-31 13:11:17 +0200
committerBastien Guerry <bzg@altern.org>2008-03-31 13:11:17 +0200
commit363630a4713cfb2d743b0bfe5ee896580ad6c379 (patch)
tree6f130fed52538e8b8258df1d73de28134cbfa680
parent5bd9f24339794f3b33f562919c082d5b3bf3c346 (diff)
downloadorg-mode-363630a4713cfb2d743b0bfe5ee896580ad6c379.tar.gz
Bug fixes for org-publish.el.
`org-publish-get-base-files-1': get the proper list of files when recursing thru a directory. `org-publish-get-base-files: use the :exclude property to skip both files and directories. This might be refined when the semantic of publishing options gets simpler, but do this for now. `org-publish-project': removed third arg of defalias to avoid compatibility issue for Emacs 22.1.
-rw-r--r--ChangeLog7
-rw-r--r--lisp/org-publish.el13
2 files changed, 15 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index a1197f6..4a91fa9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-03-31 Bastien Guerry <bzg@altern.org>
+
+ * lisp/org-publish.el (org-publish-get-base-files-1): Bug fix: get
+ the proper list of files when recursing thru a directory.
+ (org-publish-get-base-files): Use the :exclude property to skip
+ both files and directories.
+ (org-publish-project): Removed third arg of defalias.
2008-03-30 Carsten Dominik <dominik@science.uva.nl>
diff --git a/lisp/org-publish.el b/lisp/org-publish.el
index a2fd032..0e70618 100644
--- a/lisp/org-publish.el
+++ b/lisp/org-publish.el
@@ -428,11 +428,11 @@ matching the regexp SKIP-DIR when recursiing through BASE-DIR."
(fnd (file-name-nondirectory f)))
(if (and fd-p recurse
(not (string-match "^\\.+$" fnd))
- (if skip-dir (not (string-match match skip-dir fnd)) t))
- (org-publish-get-base-files-1 f recurse skip-file skip-dir)
+ (if skip-dir (not (string-match skip-dir fnd)) t))
+ (org-publish-get-base-files-1 f recurse match skip-file skip-dir)
(unless (or fd-p (and skip-file (string-match skip-file fnd)))
(pushnew f org-publish-temp-files)))))
- (directory-files base-dir t match)))
+ (directory-files base-dir t (unless recurse match))))
(defun org-publish-get-base-files (project &optional exclude-regexp)
"Return a list of all files in PROJECT.
@@ -446,7 +446,10 @@ matching filenames."
(extension (or (plist-get project-plist :base-extension) "org"))
(match (concat "^[^\\.].*\\.\\(" extension "\\)$")))
(setq org-publish-temp-files nil)
- (org-publish-get-base-files-1 base-dir recurse match exclude-regexp)
+ (org-publish-get-base-files-1 base-dir recurse match
+ ;; FIXME distinguish exclude regexp
+ ;; for skip-file and skip-dir?
+ exclude-regexp exclude-regexp)
org-publish-temp-files))
(defun org-publish-get-project-from-filename (filename)
@@ -602,7 +605,7 @@ Default for INDEX-FILENAME is 'index.org'."
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Interactive publishing functions
-(defalias 'org-publish-project 'org-publish "Publish project.")
+(defalias 'org-publish-project 'org-publish)
;;;###autoload
(defun org-publish (project &optional force)