Re: [O] [PATCH] allow klipse export in html
On Wed, Mar 29, 2017 at 3:18 PM Yehonathan Sharvitwrote: > 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
Re: [O] [PATCH] allow klipse export in html
Good news. Where is the commit? On Fri, Mar 24, 2017, 14:15 Matt Pricewrote: > Yay! Thank you! > > On Mar 23, 2017 6:25 PM, "Bastien Guerry" wrote: > > Hi Matt, > > I finally committed this. Sorry it took so long and thanks > again for the patch! > > Best, > > -- > Bastien > >
Re: [O] [PATCH] allow klipse export in html
Hi Yehonathan, Yehonathan Sharvitwrites: > Good news. Where is the commit? Here : http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=d5bbf3 -- Bastien
Re: [O] [PATCH] allow klipse export in html
Yay! Thank you! On Mar 23, 2017 6:25 PM, "Bastien Guerry"wrote: > Hi Matt, > > I finally committed this. Sorry it took so long and thanks > again for the patch! > > Best, > > -- > Bastien >
Re: [O] [PATCH] allow klipse export in html
Hi Matt, I finally committed this. Sorry it took so long and thanks again for the patch! Best, -- Bastien
Re: [O] [PATCH] allow klipse export in html
Hi Matt, Matt Pricewrites: > 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
Re: [O] [PATCH] allow klipse export in html
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 Pricewrote: > 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 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 wrote: >> >>> Hi Matt, >>> >>> Matt Price 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 >>> >> >> >
Re: [O] [PATCH] allow klipse export in html
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 Pricewrote: > 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 wrote: > >> Hi Matt, >> >> Matt Price 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 >> > >
Re: [O] [PATCH] allow klipse export in html
On Fri, Dec 16, 2016 at 12:34 AM, Yehonathan Sharvitwrote: > > > On Thu, Dec 15, 2016 at 5:35 PM, Bastien Guerry 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.
Re: [O] [PATCH] allow klipse export in html
Hi Yehonathan, Yehonathan Sharvitwrites: > 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
Re: [O] [PATCH] allow klipse export in html
On Thu, Dec 15, 2016 at 5:35 PM, Bastien Guerrywrote: > 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 >
Re: [O] [PATCH] allow klipse export in html
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
Re: [O] [PATCH] allow klipse export in html
On Thu, Dec 15, 2016 at 9:50 AM, Kaushal Modiwrote: > On Thu, Dec 15, 2016, 8:14 PM Matt Price 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 >
Re: [O] [PATCH] allow klipse export in html
On Thu, Dec 15, 2016 at 8:39 AM, Nicolas Goaziouwrote: > Hello, > > Matt Price 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 >
Re: [O] [PATCH] allow klipse export in html
Hello, Matt Pricewrites: > 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
Re: [O] [PATCH] allow klipse export in html
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 Pricewrote: > > 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 wrote: > >> >> >> >> On Wed, Dec 14, 2016 at 5:06 AM, Rasmus 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"` >> >> >> From 14433dc75b859de880f2cc135415ef6de54efe74 Mon Sep 17 00:00:00 2001 From: Matt Price 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 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 "\n%s" label code) (format "\n%s%s\n" ;; Build caption. @@ -3366,8 +3368,8 @@ contextual information." listing-number (org-trim (org-export-data caption info)) ;; Contents. - (format "%s" - lang label code)) + (format "%s" + lang label (if (and klipsify (string= lang "html"))" data-editor-type=\"html\"" "") code)) Statistics Cookie -- 2.10.2
Re: [O] [PATCH] allow klipse export in html
Matt Pricewrites: > 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