* Need help publishing subdirectories @ 2010-10-12 3:59 Jeff Horn 2010-10-12 5:29 ` Jeff Horn 0 siblings, 1 reply; 15+ messages in thread From: Jeff Horn @ 2010-10-12 3:59 UTC (permalink / raw) To: Org-mode ml I'm trying to set up an org project to publish my personal website. I like to use friendly urls, like the one below. http://www.example.tld/jeff/teaching/2010/fall/econ101/index.html My publishing set up is a bit of a mess, with a project handling the root, the "jeff" subdirectory, and one handling the "teaching" sub-sub-directory. I have ":recursive t" set on the teaching directory, since I don't want to define a new project for every course I teach. So far, publishing works as intended, except that the ".../econ101/img/" subdirectory contents aren't copied to the publishing directory. Switching on ":base-extension "any"" doesn't fix this (in fact, it prevents the project from being published at all). The relevant portion of my project: ("teaching" :base-directory "~/org/ftr/jeff/teaching/" :publishing-directory "~/Sites/FTR/jeff/teaching" :publishing-function (org-publish-org-to-html org-publish-org-to-org org-publish-org-to-pdf org-publish-attachment) :recursive t :style-include-default nil ;; :base-extension "any" ) In the ".../econ101/syllabus.org" file, an inline image calls [[./img/example.jpg]]. The "img" directory exists in my source directory. The directory is copied to my publishing directory, but not the files within the directory. I noticed also that emacs tried to open an "example.jpg" buffer, which I thought was weird. Thanks for taking the time to read and respond. Best regards, Jeff -- Jeffrey Horn Graduate Lecturer and PhD Student in Economics George Mason University (704) 271-4797 jhorn@gmu.edu jrhorn424@gmail.com ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Need help publishing subdirectories 2010-10-12 3:59 Need help publishing subdirectories Jeff Horn @ 2010-10-12 5:29 ` Jeff Horn 2010-10-12 15:29 ` Jeff Horn 0 siblings, 1 reply; 15+ messages in thread From: Jeff Horn @ 2010-10-12 5:29 UTC (permalink / raw) To: Org-mode ml I've managed to push the extra source files out with the org-static configuration found at worg.[1] But now, for some reason, I've lost all my options (no TOC, no section numbers, custom stylesheet, etc). Anyone care to look at my config off-list and offer advice? I'm beginning to think it's something silly like an unescaped quotation mark, but I've looked at every simple solution I can think of. Jeff [1] http://orgmode.org/worg/org-tutorials/org-publish-html-tutorial.php On Mon, Oct 11, 2010 at 11:59 PM, Jeff Horn <jrhorn424@gmail.com> wrote: > I'm trying to set up an org project to publish my personal website. I > like to use friendly urls, like the one below. > > http://www.example.tld/jeff/teaching/2010/fall/econ101/index.html > > My publishing set up is a bit of a mess, with a project handling the > root, the "jeff" subdirectory, and one handling the "teaching" > sub-sub-directory. I have ":recursive t" set on the teaching > directory, since I don't want to define a new project for every course > I teach. So far, publishing works as intended, except that the > ".../econ101/img/" subdirectory contents aren't copied to the > publishing directory. Switching on ":base-extension "any"" doesn't fix > this (in fact, it prevents the project from being published at all). > The relevant portion of my project: > > ("teaching" > :base-directory "~/org/ftr/jeff/teaching/" > :publishing-directory "~/Sites/FTR/jeff/teaching" > :publishing-function (org-publish-org-to-html > org-publish-org-to-org org-publish-org-to-pdf org-publish-attachment) > :recursive t > :style-include-default nil > ;; :base-extension "any" > ) > > In the ".../econ101/syllabus.org" file, an inline image calls > [[./img/example.jpg]]. The "img" directory exists in my source > directory. The directory is copied to my publishing directory, but not > the files within the directory. I noticed also that emacs tried to > open an "example.jpg" buffer, which I thought was weird. > > Thanks for taking the time to read and respond. > > Best regards, > Jeff > > > > -- > Jeffrey Horn > Graduate Lecturer and PhD Student in Economics > George Mason University > > (704) 271-4797 > jhorn@gmu.edu > jrhorn424@gmail.com > -- Jeffrey Horn Graduate Lecturer and PhD Student in Economics George Mason University (704) 271-4797 jhorn@gmu.edu jrhorn424@gmail.com ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Need help publishing subdirectories 2010-10-12 5:29 ` Jeff Horn @ 2010-10-12 15:29 ` Jeff Horn 2010-10-12 15:38 ` Nick Dokos 0 siblings, 1 reply; 15+ messages in thread From: Jeff Horn @ 2010-10-12 15:29 UTC (permalink / raw) To: Org-mode ml The relevant portion of my configuration is below. (setq org-publish-project-alist nil) (setq org-publish-project-alist '(("ftr-static" :base-directory "~/org/ftr" :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf" :publishing-directory "~/Sites/FTR/" :recursive t :publishing-function (org-publish-attachment) :table-of-contents nil :todo-keywords nil :section-numbers nil :recursive t ) ("ftr-jeff" :base-directory "~/org/ftr/jeff" :base-extension "org" :publishing-directory "~/Sites/FTR/jeff" :recursive t :publishing-function (org-publish-org-to-html org-publish-org-to-org) :htmlized-source :table-of-contents nil :todo-keywords nil :section-numbers nil :recursive t ) ("ftr" :components ( "ftr-static" "ftr-jeff" ) ))) The table of contents and section number options are being ignored (possibly others). Any ideas? Jeff On Tue, Oct 12, 2010 at 1:29 AM, Jeff Horn <jrhorn424@gmail.com> wrote: > I've managed to push the extra source files out with the org-static > configuration found at worg.[1] > > But now, for some reason, I've lost all my options (no TOC, no section > numbers, custom stylesheet, etc). Anyone care to look at my config > off-list and offer advice? > > I'm beginning to think it's something silly like an unescaped > quotation mark, but I've looked at every simple solution I can think > of. > > Jeff > > > [1] http://orgmode.org/worg/org-tutorials/org-publish-html-tutorial.php > > On Mon, Oct 11, 2010 at 11:59 PM, Jeff Horn <jrhorn424@gmail.com> wrote: >> I'm trying to set up an org project to publish my personal website. I >> like to use friendly urls, like the one below. >> >> http://www.example.tld/jeff/teaching/2010/fall/econ101/index.html >> >> My publishing set up is a bit of a mess, with a project handling the >> root, the "jeff" subdirectory, and one handling the "teaching" >> sub-sub-directory. I have ":recursive t" set on the teaching >> directory, since I don't want to define a new project for every course >> I teach. So far, publishing works as intended, except that the >> ".../econ101/img/" subdirectory contents aren't copied to the >> publishing directory. Switching on ":base-extension "any"" doesn't fix >> this (in fact, it prevents the project from being published at all). >> The relevant portion of my project: >> >> ("teaching" >> :base-directory "~/org/ftr/jeff/teaching/" >> :publishing-directory "~/Sites/FTR/jeff/teaching" >> :publishing-function (org-publish-org-to-html >> org-publish-org-to-org org-publish-org-to-pdf org-publish-attachment) >> :recursive t >> :style-include-default nil >> ;; :base-extension "any" >> ) >> >> In the ".../econ101/syllabus.org" file, an inline image calls >> [[./img/example.jpg]]. The "img" directory exists in my source >> directory. The directory is copied to my publishing directory, but not >> the files within the directory. I noticed also that emacs tried to >> open an "example.jpg" buffer, which I thought was weird. >> >> Thanks for taking the time to read and respond. >> >> Best regards, >> Jeff >> >> >> >> -- >> Jeffrey Horn >> Graduate Lecturer and PhD Student in Economics >> George Mason University >> >> (704) 271-4797 >> jhorn@gmu.edu >> jrhorn424@gmail.com >> > > > > -- > Jeffrey Horn > Graduate Lecturer and PhD Student in Economics > George Mason University > > (704) 271-4797 > jhorn@gmu.edu > jrhorn424@gmail.com > -- Jeffrey Horn Graduate Lecturer and PhD Student in Economics George Mason University (704) 271-4797 jhorn@gmu.edu jrhorn424@gmail.com ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Re: Need help publishing subdirectories 2010-10-12 15:29 ` Jeff Horn @ 2010-10-12 15:38 ` Nick Dokos 2010-10-12 16:41 ` Jeff Horn 0 siblings, 1 reply; 15+ messages in thread From: Nick Dokos @ 2010-10-12 15:38 UTC (permalink / raw) To: Jeff Horn; +Cc: nicholas.dokos, Org-mode ml Jeff Horn <jrhorn424@gmail.com> wrote: > The relevant portion of my configuration is below. > > (setq org-publish-project-alist nil) > (setq org-publish-project-alist > '(("ftr-static" > :base-directory "~/org/ftr" > :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf" > :publishing-directory "~/Sites/FTR/" > :recursive t > :publishing-function (org-publish-attachment) > :table-of-contents nil > :todo-keywords nil > :section-numbers nil > :recursive t > ) > ("ftr-jeff" > :base-directory "~/org/ftr/jeff" > :base-extension "org" > :publishing-directory "~/Sites/FTR/jeff" > :recursive t > :publishing-function (org-publish-org-to-html org-publish-org-to-org) > :htmlized-source > :table-of-contents nil > :todo-keywords nil > :section-numbers nil > :recursive t > ) > ("ftr" > :components ( "ftr-static" > "ftr-jeff" > ) > ))) > > The table of contents and section number options are being ignored > (possibly others). Any ideas? Isn't that what *should* happen if the :table-of-contents and :section-numbers options are set to nil? Nick > > Jeff > > On Tue, Oct 12, 2010 at 1:29 AM, Jeff Horn <jrhorn424@gmail.com> wrote: > > I've managed to push the extra source files out with the org-static > > configuration found at worg.[1] > > > > But now, for some reason, I've lost all my options (no TOC, no section > > numbers, custom stylesheet, etc). Anyone care to look at my config > > off-list and offer advice? > > > > I'm beginning to think it's something silly like an unescaped > > quotation mark, but I've looked at every simple solution I can think > > of. > > > > Jeff > > > > > > [1] http://orgmode.org/worg/org-tutorials/org-publish-html-tutorial.php > > > > On Mon, Oct 11, 2010 at 11:59 PM, Jeff Horn <jrhorn424@gmail.com> wrote: > >> I'm trying to set up an org project to publish my personal website. I > >> like to use friendly urls, like the one below. > >> > >> http://www.example.tld/jeff/teaching/2010/fall/econ101/index.html > >> > >> My publishing set up is a bit of a mess, with a project handling the > >> root, the "jeff" subdirectory, and one handling the "teaching" > >> sub-sub-directory. I have ":recursive t" set on the teaching > >> directory, since I don't want to define a new project for every course > >> I teach. So far, publishing works as intended, except that the > >> ".../econ101/img/" subdirectory contents aren't copied to the > >> publishing directory. Switching on ":base-extension "any"" doesn't fix > >> this (in fact, it prevents the project from being published at all). > >> The relevant portion of my project: > >> > >> ("teaching" > >> :base-directory "~/org/ftr/jeff/teaching/" > >> :publishing-directory "~/Sites/FTR/jeff/teaching" > >> :publishing-function (org-publish-org-to-html > >> org-publish-org-to-org org-publish-org-to-pdf org-publish-attachment) > >> :recursive t > >> :style-include-default nil > >> ;; :base-extension "any" > >> ) > >> > >> In the ".../econ101/syllabus.org" file, an inline image calls > >> [[./img/example.jpg]]. The "img" directory exists in my source > >> directory. The directory is copied to my publishing directory, but not > >> the files within the directory. I noticed also that emacs tried to > >> open an "example.jpg" buffer, which I thought was weird. > >> > >> Thanks for taking the time to read and respond. > >> > >> Best regards, > >> Jeff > >> > >> > >> > >> -- > >> Jeffrey Horn > >> Graduate Lecturer and PhD Student in Economics > >> George Mason University > >> > >> (704) 271-4797 > >> jhorn@gmu.edu > >> jrhorn424@gmail.com > >> > > > > > > > > -- > > Jeffrey Horn > > Graduate Lecturer and PhD Student in Economics > > George Mason University > > > > (704) 271-4797 > > jhorn@gmu.edu > > jrhorn424@gmail.com > > > > > > -- > Jeffrey Horn > Graduate Lecturer and PhD Student in Economics > George Mason University > > (704) 271-4797 > jhorn@gmu.edu > jrhorn424@gmail.com > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode > ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Re: Need help publishing subdirectories 2010-10-12 15:38 ` Nick Dokos @ 2010-10-12 16:41 ` Jeff Horn 2010-10-12 17:24 ` Nick Dokos 0 siblings, 1 reply; 15+ messages in thread From: Jeff Horn @ 2010-10-12 16:41 UTC (permalink / raw) To: nicholas.dokos; +Cc: Org-mode ml >> The relevant portion of my configuration is below. >> >> (setq org-publish-project-alist nil) >> (setq org-publish-project-alist >> '(("ftr-static" >> :base-directory "~/org/ftr" >> :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf" >> :publishing-directory "~/Sites/FTR/" >> :recursive t >> :publishing-function (org-publish-attachment) >> :table-of-contents nil >> :todo-keywords nil >> :section-numbers nil >> :recursive t >> ) >> ("ftr-jeff" >> :base-directory "~/org/ftr/jeff" >> :base-extension "org" >> :publishing-directory "~/Sites/FTR/jeff" >> :recursive t >> :publishing-function (org-publish-org-to-html org-publish-org-to-org) >> :htmlized-source >> :table-of-contents nil >> :todo-keywords nil >> :section-numbers nil >> :recursive t >> ) >> ("ftr" >> :components ( "ftr-static" >> "ftr-jeff" >> ) >> ))) >> >> The table of contents and section number options are being ignored >> (possibly others). Any ideas? > > Isn't that what *should* happen if the :table-of-contents and :section-numbers > options are set to nil? Sorry for the misunderstanding. What I meant to say was the options are being ignored, such that table of contents and section numbers are being used, as if these variables were set to non-nil. -- Jeffrey Horn Graduate Lecturer and PhD Student in Economics George Mason University (704) 271-4797 jhorn@gmu.edu jrhorn424@gmail.com ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Re: Need help publishing subdirectories 2010-10-12 16:41 ` Jeff Horn @ 2010-10-12 17:24 ` Nick Dokos 2010-10-12 17:42 ` Jeff Horn 0 siblings, 1 reply; 15+ messages in thread From: Nick Dokos @ 2010-10-12 17:24 UTC (permalink / raw) To: Jeff Horn; +Cc: nicholas.dokos, Org-mode ml Jeff Horn <jrhorn424@gmail.com> wrote: > >> The relevant portion of my configuration is below. > >> > >> (setq org-publish-project-alist nil) > >> (setq org-publish-project-alist > >> '(("ftr-static" > >> :base-directory "~/org/ftr" > >> :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf" > >> :publishing-directory "~/Sites/FTR/" > >> :recursive t > >> :publishing-function (org-publish-attachment) > >> :table-of-contents nil > >> :todo-keywords nil > >> :section-numbers nil > >> :recursive t > >> ) > >> ("ftr-jeff" > >> :base-directory "~/org/ftr/jeff" > >> :base-extension "org" > >> :publishing-directory "~/Sites/FTR/jeff" > >> :recursive t > >> :publishing-function (org-publish-org-to-html org-publish-org-to-org) > >> :htmlized-source > >> :table-of-contents nil > >> :todo-keywords nil > >> :section-numbers nil > >> :recursive t > >> ) > >> ("ftr" > >> :components ( "ftr-static" > >> "ftr-jeff" > >> ) > >> ))) > >> > >> The table of contents and section number options are being ignored > >> (possibly others). Any ideas? > > > > Isn't that what *should* happen if the :table-of-contents and :section-numbers > > options are set to nil? > > Sorry for the misunderstanding. What I meant to say was the options > are being ignored, such that table of contents and section numbers are > being used, as if these variables were set to non-nil. > 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. Nick ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Re: Need help publishing subdirectories 2010-10-12 17:24 ` Nick Dokos @ 2010-10-12 17:42 ` Jeff Horn 2010-10-12 18:10 ` Nick Dokos 2010-10-12 18:13 ` Nick Dokos 0 siblings, 2 replies; 15+ messages in thread From: Jeff Horn @ 2010-10-12 17:42 UTC (permalink / raw) To: nicholas.dokos; +Cc: Org-mode ml > 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. Jeff -- Jeffrey Horn Graduate Lecturer and PhD Student in Economics George Mason University (704) 271-4797 jhorn@gmu.edu jrhorn424@gmail.com ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Re: Need help publishing subdirectories 2010-10-12 17:42 ` Jeff Horn @ 2010-10-12 18:10 ` Nick Dokos 2010-10-13 4:24 ` Jeff Horn 2010-10-13 15:23 ` Jeff Horn 2010-10-12 18:13 ` Nick Dokos 1 sibling, 2 replies; 15+ messages in thread From: Nick Dokos @ 2010-10-12 18:10 UTC (permalink / raw) To: Jeff Horn; +Cc: nicholas.dokos, Org-mode ml Jeff Horn <jrhorn424@gmail.com> 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 ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Re: Need help publishing subdirectories 2010-10-12 18:10 ` Nick Dokos @ 2010-10-13 4:24 ` Jeff Horn 2010-10-13 15:23 ` Jeff Horn 1 sibling, 0 replies; 15+ messages in thread From: Jeff Horn @ 2010-10-13 4:24 UTC (permalink / raw) To: nicholas.dokos; +Cc: Org-mode ml > 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? Correct. > 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): I'll do my best. I don't know a lot about emacs, but I'm learning. What was the function for? I guess I should be editing an org-mode source file? Do I need to recompile after adding the debug call? Thanks again! Jeff -- Jeffrey Horn Graduate Lecturer and PhD Student in Economics George Mason University (704) 271-4797 jhorn@gmu.edu jrhorn424@gmail.com ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Re: Need help publishing subdirectories 2010-10-12 18:10 ` Nick Dokos 2010-10-13 4:24 ` Jeff Horn @ 2010-10-13 15:23 ` Jeff Horn 2010-10-13 18:02 ` Jeff Horn 1 sibling, 1 reply; 15+ messages in thread From: Jeff Horn @ 2010-10-13 15:23 UTC (permalink / raw) To: nicholas.dokos; +Cc: Org-mode ml (We had a bit of discussion off list. I had a fresh crack at the problem this morning, so I'm copying the list on this message.) > (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) > > ;;;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ I was stopping the debug process after pressing "R project-plist RET". I've finished stepping through the project with "c" and the project-plist contains the right project at every step, with the right settings, ":table-of-contents nil" and ":section-numbers nil". The file modification times are correct, but the content is wrong. There are section numbers, a table of contents, and the file lacks my defined linked style sheet. Could you walk me through "edebug"? Simply replace "(debug)" above with "(edebug)" didn't do the trick. Thanks! Jeff -- Jeffrey Horn Graduate Lecturer and PhD Student in Economics George Mason University (704) 271-4797 jhorn@gmu.edu jrhorn424@gmail.com ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Re: Need help publishing subdirectories 2010-10-13 15:23 ` Jeff Horn @ 2010-10-13 18:02 ` Jeff Horn 2010-10-14 6:12 ` Nick Dokos 2010-10-14 7:30 ` Carsten Dominik 0 siblings, 2 replies; 15+ messages in thread From: Jeff Horn @ 2010-10-13 18:02 UTC (permalink / raw) To: nicholas.dokos; +Cc: Org-mode ml I moved ":htmlized-source" to the bottom of the project definition and it fixed the problem. In the examples I've seen, ":htmlized-source" has an empty value. I hypothesize the key was seeing the next key as a value, and so wasn't picking up any subsequent keys. I just loaded my publishing setup from a few days ago and edited every line that had ":htmlized-source" to ":htmlized-source t" and my problem is solved. Thanks so much for the help! Even if it didn't help discover the problem, I learned a good bit about debugging, and I edited my first source file, so that's something to be proud of! :-) Jeff On Wed, Oct 13, 2010 at 11:23 AM, Jeff Horn <jrhorn424@gmail.com> wrote: > (We had a bit of discussion off list. I had a fresh crack at the > problem this morning, so I'm copying the list on this message.) > >> (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) >> >> ;;;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > I was stopping the debug process after pressing "R project-plist RET". > I've finished stepping through the project with "c" and the > project-plist contains the right project at every step, with the right > settings, ":table-of-contents nil" and ":section-numbers nil". The > file modification times are correct, but the content is wrong. There > are section numbers, a table of contents, and the file lacks my > defined linked style sheet. > > Could you walk me through "edebug"? Simply replace "(debug)" above > with "(edebug)" didn't do the trick. > > Thanks! > Jeff > > > > -- > Jeffrey Horn > Graduate Lecturer and PhD Student in Economics > George Mason University > > (704) 271-4797 > jhorn@gmu.edu > jrhorn424@gmail.com > -- Jeffrey Horn Graduate Lecturer and PhD Student in Economics George Mason University (704) 271-4797 jhorn@gmu.edu jrhorn424@gmail.com ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Re: Need help publishing subdirectories 2010-10-13 18:02 ` Jeff Horn @ 2010-10-14 6:12 ` Nick Dokos 2010-10-14 11:53 ` Jeff Horn 2010-10-14 7:30 ` Carsten Dominik 1 sibling, 1 reply; 15+ messages in thread From: Nick Dokos @ 2010-10-14 6:12 UTC (permalink / raw) To: Jeff Horn; +Cc: nicholas.dokos, Org-mode ml Jeff Horn <jrhorn424@gmail.com> wrote: > I moved ":htmlized-source" to the bottom of the project definition and > it fixed the problem. > > In the examples I've seen, ":htmlized-source" has an empty value. I > hypothesize the key was seeing the next key as a value, and so wasn't > picking up any subsequent keys. I think you are right: the code uses plist-get to get property values and the doc string for plist-get says: ,---- | plist-get is a built-in function in `C source code'. | | (plist-get PLIST PROP) | | Extract a value from a property list. | PLIST is a property list, which is a list of the form | (PROP1 VALUE1 PROP2 VALUE2...). This function returns the value | corresponding to the given PROP, or nil if PROP is not one of the | properties on the list. This function never signals an error. `---- apparently with no provision for a missing value. Which means that org needs some additional error checking to catch situations like this. Maybe we need a wrapper around plist-get to check things. I wonder: is it OK to use the fact that in org, all property names start with a colon, to detect missing values? Probably not, since a value can also start with a colon. > > I just loaded my publishing setup from a few days ago and edited every > line that had ":htmlized-source" to ":htmlized-source t" and my > problem is solved. > > Thanks so much for the help! Even if it didn't help discover the > problem, I learned a good bit about debugging, and I edited my first > source file, so that's something to be proud of! :-) > ... and it wasn't too bad, right? But inspired guessing will beat debugging drudgery any day. Congrats, Nick ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Re: Need help publishing subdirectories 2010-10-14 6:12 ` Nick Dokos @ 2010-10-14 11:53 ` Jeff Horn 0 siblings, 0 replies; 15+ messages in thread From: Jeff Horn @ 2010-10-14 11:53 UTC (permalink / raw) To: nicholas.dokos; +Cc: Org-mode ml >> Thanks so much for the help! Even if it didn't help discover the >> problem, I learned a good bit about debugging, and I edited my first >> source file, so that's something to be proud of! :-) >> > > ... and it wasn't too bad, right? But inspired guessing will beat > debugging drudgery any day. It wasn't too bad. You've been great, and I learned something, so my headaches weren't in vain! -- Jeffrey Horn Graduate Lecturer and PhD Student in Economics George Mason University (704) 271-4797 jhorn@gmu.edu jrhorn424@gmail.com ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Re: Need help publishing subdirectories 2010-10-13 18:02 ` Jeff Horn 2010-10-14 6:12 ` Nick Dokos @ 2010-10-14 7:30 ` Carsten Dominik 1 sibling, 0 replies; 15+ messages in thread From: Carsten Dominik @ 2010-10-14 7:30 UTC (permalink / raw) To: Jeff Horn; +Cc: nicholas.dokos, Org-mode ml On Oct 13, 2010, at 8:02 PM, Jeff Horn wrote: > I moved ":htmlized-source" to the bottom of the project definition and > it fixed the problem. > > In the examples I've seen, ":htmlized-source" has an empty value. I > hypothesize the key was seeing the next key as a value, and so wasn't > picking up any subsequent keys. > > I just loaded my publishing setup from a few days ago and edited every > line that had ":htmlized-source" to ":htmlized-source t" and my > problem is solved. Indeed. Looking back on your example, your property list was indeed ill-formed. It must have an even number of elements, so every key needs a value. It is hard to protect against this problem. Maybe I could build a better customize interface to this variable, so that its value could be safely built in this way. Thanks to both you and Nick for the persistence to resolve this. - Carsten > > Thanks so much for the help! Even if it didn't help discover the > problem, > I learned a good bit about debugging, and I edited my first > source file, so that's something to be proud of! :-) > > Jeff > > On Wed, Oct 13, 2010 at 11:23 AM, Jeff Horn <jrhorn424@gmail.com> > wrote: >> (We had a bit of discussion off list. I had a fresh crack at the >> problem this morning, so I'm copying the list on this message.) >> >>> (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) >>> >>> ;;;^ >>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >> >> I was stopping the debug process after pressing "R project-plist >> RET". >> I've finished stepping through the project with "c" and the >> project-plist contains the right project at every step, with the >> right >> settings, ":table-of-contents nil" and ":section-numbers nil". The >> file modification times are correct, but the content is wrong. There >> are section numbers, a table of contents, and the file lacks my >> defined linked style sheet. >> >> Could you walk me through "edebug"? Simply replace "(debug)" above >> with "(edebug)" didn't do the trick. >> >> Thanks! >> Jeff >> >> >> >> -- >> Jeffrey Horn >> Graduate Lecturer and PhD Student in Economics >> George Mason University >> >> (704) 271-4797 >> jhorn@gmu.edu >> jrhorn424@gmail.com >> > > > > -- > Jeffrey Horn > Graduate Lecturer and PhD Student in Economics > George Mason University > > (704) 271-4797 > jhorn@gmu.edu > jrhorn424@gmail.com > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode - Carsten ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Re: Need help publishing subdirectories 2010-10-12 17:42 ` Jeff Horn 2010-10-12 18:10 ` Nick Dokos @ 2010-10-12 18:13 ` Nick Dokos 1 sibling, 0 replies; 15+ messages in thread From: Nick Dokos @ 2010-10-12 18:13 UTC (permalink / raw) To: Jeff Horn; +Cc: nicholas.dokos, Org-mode ml ... and just to make sure: you either re-evaluate org-publish-project-alist or you restart emacs after changing it? Nick ^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2010-10-14 11:54 UTC | newest] Thread overview: 15+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-10-12 3:59 Need help publishing subdirectories Jeff Horn 2010-10-12 5:29 ` Jeff Horn 2010-10-12 15:29 ` Jeff Horn 2010-10-12 15:38 ` Nick Dokos 2010-10-12 16:41 ` Jeff Horn 2010-10-12 17:24 ` Nick Dokos 2010-10-12 17:42 ` Jeff Horn 2010-10-12 18:10 ` Nick Dokos 2010-10-13 4:24 ` Jeff Horn 2010-10-13 15:23 ` Jeff Horn 2010-10-13 18:02 ` Jeff Horn 2010-10-14 6:12 ` Nick Dokos 2010-10-14 11:53 ` Jeff Horn 2010-10-14 7:30 ` Carsten Dominik 2010-10-12 18:13 ` Nick Dokos
Code repositories for project(s) associated with this public inbox https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).