[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: When/where does setq work?

From: lee
Subject: Re: When/where does setq work?
Date: Wed, 02 Apr 2014 14:57:09 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

Rusi <address@hidden> writes:

> I have the following function.
> It sets the org-export-html-style variable to inline CSS.
> ----------------------------
> (defun load-my-css()
>   "Returns string from css file (hardwired) suitable for inline css"
>   (interactive)
>   (setq org-export-html-style
>       (with-temp-buffer
>         (insert "\n<style type=\"text/css\">\n")
>         (insert-file-contents (expand-file-name "my-org.css" "~/orghacks"))
>         (goto-char (point-max))
>         (insert "\n</style>\n")
>         (buffer-string))))
> (load-my-css)
> ------------------------------
> The intent is that for various reasons I want inline CSS not a linked style 
> sheet.
> Towards that it reads the my-org.css file into a temp-buffer and stores that 
> into a suitable style variable.
> Now it works... kinda but not properly.
> That is it works once from my init.
> However 
> 1. edit my-org.css
> 2. save
> 3. M-x load-my-css
> has no effect
> Restart emacs and it takes effect

Where and how is `org-export-html-style' declared and used?  Are you
sure its value does not change when the function is called and that the
function returns what you are expecting?

Knowledge is volatile and fluid.  Software is power.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]