From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Price Subject: Re: [PATCH] allow klipse export in html Date: Thu, 15 Dec 2016 09:42:08 -0500 Message-ID: References: <8737hp71mt.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a1141cb5441633a0543b37589 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59993) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cHXFa-0000cm-EX for emacs-orgmode@gnu.org; Thu, 15 Dec 2016 09:43:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cHXFW-0004if-4G for emacs-orgmode@gnu.org; Thu, 15 Dec 2016 09:43:14 -0500 Received: from mail-io0-f177.google.com ([209.85.223.177]:36374) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cHXFV-0004iU-T3 for emacs-orgmode@gnu.org; Thu, 15 Dec 2016 09:43:10 -0500 Received: by mail-io0-f177.google.com with SMTP id 136so70698437iou.3 for ; Thu, 15 Dec 2016 06:43:09 -0800 (PST) In-Reply-To: <8737hp71mt.fsf@nicolasgoaziou.fr> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Matt Price , Rasmus , Bastien Guerry , Yehonathan Sharvit , Org Mode --001a1141cb5441633a0543b37589 Content-Type: text/plain; charset=UTF-8 On Thu, Dec 15, 2016 at 8:39 AM, Nicolas Goaziou wrote: > 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 > --001a1141cb5441633a0543b37589 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On Thu, Dec 15, 2016 at 8:39 AM, Nicolas Goaziou <= mail@nicolasgoa= ziou.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<= br> > block.=C2=A0 further refinements necessary before it works properly; s= everla
> more would be useful for hte improvements that Bastien suggests.

Thank you. Some comments follow.

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

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

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

:version :package-version keywords are missing.

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

css -> CSS

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

See above.

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

Location of the klipse javascript source code.

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

See above.

> +(defcustom org-html-klipse-selection-script
> +=C2=A0 "window.klipse_settings =3D {selector_eval_html: '.sr= c-html',
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0selector_eval_js: '.src-js',
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0selector_eval_python_client: '.src-p= ython',
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0selector_eval_scheme: '.src-scheme&#= 39;,
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0selector: '.src-clojure',
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0selector_eval_ruby: '.src-ruby'}= ;"
> +=C2=A0 "javascript snippet to activate klipse"

Javascript snippet to activate klipse.

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

See above.

> +=C2=A0 =C2=A0;; klipse library for live code blocks, if requested
> +=C2=A0 =C2=A0(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

=C2=A0 (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 t= hink 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 custom= izing it?
=C2=A0

Regards,

--
Nicolas Goaziou

--001a1141cb5441633a0543b37589--