From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Davison Subject: Re: can't make org-publish do anything Date: Fri, 4 Jul 2008 23:50:52 +0100 Message-ID: <20080704225052.GA1245@stats.ox.ac.uk> References: <20080704193413.GA27726@stats.ox.ac.uk> <486E9E80.9020004@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KEu7D-00038g-ML for emacs-orgmode@gnu.org; Fri, 04 Jul 2008 18:50:55 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KEu7C-00038C-Ti for emacs-orgmode@gnu.org; Fri, 04 Jul 2008 18:50:55 -0400 Received: from [199.232.76.173] (port=50104 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KEu7C-000380-NR for emacs-orgmode@gnu.org; Fri, 04 Jul 2008 18:50:54 -0400 Received: from markov.stats.ox.ac.uk ([163.1.210.1]:36117) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KEu7C-0006cB-Qo for emacs-orgmode@gnu.org; Fri, 04 Jul 2008 18:50:55 -0400 Received: from blackcap.stats.ox.ac.uk (blackcap.stats [163.1.210.5]) by markov.stats.ox.ac.uk (8.13.6/8.13.6) with ESMTP id m64MoqlI026313 for ; Fri, 4 Jul 2008 23:50:53 +0100 (BST) Content-Disposition: inline In-Reply-To: <486E9E80.9020004@gmx.de> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs org-mode mailing list 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 >> >