help-gnu-emacs
[Top][All Lists]
Advanced

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

When/where does setq work?


From: Rusi
Subject: When/where does setq work?
Date: Wed, 2 Apr 2014 00:00:41 -0700 (PDT)
User-agent: G2/1.0

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

Any clues??


reply via email to

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