From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id ILvqEUfnB2aEawEAe85BDQ:P1 (envelope-from ) for ; Sat, 30 Mar 2024 11:19:51 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id ILvqEUfnB2aEawEAe85BDQ (envelope-from ) for ; Sat, 30 Mar 2024 11:19:51 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=GvnZgMQw; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1711793991; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=ubRsuUBsx/eXvskpYMMxAe7ebH+YiSHEGxMi6EvwDOw=; b=kr7UP5V/kJ3CE5s0ejvNimhzM2SliqdEX6l1f+ZqFiaJ9RZIzCgo6BSNAslEWERQ4sRNl0 Oubj3X9duFfUb93Him0Kn3KsrgBg7r1KT8NB7ePYudOhdcJVNPC295CyeYnvxmeu3aDWnu kee4VIQauTb4RKP+rmv4zuM/frc7VB89FjXL1LJd1dJwfZMulvHtiBpmEMq18LSWeuF03V 36+UsNPLn9xF8AyknPW4NbTQp6paKCx0gWf9+cmhI+fzu622KACTQL53s2p5q8p2yO0kzS qcVs5RCm8g/Lr+Bwv6Mq52Vn7+njAUoS5rNy9paRBBB8BOfjSLf6+e1EHQg2QA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=GvnZgMQw; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1711793991; a=rsa-sha256; cv=none; b=no+GgcJPJ9YWk59jvhOdLrNRqCsOEgxtoQISEdpiv7uHhfWCTreKTXM/Wdya+P0W61JYgp DIql4zuBUOp/lk3sTQVhRDQUWo4tVZ3+RZ7+Z7A+lah2TBJCiHzczBENcfLzzWGLRh6rp2 +N+O5mdgi1XDrIJRmUvi//ZSteNCCAEu+lHsCXSDBRWHLajcuGdSjoZCvDs4IGAlTNL5Lg kMMKuS1LnvKUnGKdC0TxZPy+p6V4QehaN+xoGV19tNuBa0RAlnWFsSTVhFDvrXyDDJbm60 qf0FccehdYNIFk0Or6h0hpC7rHp7Ste+XXzZnpmPX8JFYLqu7Jk7YaWqjzgZvw== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 915983C81E for ; Sat, 30 Mar 2024 11:19:50 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rqVn6-0006gy-Sk; Sat, 30 Mar 2024 06:18:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rqVn4-0006gZ-AE for emacs-orgmode@gnu.org; Sat, 30 Mar 2024 06:18:22 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rqVn0-0007gs-75 for emacs-orgmode@gnu.org; Sat, 30 Mar 2024 06:18:21 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id DECD1240101 for ; Sat, 30 Mar 2024 11:18:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1711793893; bh=ubRsuUBsx/eXvskpYMMxAe7ebH+YiSHEGxMi6EvwDOw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: Content-Transfer-Encoding:From; b=GvnZgMQweBoBV+3QYhzD4+Ch451/skGeI3aH2yN59M7H0D55RbKy86J3+/zv32Jbm o89U4gQVkQsAsdlb6LmNyue5pnZu1nUzytrcZKq4RhRKyxmpYFt7AqULn2p6YbjEjN ld60jDtRbrbkMv9B3ozeJRKpzWqKR/jlJK6mlLtcqrT/unehPJhEab1/1q2gHSbP4c YHGrTMjpwjHL1eI4h1Yf43umXq0JXbFT71Aj4P2aSN1+AWP6hfyS19IvTaSIBL9m5Y PvOxYVt/XpcZMeHogRanWlh986+V34Om2CX78qyyGJHSEXZbCTyfSJF+9EYXh9AAXt uCaCcJTW9GITA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4V6CsJ6cT0z9rxN; Sat, 30 Mar 2024 11:18:12 +0100 (CET) From: Ihor Radchenko To: Robert , Timothy , Karthik Chikmagalur Cc: emacs-orgmode@gnu.org Subject: Re: SVG Previews for org mode In-Reply-To: References: Date: Sat, 30 Mar 2024 10:18:22 +0000 Message-ID: <87msqg2fbl.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Spam-Score: -7.61 X-Migadu-Queue-Id: 915983C81E X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: -7.61 X-TUID: yEnGvaA1ABLF Robert 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=E2=80=99t 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/ --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at