EHLO. I've just discovered that I can't publish a simple webpage anymore (some options under C-c C-e sitll work but F and P don't). Short investigation shows that when I run:
(org-publish-get-project-from-filename "/home/steelman/dydaktyka/index.org") in the *scratch* buffer I get --8<---------------cut here---------------start------------->8--- Debugger entered--Lisp error: (wrong-type-argument stringp ("index.org")) string-match(("index.org") "/home/steelman/dydaktyka/index.org") (and i (string-match i filename)) (or (and i (string-match i filename)) (and (not ...) (string-match xm filename))) (if (or (and i ...) (and ... ...)) (progn (setq project-name ...) (throw ... project-name))) [...] --8<---------------cut here---------------end--------------->8--- assuming my org-publish-project-alist --8<---------------cut here---------------start------------->8--- (setq org-publish-project-alist '(("dydaktyka-org" :base-directory "~/dydaktyka" :base-extension "org" :publishing-directory "/some/dir" :exclude ".*" :table-of-contents nil :publishing-function org-publish-org-to-html :include ("index.org")) ; <---- HERE ("dydaktyka-files" :base-directory "~/dydaktyka/data" :recursive t :publishing-directory "/some/dir/data" :base-extension "odt" :publishing-function org-publish-attachment) ("dydaktyka" :components ("dydaktyka-org" "dydaktyka-files")))) --8<---------------cut here---------------end--------------->8--- However, with parenthesis around "index.org" removed the function seems to work fine and returns --8<---------------cut here---------------start------------->8--- ("dydaktyka-org" :base-directory "~/dydaktyka" :base-extension "org" :publishing-directory "/some/dir" :exclude ".*" :table-of-contents nil :publishing-function org-publish-org-to-html :include "index.org") --8<---------------cut here---------------end--------------->8--- All this leads to a patch like this: --8<---------------cut here---------------start------------->8--- Fix org-publish to accept list of files to :include again Fix a regression introduced by Sebastian Rose's 339d6fe4 that makes org-publish-get-project-from-filename function break if a project's :include parameter contains a list of strings. diff --git a/lisp/org-publish.el b/lisp/org-publish.el index 6324eba..8a02df1 100644 --- a/lisp/org-publish.el +++ b/lisp/org-publish.el @@ -466,12 +466,15 @@ matching filenames." ;; [[info:org:Selecting%20files]] shows how this is supposed to work: (let* ((r (plist-get (cdr prj) :recursive)) (b (expand-file-name (plist-get (cdr prj) :base-directory))) + (b (concat b (when (string-match "[^/]$" b) "/"))) ; How about Win? (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 "\\)$"))) (when (or - (and i (string-match i filename)) + (and i (stringp i) (string-match i filename)) + (and i (listp i) (member filename + (mapcar (lambda (x) (concat b x)) i))) (and (not (and e (string-match e filename))) (string-match xm filename))) --8<---------------cut here---------------end--------------->8--- -- Miłego dnia, Łukasz Stelmach _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode