emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* controlling how htmlize fontifies code
@ 2015-08-02  9:24 Eric S Fraga
  2015-08-02 12:17 ` Rasmus
  2015-08-02 13:19 ` Rick Frankel
  0 siblings, 2 replies; 16+ messages in thread
From: Eric S Fraga @ 2015-08-02  9:24 UTC (permalink / raw)
  To: emacs-orgmode

Hello all,

I have to prepare a whole new set of lectures for a new course and I
thought I would play around with =ox-reveal= as an HTML export target
may actually be more appropriate for this course than my usual PDF
target.  And one of the best features of org is that most of the effort
is the same regardless of target so I won't be wasting much time
playing! :-)

In playing around with reveal, I realised that exporting code uses the
=ox-html= exporter (obvious, in hindsight).  This exporter uses emacs's
own fontifying engine to colour code for export.  My problem is that I
use a dark background theme for emacs but want presentations to be based
on a light background.  The code colouring, as a result, is completely
wrong.

Now, I can simply start up emacs with a light background, export my
slides and everything is fine.  However, it would be nice to not have to
start up a new emacs just for this.  Is there an easy way to pretend,
for export to HTML, that emacs is using a light background?  Maybe a way
to advise the exporter?  

Thanks,
eric

PS - ideally, code export to HTML would make use of CSS instead of
     hard-coding in the colours but that's a discussion for another
     day...
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3beta-1303-g3f0398

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

* Re: controlling how htmlize fontifies code
  2015-08-02  9:24 controlling how htmlize fontifies code Eric S Fraga
@ 2015-08-02 12:17 ` Rasmus
  2015-08-03 13:51   ` Eric S Fraga
  2015-08-02 13:19 ` Rick Frankel
  1 sibling, 1 reply; 16+ messages in thread
From: Rasmus @ 2015-08-02 12:17 UTC (permalink / raw)
  To: emacs-orgmode

Eric S Fraga <e.fraga@ucl.ac.uk> writes:

> Now, I can simply start up emacs with a light background, export my
> slides and everything is fine.  However, it would be nice to not have to
> start up a new emacs just for this.  Is there an easy way to pretend,
> for export to HTML, that emacs is using a light background?  Maybe a way
> to advise the exporter?  

Check the functions disable-theme and load-theme in Emacs; maybe map
custom-enabled-themes over disable-theme. Check the hooks
org-export-before-processing-hook and org-export-before-parsing-hook in ox
to automate it.

Some people on SX seem to have used some JS coloring libraries.

> PS - ideally, code export to HTML would make use of CSS instead of
>      hard-coding in the colours but that's a discussion for another
>      day...

This would also solve the problem when exporting in batch.  Patches
welcome.

Rasmus

-- 
I feel emotional landscapes they puzzle me

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

* Re: controlling how htmlize fontifies code
  2015-08-02  9:24 controlling how htmlize fontifies code Eric S Fraga
  2015-08-02 12:17 ` Rasmus
@ 2015-08-02 13:19 ` Rick Frankel
  2015-08-02 13:41   ` Kaushal
  2015-08-03 13:50   ` Eric S Fraga
  1 sibling, 2 replies; 16+ messages in thread
From: Rick Frankel @ 2015-08-02 13:19 UTC (permalink / raw)
  To: emacs-orgmode

On Sun, Aug 02, 2015 at 10:24:25AM +0100, Eric S Fraga wrote:
> Now, I can simply start up emacs with a light background, export my
> slides and everything is fine.  However, it would be nice to not have to
> start up a new emacs just for this.  Is there an easy way to pretend,
> for export to HTML, that emacs is using a light background?  Maybe a way
> to advise the exporter?

> PS - ideally, code export to HTML would make use of CSS instead of
>      hard-coding in the colours but that's a discussion for another
>      day...

Check the documentation for the variable `org-html-htmlize-output-type'. Since
ox-reveal is derived from ox-html, it should work as specified. I personally
use ox-deck (also derived from html), so YMMV.

rick

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

