[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] Re: Need help publishing subdirectories
From: |
Nick Dokos |
Subject: |
Re: [Orgmode] Re: Need help publishing subdirectories |
Date: |
Tue, 12 Oct 2010 14:10:14 -0400 |
Jeff Horn <address@hidden> 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 <RET> 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
- [Orgmode] Need help publishing subdirectories, Jeff Horn, 2010/10/11
- [Orgmode] Re: Need help publishing subdirectories, Jeff Horn, 2010/10/12
- [Orgmode] Re: Need help publishing subdirectories, Jeff Horn, 2010/10/12
- Re: [Orgmode] Re: Need help publishing subdirectories, Nick Dokos, 2010/10/12
- Re: [Orgmode] Re: Need help publishing subdirectories, Jeff Horn, 2010/10/12
- Re: [Orgmode] Re: Need help publishing subdirectories, Nick Dokos, 2010/10/12
- Re: [Orgmode] Re: Need help publishing subdirectories, Jeff Horn, 2010/10/12
- Re: [Orgmode] Re: Need help publishing subdirectories,
Nick Dokos <=
- Re: [Orgmode] Re: Need help publishing subdirectories, Jeff Horn, 2010/10/13
- Re: [Orgmode] Re: Need help publishing subdirectories, Jeff Horn, 2010/10/13
- Re: [Orgmode] Re: Need help publishing subdirectories, Jeff Horn, 2010/10/13
- Re: [Orgmode] Re: Need help publishing subdirectories, Nick Dokos, 2010/10/14
- Re: [Orgmode] Re: Need help publishing subdirectories, Jeff Horn, 2010/10/14
- Re: [Orgmode] Re: Need help publishing subdirectories, Carsten Dominik, 2010/10/14
- Re: [Orgmode] Re: Need help publishing subdirectories, Nick Dokos, 2010/10/12