From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: using variables in org-publish-project-alist Date: Mon, 24 Nov 2008 11:11:18 +0100 Message-ID: <69087D9F-9960-49CA-BB38-328153C61D7A@uva.nl> References: <492a0781.1ade660a.31f9.26b3@mx.google.com> Mime-Version: 1.0 (Apple Message framework v929.2) 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 1L4dx7-0002FS-DA for emacs-orgmode@gnu.org; Mon, 24 Nov 2008 11:06:21 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L4dx5-0002DN-B2 for emacs-orgmode@gnu.org; Mon, 24 Nov 2008 11:06:20 -0500 Received: from [199.232.76.173] (port=50556 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L4dmJ-00027s-Op for emacs-orgmode@gnu.org; Mon, 24 Nov 2008 10:55:12 -0500 Received: from ik-out-1112.google.com ([66.249.90.176]:33943) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L4YPa-0000ac-Q3 for emacs-orgmode@gnu.org; Mon, 24 Nov 2008 05:11:23 -0500 Received: by ik-out-1112.google.com with SMTP id b32so1707138ika.2 for ; Mon, 24 Nov 2008 02:11:21 -0800 (PST) In-Reply-To: <492a0781.1ade660a.31f9.26b3@mx.google.com> 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: 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 " | href=\"./style.css\" > | type=\"text/css\">" > | :auto-preamble t > | :auto-postamble t > | :preamble (format "
Back - href='%s'>Home" rgr-home) > | :postamble "
" > | :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