emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] allow klipse export in html
@ 2016-12-14 22:44 Matt Price
  2016-12-15  1:25 ` Matt Price
  2016-12-15 13:39 ` Nicolas Goaziou
  0 siblings, 2 replies; 20+ messages in thread
From: Matt Price @ 2016-12-14 22:44 UTC (permalink / raw)
  To: Rasmus; +Cc: bzg, Yehonathan Sharvit, Org Mode


[-- Attachment #1.1: Type: text/plain, Size: 734 bytes --]

I'm such a slow coder that this is all I got to in my free moments
today:patch for defcustoms that inserts the necessary code into a src
block.  further refinements necessary before it works properly; severla
more would be useful for hte improvements that Bastien suggests.


On Wed, Dec 14, 2016 at 12:55 PM, Matt Price <moptop99@gmail.com> wrote:

>
>
>
> On Wed, Dec 14, 2016 at 5:06 AM, Rasmus <rasmus@gmx.us> wrote:
>
>>
>> I don’t know if much more support is needed.  We add some automatic
>> configuration scripting or add a per-block switch for enabling klipse.
>>
>> Two more little things. HTML blocks can't use the standard editor so they
> need an extra attribute `data-editor-style="html"`
>
>
>

[-- Attachment #1.2: Type: text/html, Size: 1413 bytes --]

[-- Attachment #2: 0001-preliminary-support-for-live-preview-of-code-snippet.patch --]
[-- Type: text/x-patch, Size: 2507 bytes --]

From 05cc9948fe65201317a770c2d20cb9202b7d83ce Mon Sep 17 00:00:00 2001
From: Matt Price <matt.price@utoronto.ca>
Date: Wed, 14 Dec 2016 17:37:09 -0500
Subject: [PATCH] preliminary support for live preview of code snippets

Src blocks in supported languages are exported in a REPL which permits
live execution, courtesy of the klipse library.  Defcustom
`org-html-klipsify-src' set to nil by default, controls this
behaviour.
---
 lisp/ox-html.el | 33 ++++++++++++++++++++++++++++++++-
 1 file changed, 32 insertions(+), 1 deletion(-)

diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index 63a8c84..2704f84 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -1548,7 +1548,33 @@ CSS classes, then this prefix can be very useful."
   :group 'org-export-html
   :type 'string)
 
-\f
+(defcustom org-html-klipsify-src nil
+  "Set to non-nil if you would like to make source code blocks editable in exported presentation."
+  :group 'org-export-html
+  :type 'boolean)
+
+(defcustom org-html-klipse-css "https://storage.googleapis.com/app.klipse.tech/css/codemirror.css"
+  "Location of the codemirror css file for use with klipse."
+  :group 'org-export-html
+  :type 'string)
+
+(defcustom org-html-klipse-js "https://storage.googleapis.com/app.klipse.tech/plugin_prod/js/klipse_plugin.min.js"
+  "location of the klipse js source code."
+  :group 'org-export-html
+  :type 'string)
+
+(defcustom org-html-klipse-selection-script
+  "window.klipse_settings = {selector_eval_html: '.src-html',
+                             selector_eval_js: '.src-js',
+                             selector_eval_python_client: '.src-python',
+                             selector_eval_scheme: '.src-scheme',
+                             selector: '.src-clojure',
+                             selector_eval_ruby: '.src-ruby'};"
+  "javascript snippet to activate klipse"
+  :group 'org-export-html
+  :type 'string)
+
+
 ;;; Internal Functions
 
 (defun org-html-xhtml-p (info)
@@ -2041,6 +2067,11 @@ holding export options."
    (format "</%s>\n" (nth 1 (assq 'content (plist-get info :html-divs))))
    ;; Postamble.
    (org-html--build-pre/postamble 'postamble info)
+   ;; klipse library for live code blocks, if requested
+   (if org-html-klipsify-src
+       (concat "<script>"org-html-klipse-selection-script "</script>
+<script src=\"" org-html-klipse-js "\"></script>
+<link rel=\"stylesheet\" type=\"text/css\" href=\"" org-html-klipse-css "\"/>"))
    ;; Closing document.
    "</body>\n</html>"))
 
-- 
2.10.2


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

* Re: [PATCH] allow klipse export in html
  2016-12-14 22:44 [PATCH] allow klipse export in html Matt Price
@ 2016-12-15  1:25 ` Matt Price
  2016-12-15  2:17   ` Bastien Guerry
  2016-12-15 13:39 ` Nicolas Goaziou
  1 sibling, 1 reply; 20+ messages in thread
From: Matt Price @ 2016-12-15  1:25 UTC (permalink / raw)
  To: Rasmus; +Cc: bzg, Yehonathan Sharvit, Org Mode


[-- Attachment #1.1: Type: text/plain, Size: 960 bytes --]

And this second patch adds support for html rendering with klipse.  The
default CSS leaves a little to be desired!


On Wed, Dec 14, 2016 at 5:44 PM, Matt Price <moptop99@gmail.com> wrote:

>
> I'm such a slow coder that this is all I got to in my free moments
> today:patch for defcustoms that inserts the necessary code into a src
> block.  further refinements necessary before it works properly; severla
> more would be useful for hte improvements that Bastien suggests.
>
>
> On Wed, Dec 14, 2016 at 12:55 PM, Matt Price <moptop99@gmail.com> wrote:
>
>>
>>
>>
>> On Wed, Dec 14, 2016 at 5:06 AM, Rasmus <rasmus@gmx.us> wrote:
>>
>>>
>>> I don’t know if much more support is needed.  We add some automatic
>>> configuration scripting or add a per-block switch for enabling klipse.
>>>
>>> Two more little things. HTML blocks can't use the standard editor so
>> they need an extra attribute `data-editor-style="html"`
>>
>>
>>

[-- Attachment #1.2: Type: text/html, Size: 1927 bytes --]

[-- Attachment #2: 0002-Add-basic-support-for-html-rendering.patch --]
[-- Type: text/x-patch, Size: 1835 bytes --]

From 14433dc75b859de880f2cc135415ef6de54efe74 Mon Sep 17 00:00:00 2001
From: Matt Price <matt.price@utoronto.ca>
Date: Wed, 14 Dec 2016 20:15:04 -0500
Subject: [PATCH 2/2] Add basic support for html rendering

Insert 'data-editor-type="html"' into <pre> tag when exporting
klipsified html blocks.
---
 lisp/ox-html.el | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index 2704f84..a9c8b5d 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -3345,11 +3345,13 @@ CONTENTS holds the contents of the item.  INFO is a plist holding
 contextual information."
   (if (org-export-read-attribute :attr_html src-block :textarea)
       (org-html--textarea-block src-block)
-    (let ((lang (org-element-property :language src-block))
+    (let* ((lang (org-element-property :language src-block))
 	  (code (org-html-format-code src-block info))
 	  (label (let ((lbl (and (org-element-property :name src-block)
 				 (org-export-get-reference src-block info))))
-		   (if lbl (format " id=\"%s\"" lbl) ""))))
+		   (if lbl (format " id=\"%s\"" lbl) "")))
+	  (klipsify  (and  org-reveal-klipsify-src
+                           (member lang '("javascript" "js" "ruby" "scheme" "clojure" "php" "html")))))
       (if (not lang) (format "<pre class=\"example\"%s>\n%s</pre>" label code)
 	(format "<div class=\"org-src-container\">\n%s%s\n</div>"
 		;; Build caption.
@@ -3366,8 +3368,8 @@ contextual information."
 			      listing-number
 			      (org-trim (org-export-data caption info))))))
 		;; Contents.
-		(format "<pre class=\"src src-%s\"%s>%s</pre>"
-			lang label code))))))
+		(format "<pre class=\"src src-%s\"%s%s>%s</pre>"
+			lang label (if (and klipsify (string= lang "html"))" data-editor-type=\"html\"" "") code))))))
 
 ;;;; Statistics Cookie
 
