From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Re: Need help publishing subdirectories Date: Tue, 12 Oct 2010 14:10:14 -0400 Message-ID: <30536.1286907014@gamaville.dokosmarshall.org> References: <22513.1286897899@gamaville.dokosmarshall.org> <28250.1286904282@gamaville.dokosmarshall.org> Reply-To: nicholas.dokos@hp.com Return-path: Received: from [140.186.70.92] (port=53223 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P5jJD-0004vO-Ow for emacs-orgmode@gnu.org; Tue, 12 Oct 2010 14:11:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P5jIz-0001p1-2S for emacs-orgmode@gnu.org; Tue, 12 Oct 2010 14:10:43 -0400 Received: from vms173001pub.verizon.net ([206.46.173.1]:41115) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P5jIy-0001oj-Us for emacs-orgmode@gnu.org; Tue, 12 Oct 2010 14:10:29 -0400 Received: from gamaville.dokosmarshall.org ([unknown] [173.76.32.106]) by vms173001.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0LA600GK0VT25YA0@vms173001.mailsrvcs.net> for emacs-orgmode@gnu.org; Tue, 12 Oct 2010 13:10:15 -0500 (CDT) In-reply-to: Message from Jeff Horn of "Tue, 12 Oct 2010 13:42:12 EDT." 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: Jeff Horn Cc: nicholas.dokos@hp.com, Org-mode ml Jeff Horn wrote: > > So, you are changing the project settings but you don't see the changes > > in the html files? Have you investigated caching effects? Not only at > > the web browser but also at the org-mode publishing level? org-publish > > keeps timestamps on org files and does not update the html files if they > > have not been changed. > > Thanks for your help, Nick. I have been deleting ~/.org-timestamps/ > when republishing, and forcing a refresh of the web browser. > > If I open the HTML files in an editor, I can see the table of contents > in the file, and there is no customer stylesheet link, and there is > the default style wrapped in CDATA. > OK - let me try to summarize and see if I have understood correctly: o in your org-publish-project-alist you set :table-of-contents to nil o you clear the timestamps directory o you run org-publish and you examine the resulting html file and it contains a TOC. o the html file's modification time is correct, i.e. it was updated a few seconds ago. Correct so far? I cannot reproduce this in my setup: Org-mode version 7.01trans (release_7.01h.654.g3afc) Unless somebody can see what's wrong, if you don't mind doing some elisp debugging, I 'd suggest adding a (debug) call in org-publish-file and checking the value of the plist before the publishing function is called (look for the big, marked section below for more details): (defun org-publish-file (filename &optional project no-cache) "Publish file FILENAME from PROJECT. If NO-CACHE is not nil, do not initialize org-publish-cache and write it to disk. This is needed, since this function is used to publish single files, when entire projects are published. See `org-publish-projects'." (let* ((project (or project (or (org-publish-get-project-from-filename filename) (error "File %s not part of any known project" (abbreviate-file-name filename))))) (project-plist (cdr project)) (ftname (expand-file-name filename)) (publishing-function (or (plist-get project-plist :publishing-function) 'org-publish-org-to-html)) (base-dir (file-name-as-directory (expand-file-name (or (plist-get project-plist :base-directory) (error "Project %s does not have :base-directory defined" (car project)))))) (pub-dir (file-name-as-directory (file-truename (or (plist-get project-plist :publishing-directory) (error "Project %s does not have :publishing-directory defined" (car project)))))) tmp-pub-dir) (unless no-cache (org-publish-initialize-cache (car project))) (setq tmp-pub-dir (file-name-directory (concat pub-dir (and (string-match (regexp-quote base-dir) ftname) (substring ftname (match-end 0)))))) ;;;VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV ;;; add a debug call, reeavaluate the function, do the publish and when ;;; you are dumped into the debugger, say e project-plist and see ;;; what :table-of-contents is set to. If it's what it's supposed to be, ;;; continue execution with c and look at the html file, both contents ;;; and modification time. If it's still wrong in terms of contents but ;;; right in terms of modification time, there is something wrong with ;;; the publishing function: you might want to step through it with ;;; edebug, checking things along the way. (debug) ;;;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (if (listp publishing-function) ;; allow chain of publishing functions (mapc (lambda (f) (when (org-publish-needed-p filename pub-dir f tmp-pub-dir) (funcall f project-plist filename tmp-pub-dir) (org-publish-update-timestamp filename pub-dir f))) publishing-function) (when (org-publish-needed-p filename pub-dir publishing-function tmp-pub-dir) (funcall publishing-function project-plist filename tmp-pub-dir) (org-publish-update-timestamp filename pub-dir publishing-function))) (unless no-cache (org-publish-write-cache-file)))) HTH, Nick