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-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rustom Mody Subject: Re: How to change org-export-html-style Date: Tue, 15 Apr 2014 17:05:08 +0530 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c339e25e7e7104f71332fc Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43992) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wa1eE-0005pf-RT for emacs-orgmode@gnu.org; Tue, 15 Apr 2014 07:35:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wa1eD-0007K2-5V for emacs-orgmode@gnu.org; Tue, 15 Apr 2014 07:35:30 -0400 Received: from mail-oa0-x22d.google.com ([2607:f8b0:4003:c02::22d]:62589) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wa1eC-0007Jr-RE for emacs-orgmode@gnu.org; Tue, 15 Apr 2014 07:35:29 -0400 Received: by mail-oa0-f45.google.com with SMTP id eb12so10544006oac.4 for ; Tue, 15 Apr 2014 04:35:28 -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 --001a11c339e25e7e7104f71332fc Content-Type: text/plain; charset=UTF-8 On Tue, Apr 15, 2014 at 5:00 PM, Rustom Mody wrote: > My html styles are in a file my-org.css in ~/orghacks > > I need (for various reasons) to inline these styles > I should have mentioned the org version: 8.2.5e Emacs version: 24.3.1 --001a11c339e25e7e7104f71332fc Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On Tue, Apr 15, 2014 at 5:00 PM, Rustom Mody <ru= stompmody@gmail.com> wrote:
My html styles are in a= file my-org.css in ~/orghacks

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

I should have mentioned the org ver= sion: 8.2.5e
Emacs version: 24.3.1
<= br>
--001a11c339e25e7e7104f71332fc-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rustom Mody Subject: Re: How to change org-export-html-style Date: Wed, 16 Apr 2014 08:55:24 +0530 Message-ID: References: <28e944dca49c583c458b6ba60f29d078@mail.rickster.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c2cd18c9edae04f7207838 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44172) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WaGTq-000757-9B for emacs-orgmode@gnu.org; Tue, 15 Apr 2014 23:25:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WaGTp-0007hV-8s for emacs-orgmode@gnu.org; Tue, 15 Apr 2014 23:25:46 -0400 Received: from mail-ob0-x22f.google.com ([2607:f8b0:4003:c01::22f]:43889) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WaGTp-0007hP-2h for emacs-orgmode@gnu.org; Tue, 15 Apr 2014 23:25:45 -0400 Received: by mail-ob0-f175.google.com with SMTP id vb8so5316761obc.6 for ; Tue, 15 Apr 2014 20:25:44 -0700 (PDT) In-Reply-To: <28e944dca49c583c458b6ba60f29d078@mail.rickster.com> 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: Rick Frankel , emacs-orgmode --001a11c2cd18c9edae04f7207838 Content-Type: text/plain; charset=UTF-8 On Tue, Apr 15, 2014 at 10:39 PM, Rick Frankel 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 "nn") >> (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 --001a11c2cd18c9edae04f7207838 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

--001a11c2cd18c9edae04f7207838-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: How to change org-export-html-style Date: Wed, 16 Apr 2014 00:53:46 -0400 Message-ID: <87wqepvpr9.fsf@gmail.com> References: <28e944dca49c583c458b6ba60f29d078@mail.rickster.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55150) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WaHrM-0003W0-Di for emacs-orgmode@gnu.org; Wed, 16 Apr 2014 00:54:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WaHrG-0008Dy-50 for emacs-orgmode@gnu.org; Wed, 16 Apr 2014 00:54:08 -0400 Received: from plane.gmane.org ([80.91.229.3]:52420) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WaHrF-0008Dr-UO for emacs-orgmode@gnu.org; Wed, 16 Apr 2014 00:54:02 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WaHrE-0005WR-DU for emacs-orgmode@gnu.org; Wed, 16 Apr 2014 06:54:00 +0200 Received: from pool-98-110-160-12.bstnma.fios.verizon.net ([98.110.160.12]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 16 Apr 2014 06:54:00 +0200 Received: from ndokos by pool-98-110-160-12.bstnma.fios.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 16 Apr 2014 06:54:00 +0200 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@gnu.org Rustom Mody writes: > On Tue, Apr 15, 2014 at 10:39 PM, Rick Frankel 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 "nn") >       (buffer-string)))) 1) I hope that the various escapes needed *are* in your definition and were stripped during the email trip; e.g. the inner quotes in the first string should be \" and \n instead of n. 2) org-export-html-style smells like an org 7.x variable to me. Are you using org 7.x? If not, you might need to change the name (although I don't know for sure and I haven't researched it.) > (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; } > Is `code' meaningful? Exporting a simple file with code I get things like this (with org 8.x):