-- 
2.10.2


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

* Re: [PATCH] allow klipse export in html
  2016-12-15  1:25 ` Matt Price
@ 2016-12-15  2:17   ` Bastien Guerry
  0 siblings, 0 replies; 20+ messages in thread
From: Bastien Guerry @ 2016-12-15  2:17 UTC (permalink / raw)
  To: Matt Price; +Cc: Yehonathan Sharvit, Org Mode, Rasmus

Matt Price <moptop99@gmail.com> writes:

> And this second patch adds support for html rendering with klipse. 
> The default CSS leaves a little to be desired!

Thanks for both patches -- I think the second one should use
`org-html-klipsify-src' instead of `org-reveal-klipsify-src'
but besides that, I'm pretty sure we cannot link to a js library that
does not pass the js tests.

I will ask on emacs-devel.

Thanks!

-- 
 Bastien

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

* Re: [PATCH] allow klipse export in html
  2016-12-14 22:44 [PATCH] allow klipse export in html Matt Price
  2016-12-15  1:25 ` Matt Price
@ 2016-12-15 13:39 ` Nicolas Goaziou
  2016-12-15 14:42   ` Matt Price
  1 sibling, 1 reply; 20+ messages in thread
From: Nicolas Goaziou @ 2016-12-15 13:39 UTC (permalink / raw)
  To: Matt Price; +Cc: bzg, Yehonathan Sharvit, Org Mode, Rasmus

Hello,

Matt Price <moptop99@gmail.com> writes:

> I'm such a slow coder that this is all I got to in my free moments
> today:patch for defcustoms that inserts the necessary code into a src
> block.  further refinements necessary before it works properly; severla
> more would be useful for hte improvements that Bastien suggests.

Thank you. Some comments follow.

> +(defcustom org-html-klipsify-src nil
> +  "Set to non-nil if you would like to make source code blocks editable in exported presentation."

When non-nil, source code blocks are editable in exported presentation.

> +  :group 'org-export-html
> +  :type 'boolean)

:version :package-version keywords are missing.

> +(defcustom org-html-klipse-css "https://storage.googleapis.com/app.klipse.tech/css/codemirror.css"
> +  "Location of the codemirror css file for use with klipse."

css -> CSS

> +  :group 'org-export-html
> +  :type 'string)

See above.

> +(defcustom org-html-klipse-js "https://storage.googleapis.com/app.klipse.tech/plugin_prod/js/klipse_plugin.min.js"
> +  "location of the klipse js source code."

Location of the klipse javascript source code.

> +  :group 'org-export-html
> +  :type 'string)

See above.

> +(defcustom org-html-klipse-selection-script
> +  "window.klipse_settings = {selector_eval_html: '.src-html',
> +                             selector_eval_js: '.src-js',
> +                             selector_eval_python_client: '.src-python',
> +                             selector_eval_scheme: '.src-scheme',
> +                             selector: '.src-clojure',
> +                             selector_eval_ruby: '.src-ruby'};"
> +  "javascript snippet to activate klipse"

Javascript snippet to activate klipse.

> +  :group 'org-export-html
> +  :type 'string)

See above.

> +   ;; klipse library for live code blocks, if requested
> +   (if org-html-klipsify-src

You shouldn't use `org-html-klipsify-src' directly in the code, but
instead "register" it in the back-end and call

  (plist-get info :html-klipsify-src)

See other defcustoms.

The new property also needs to be documented in "org.texi", in
Publishing directory.

Regards,

-- 
Nicolas Goaziou

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

* Re: [PATCH] allow klipse export in html
  2016-12-15 13:39 ` Nicolas Goaziou
@ 2016-12-15 14:42   ` Matt Price
  2016-12-15 14:50     ` Kaushal Modi
  2016-12-15 14:56     ` Matt Price
  0 siblings, 2 replies; 20+ messages in thread
From: Matt Price @ 2016-12-15 14:42 UTC (permalink / raw)
  To: Matt Price, Rasmus, Bastien Guerry, Yehonathan Sharvit, Org Mode

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

On Thu, Dec 15, 2016 at 8:39 AM, Nicolas Goaziou <mail@nicolasgoaziou.fr>
wrote:

> Hello,
>
> Matt Price <moptop99@gmail.com> writes:
>
> > I'm such a slow coder that this is all I got to in my free moments
> > today:patch for defcustoms that inserts the necessary code into a src
> > block.  further refinements necessary before it works properly; severla
> > more would be useful for hte improvements that Bastien suggests.
>
> Thank you. Some comments follow.
>
> > +(defcustom org-html-klipsify-src nil
> > +  "Set to non-nil if you would like to make source code blocks editable
> in exported presentation."
>
> When non-nil, source code blocks are editable in exported presentation.
>
> > +  :group 'org-export-html
> > +  :type 'boolean)
>
> :version :package-version keywords are missing.
>
> > +(defcustom org-html-klipse-css "https://storage.googleapis.
> com/app.klipse.tech/css/codemirror.css"
> > +  "Location of the codemirror css file for use with klipse."
>
> css -> CSS
>
> > +  :group 'org-export-html
> > +  :type 'string)
>
> See above.
>
> > +(defcustom org-html-klipse-js "https://storage.googleapis.
> com/app.klipse.tech/plugin_prod/js/klipse_plugin.min.js"
> > +  "location of the klipse js source code."
>
> Location of the klipse javascript source code.
>
> > +  :group 'org-export-html
> > +  :type 'string)
>
> See above.
>
> > +(defcustom org-html-klipse-selection-script
> > +  "window.klipse_settings = {selector_eval_html: '.src-html',
> > +                             selector_eval_js: '.src-js',
> > +                             selector_eval_python_client: '.src-python',
> > +                             selector_eval_scheme: '.src-scheme',
> > +                             selector: '.src-clojure',
> > +                             selector_eval_ruby: '.src-ruby'};"
> > +  "javascript snippet to activate klipse"
>
> Javascript snippet to activate klipse.
>
> > +  :group 'org-export-html
> > +  :type 'string)
>
> See above.
>
> > +   ;; klipse library for live code blocks, if requested
> > +   (if org-html-klipsify-src
>
> You shouldn't use `org-html-klipsify-src' directly in the code, but
> instead "register" it in the back-end and call
>
>   (plist-get info :html-klipsify-src)
>
> See other defcustoms.
>

The new, attached patch hopefully addresses the above concerns. S

>
> The new property also needs to be documented in "org.texi", in
> Publishing directory.
>

I took a look at org.texi but my understanding of texi syntax is very poor
and I don't think I have time to learn today. Bastien, would you be willing
to take that on? Also, if you have thoughts on customizing the selection
script I'd welcome them.

Yehonathan: can klipse_settings[selector] take multiple css classes, in
case we need to be able to accommodate customizing it?


>
> Regards,
>
> --
> Nicolas Goaziou
>

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

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

* Re: [PATCH] allow klipse export in html
  2016-12-15 14:42   ` Matt Price
@ 2016-12-15 14:50     ` Kaushal Modi
  2016-12-15 14:57       ` Matt Price
  2016-12-15 14:56     ` Matt Price
  1 sibling, 1 reply; 20+ messages in thread
From: Kaushal Modi @ 2016-12-15 14:50 UTC (permalink / raw)
  To: Matt Price, Rasmus, Bastien Guerry, Yehonathan Sharvit, Org Mode

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

On Thu, Dec 15, 2016, 8:14 PM Matt Price <moptop99@gmail.com> wrote:

>
> I took a look at org.texi but my understanding of texi syntax is very poor
> and I don't think I have time to learn today.
>

Why not write the new sections in org mode, and then export to texi? :)

-- 

Kaushal Modi

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

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

* Re: [PATCH] allow klipse export in html
  2016-12-15 14:42   ` Matt Price
  2016-12-15 14:50     ` Kaushal Modi
@ 2016-12-15 14:56     ` Matt Price
  2016-12-15 15:35       ` Bastien Guerry
  1 sibling, 1 reply; 20+ messages in thread
From: Matt Price @ 2016-12-15 14:56 UTC (permalink / raw)
  To: Matt Price, Rasmus, Bastien Guerry, Yehonathan Sharvit, Org Mode


[-- Attachment #1.1: Type: text/plain, Size: 3164 bytes --]

(actually attaching the patch)
(seemed silly to have a whole bunch of tiny patches but can resubmit as a
series if that's preferred).

On Thu, Dec 15, 2016 at 9:42 AM, Matt Price <moptop99@gmail.com> wrote:

>
>
> On Thu, Dec 15, 2016 at 8:39 AM, Nicolas Goaziou <mail@nicolasgoaziou.fr>
> wrote:
>
>> Hello,
>>
>> Matt Price <moptop99@gmail.com> writes:
>>
>> > I'm such a slow coder that this is all I got to in my free moments
>> > today:patch for defcustoms that inserts the necessary code into a src
>> > block.  further refinements necessary before it works properly; severla
>> > more would be useful for hte improvements that Bastien suggests.
>>
>> Thank you. Some comments follow.
>>
>> > +(defcustom org-html-klipsify-src nil
>> > +  "Set to non-nil if you would like to make source code blocks
>> editable in exported presentation."
>>
>> When non-nil, source code blocks are editable in exported presentation.
>>
>> > +  :group 'org-export-html
>> > +  :type 'boolean)
>>
>> :version :package-version keywords are missing.
>>
>> > +(defcustom org-html-klipse-css "https://storage.googleapis.co
>> m/app.klipse.tech/css/codemirror.css"
>> > +  "Location of the codemirror css file for use with klipse."
>>
>> css -> CSS
>>
>> > +  :group 'org-export-html
>> > +  :type 'string)
>>
>> See above.
>>
>> > +(defcustom org-html-klipse-js "https://storage.googleapis.co
>> m/app.klipse.tech/plugin_prod/js/klipse_plugin.min.js"
>> > +  "location of the klipse js source code."
>>
>> Location of the klipse javascript source code.
>>
>> > +  :group 'org-export-html
>> > +  :type 'string)
>>
>> See above.
>>
>> > +(defcustom org-html-klipse-selection-script
>> > +  "window.klipse_settings = {selector_eval_html: '.src-html',
>> > +                             selector_eval_js: '.src-js',
>> > +                             selector_eval_python_client:
>> '.src-python',
>> > +                             selector_eval_scheme: '.src-scheme',
>> > +                             selector: '.src-clojure',
>> > +                             selector_eval_ruby: '.src-ruby'};"
>> > +  "javascript snippet to activate klipse"
>>
>> Javascript snippet to activate klipse.
>>
>> > +  :group 'org-export-html
>> > +  :type 'string)
>>
>> See above.
>>
>> > +   ;; klipse library for live code blocks, if requested
>> > +   (if org-html-klipsify-src
>>
>> You shouldn't use `org-html-klipsify-src' directly in the code, but
>> instead "register" it in the back-end and call
>>
>>   (plist-get info :html-klipsify-src)
>>
>> See other defcustoms.
>>
>
> The new, attached patch hopefully addresses the above concerns. S
>
>>
>> The new property also needs to be documented in "org.texi", in
>> Publishing directory.
>>
>
> I took a look at org.texi but my understanding of texi syntax is very poor
> and I don't think I have time to learn today. Bastien, would you be willing
> to take that on? Also, if you have thoughts on customizing the selection
> script I'd welcome them.
>
> Yehonathan: can klipse_settings[selector] take multiple css classes, in
> case we need to be able to accommodate customizing it?
>
>
>>
>> Regards,
>>
>> --
>> Nicolas Goaziou
>>
>
>

[-- Attachment #1.2: Type: text/html, Size: 5112 bytes --]

[-- Attachment #2: 0001-Conform-to-Org-coding-standards-and-add-backwards-co.patch --]
[-- Type: text/x-patch, Size: 4759 bytes --]

From 333f2d02058a8c6412087371195ca0de9a8377cb Mon Sep 17 00:00:00 2001
From: Matt Price <matt.price@utoronto.ca>
Date: Thu, 15 Dec 2016 09:24:27 -0500
Subject: [PATCH] Conform to Org coding standards, and add backwards
 compatibility

Use new defcustoms appropriately, add package-version information, and
permit users to prefer old <pre></pre> syntax instead of new
<pre><code></code></pre>.
---
 lisp/ox-html.el | 35 ++++++++++++++++++++++++++---------
 1 file changed, 26 insertions(+), 9 deletions(-)

diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index a9c8b5d..5d2e4c3 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -170,6 +170,11 @@
     (:html-table-row-open-tag nil nil org-html-table-row-open-tag)
     (:html-table-row-close-tag nil nil org-html-table-row-close-tag)
     (:html-xml-declaration nil nil org-html-xml-declaration)
+    (:html-klipsify-src nil nil org-html-klipsify-src)
+    (:html-klipse-css nil nil org-html-klipse-css)
+    (:html-klipse-js nil nil org-html-klipse-js)
+    (:html-klipse-keep-old-src nil nil org-html-keep-old-src)
+    (:html-klipse-selection-script nil nil org-html-klipse-selection-script)
     (:infojs-opt "INFOJS_OPT" nil nil)
     ;; Redefine regular options.
     (:creator "CREATOR" nil org-html-creator-string)
@@ -1549,18 +1554,21 @@ CSS classes, then this prefix can be very useful."
   :type 'string)
 
 (defcustom org-html-klipsify-src nil
-  "Set to non-nil if you would like to make source code blocks editable in exported presentation."
+  "When non-nil, source code blocks are editable in exported presentation."
   :group 'org-export-html
+  :package-version '(Org . "9.1")
   :type 'boolean)
 
 (defcustom org-html-klipse-css "https://storage.googleapis.com/app.klipse.tech/css/codemirror.css"
-  "Location of the codemirror css file for use with klipse."
+  "Location of the codemirror CSS file for use with klipse."
   :group 'org-export-html
+  :package-version '(Org . "9.1")
   :type 'string)
 
 (defcustom org-html-klipse-js "https://storage.googleapis.com/app.klipse.tech/plugin_prod/js/klipse_plugin.min.js"
-  "location of the klipse js source code."
+  "Location of the klipse js source code."
   :group 'org-export-html
+  :package-version '(Org . "9.1")
   :type 'string)
 
 (defcustom org-html-klipse-selection-script
@@ -1570,10 +1578,17 @@ CSS classes, then this prefix can be very useful."
                              selector_eval_scheme: '.src-scheme',
                              selector: '.src-clojure',
                              selector_eval_ruby: '.src-ruby'};"
-  "javascript snippet to activate klipse"
+  "JAvascript snippet to activate klipse"
   :group 'org-export-html
+  :package-version '(Org . "9.1")
   :type 'string)
 
+(defcustom org-html-keep-old-src nil
+  "When non-nil, preserve old <pre class=\"\" syntax in favour of the new, 
+more widely used <pre><code class=\"\" synatax. "
+  :group 'org-export-html
+  :package-version '(Org . "9.1")
+  :type 'boolean)
 
 ;;; Internal Functions
 
@@ -2068,8 +2083,8 @@ holding export options."
    ;; Postamble.
    (org-html--build-pre/postamble 'postamble info)
    ;; klipse library for live code blocks, if requested
-   (if org-html-klipsify-src
-       (concat "<script>"org-html-klipse-selection-script "</script>
+   (if (plist-get info :html-klipsify-src)
+       (concat "<script>" (plist-get info :html-klipse-selection-script)  "</script>
 <script src=\"" org-html-klipse-js "\"></script>
 <link rel=\"stylesheet\" type=\"text/css\" href=\"" org-html-klipse-css "\"/>"))
    ;; Closing document.
@@ -3350,7 +3365,7 @@ contextual information."
 	  (label (let ((lbl (and (org-element-property :name src-block)
 				 (org-export-get-reference src-block info))))
 		   (if lbl (format " id=\"%s\"" lbl) "")))
-	  (klipsify  (and  org-reveal-klipsify-src
+	  (klipsify  (and  (plist-get info :html-klipsify-src)
                            (member lang '("javascript" "js" "ruby" "scheme" "clojure" "php" "html")))))
       (if (not lang) (format "<pre class=\"example\"%s>\n%s</pre>" label code)
 	(format "<div class=\"org-src-container\">\n%s%s\n</div>"
@@ -3368,8 +3383,10 @@ contextual information."
 			      listing-number
 			      (org-trim (org-export-data caption info))))))
 		;; Contents.
-		(format "<pre class=\"src src-%s\"%s%s>%s</pre>"
-			lang label (if (and klipsify (string= lang "html"))" data-editor-type=\"html\"" "") code))))))
+		(let ((open (if org-html-keep-old-src "<pre" "<pre><code"))
+		      (close (if org-html-keep-old-src "</pre>" "</code></pre>")))
+		  (format "%s class=\"src src-%s\"%s%s>%s%s"
+			  open lang label (if (and klipsify (string= lang "html"))" data-editor-type=\"html\"" "") code close)))))))
 
 ;;;; Statistics Cookie
 
-- 
2.10.2


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

* Re: [PATCH] allow klipse export in html
  2016-12-15 14:50     ` Kaushal Modi
@ 2016-12-15 14:57       ` Matt Price
  0 siblings, 0 replies; 20+ messages in thread
From: Matt Price @ 2016-12-15 14:57 UTC (permalink / raw)
  To: Kaushal Modi; +Cc: Bastien Guerry, Yehonathan Sharvit, Org Mode, Rasmus

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

On Thu, Dec 15, 2016 at 9:50 AM, Kaushal Modi <kaushal.modi@gmail.com>
wrote:

> On Thu, Dec 15, 2016, 8:14 PM Matt Price <moptop99@gmail.com> wrote:
>
>>
>> I took a look at org.texi but my understanding of texi syntax is very
>> poor and I don't think I have time to learn today.
>>
>
> Why not write the new sections in org mode, and then export to texi? :)
>

Oh.  Right!!

Why isn't there an org.org source document??

In the middle of a sort of viral explosion around something happening on
Saturday, so might be a while before I do this.

>
> --
>
> Kaushal Modi
>

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

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

* Re: [PATCH] allow klipse export in html
  2016-12-15 14:56     ` Matt Price
@ 2016-12-15 15:35       ` Bastien Guerry
  2016-12-16  5:34         ` Yehonathan Sharvit
  0 siblings, 1 reply; 20+ messages in thread
From: Bastien Guerry @ 2016-12-15 15:35 UTC (permalink / raw)
  To: Matt Price; +Cc: Yehonathan Sharvit, Org Mode, Rasmus

Hi Matt,

thanks for the new patch!

Before applying it (and working further on it), I suggest we wait for
Yehonathan's feedback on making klipse.js librejs-compatible.  That's
possibly a blocking issue, and we need to sort it out.

Thanks!

-- 
 Bastien

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

* Re: [PATCH] allow klipse export in html
  2016-12-15 15:35       ` Bastien Guerry
@ 2016-12-16  5:34         ` Yehonathan Sharvit
  2016-12-16  9:36           ` Bastien
  2016-12-16 13:26           ` Matt Price
  0 siblings, 2 replies; 20+ messages in thread
From: Yehonathan Sharvit @ 2016-12-16  5:34 UTC (permalink / raw)
  To: Bastien Guerry; +Cc: Org Mode, Rasmus

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

On Thu, Dec 15, 2016 at 5:35 PM, Bastien Guerry <bzg@bzg.fr> wrote:

> Hi Matt,
>
> thanks for the new patch!
>
> Before applying it (and working further on it), I suggest we wait for
> Yehonathan's feedback on making klipse.js librejs-compatible.  That's
> possibly a blocking issue, and we need to sort it out.
>
> ​I've added license info to make klipse.js librejs-compatible: both
mininified and non minified versions.

What else do you need from me?

​


> Thanks!
>
> --
>  Bastien
>

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

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

* Re: [PATCH] allow klipse export in html
  2016-12-16  5:34         ` Yehonathan Sharvit
@ 2016-12-16  9:36           ` Bastien
  2016-12-16 13:26           ` Matt Price
  1 sibling, 0 replies; 20+ messages in thread
From: Bastien @ 2016-12-16  9:36 UTC (permalink / raw)
  To: Yehonathan Sharvit; +Cc: Org Mode, Rasmus

Hi Yehonathan,

Yehonathan Sharvit <viebel@gmail.com> writes:

> ​I've added license info to make klipse.js librejs-compatible: both
> mininified and non minified versions.
>
> What else do you need from me?

Nothing really, we can move forward on our side.

Thanks a lot for your swift action on this!

-- 
 Bastien

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

* Re: [PATCH] allow klipse export in html
  2016-12-16  5:34         ` Yehonathan Sharvit
  2016-12-16  9:36           ` Bastien
@ 2016-12-16 13:26           ` Matt Price
       [not found]             ` <87y3zfg6p7.fsf@bzg.fr>
  1 sibling, 1 reply; 20+ messages in thread
From: Matt Price @ 2016-12-16 13:26 UTC (permalink / raw)
  To: Yehonathan Sharvit; +Cc: Bastien Guerry, Org Mode, Rasmus

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

On Fri, Dec 16, 2016 at 12:34 AM, Yehonathan Sharvit <viebel@gmail.com>
wrote:

>
>
> On Thu, Dec 15, 2016 at 5:35 PM, Bastien Guerry <bzg@bzg.fr> wrote:
>
>> Hi Matt,
>>
>> thanks for the new patch!
>>
>> Before applying it (and working further on it), I suggest we wait for
>> Yehonathan's feedback on making klipse.js librejs-compatible.  That's
>> possibly a blocking issue, and we need to sort it out.
>>
>> ​I've added license info to make klipse.js librejs-compatible: both
> mininified and non minified versions.
>
> What else do you need from me?
>
> Thanks!
Bastien: what more do you need from /me/? I am extremely busy for the next
couple of days but would like to help see this through before, say,
Christmas if I can.

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

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

* Re: [PATCH] allow klipse export in html
       [not found]                                               ` <CAN_Dec_SMD4mmwhE2FomC0_=w8JMvctjUGL2Z56xLdt2r8M_kQ@mail.gmail.com>
@ 2017-03-09 15:18                                                 ` Matt Price
  2017-03-21 23:33                                                   ` Matt Price
  2017-03-23 22:25                                                   ` Bastien Guerry
  0 siblings, 2 replies; 20+ messages in thread
From: Matt Price @ 2017-03-09 15:18 UTC (permalink / raw)
  To: Bastien Guerry, Org Mode; +Cc: Yehonathan Sharvit, Rasmus

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

Hi Bastien,

Just pinging on this. If the answer is no, that's fine; otherwise I'd love
to get this merged so I can stop monkey-patching every time I update org :-)

On Mon, Jan 30, 2017 at 11:04 PM, Matt Price <moptop99@gmail.com> wrote:

> Hi Bastien, I thought I'd just check in on this again. Thanks!
>
> Matt
>
>
> On Mon, Jan 16, 2017 at 1:35 AM, Bastien Guerry <bzg@bzg.fr> wrote:
>
>> Hi Matt,
>>
>> Matt Price <moptop99@gmail.com> writes:
>>
>> > Hi Bastien, is there anything I can do to help get this accepted? one
>> > it is in ox-html I would like to submit a patch to ox-reveal so the
>> > same mechanism can be used there. thanks!
>>
>> everything is ready, it's just that I need some time.  I *do* have
>> some this week, don't worry.
>>
>> Thanks for your patience,
>>
>> --
>>  Bastien
>>
>
>

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

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

* Re: [PATCH] allow klipse export in html
  2017-03-09 15:18                                                 ` Matt Price
@ 2017-03-21 23:33                                                   ` Matt Price
  2017-03-22  6:13                                                     ` Bastien Guerry
  2017-03-23 22:25                                                   ` Bastien Guerry
  1 sibling, 1 reply; 20+ messages in thread
From: Matt Price @ 2017-03-21 23:33 UTC (permalink / raw)
  To: Bastien Guerry, Org Mode; +Cc: Yehonathan Sharvit, Rasmus

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

Hi Bastien,
checking again to see if there's any movement on this. I can also repatch
against master.

m

On Thu, Mar 9, 2017 at 10:18 AM, Matt Price <moptop99@gmail.com> wrote:

> Hi Bastien,
>
> Just pinging on this. If the answer is no, that's fine; otherwise I'd love
> to get this merged so I can stop monkey-patching every time I update org :-)
>
> On Mon, Jan 30, 2017 at 11:04 PM, Matt Price <moptop99@gmail.com> wrote:
>
>> Hi Bastien, I thought I'd just check in on this again. Thanks!
>>
>> Matt
>>
>>
>> On Mon, Jan 16, 2017 at 1:35 AM, Bastien Guerry <bzg@bzg.fr> wrote:
>>
>>> Hi Matt,
>>>
>>> Matt Price <moptop99@gmail.com> writes:
>>>
>>> > Hi Bastien, is there anything I can do to help get this accepted? one
>>> > it is in ox-html I would like to submit a patch to ox-reveal so the
>>> > same mechanism can be used there. thanks!
>>>
>>> everything is ready, it's just that I need some time.  I *do* have
>>> some this week, don't worry.
>>>
>>> Thanks for your patience,
>>>
>>> --
>>>  Bastien
>>>
>>
>>
>

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

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

* Re: [PATCH] allow klipse export in html
  2017-03-21 23:33                                                   ` Matt Price
@ 2017-03-22  6:13                                                     ` Bastien Guerry
  0 siblings, 0 replies; 20+ messages in thread
From: Bastien Guerry @ 2017-03-22  6:13 UTC (permalink / raw)
  To: Matt Price; +Cc: Yehonathan Sharvit, Org Mode, Rasmus

Hi Matt,

Matt Price <moptop99@gmail.com> writes:

> checking again to see if there's any movement on this. I can also
> repatch against master.

well, my bad.  Enough is enough, I will review and commit this today,
sorry for the delay.

-- 
 Bastien

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

* Re: [PATCH] allow klipse export in html
  2017-03-09 15:18                                                 ` Matt Price
  2017-03-21 23:33                                                   ` Matt Price
@ 2017-03-23 22:25                                                   ` Bastien Guerry
  2017-03-24 11:15                                                     ` Matt Price
  1 sibling, 1 reply; 20+ messages in thread
From: Bastien Guerry @ 2017-03-23 22:25 UTC (permalink / raw)
  To: Matt Price; +Cc: Yehonathan Sharvit, Org Mode, Rasmus

Hi Matt,

I finally committed this.  Sorry it took so long and thanks
again for the patch!

Best,

-- 
 Bastien

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

* Re: [PATCH] allow klipse export in html
  2017-03-23 22:25                                                   ` Bastien Guerry
@ 2017-03-24 11:15                                                     ` Matt Price
  2017-03-24 11:19                                                       ` Yehonathan Sharvit
  0 siblings, 1 reply; 20+ messages in thread
From: Matt Price @ 2017-03-24 11:15 UTC (permalink / raw)
  To: Bastien Guerry; +Cc: Yehonathan Sharvit, Org Mode, Rasmus

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

Yay! Thank you!

On Mar 23, 2017 6:25 PM, "Bastien Guerry" <bzg@bzg.fr> wrote:

> Hi Matt,
>
> I finally committed this.  Sorry it took so long and thanks
> again for the patch!
>
> Best,
>
> --
>  Bastien
>

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

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

* Re: [PATCH] allow klipse export in html
  2017-03-24 11:15                                                     ` Matt Price
@ 2017-03-24 11:19                                                       ` Yehonathan Sharvit
  2017-03-24 13:00                                                         ` Bastien Guerry
  2017-03-29 20:46                                                         ` Kaushal Modi
  0 siblings, 2 replies; 20+ messages in thread
From: Yehonathan Sharvit @ 2017-03-24 11:19 UTC (permalink / raw)
  To: Matt Price, Bastien Guerry; +Cc: Org Mode, Rasmus

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

Good news. Where is the commit?

On Fri, Mar 24, 2017, 14:15 Matt Price <moptop99@gmail.com> wrote:

> Yay! Thank you!
>
> On Mar 23, 2017 6:25 PM, "Bastien Guerry" <bzg@bzg.fr> wrote:
>
> Hi Matt,
>
> I finally committed this.  Sorry it took so long and thanks
> again for the patch!
>
> Best,
>
> --
>  Bastien
>
>

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

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

* Re: [PATCH] allow klipse export in html
  2017-03-24 11:19                                                       ` Yehonathan Sharvit
@ 2017-03-24 13:00                                                         ` Bastien Guerry
  2017-03-29 20:46                                                         ` Kaushal Modi
  1 sibling, 0 replies; 20+ messages in thread
From: Bastien Guerry @ 2017-03-24 13:00 UTC (permalink / raw)
  To: Yehonathan Sharvit; +Cc: Org Mode, Rasmus

Hi Yehonathan,

Yehonathan Sharvit <viebel@gmail.com> writes:

> Good news. Where is the commit?

Here : http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=d5bbf3

-- 
 Bastien

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

* Re: [PATCH] allow klipse export in html
  2017-03-24 11:19                                                       ` Yehonathan Sharvit
  2017-03-24 13:00                                                         ` Bastien Guerry
@ 2017-03-29 20:46                                                         ` Kaushal Modi
  1 sibling, 0 replies; 20+ messages in thread
From: Kaushal Modi @ 2017-03-29 20:46 UTC (permalink / raw)
  To: Yehonathan Sharvit, Matt Price, Bastien Guerry; +Cc: Org Mode, Rasmus

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

On Wed, Mar 29, 2017 at 3:18 PM Yehonathan Sharvit <viebel@gmail.com> wrote:

> Good news. Where is the commit?


It's in the master branch:
http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=d5bbf365533ba45d72ebed8121c7612c860ea944

-- 

Kaushal Modi

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

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

end of thread, other threads:[~2017-03-29 20:46 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-14 22:44 [PATCH] allow klipse export in html Matt Price
2016-12-15  1:25 ` Matt Price
2016-12-15  2:17   ` Bastien Guerry
2016-12-15 13:39 ` Nicolas Goaziou
2016-12-15 14:42   ` Matt Price
2016-12-15 14:50     ` Kaushal Modi
2016-12-15 14:57       ` Matt Price
2016-12-15 14:56     ` Matt Price
2016-12-15 15:35       ` Bastien Guerry
2016-12-16  5:34         ` Yehonathan Sharvit
2016-12-16  9:36           ` Bastien
2016-12-16 13:26           ` Matt Price
     [not found]             ` <87y3zfg6p7.fsf@bzg.fr>
     [not found]               ` <CAN_Dec9Ocfx+y1p0BqV4_ZwcLxUXb5g2XaU24RiWWGKgDVjiEA@mail.gmail.com>
     [not found]                 ` <87inqf15zz.fsf@bzg.fr>
     [not found]                   ` <CAMwuZb6LCGXsqLTVxziKRzgwrh-TVa1RqqKjqYnm6VO_pZ1yGQ@mail.gmail.com>
     [not found]                     ` <8760mf14yj.fsf@bzg.fr>
     [not found]                       ` <8737hij3an.fsf@gmx.us>
     [not found]                         ` <87pokmzm3x.fsf@bzg.fr>
     [not found]                           ` <CAN_Dec8GaKFKuyPg+s9LAxoVs4JTFJhDTk-b+s1wBghvVAOrFw@mail.gmail.com>
     [not found]                             ` <87h95yzik8.fsf@bzg.fr>
     [not found]                               ` <CAN_Dec-QZ5yHaeHY+XuPpDj6e_CbBA7qXUYmBRGddFmRK+CGMg@mail.gmail.com>
     [not found]                                 ` <87y3z9wszz.fsf@bzg.fr>
     [not found]                                   ` <877f6th05m.fsf@gmx.us>
     [not found]                                     ` <CAN_Dec9zthpWhS0z6GTgpDzQcja8A97BpDDXcqKEx3AwuXVoNg@mail.gmail.com>
     [not found]                                       ` <87zij7tgy7.fsf@bzg.fr>
     [not found]                                         ` <CAN_Dec93XtySLpYozbMMwnRB+gQtT-jDapo7CeV0k2JYfbUvdA@mail.gmail.com>
     [not found]                                           ` <CAN_Dec8Gb7N_ZpLKn+iDw6DCVgjRrWxYrOe=hRqOD_N93FMO1A@mail.gmail.com>
     [not found]                                             ` <87ziir3427.fsf@bzg.fr>
     [not found]                                               ` <CAN_Dec_SMD4mmwhE2FomC0_=w8JMvctjUGL2Z56xLdt2r8M_kQ@mail.gmail.com>
2017-03-09 15:18                                                 ` Matt Price
2017-03-21 23:33                                                   ` Matt Price
2017-03-22  6:13                                                     ` Bastien Guerry
2017-03-23 22:25                                                   ` Bastien Guerry
2017-03-24 11:15                                                     ` Matt Price
2017-03-24 11:19                                                       ` Yehonathan Sharvit
2017-03-24 13:00                                                         ` Bastien Guerry
2017-03-29 20:46                                                         ` Kaushal Modi

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