diff options
author | Bastien Guerry <bzg@altern.org> | 2008-03-31 13:11:17 +0200 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2008-03-31 13:11:17 +0200 |
commit | 363630a4713cfb2d743b0bfe5ee896580ad6c379 (patch) | |
tree | 6f130fed52538e8b8258df1d73de28134cbfa680 | |
parent | 5bd9f24339794f3b33f562919c082d5b3bf3c346 (diff) | |
download | org-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-- | ChangeLog | 7 | ||||
-rw-r--r-- | lisp/org-publish.el | 13 |
2 files changed, 15 insertions, 5 deletions
@@ -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) |