From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id aPY5MMjgEmYXGwEAqHPOHw:P1 (envelope-from ) for ; Sun, 07 Apr 2024 20:07:04 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id aPY5MMjgEmYXGwEAqHPOHw (envelope-from ) for ; Sun, 07 Apr 2024 20:07:04 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=d0GTJhtf; dmarc=pass (policy=none) header.from=gmail.com; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1712513224; a=rsa-sha256; cv=none; b=bWPT1QkRr8Z2aXU2mtLrSZo0DHryi3ZHYMQVCBrSz0/QZDMXhPAvhtBypFHkm0lWxC31Y7 pooWOFNTsAFDz+YEc/+8Q1Zpy+PES3mqbfsCgQAW1zz/QnYlfadZHeilQOO7YRpErIG7mz JBPFshgCbUEGT0y8iFa9YgfEUgATsXVW2BS8BNp5VFu//BU2td3W5XtwDrmyevT0WvOFTE xOTVw0P8EZEpENcAXtPm31zoeVqmAo5RWEq+5sXZcsyBN03N/JSLXHkRxLeWhLXUvXop4g A5L51uNxzqa0olCo9c5aDPR1cX+ZCu/w45SyGjT/XXUrf0+Jtr2ZPpPzjzYUaA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=d0GTJhtf; dmarc=pass (policy=none) header.from=gmail.com; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1712513224; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=FlxZhVJwtUCCC0V93kNFgunko8h15rWbnus3wAAa18Y=; b=cMg26Cnv/4/mqEk6NLO51iSbHoExJKPiNUEuk4/RMY705+cmVt8KKprE7rf0a+1EANHtcA ey/8dpSX41tqTSa4lk+yr0odcKIH+0JoyK8q5GlFlBoBTS3cJIqTX1yPX4raWwaJY2oix/ FCjgptFUL1ZqceaGOirBC0OXhwUHsmGuWNnaskF6LawZzepK1IgIbOcVMSFWQTjtdQ372R DjOyHYQ9WbL7WjsGpleregRW84V7k1/69/H3Iy8ZURpaQFx3OGDCBpuMBFPD7FtPmSZo1h AkHumW7ibd0VCXrujXkzJzjvhZu1CvxlCv4nybKdPWRwoLcbt7E0SiImnSSGkQ== 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 A187B686A0 for ; Sun, 7 Apr 2024 20:07:04 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rtWu8-0000wz-AX; Sun, 07 Apr 2024 14:06:08 -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 1rtWu7-0000wh-2v for emacs-orgmode@gnu.org; Sun, 07 Apr 2024 14:06:07 -0400 Received: from mail-pj1-x102a.google.com ([2607:f8b0:4864:20::102a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rtWu5-0004cN-8b for emacs-orgmode@gnu.org; Sun, 07 Apr 2024 14:06:06 -0400 Received: by mail-pj1-x102a.google.com with SMTP id 98e67ed59e1d1-2a2f007a33dso2532256a91.0 for ; Sun, 07 Apr 2024 11:06:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712513164; x=1713117964; darn=gnu.org; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=FlxZhVJwtUCCC0V93kNFgunko8h15rWbnus3wAAa18Y=; b=d0GTJhtf2IQAzy71w5EvQEA7kNxKOkjS4vjDdMwI47BXGVncqQODzKwlLAoy4PhqZY JwMARNTS8WPmxA6LcGplDm8lE3a9DaN63ggEv0D7kf8XAYL48e3Owsglp0LbkgSDFv3i DOxFXIXkd2LFMSKv5yHS+ukUhC+lHV4HAa1IUB5qxiupZQWxOFf37agUw60/q7pXe6pF RlI62azY0W1OEQQT+OsT/QKuQc/ciPPYfTO++W2FdSvfU3KI99NFpBO5OZGqHWilJ1WZ y5hDY1p/jASqYTQolwfWPUr8QrUGLQP43vPWTrg3LMfThGHeoBk4/lYZ2R92ZLhrBXKI h1Qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712513164; x=1713117964; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=FlxZhVJwtUCCC0V93kNFgunko8h15rWbnus3wAAa18Y=; b=uRiGsmKmOPyBhQegc7R+ne7SNPbsWw1Yi1089Zlo1XftUSrM6zRgkRrCkNamXClD1g L0LiEVW7fYdCKRNXbgZeBUq8BkVUV7/UYbfqLQU1pu53EagWDN0MXiYKoutN41TUiliT b77PD5/MZMp/CzCWfLKB4cbWX42EyUNEvRNsJAy1Rnvr3jhyJkc0REx7rOazjLqCIdHw uJK/cTPSV7JXNsce/4lTj6xsC2iKiSj+DJi/TZC0j07d8u1mrkzLhZEq3JNnL+Kc/E1u PVgV1OksVS/+C4u3zX0QSgiwQlq83aLjK+GQ4NAMJo+TtqbLc1KP9rLRN/Mwnj2bKq69 32Mg== X-Gm-Message-State: AOJu0YxfkSDxR8y4oMQCnUbBignKA5TvheLnC0/iYfaNY9JPsJNtrU3h 2YjCbG8GY0vqlfC378z4hifqqVtTTuLLFpMWu8bWJf4hqvK2333+ X-Google-Smtp-Source: AGHT+IFdErrqnbd88hyroC4IPJGVNet3Tfg0LuU+QXNnU6f810cGGSK9TZG2e8aylGDM88DU4QU75w== X-Received: by 2002:a17:90a:f482:b0:2a2:2dda:6ee7 with SMTP id bx2-20020a17090af48200b002a22dda6ee7mr5269769pjb.27.1712513163718; Sun, 07 Apr 2024 11:06:03 -0700 (PDT) Received: from localhost ([2600:8802:5726:2500:4084:633a:9e6d:2dee]) by smtp.gmail.com with ESMTPSA id o8-20020a17090aac0800b002a2f055e52csm5643806pjq.34.2024.04.07.11.06.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Apr 2024 11:06:03 -0700 (PDT) From: Karthik Chikmagalur To: Ihor Radchenko , Tony Zorman Cc: emacs-orgmode@gnu.org Subject: Re: Using org-latex-preview in other major modes In-Reply-To: <87msq5o03b.fsf@localhost> References: <87edbhljr7.fsf@hyperspace> <87msq5o03b.fsf@localhost> Date: Sun, 07 Apr 2024 11:06:02 -0700 Message-ID: <871q7hf3p1.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::102a; envelope-from=karthikchikmagalur@gmail.com; helo=mail-pj1-x102a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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-Flow: FLOW_IN X-Migadu-Country: US X-Spam-Score: -6.70 X-Migadu-Queue-Id: A187B686A0 X-Migadu-Spam-Score: -6.70 X-Migadu-Scanner: mx10.migadu.com X-TUID: XQYheP2zWRJq > Abstracting away previews is certainly welcome. > RMS explicitly asked Org mode team to work towards this goal: > https://list.orgmode.org/E1kIkxv-0007iy-Av@fencepost.gnu.org/ I agree with RMS about this, and this was on our minds when we wrote org-latex-preview. The basic previewing process is explicitly written to be Org-agnostic, but we weren't as rigorous when adding the fancier features (like live previews). > Ideally, we should have Org-independent library that does the previews, > and an Org-specific code that re-uses this library. Eventually, we can > move the generic library to Emacs core. Here is the plan Timothy and I have discussed: 1. Merge org-latex-preview in its current state and continue to fix bugs/edge cases. 2. Write an external package reimplementing in a more generic way the parts of the API that are Org-specific. This external package will depend (heavily) on org-latex-preview. 3. Solicit from the community integrations of this with other major-modes using this generic API. 4. Once this API is stable, replace the corresponding parts of org-latex-preview. 5. Propose moving everything but the Org-specific parts to a `latex-preview.el' package included with Emacs. >From Tony's proof of concept, I think step 2 might be unnecessary and we can incrementally modify org-latex-preview instead. > We may go even further, and extend the previews to be not just for > LaTeX. Might as well preview html/image links/pdf links/etc. I agree in principle but I think this is difficult to do with org-latex-preview because the async process chain and overlay handling are highly tuned for low-latency LaTeX processing.[1] I do think Emacs could use a generic link-preview package, with an org-link-preview adapter for Org mode. Karthik [1]: As low-latency as possible from Emacs without modifying the LaTeX compiler or image renderer, as for example TeXpresso does. https://github.com/let-def/texpresso