* Re: controlling how htmlize fontifies code
  2015-08-02 13:19 ` Rick Frankel
@ 2015-08-02 13:41   ` Kaushal
  2015-08-03 13:50   ` Eric S Fraga
  1 sibling, 0 replies; 16+ messages in thread
From: Kaushal @ 2015-08-02 13:41 UTC (permalink / raw)
  To: emacs-org list

[-- Attachment #1: Type: text/plain, Size: 1307 bytes --]

I export with my custom Leuven theme (a light theme) css and it works fine.
I also have my emacs theme as a dark theme by default.

;; (setq org-html-htmlize-output-type 'inline-css) ; default
(setq org-html-htmlize-output-type 'css)
;; (setq org-html-htmlize-font-prefix "") ; default
(setq org-html-htmlize-font-prefix "org-")

Check out this link for the full solution including Leuven theme css:
http://emacs.stackexchange.com/a/7633/115

--
Kaushal Modi
On Aug 2, 2015 9:19 AM, "Rick Frankel" <rick@rickster.com> wrote:

> On Sun, Aug 02, 2015 at 10:24:25AM +0100, Eric S Fraga wrote:
> > Now, I can simply start up emacs with a light background, export my
> > slides and everything is fine.  However, it would be nice to not have to
> > start up a new emacs just for this.  Is there an easy way to pretend,
> > for export to HTML, that emacs is using a light background?  Maybe a way
> > to advise the exporter?
>
> > PS - ideally, code export to HTML would make use of CSS instead of
> >      hard-coding in the colours but that's a discussion for another
> >      day...
>
> Check the documentation for the variable `org-html-htmlize-output-type'.
> Since
> ox-reveal is derived from ox-html, it should work as specified. I
> personally
> use ox-deck (also derived from html), so YMMV.
>
> rick
>
>

