From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: can't make org-publish do anything Date: Fri, 4 Jul 2008 22:55:26 -0700 Message-ID: <0E56C563-182B-4A68-B408-D292E50B706B@gmail.com> References: <20080704193413.GA27726@stats.ox.ac.uk> <486E9E80.9020004@gmx.de> <20080704225052.GA1245@stats.ox.ac.uk> Mime-Version: 1.0 (Apple Message framework v924) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KF0k8-0006vO-3L for emacs-orgmode@gnu.org; Sat, 05 Jul 2008 01:55:32 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KF0k6-0006tO-LU for emacs-orgmode@gnu.org; Sat, 05 Jul 2008 01:55:31 -0400 Received: from [199.232.76.173] (port=46249 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KF0k6-0006t8-FI for emacs-orgmode@gnu.org; Sat, 05 Jul 2008 01:55:30 -0400 Received: from wf-out-1314.google.com ([209.85.200.172]:11246) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KF0k5-0002jK-UX for emacs-orgmode@gnu.org; Sat, 05 Jul 2008 01:55:30 -0400 Received: by wf-out-1314.google.com with SMTP id 28so1409370wfc.24 for ; Fri, 04 Jul 2008 22:55:28 -0700 (PDT) In-Reply-To: <20080704225052.GA1245@stats.ox.ac.uk> 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: Dan Davison Cc: emacs org-mode mailing list I just pushed this change, thanks! - Carsten On Jul 4, 2008, at 3:50 PM, Dan Davison wrote: > 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