emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: Robert <robert+orgmode@robewald.de>,
	Timothy <orgmode@tec.tecosaur.net>,
	Karthik Chikmagalur <karthikchikmagalur@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: SVG Previews for org mode
Date: Sat, 30 Mar 2024 10:18:22 +0000	[thread overview]
Message-ID: <87msqg2fbl.fsf@localhost> (raw)
In-Reply-To: <C8841D00-C697-4B7B-8A0C-E26351279BE6@robewald.de>

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	other threads:[~2024-03-30 10:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-29 22:14 SVG Previews for org mode Robert
2024-03-30 10:18 ` Ihor Radchenko [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87msqg2fbl.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=karthikchikmagalur@gmail.com \
    --cc=orgmode@tec.tecosaur.net \
    --cc=robert+orgmode@robewald.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).