On Sat, Jul 05, 2008 at 12:04:48AM +0200, Sebastian Rose wrote: > Hi Dan, > > org-publish-to-html is the default as I look in the code ... > > Sorry. > > When I put the value of your org-publish-projects-alist into my > own one and evaluate it, it works here. So maybe Manish was on > the right track, hopefully.
Yes, he was. I think I may have identified the bug. The symptom is that when the directory ~/.org-timestamps does not exist, org-publish does nothing. I think what it should do is create ~/.org-timestamps, and go ahead with the requested publishing. org-publish.el contains the function org-publish-needed-p which is supposed to return 't' if the file should be published. Here's my suggested change which seems to result in the behaviour I was expecting. But I haven't looked at the code extensively, maybe there's some more appropriate place to make the missing timestamp directory. Also, I barely know what I'm doing in elisp. The original defun is below. ~> diff -uNr /usr/local/src/org-mode/lisp/org-publish.el ~/org-publish-dan.el --- /usr/local/src/org-mode/lisp/org-publish.el 2008-07-04 23:25:36.000000000 +0100 +++ /home/dan/org-publish-dan.el 2008-07-04 23:27:17.000000000 +0100 @@ -312,7 +312,9 @@ org-publish-timestamp-directory) ;; there is a timestamp, check if FILENAME is newer (file-newer-than-file-p - filename (org-publish-timestamp-filename filename)))) + filename (org-publish-timestamp-filename filename))) + (make-directory org-publish-timestamp-directory) + t) ;; don't use timestamps, always return t t)) Thanks Manish and Sebastian. Dan current version: (defun org-publish-needed-p (filename) "Return `t' if FILENAME should be published." (if org-publish-use-timestamps-flag (if (file-exists-p org-publish-timestamp-directory) ;; first handle possible wrong timestamp directory (if (not (file-directory-p org-publish-timestamp-directory)) (error "Org publish timestamp: %s is not a directory" org-publish-timestamp-directory) ;; there is a timestamp, check if FILENAME is newer (file-newer-than-file-p filename (org-publish-timestamp-filename filename)))) ;; don't use timestamps, always return t t)) > > > Regards, Sebastian > > > Dan Davison schrieb: >> I'm trying to get going with org-publish, but am falling at the first >> hurdle. I can't get it to do anything... >> >> C-h v shows that org-publish-projects-alist has the value >> >> (("website" :base-directory "~/website/" :publishing-directory >> "~/pub_html/website/" :section-numbers nil :table-of-contents nil)) >> >> The directory ~/website exists and contains a trivial org syntax file called >> root.org ('* hello' followed by a newline) >> >> The directory ~/pub_html/website exists. >> >> I was expecting org-publish website, and C-c C-e X website (incidentally the >> X is erroneously down as a C in the documentation node 13.3) to result in a >> file called root.html being written to ~/pub_html/website, but that >> directory remains empty, despite repeated invocations of the same commands... >> >> I know I'm being stupid... how, please? >> >> Cheers, >> >> Dan >> >> Org-mode version 6.06pre01 >> >> I've tried with and without the trailing slashes on the >> base/publishing-directory values, the documentation shows trailing slashes >> I've tried manually expanding ~, to no avail. (But I believe ~ should be >> fine as it is) >> >> >> _______________________________________________ >> Emacs-orgmode mailing list >> Remember: use `Reply All' to send replies to the list. >> Emacs-orgmode@gnu.org >> http://lists.gnu.org/mailman/listinfo/emacs-orgmode >> > _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode