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.
This commit is contained in:
Bastien Guerry 2008-03-31 13:11:17 +02:00
parent 5bd9f24339
commit 363630a471
2 changed files with 15 additions and 5 deletions

View File

@ -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>

View File

@ -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)