Re: Org 9.5 broke the rendering of my SVG images

2022-10-17 Thread Chris Clark
Would the HTML  tag be appropriate in this case?

For example, here's a tiny example of using the  tag with an external
CSS stylesheet: https://plnkr.co/edit/i8RFDW?preview


On Fri, Oct 14, 2022 at 4:32 AM Ihor Radchenko  wrote:

> Alexandre Duret-Lutz  writes:
>
> > In Org 9.5, SVG images started being exported by the HTML exporter as
> >  rather than .
> >
> > The patch causing that was
> >   https://list.orgmode.org/87k0pemj6d@gmail.com/T/
> > with two arguments:
> > 1)  do not have an alt attribute
> > 2)  will not render some SVG file correctly if it has no viewBox
> >(I'm assuming that the issue shown in that message is a missing
> viewBox).
> >
> > The reason I've noticed this change is that it broke my web pages.  On
> > my pages, I use SVG to display many automata, and they all share a
> > common stylesheet.  That stylesheet is not inlined into the SVG, rather,
> > it is a separate file included in the SVG files with
> >   
> > so that the browser only need to download it once.
> >
> > Infortunately,  does not allow external stylesheets to be
> > processed, so my stylesheets are now ignored.  Note that one can also
> > build SVG images that include other SVG images, or SVG images that have
> > animations that start when you hover on some elements.  All those
> > usages would break with .
> >
> > I've seen that very issue was discussed back in 2016
> > https://list.orgmode.org/871t2iq353@iki.fi/T/
> > where Christian Moe pointed out exactly this:
> >
> >> (2) You can also do other things with  that you cannot with
> >> , like manipulating the SVG with Javascript and styling it with
> >> an external stylesheet (linked from the SVG, not the web page).
> >
> > So in the interest of allowing users to build documents where SVG
> > files are not static, self-contained images, it seems to me that Org
> > probably needs some way to specify whether SVG images should be
> > exported as  or  (or maybe even inlined).
>
> Confirmed.
> This is clearly a regression and should be fixed.
>
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at .
> Support Org development at ,
> or support my work at 
>
>


Re: Add 'backend' header arg to clojure code blocks

2022-10-09 Thread Chris Clark
Thank you for the great feedback! Here are some updated patches.

Attached are two patches: one for org mode, and a corresponding one for
worg.

On Sun, Oct 9, 2022 at 3:42 AM Ihor Radchenko  wrote:

> Chris Clark  writes:
>
> > This is my first attempt to contribute to org-mode; please let me know if
> > I'm doing something wrong.
>
> Thanks a lot! Contributions are always welcome.
>
> Please also add a mention and/or example to the ob-clojure documentation
> https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-clojure.html
> (The source repository is https://git.sr.ht/~bzg/worg )
>
> Also, you need to add an etc/ORG-NEWS entry about the new header
> argument.
>
> And I have few minor comments on the patch itself.
>
> > From cc72dcac3075be76e3edcfee75c887272e48698c Mon Sep 17 00:00:00 2001
> > From: Chris Clark 
> > Date: Sat, 8 Oct 2022 05:41:20 -0400
> > Subject: [PATCH] ob-clojure.el: Add a 'backend' header arg to clojure
> code blocks
>^:backend
> > * ob-clojure.el (org-babel-header-args:clojure,
> > org-babel-execute:clojure): Add a 'backend' header arg that can
>^:backend
> > override the configured `org-babel-clojure-backend`.
>^'
> (by convention, we quote like `symbol' using `' pair).
>
>
> Also, unless you have FSF copyright assignment, we need you to add
> TINYCHANGE at the end of the commit message. See
> https://orgmode.org/worg/org-contribute.html#first-patch
>
> > +   (t (user-error "You need to customize
> org-babel-clojure-backend")
>
> While we are here, can as well quote `org-babel-clojure-backend'.
>
> Or may even add "or set `:backend' header argument".
>
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at <https://orgmode.org/>.
> Support Org development at <https://liberapay.com/org-mode>,
> or support my work at <https://liberapay.com/yantar92>
>


0001-ob-clojure.el-Add-a-backend-header-arg-to-clojure-co.patch
Description: Binary data


0001-ob-doc-clojure.org-Add-example-of-backend-header-arg.patch
Description: Binary data


Add 'backend' header arg to clojure code blocks

2022-10-08 Thread Chris Clark
This is my first attempt to contribute to org-mode; please let me know if
I'm doing something wrong.

Attached is a patch to incorporate some of the changes that were originally
presented by Ag Ibragimov here:
https://list.orgmode.org/m2y2oimdjf@gmail.com/. I've been using these
changes locally for a long time, and I'm hoping others might benefit!

For example:

   #+header: :backend babashka
   #+begin_src clojure
 (range 3)
   #+end_src

   #+RESULTS:
   : (0 1 2)


0001-ob-clojure.el-Add-a-backend-header-arg-to-clojure-co.patch
Description: Binary data