emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <dominik@science.uva.nl>
To: Richard Riley <rileyrgdev@googlemail.com>
Cc: org-mode <emacs-orgmode@gnu.org>
Subject: Re: using variables in  org-publish-project-alist
Date: Mon, 24 Nov 2008 11:11:18 +0100	[thread overview]
Message-ID: <69087D9F-9960-49CA-BB38-328153C61D7A@uva.nl> (raw)
In-Reply-To: <492a0781.1ade660a.31f9.26b3@mx.google.com>

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

  reply	other threads:[~2008-11-24 16:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-24  1:45 using variables in org-publish-project-alist Richard Riley
2008-11-24 10:11 ` Carsten Dominik [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=69087D9F-9960-49CA-BB38-328153C61D7A@uva.nl \
    --to=dominik@science.uva.nl \
    --cc=emacs-orgmode@gnu.org \
    --cc=rileyrgdev@googlemail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).