On Tue, Apr 15, 2014 at 10:39 PM, Rick Frankel <r...@rickster.com> wrote:

> On 2014-04-15 07:30, Rustom Mody wrote:
>
>> I need (for various reasons) to inline these styles
>>
>> I have this code in my init to change the html style
>>
>> ---------------------------------
>> (defun rusi/load-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))))
>> (rusi/load-css)
>> --------------------------------
>> Now if I edit and save the my-org.css file and then call M-:
>> (rusi/load-css)
>> it does not work.
>> Restarting emacs makes it work.
>> Ive checked that org-export-html-style is actually changed.
>> However org-mode seems to be keeping some internal copy after first use.
>> org-reload is not helping here
>>
>
> Can you explain "not working"? There's not enough info here to see
> what problem you are having.
>
> rick
>


Lets say my-org.css has this one line:

code { color: green; }

ie put inline code blocks in green when exporting to html

I change it to

code { color: blue; }

1  save the file
2. Run rusi/load-css
3. Check that org-export-html-file's value has changed from green to blue

However exports from org to html continue to export code-blocks as green

Restart emacs and export (some org file that has code blocks)
Now they are blue

Reply via email to