emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] How to change org-export-html-style


From: Rick Frankel
Subject: Re: [O] How to change org-export-html-style
Date: Wed, 16 Apr 2014 10:59:11 -0400
User-agent: Roundcube Webmail/0.9.0

On 2014-04-15 23:25, Rustom Mody wrote:
On Tue, Apr 15, 2014 at 10:39 PM, Rick Frankel <address@hidden> 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.


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'.
<snip/>
#+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





reply via email to

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