unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: lee <lee@yun.yagibdah.de>
To: help-gnu-emacs@gnu.org
Subject: Re: When/where does setq work?
Date: Wed, 02 Apr 2014 14:57:09 +0200	[thread overview]
Message-ID: <87k3b7j3dm.fsf@yun.yagibdah.de> (raw)
In-Reply-To: <5b43106c-3389-4e57-aee1-ab55c035da85@googlegroups.com> (Rusi's message of "Wed, 2 Apr 2014 00:00:41 -0700 (PDT)")

Rusi <rustompmody@gmail.com> writes:

> 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

Where and how is `org-export-html-style' declared and used?  Are you
sure its value does not change when the function is called and that the
function returns what you are expecting?


-- 
Knowledge is volatile and fluid.  Software is power.



  reply	other threads:[~2014-04-02 12:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-02  7:00 When/where does setq work? Rusi
2014-04-02 12:57 ` lee [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k3b7j3dm.fsf@yun.yagibdah.de \
    --to=lee@yun.yagibdah.de \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).