[-- Attachment #2: Type: text/html, Size: 1798 bytes --]

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

* Re: controlling how htmlize fontifies code
  2015-08-02 13:19 ` Rick Frankel
  2015-08-02 13:41   ` Kaushal
@ 2015-08-03 13:50   ` Eric S Fraga
  2015-08-03 21:08     ` Rick Frankel
  1 sibling, 1 reply; 16+ messages in thread
From: Eric S Fraga @ 2015-08-03 13:50 UTC (permalink / raw)
  To: emacs-orgmode

On Sunday,  2 Aug 2015 at 09:19, Rick Frankel wrote:
> Check the documentation for the variable `org-html-htmlize-output-type'. Since
> ox-reveal is derived from ox-html, it should work as specified. I personally
> use ox-deck (also derived from html), so YMMV.

On Sunday,  2 Aug 2015 at 09:41, Kaushal wrote:
> I export with my custom Leuven theme (a light theme) css and it works fine.
> I also have my emacs theme as a dark theme by default.
>
> ;; (setq org-html-htmlize-output-type 'inline-css) ; default
> (setq org-html-htmlize-output-type 'css)
> ;; (setq org-html-htmlize-font-prefix "") ; default
> (setq org-html-htmlize-font-prefix "org-")

Thank you Rick and Kaushal.

=org-html-htmlize-output-type= does what I want.  However, I don't want
to set this globally as I use htmlize every now and again to send HTML
emacs (yes, I know, bad idea but some colleagues require me to email
information in tables and the like every now and again and it's better
than using Word... ;-).

I have tried both setting a local variable and also using #+bind: but
neither approach works for some reason.  I did not expect the local
variable setting to work, of course.

Any suggestions on taking this forward?

For now, setting this variable globally to nil is a stop-gap measure.

Thanks,
eric
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3beta-1303-g3f0398

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

* Re: controlling how htmlize fontifies code
  2015-08-02 12:17 ` Rasmus
@ 2015-08-03 13:51   ` Eric S Fraga
  0 siblings, 0 replies; 16+ messages in thread
From: Eric S Fraga @ 2015-08-03 13:51 UTC (permalink / raw)
  To: Rasmus; +Cc: emacs-orgmode

On Sunday,  2 Aug 2015 at 14:17, Rasmus wrote:

[...]

> Check the functions disable-theme and load-theme in Emacs; maybe map
> custom-enabled-themes over disable-theme. Check the hooks

Thanks.  Using org-html-htmlize-output-type seems to work for what I
want.
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3beta-1303-g3f0398

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

* Re: controlling how htmlize fontifies code
  2015-08-03 13:50   ` Eric S Fraga
@ 2015-08-03 21:08     ` Rick Frankel
  2015-08-04 12:41       ` Eric S Fraga
  2015-08-04 13:24       ` Eric S Fraga
  0 siblings, 2 replies; 16+ messages in thread
From: Rick Frankel @ 2015-08-03 21:08 UTC (permalink / raw)
  To: emacs-orgmode

On Mon, Aug 03, 2015 at 02:50:27PM +0100, Eric S Fraga wrote:
> On Sunday,  2 Aug 2015 at 09:19, Rick Frankel wrote:
> > Check the documentation for the variable `org-html-htmlize-output-type'. Since
> > ox-reveal is derived from ox-html, it should work as specified. I personally
> > use ox-deck (also derived from html), so YMMV.
>
> On Sunday,  2 Aug 2015 at 09:41, Kaushal wrote:
> > I export with my custom Leuven theme (a light theme) css and it works fine.
> > I also have my emacs theme as a dark theme by default.
> >
> > ;; (setq org-html-htmlize-output-type 'inline-css) ; default
> > (setq org-html-htmlize-output-type 'css)
> > ;; (setq org-html-htmlize-font-prefix "") ; default
> > (setq org-html-htmlize-font-prefix "org-")
>

> I have tried both setting a local variable and also using #+bind: but
> neither approach works for some reason.  I did not expect the local
> variable setting to work, of course.
>

Both should work. Are you sure you have `org-export-allow-bind-keywords' set?
Why wouldn't you expect local variables to work?

rick

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

* Re: controlling how htmlize fontifies code
  2015-08-03 21:08     ` Rick Frankel
@ 2015-08-04 12:41       ` Eric S Fraga
  2015-08-04 13:24       ` Eric S Fraga
  1 sibling, 0 replies; 16+ messages in thread
From: Eric S Fraga @ 2015-08-04 12:41 UTC (permalink / raw)
  To: emacs-orgmode

On Monday,  3 Aug 2015 at 17:08, Rick Frankel wrote:

[...]

>> I have tried both setting a local variable and also using #+bind: but
>> neither approach works for some reason.  I did not expect the local
>> variable setting to work, of course.
>>
>
> Both should work. Are you sure you have `org-export-allow-bind-keywords' set?

I do allow bind keywords.  Strange.  I'll investigate further with emacs
-Q etc.  I may post an ECM later.

> Why wouldn't you expect local variables to work?

Because, if I understand correctly, the exporter processes the file into
a different buffer which is then exported and locally set variables
don't transfer to the new buffer.  This is why I have used binding in
the past.  Maybe the new exporter is different?

thanks,
eric

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3beta-1315-ga3b2b7

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

* Re: controlling how htmlize fontifies code
  2015-08-03 21:08     ` Rick Frankel
  2015-08-04 12:41       ` Eric S Fraga
@ 2015-08-04 13:24       ` Eric S Fraga
  2015-08-04 14:00         ` Rasmus
  1 sibling, 1 reply; 16+ messages in thread
From: Eric S Fraga @ 2015-08-04 13:24 UTC (permalink / raw)
  To: emacs-orgmode

On Monday,  3 Aug 2015 at 17:08, Rick Frankel wrote:

[...]

> Both should work. Are you sure you have `org-export-allow-bind-keywords' set?
> Why wouldn't you expect local variables to work?

Okay, I have tracked the problem down.  Took some effort and boy did
this test my not very extensive emacs lisp knowledge!  I do need to
learn how to use the Emacs debugger.  Task for a rainy day...

In any case, the problem is that the fontification happens
(org-html-htmlize-output-type not nil) in org-html-fontify-code using
with-temp-buffer which resets org-html-htmlize-output-type back to
inline-css or whatever the global setting for that variable happens to
be.

So, basically, one can have code fontified with inline-css or not at all
unless the output type is set to css globally.

I hope this makes sense.

Trying to fix this is definitely beyond my ability unfortunately.  I may
need to see how onerous it is to set the output type to css globally.

Thanks again,
eric

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3beta-1315-ga3b2b7

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

* Re: controlling how htmlize fontifies code
  2015-08-04 13:24       ` Eric S Fraga
@ 2015-08-04 14:00         ` Rasmus
  2015-08-04 15:09           ` Nicolas Goaziou
  0 siblings, 1 reply; 16+ messages in thread
From: Rasmus @ 2015-08-04 14:00 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 697 bytes --]

Hi Eric,

Thanks for looking into this.

Eric S Fraga <e.fraga@ucl.ac.uk> writes:

> Trying to fix this is definitely beyond my ability unfortunately.  I may
> need to see how onerous it is to set the output type to css globally.

Here's a simple fix, though I suspect Nicolas will have a more through
solution up his sleeve.

Of course, in org-html--build-head the mysterious :html-htmlized-css-url
is required so you won't actually get any default colors, which is a bit
boring in my opinion.  I don't know if I'm misunderstanding
:html-htmlized-css-url, a bug or something supposed to be set via a
publish project.

Rasmus

-- 
This is the kind of tedious nonsense up with which I will not put

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0004-ox-html-Respect-local-values-when-formatting-code.patch --]
[-- Type: text/x-diff, Size: 2560 bytes --]

From dcf2ba74fcfe68c4590f7f71ed8029c72a3c10ac Mon Sep 17 00:00:00 2001
From: Rasmus <rasmus@gmx.us>
Date: Tue, 4 Aug 2015 15:52:47 +0200
Subject: [PATCH 4/4] ox-html: Respect local values when formatting code

* ox-html.el (org-html-fontify-code): Use local value of
  org-html-htmlize-output-type parent and org-html-htmlize-font-prefix
  parent.

Reported-by: Eric S Fraga <e.fraga@ucl.ac.uk>
<http://permalink.gmane.org/gmane.emacs.orgmode/99450>
---
 lisp/ox-html.el | 44 +++++++++++++++++++++++++-------------------
 1 file changed, 25 insertions(+), 19 deletions(-)

diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index d454fab..87351a8 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -2041,25 +2041,31 @@ is the language used for CODE, as a string, or nil."
 	 ;; Case 2: Default.  Fontify code.
 	 (t
 	  ;; htmlize
-	  (setq code (with-temp-buffer
-		       ;; Switch to language-specific mode.
-		       (funcall lang-mode)
-		       (insert code)
-		       ;; Fontify buffer.
-		       (font-lock-ensure)
-		       ;; Remove formatting on newline characters.
-		       (save-excursion
-			 (let ((beg (point-min))
-			       (end (point-max)))
-			   (goto-char beg)
-			   (while (progn (end-of-line) (< (point) end))
-			     (put-text-property (point) (1+ (point)) 'face nil)
-			     (forward-char 1))))
-		       (org-src-mode)
-		       (set-buffer-modified-p nil)
-		       ;; Htmlize region.
-		       (org-html-htmlize-region-for-paste
-			(point-min) (point-max))))
+	  (setq code
+		(let ((parent (current-buffer)))
+		  (with-temp-buffer
+		    ;; Switch to language-specific mode.
+		    (funcall lang-mode)
+		    (insert code)
+		    ;; Fontify buffer.
+		    (font-lock-ensure)
+		    ;; Remove formatting on newline characters.
+		    (save-excursion
+		      (let ((beg (point-min))
+			    (end (point-max)))
+			(goto-char beg)
+			(while (progn (end-of-line) (< (point) end))
+			  (put-text-property (point) (1+ (point)) 'face nil)
+			  (forward-char 1))))
+		    (org-src-mode)
+		    (set-buffer-modified-p nil)
+		    ;; Htmlize region.
+		    (let ((org-html-htmlize-output-type
+			   (buffer-local-value 'org-html-htmlize-output-type parent))
+			  (org-html-htmlize-font-prefix
+			   (buffer-local-value 'org-html-htmlize-font-prefix parent)))
+		      (org-html-htmlize-region-for-paste
+		       (point-min) (point-max))))))
 	  ;; Strip any enclosing <pre></pre> tags.
 	  (let* ((beg (and (string-match "\\`<pre[^>]*>\n*" code) (match-end 0)))
 		 (end (and beg (string-match "</pre>\\'" code))))
-- 
2.5.0


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

* Re: controlling how htmlize fontifies code
  2015-08-04 14:00         ` Rasmus
@ 2015-08-04 15:09           ` Nicolas Goaziou
  2015-08-04 15:21             ` Rasmus
  2015-08-04 16:03             ` Eric S Fraga
  0 siblings, 2 replies; 16+ messages in thread
From: Nicolas Goaziou @ 2015-08-04 15:09 UTC (permalink / raw)
  To: Rasmus; +Cc: emacs-orgmode

Hello,

Rasmus <rasmus@gmx.us> writes:

> Here's a simple fix, 

Thank you.

> though I suspect Nicolas will have a more through solution up his
> sleeve.

Not really, although I would write it like the following instead:

  (let ((output-type org-html-htmlize-output-type)
        (font-prefix org-html-htmlize-font-prefix))
    (with-temp-buffer
      ...
      ;; Htmlize region.
      (let ((org-html-htmlize-output-type output-type)
            (org-html-htmlize-font-prefix font-prefix))
        (org-html-htmlize-region-for-paste
         (point-min) (point-max)))))

> Of course, in org-html--build-head the mysterious :html-htmlized-css-url
> is required so you won't actually get any default colors, which is a bit
> boring in my opinion.  I don't know if I'm misunderstanding
> :html-htmlized-css-url, a bug or something supposed to be set via a
> publish project.

I think there's a bug. `org-org-htmlized-css-url' is defined in
"ox-org.el", but not attached to any info property. So, at the
moment, :html-htmlized-css-url is bogus.


Regards,

-- 
Nicolas Goaziou

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

* Re: controlling how htmlize fontifies code
  2015-08-04 15:09           ` Nicolas Goaziou
@ 2015-08-04 15:21             ` Rasmus
  2015-08-04 18:27               ` Nicolas Goaziou
  2015-08-04 16:03             ` Eric S Fraga
  1 sibling, 1 reply; 16+ messages in thread
From: Rasmus @ 2015-08-04 15:21 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> Not really, although I would write it like the following instead:
>
>   (let ((output-type org-html-htmlize-output-type)
>         (font-prefix org-html-htmlize-font-prefix))
>     (with-temp-buffer
>       ...
>       ;; Htmlize region.
>       (let ((org-html-htmlize-output-type output-type)
>             (org-html-htmlize-font-prefix font-prefix))
>         (org-html-htmlize-region-for-paste
>          (point-min) (point-max)))))

That might be ascetically nicer.

>> Of course, in org-html--build-head the mysterious :html-htmlized-css-url
>> is required so you won't actually get any default colors, which is a bit
>> boring in my opinion.  I don't know if I'm misunderstanding
>> :html-htmlized-css-url, a bug or something supposed to be set via a
>> publish project.
>
> I think there's a bug. `org-org-htmlized-css-url' is defined in
> "ox-org.el", but not attached to any info property. So, at the
> moment, :html-htmlized-css-url is bogus.

Do we have a function that can generate a candidate css file for
org-org-htmlized-css-url or :html-htmlize-css-url?

Rasmus

-- 
Lasciate ogni speranza o voi che entrate: siete nella mani di'machellaio

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

* Re: controlling how htmlize fontifies code
  2015-08-04 15:09           ` Nicolas Goaziou
  2015-08-04 15:21             ` Rasmus
@ 2015-08-04 16:03             ` Eric S Fraga
  1 sibling, 0 replies; 16+ messages in thread
From: Eric S Fraga @ 2015-08-04 16:03 UTC (permalink / raw)
  To: Rasmus; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 879 bytes --]

On Tuesday,  4 Aug 2015 at 17:09, Nicolas Goaziou wrote:

[...]

> Not really, although I would write it like the following instead:
>
>   (let ((output-type org-html-htmlize-output-type)
>         (font-prefix org-html-htmlize-font-prefix))
>     (with-temp-buffer
>       ...
>       ;; Htmlize region.
>       (let ((org-html-htmlize-output-type output-type)
>             (org-html-htmlize-font-prefix font-prefix))
>         (org-html-htmlize-region-for-paste
>          (point-min) (point-max)))))

Thanks Nicolas.  This works!  (diffs attached) At least with the output
type set as a local variable but not with #+bind which is perfectly fine
as local variable use is what I would prefer.

And thank you to Rasmus as well as I would imagine the suggested code
changes would work as well.

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3beta-1315-ga3b2b7

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: t.patch --]
[-- Type: text/x-diff, Size: 1926 bytes --]

diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index d454fab..82e3b76 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -2041,25 +2041,29 @@ is the language used for CODE, as a string, or nil."
 	 ;; Case 2: Default.  Fontify code.
 	 (t
 	  ;; htmlize
-	  (setq code (with-temp-buffer
-		       ;; Switch to language-specific mode.
-		       (funcall lang-mode)
-		       (insert code)
-		       ;; Fontify buffer.
-		       (font-lock-ensure)
-		       ;; Remove formatting on newline characters.
-		       (save-excursion
-			 (let ((beg (point-min))
-			       (end (point-max)))
-			   (goto-char beg)
-			   (while (progn (end-of-line) (< (point) end))
-			     (put-text-property (point) (1+ (point)) 'face nil)
-			     (forward-char 1))))
-		       (org-src-mode)
-		       (set-buffer-modified-p nil)
-		       ;; Htmlize region.
-		       (org-html-htmlize-region-for-paste
-			(point-min) (point-max))))
+	  (let ((output-type org-html-htmlize-output-type)
+		(font-prefix org-html-htmlize-font-prefix))
+	    (setq code (with-temp-buffer
+			 ;; Switch to language-specific mode.
+			 (funcall lang-mode)
+			 (insert code)
+			 ;; Fontify buffer.
+			 (font-lock-ensure)
+			 ;; Remove formatting on newline characters.
+			 (save-excursion
+			   (let ((beg (point-min))
+				 (end (point-max)))
+			     (goto-char beg)
+			     (while (progn (end-of-line) (< (point) end))
+			       (put-text-property (point) (1+ (point)) 'face nil)
+			       (forward-char 1))))
+			 (org-src-mode)
+			 (set-buffer-modified-p nil)
+			 ;; Htmlize region.
+			 (let ((org-html-htmlize-output-type output-type)
+			       (org-html-htmlize-font-prefix font-prefix))
+			   (org-html-htmlize-region-for-paste
+			    (point-min) (point-max))))))
 	  ;; Strip any enclosing <pre></pre> tags.
 	  (let* ((beg (and (string-match "\\`<pre[^>]*>\n*" code) (match-end 0)))
 		 (end (and beg (string-match "</pre>\\'" code))))

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

* Re: controlling how htmlize fontifies code
  2015-08-04 15:21             ` Rasmus
@ 2015-08-04 18:27               ` Nicolas Goaziou
  2015-08-04 18:38                 ` Rasmus
  0 siblings, 1 reply; 16+ messages in thread
From: Nicolas Goaziou @ 2015-08-04 18:27 UTC (permalink / raw)
  To: Rasmus; +Cc: emacs-orgmode

Rasmus <rasmus@gmx.us> writes:

> Do we have a function that can generate a candidate css file for
> org-org-htmlized-css-url or :html-htmlize-css-url?

There is `org-html-htmlize-generate-css'.

Regards,

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

* Re: controlling how htmlize fontifies code
  2015-08-04 18:27               ` Nicolas Goaziou
@ 2015-08-04 18:38                 ` Rasmus
  2015-08-04 18:44                   ` Nicolas Goaziou
  0 siblings, 1 reply; 16+ messages in thread
From: Rasmus @ 2015-08-04 18:38 UTC (permalink / raw)
  To: emacs-orgmode

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> Rasmus <rasmus@gmx.us> writes:
>
>> Do we have a function that can generate a candidate css file for
>> org-org-htmlized-css-url or :html-htmlize-css-url?
>
> There is `org-html-htmlize-generate-css'.

The next question is thus, shouldn't the output of this automatically be
inserted when css instead of inline-css is used?

Rasmus

-- 
I almost cut my hair, it happened just the other day

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

* Re: controlling how htmlize fontifies code
  2015-08-04 18:38                 ` Rasmus
@ 2015-08-04 18:44                   ` Nicolas Goaziou
  0 siblings, 0 replies; 16+ messages in thread
From: Nicolas Goaziou @ 2015-08-04 18:44 UTC (permalink / raw)
  To: Rasmus; +Cc: emacs-orgmode

Rasmus <rasmus@gmx.us> writes:

> Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
>
>> Rasmus <rasmus@gmx.us> writes:
>>
>>> Do we have a function that can generate a candidate css file for
>>> org-org-htmlized-css-url or :html-htmlize-css-url?
>>
>> There is `org-html-htmlize-generate-css'.
>
> The next question is thus, shouldn't the output of this automatically be
> inserted when css instead of inline-css is used?

IIUC, the very existence of `org-org-htmlized-css-url' is because this
function is not reliable when using batch mode or when different authors
use different Emacs themes.

Regards,

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

end of thread, other threads:[~2015-08-04 18:43 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-02  9:24 controlling how htmlize fontifies code Eric S Fraga
2015-08-02 12:17 ` Rasmus
2015-08-03 13:51   ` Eric S Fraga
2015-08-02 13:19 ` Rick Frankel
2015-08-02 13:41   ` Kaushal
2015-08-03 13:50   ` Eric S Fraga
2015-08-03 21:08     ` Rick Frankel
2015-08-04 12:41       ` Eric S Fraga
2015-08-04 13:24       ` Eric S Fraga
2015-08-04 14:00         ` Rasmus
2015-08-04 15:09           ` Nicolas Goaziou
2015-08-04 15:21             ` Rasmus
2015-08-04 18:27               ` Nicolas Goaziou
2015-08-04 18:38                 ` Rasmus
2015-08-04 18:44                   ` Nicolas Goaziou
2015-08-04 16:03             ` Eric S Fraga

Code repositories for project(s) associated with this public inbox

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

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).