all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* When/where does setq work?
@ 2014-04-02  7:00 Rusi
  2014-04-02 12:57 ` lee
  0 siblings, 1 reply; 7+ messages in thread
From: Rusi @ 2014-04-02  7:00 UTC (permalink / raw)
  To: help-gnu-emacs

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??


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

end of thread, other threads:[~2014-04-03 14:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-02  7:00 When/where does setq work? Rusi
2014-04-02 12:57 ` lee
2014-04-02 18:06   ` Florian v. Savigny
     [not found]   ` <mailman.18759.1396461983.10748.help-gnu-emacs@gnu.org>
2014-04-02 22:04     ` Rusi
2014-04-02 23:02       ` Florian v. Savigny
     [not found]       ` <mailman.18784.1396479749.10748.help-gnu-emacs@gnu.org>
2014-04-03  4:04         ` Rusi
2014-04-03 14:49           ` Florian v. Savigny

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.