From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rustom Mody Subject: How to change org-export-html-style Date: Tue, 15 Apr 2014 17:00:48 +0530 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a1134cf20e39ef604f713227e Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43333) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wa1a3-0002RK-2X for emacs-orgmode@gnu.org; Tue, 15 Apr 2014 07:31:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wa1a1-0005le-SD for emacs-orgmode@gnu.org; Tue, 15 Apr 2014 07:31:11 -0400 Received: from mail-ob0-x231.google.com ([2607:f8b0:4003:c01::231]:43653) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wa1a1-0005lN-Nq for emacs-orgmode@gnu.org; Tue, 15 Apr 2014 07:31:09 -0400 Received: by mail-ob0-f177.google.com with SMTP id vb8so2183629obc.8 for ; Tue, 15 Apr 2014 04:31:08 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode --001a1134cf20e39ef604f713227e Content-Type: text/plain; charset=UTF-8 My html styles are in a file my-org.css in ~/orghacks 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\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 --001a1134cf20e39ef604f713227e Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
My html styles are in a= file my-org.css in ~/orghacks

I need (for various reasons) t= o inline these styles

I have this code in my init to change th= e html style

---------------------------------
(defun rusi/load-css()
=C2=A0 &= quot;Returns string from css file (hardwired) suitable for inline css"=
=C2=A0 (interactive)
=C2=A0 (setq org-export-html-style
=C2=A0=C2= =A0=C2=A0 (with-temp-buffer
=C2=A0=C2=A0=C2=A0 =C2=A0 (insert "\n<style type=3D\"text/css\= ">\n")
=C2=A0=C2=A0=C2=A0 =C2=A0 (insert-file-contents (exp= and-file-name "my-org.css" "~/orghacks"))
=C2=A0=C2= =A0=C2=A0 =C2=A0 (goto-char (point-max))
=C2=A0=C2=A0=C2=A0 =C2=A0 (inse= rt "\n</style>\n")
=C2=A0=C2=A0=C2=A0 =C2=A0 (buffer-string))))
(rusi/load-css)
--------= ------------------------
Now if I edit and save the my-org.css fil= e and then call M-: (rusi/load-css)
it does not work.
Res= tarting 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
--001a1134cf20e39ef604f713227e--