* using variables in org-publish-project-alist @ 2008-11-24 1:45 Richard Riley 2008-11-24 10:11 ` Carsten Dominik 0 siblings, 1 reply; 6+ messages in thread From: Richard Riley @ 2008-11-24 1:45 UTC (permalink / raw) To: org-mode I removed directory names from my projects list thus ,---- | (setq org-publish-project-alist | '( | ("web-extra" | :base-directory rgr-source ;; ********************************** | :publishing-directory rgr-publish | :base-extension "gif\\|jpg\\|jpeg\\|png\\|css" | :publishing-function org-publish-attachment | :recursive t | ) | ("web-org" | :base-directory rgr-source | :publishing-directory rgr-publish | :base-extension "org" | :publishing-function org-publish-org-to-html | :recursive t | :section-numbers nil | :style "<link rel=stylesheet | href=\"./style.css\" | type=\"text/css\">" | :auto-preamble t | :auto-postamble t | :preamble (format "<div id='Content'><a href='../'>Back</a> - <a href='%s'>Home</a>" rgr-home) | :postamble "</div>" | :author nil | ) | ("web" | :components("web-org" "web-extra") | ) | ) | ) `---- I included an external file: ,---- | (load-file "~/.emacs.d/.webvars") `---- where I declares the variables: ,---- | (setq rgr-source "/home/sh/webs/rgr/") | (setq rgr-publish "/ssh:rgr.net:/home/sh/webs/rgr/") | (setq rgr-home "http://rgr.net/default/") `---- C-h v on "rgr-source" gives ,---- | rgr-source's value is | "/home/sh/webs/rgr/" | | Documentation: | Not documented as a variable. `---- but when I publish the project or a project file I get this: ,---- | org-publish-get-base-files: Wrong type argument: stringp, rgr-source `---- I have a niggly feeling its going to be something obvious but what? thanks for any info, r. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: using variables in org-publish-project-alist 2008-11-24 1:45 using variables in org-publish-project-alist Richard Riley @ 2008-11-24 10:11 ` Carsten Dominik 2008-11-24 11:59 ` Richard Riley 0 siblings, 1 reply; 6+ messages in thread From: Carsten Dominik @ 2008-11-24 10:11 UTC (permalink / raw) To: Richard Riley; +Cc: org-mode Hi Richard, no, variables are not interpolated into quoted lists, any list preceded by "'" is quoted. If you can guarantee that the value of the variables is define at the time the (setq org-publish-projects-alist ... is executed, then you can use backquote syntax: Quote the main list with the backquote, and then preceed any variable inside you would like to have evaluated with a comma so (setq org-publish-projects-alist `( ............. ,rgr-souerce ....)) Note that this works only once, so if you later change the value, this list will not be changed. If you wanted dynamic behavior, then we would have to patch org- publish.el. HTH - Carsten On Nov 24, 2008, at 2:45 AM, Richard Riley wrote: > > I removed directory names from my projects list thus > > ,---- > | (setq org-publish-project-alist > | '( > | ("web-extra" > | :base-directory rgr-source ;; ********************************** > | :publishing-directory rgr-publish > | :base-extension "gif\\|jpg\\|jpeg\\|png\\|css" > | :publishing-function org-publish-attachment > | :recursive t > | ) > | ("web-org" > | :base-directory rgr-source > | :publishing-directory rgr-publish > | :base-extension "org" > | :publishing-function org-publish-org-to-html > | :recursive t > | :section-numbers nil > | :style "<link rel=stylesheet > | href=\"./style.css\" > | type=\"text/css\">" > | :auto-preamble t > | :auto-postamble t > | :preamble (format "<div id='Content'><a href='../'>Back</a> - <a > href='%s'>Home</a>" rgr-home) > | :postamble "</div>" > | :author nil > | ) > | ("web" > | :components("web-org" "web-extra") > | ) > | ) > | ) > `---- > > I included an external file: > > ,---- > | (load-file "~/.emacs.d/.webvars") > `---- > > where I declares the variables: > > ,---- > | (setq rgr-source "/home/sh/webs/rgr/") > | (setq rgr-publish "/ssh:rgr.net:/home/sh/webs/rgr/") > | (setq rgr-home "http://rgr.net/default/") > `---- > > C-h v on "rgr-source" gives > > ,---- > | rgr-source's value is > | "/home/sh/webs/rgr/" > | > | Documentation: > | Not documented as a variable. > `---- > > but when I publish the project or a project file I get this: > > ,---- > | org-publish-get-base-files: Wrong type argument: stringp, rgr-source > `---- > > I have a niggly feeling its going to be something obvious but what? > > thanks for any info, > > r. > > > _______________________________________________ > 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: using variables in org-publish-project-alist 2008-11-24 10:11 ` Carsten Dominik @ 2008-11-24 11:59 ` Richard Riley 2008-11-24 23:58 ` Sebastian Rose 0 siblings, 1 reply; 6+ messages in thread From: Richard Riley @ 2008-11-24 11:59 UTC (permalink / raw) To: Carsten Dominik; +Cc: org-mode, Richard Riley Thanks - wow, I would never have found that! Just testing it I noticed a small "feature" (possibly bug). We talked about buffers being opened in the past when publishing. Now the project publish is nice and quiet except for one case: I break my site down to many subdirs each with an index.org/html. If I open my "homepage" e.g ~/myweb/index.org, and then publish the entire project while in that buffer then any other "index" replaces it during the publish process - it is was replaced by ~/myweb/projects/index.org<2>" in the focused window. Not a day breaker I admit, but still a slight "blip" in the otherwise super quiet publish process. And the quoting works fine, thanks for the explanation. Carsten Dominik <dominik@science.uva.nl> writes: > Hi Richard, > > no, variables are not interpolated into quoted lists, > any list preceded by "'" is quoted. > > If you can guarantee that the value of the variables is define at the > time the > > (setq org-publish-projects-alist ... > > is executed, then you can use backquote syntax: Quote the main list > with the backquote, and then preceed any variable inside you would > like to have evaluated with a comma so > > (setq org-publish-projects-alist > `( ............. > ,rgr-souerce > ....)) > > Note that this works only once, so if you later change the value, this > list will not be changed. > > If you wanted dynamic behavior, then we would have to patch org- > publish.el. > > HTH > > - Carsten > > > On Nov 24, 2008, at 2:45 AM, Richard Riley wrote: > >> >> I removed directory names from my projects list thus >> >> ,---- >> | (setq org-publish-project-alist >> | '( >> | ("web-extra" >> | :base-directory rgr-source ;; ********************************** >> | :publishing-directory rgr-publish >> | :base-extension "gif\\|jpg\\|jpeg\\|png\\|css" >> | :publishing-function org-publish-attachment >> | :recursive t >> | ) >> | ("web-org" >> | :base-directory rgr-source >> | :publishing-directory rgr-publish >> | :base-extension "org" >> | :publishing-function org-publish-org-to-html >> | :recursive t >> | :section-numbers nil >> | :style "<link rel=stylesheet >> | href=\"./style.css\" >> | type=\"text/css\">" >> | :auto-preamble t >> | :auto-postamble t >> | :preamble (format "<div id='Content'><a href='../'>Back</a> - >> <a href='%s'>Home</a>" rgr-home) >> | :postamble "</div>" >> | :author nil >> | ) >> | ("web" >> | :components("web-org" "web-extra") >> | ) >> | ) >> | ) >> `---- >> >> I included an external file: >> >> ,---- >> | (load-file "~/.emacs.d/.webvars") >> `---- >> >> where I declares the variables: >> >> ,---- >> | (setq rgr-source "/home/sh/webs/rgr/") >> | (setq rgr-publish "/ssh:rgr.net:/home/sh/webs/rgr/") >> | (setq rgr-home "http://rgr.net/default/") >> `---- >> >> C-h v on "rgr-source" gives >> >> ,---- >> | rgr-source's value is >> | "/home/sh/webs/rgr/" >> | >> | Documentation: >> | Not documented as a variable. >> `---- >> >> but when I publish the project or a project file I get this: >> >> ,---- >> | org-publish-get-base-files: Wrong type argument: stringp, rgr-source >> `---- >> >> I have a niggly feeling its going to be something obvious but what? >> >> thanks for any info, >> >> r. >> >> >> _______________________________________________ >> 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 -- important and urgent problems of the technology of today are no longer the satisfactions of the primary needs or of archetypal wishes, but the reparation of the evils and damages by the technology of yesterday. ~Dennis Gabor, Innovations: Scientific, Technological and Social, 1970 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: using variables in org-publish-project-alist 2008-11-24 11:59 ` Richard Riley @ 2008-11-24 23:58 ` Sebastian Rose 2008-11-25 0:09 ` Richard Riley 0 siblings, 1 reply; 6+ messages in thread From: Sebastian Rose @ 2008-11-24 23:58 UTC (permalink / raw) To: Richard Riley; +Cc: org-mode Hi Richard, Richard Riley <rileyrgdev@googlemail.com> writes: > If I open my "homepage" e.g ~/myweb/index.org, and then publish the > entire project while in that buffer then any other "index" replaces it > during the publish process - it is was replaced by > ~/myweb/projects/index.org<2>" in the focused window. Not a day breaker > I admit, but still a slight "blip" in the otherwise super quiet publish > process. Does setting the `:index-filename' help? (setq org-publish-project-alist '(("org-notes" ;; ... :auto-index t ; generate index.org automagically :index-filename "sitemap.org" :index-title "Sitemap" :recursive t ;; ... ) Regards, -- Sebastian Rose, EMMA STIL - mediendesign, Niemeyerstr.6, 30449 Hannover Tel.: +49 (0)511 - 36 58 472 Fax: +49 (0)1805 - 233633 - 11044 mobil: +49 (0)173 - 83 93 417 Http: www.emma-stil.de ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: using variables in org-publish-project-alist 2008-11-24 23:58 ` Sebastian Rose @ 2008-11-25 0:09 ` Richard Riley 2008-11-25 0:35 ` Sebastian Rose 0 siblings, 1 reply; 6+ messages in thread From: Richard Riley @ 2008-11-25 0:09 UTC (permalink / raw) To: Sebastian Rose; +Cc: org-mode, Richard Riley Sebastian Rose <sebastian_rose@gmx.de> writes: > Hi Richard, > > > Richard Riley <rileyrgdev@googlemail.com> writes: >> If I open my "homepage" e.g ~/myweb/index.org, and then publish the >> entire project while in that buffer then any other "index" replaces it >> during the publish process - it is was replaced by >> ~/myweb/projects/index.org<2>" in the focused window. Not a day breaker >> I admit, but still a slight "blip" in the otherwise super quiet publish >> process. > > > Does setting the `:index-filename' help? I do not use auto-index but have my own index.org files. I believe Carsten has addressed this issue. > > > (setq org-publish-project-alist > '(("org-notes" > > ;; ... > > :auto-index t ; generate index.org automagically > :index-filename "sitemap.org" > :index-title "Sitemap" > :recursive t > > ;; ... > ) > > > > Regards, -- important and urgent problems of the technology of today are no longer the satisfactions of the primary needs or of archetypal wishes, but the reparation of the evils and damages by the technology of yesterday. ~Dennis Gabor, Innovations: Scientific, Technological and Social, 1970 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: using variables in org-publish-project-alist 2008-11-25 0:09 ` Richard Riley @ 2008-11-25 0:35 ` Sebastian Rose 0 siblings, 0 replies; 6+ messages in thread From: Sebastian Rose @ 2008-11-25 0:35 UTC (permalink / raw) To: Richard Riley; +Cc: org-mode Richard Riley <rileyrgdev@googlemail.com> writes: > Sebastian Rose <sebastian_rose@gmx.de> writes: > >> Hi Richard, >> >> >> Richard Riley <rileyrgdev@googlemail.com> writes: >>> If I open my "homepage" e.g ~/myweb/index.org, and then publish the >>> entire project while in that buffer then any other "index" replaces it >>> during the publish process - it is was replaced by >>> ~/myweb/projects/index.org<2>" in the focused window. Not a day breaker >>> I admit, but still a slight "blip" in the otherwise super quiet publish >>> process. >> >> >> Does setting the `:index-filename' help? > > I do not use auto-index but have my own index.org files. I believe > Carsten has addressed this issue. Not shure, how this is implemented at the moment. "index.org" is the default for `:index-filename'. Best, -- Sebastian Rose, EMMA STIL - mediendesign, Niemeyerstr.6, 30449 Hannover Tel.: +49 (0)511 - 36 58 472 Fax: +49 (0)1805 - 233633 - 11044 mobil: +49 (0)173 - 83 93 417 Email: s.rose emma-stil de, sebastian_rose gmx de Http: www.emma-stil.de ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-11-25 0:32 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-11-24 1:45 using variables in org-publish-project-alist Richard Riley 2008-11-24 10:11 ` Carsten Dominik 2008-11-24 11:59 ` Richard Riley 2008-11-24 23:58 ` Sebastian Rose 2008-11-25 0:09 ` Richard Riley 2008-11-25 0:35 ` Sebastian Rose
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).