emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Replace the string in project setting
@ 2009-12-24  2:12 Water Lin
  2009-12-24  7:43 ` Carsten Dominik
  0 siblings, 1 reply; 3+ messages in thread
From: Water Lin @ 2009-12-24  2:12 UTC (permalink / raw)
  To: emacs-orgmode


I set publishing project by
------
(require 'org-publish)
(setq org-publish-project-alist
-----

and I also want to embed css sheetstyle by setting
--------
:style "<style>...</style>"
--------

But the style is too long and I want to use a string to replace it.

So I set a string by
-------
(setq waterstyle "<style>....</style>")
-------

and replace the :style like following:
-------
:style waterstyle
-------

But while I publish the project, Emacs prompts an error about this.

I am not very familiar with elisp. Can I embed the style by a string
like this?

Thanks

Water Lin

-- 
Water Lin's notes and pencils: http://en.waterlin.org
Email: WaterLin@ymail.com
__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Replace the string in project setting
  2009-12-24  2:12 Replace the string in project setting Water Lin
@ 2009-12-24  7:43 ` Carsten Dominik
  2009-12-24  9:02   ` Water Lin
  0 siblings, 1 reply; 3+ messages in thread
From: Carsten Dominik @ 2009-12-24  7:43 UTC (permalink / raw)
  To: Water Lin; +Cc: emacs-orgmode


On Dec 24, 2009, at 3:12 AM, Water Lin wrote:

>
> I set publishing project by
> ------
> (require 'org-publish)
> (setq org-publish-project-alist
> -----
>
> and I also want to embed css sheetstyle by setting
> --------
> :style "<style>...</style>"
> --------
>
> But the style is too long and I want to use a string to replace it.
>
> So I set a string by
> -------
> (setq waterstyle "<style>....</style>")
> -------
>
> and replace the :style like following:
> -------
> :style waterstyle
> -------
>
> But while I publish the project, Emacs prompts an error about this.
>
> I am not very familiar with elisp. Can I embed the style by a string
> like this?

Hi,

you need to do this:

(setq waterstyle .....)

(setq org-publish-project-alist
      `((......
           ......
          :style ,waterstyle
            ....)))

(note the *backquote* instead of a normal quote to quote
the value of org-publish-project-alist, and note the comma before
waterstyle to interpolate the value into the quoted list.

HTH

- Carsten

>
> Thanks
>
> Water Lin
>
> -- 
> Water Lin's notes and pencils: http://en.waterlin.org
> Email: WaterLin@ymail.com
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.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] 3+ messages in thread

* Re: Replace the string in project setting
  2009-12-24  7:43 ` Carsten Dominik
@ 2009-12-24  9:02   ` Water Lin
  0 siblings, 0 replies; 3+ messages in thread
From: Water Lin @ 2009-12-24  9:02 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode

Carsten Dominik <carsten.dominik@gmail.com> writes:

> On Dec 24, 2009, at 3:12 AM, Water Lin wrote:
>
>>
>> I set publishing project by
>> ------
>> (require 'org-publish)
>> (setq org-publish-project-alist
>> -----
>>
>> and I also want to embed css sheetstyle by setting
>> --------
>> :style "<style>...</style>"
>> --------
>>
>> But the style is too long and I want to use a string to replace it.
>>
>> So I set a string by
>> -------
>> (setq waterstyle "<style>....</style>")
>> -------
>>
>> and replace the :style like following:
>> -------
>> :style waterstyle
>> -------
>>
>> But while I publish the project, Emacs prompts an error about this.
>>
>> I am not very familiar with elisp. Can I embed the style by a string
>> like this?
>
> Hi,
>
> you need to do this:
>
> (setq waterstyle .....)
>
> (setq org-publish-project-alist
>      `((......
>           ......
>          :style ,waterstyle
>            ....)))
>
> (note the *backquote* instead of a normal quote to quote
> the value of org-publish-project-alist, and note the comma before
> waterstyle to interpolate the value into the quoted list.
>
> HTH
>
> - Carsten

Thanks, I think I am not just know how to do it but also know why I need
to do this.

Thanks

Water Lin
>
>>
>> Thanks
>>
>> Water Lin
>>
>> -- 
>> Water Lin's notes and pencils: http://en.waterlin.org
>> Email: WaterLin@ymail.com
>> __________________________________________________
>> Do You Yahoo!?
>> Tired of spam?  Yahoo! Mail has the best spam protection around
>> http://mail.yahoo.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
>
>
>
>

-- 
Water Lin's notes and pencils: http://en.waterlin.org
Email: WaterLin@ymail.com
__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-12-24  9:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-24  2:12 Replace the string in project setting Water Lin
2009-12-24  7:43 ` Carsten Dominik
2009-12-24  9:02   ` Water Lin

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).