emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SVG Previews for org mode


From: Ihor Radchenko
Subject: Re: SVG Previews for org mode
Date: Sat, 30 Mar 2024 10:18:22 +0000

Robert <robert+orgmode@robewald.de> writes:

> I created the attached code to be able to preview SVG in org mode. Please 
> comment if you have suggestions for a better approach.
>
> It works by having svg in a #+begin_src svg block and running org-format-svg 
> on it.
>
> I took inspiration from org-format-latex and wonder whether it should be 
> merged with that function.
> ...
> It could also be integrated with the C-c mechanisms on src_blocks. But I 
> don’t know how to do that.

Thanks for the proposal!

C-c C-c mechanisms and preview mechanisms are very different things.
C-c C-c is supposed to _run_ the code. Inserting overlays is a rather
fragile side effect of running a code.
So, utilizing preview does make more sense compared to utilizing babel.

However, I am not very sure if previewing raw svg fragments is something
many people will need. At least, I do not recall many requests to have
previews of svg images _specifically_. AFAIR, the more common requests
are (1) previewing html links and files (for example, produced by
ipython); (2) previewing base-encoded images in general, not just svgs;
with the intention to store images as plain text, right inside Org
buffers; (3) previewing pdfs.

Rather than adding a new preview command for each possible data type,
I'd prefer to see a more unified API to preview parts of Org files.
So, your idea to integrate things with the existing image latex does
make sense.

However, we are currently in the process of major rewrite of the latex
preview system [1], so making major changes in this area is temporarily
suspended.

[1] https://list.orgmode.org/87lek2up0w.fsf@tec.tecosaur.net/

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]