My css is rusty, but shouldn't that be 

src { 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
>

-- 
Nick

From mboxrd@z Thu Jan  1 00:00:00 1970
From: Rustom Mody 
Subject: Re: How to change org-export-html-style
Date: Wed, 16 Apr 2014 14:05:23 +0530
Message-ID: 
References: 
	<28e944dca49c583c458b6ba60f29d078@mail.rickster.com>
	
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=001a11c257a45d538404f724cd9c
Return-path: 
Received: from eggs.gnu.org ([2001:4830:134:3::10]:57779)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from ) id 1WaLJs-0003w9-Cf
	for emacs-orgmode@gnu.org; Wed, 16 Apr 2014 04:35:49 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from ) id 1WaLJo-00062P-6P
	for emacs-orgmode@gnu.org; Wed, 16 Apr 2014 04:35:48 -0400
Received: from mail-ob0-x232.google.com ([2607:f8b0:4003:c01::232]:40431)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from ) id 1WaLJo-00062K-1G
	for emacs-orgmode@gnu.org; Wed, 16 Apr 2014 04:35:44 -0400
Received: by mail-ob0-f178.google.com with SMTP id wn1so455402obc.9
	for ; Wed, 16 Apr 2014 01:35:43 -0700 (PDT)
In-Reply-To: 
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 

--001a11c257a45d538404f724cd9c
Content-Type: text/plain; charset=UTF-8

Ok Thanks Nick

I had to change org-export-html-style  to org-html-head  and now its working

How the 7.xx variable was working is still somewhat a mystery though.

--001a11c257a45d538404f724cd9c
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Ok Thanks Nick

I had= to change org-export-html-style=C2=A0 to org-html-head=C2=A0 and now its w= orking

How the 7.xx variable was = working is still somewhat a mystery though.


--001a11c257a45d538404f724cd9c-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rick Frankel Subject: Re: How to change org-export-html-style Date: Wed, 16 Apr 2014 10:59:11 -0400 Message-ID: References: <28e944dca49c583c458b6ba60f29d078@mail.rickster.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51494) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WaRIy-000571-Bp for emacs-orgmode@gnu.org; Wed, 16 Apr 2014 10:59:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WaRIt-000223-8T for emacs-orgmode@gnu.org; Wed, 16 Apr 2014 10:59:16 -0400 Received: from mail.rickster.com ([204.62.15.78]:56440) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WaRIt-00021z-52 for emacs-orgmode@gnu.org; Wed, 16 Apr 2014 10:59:11 -0400 In-Reply-To: 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: Rustom Mody Cc: emacs-orgmode On 2014-04-15 23:25, Rustom Mody wrote: > On Tue, Apr 15, 2014 at 10:39 PM, Rick Frankel =20 > wrote: >=20 > On 2014-04-15 07:30, Rustom Mody wrote: >=20 > I need (for various reasons) to inline these styles >=20 > I have this code in my init to change the html style >=20 > (defun rusi/load-css() > =C2=A0 "Returns string from css file (hardwired) suitable for inline cs= s" > =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 "nn") > =C2=A0=C2=A0=C2=A0 =C2=A0 (buffer-string)))) > (rusi/load-css) > Now if I edit and save the my-org.css file and then call M-:=20 > (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=20 > use. > org-reload is not helping here >=20 > Can you explain "not working"? There's not enough info here to see > what problem you are having. >=20 On further examination, I'm not sure how it works at all! `org-export-html-style' is a customization variable from the (old) version of org included w/ emacs: #+BEGIN_SRC emacs-lisp (describe-variable 'org-export-html-style) #+END_SRC #+RESULTS: #+begin_example org-export-html-style is a variable defined in `org-html.el'. #+end_example The source file for the current exporter is `ox-html.el'. Try setting `org-html-head' and `org-html-head-include-default-style'. rick