From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id AIwkBApgq2Va0gAAqHPOHw:P1 (envelope-from ) for ; Sat, 20 Jan 2024 06:54:18 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id AIwkBApgq2Va0gAAqHPOHw (envelope-from ) for ; Sat, 20 Jan 2024 06:54:18 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=leidCve0; 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=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1705730058; 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=32TaQczC9OmufqEYU8kUvUJG1eIZ4551/xUC+cYzk84=; b=trFRMXQq+rAs2J4iIgcOw/Qv0EHw7uqif+5EbUeHv2hN/BKvrZfwQPM5GDobnXBRDljAvH kd+Eef6gNxK/XpOapWYbTydGrJ2f6SGDYVTNMzBQit9kUL4sPeKFBznbi8GUlYLDaJUpjv pDhzTpvEfrky+9BYI2HGgFD32kTcsUbomkw1KHUx9MLpmjVEVIRIr4lyJN2KKZS8SGa9KN WRS2sSIJ9Ia+u/G6vNfGZX5tad1F66bASh7Rwp8LBNNsiPnj7dGK5yRfouV679+SYVbnrk sqYozBo8I5YAnp+a73rNQFk1xFBIeGwgPIHvu2bfuWyNpb86nMaegtvXbAR0BA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=leidCve0; 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=gmail.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1705730058; a=rsa-sha256; cv=none; b=obNMPb4gXKj7TIOFefZrLbhuia4HtXEtipRGsCS6nM0OwNUNggMgi9pRkuqOjpEZqjzNT6 BhFnjeNfI9u24Se/Y9x4+hyM2ZzrsNM/5uM157ICJLPzbgn4/HCU24GPxmfwsNDSvxEPXQ 52mhhidS/I4x2ISwC7yS7EbDsyB/zK0+NbsJ/PtuV0qs3Q92i0e2FLjAZkBlJ3Wp9tq/Bw 5gIKE94ima+nbHs+YEMqRryNpiT/FsM2xDnT0sVlL+VOKQZRTecVF7qrCUs/K4xVZ2ZAvP wTJmB00v+wR/cgIOe0sHm9bNbPbJVImHAdJ1Ss1CIVIY337a4tOJcFD796fLKA== 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 9D5043ABCB for ; Sat, 20 Jan 2024 06:54:17 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rR4IL-00013I-Fv; Sat, 20 Jan 2024 00:53:29 -0500 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 1rR4IK-000136-4G for emacs-orgmode@gnu.org; Sat, 20 Jan 2024 00:53:28 -0500 Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rR4II-0002Jo-JO for emacs-orgmode@gnu.org; Sat, 20 Jan 2024 00:53:27 -0500 Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-6dbc9dab55dso580162b3a.0 for ; Fri, 19 Jan 2024 21:53:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705730004; x=1706334804; 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=32TaQczC9OmufqEYU8kUvUJG1eIZ4551/xUC+cYzk84=; b=leidCve0M00K1cC9TYMwQo48YGmiJaBNR3FhZ6HvRb9gyDMPzcoC3vqkdc4kFZuQZ+ igUduADhYGFv7k9Si1JyMYQB+yfGXhZBpGOwW520r80Pv8aC4YAxmmTgLnkuXwOx0QM5 +bGs+j0wGhWGynPRk2PD73KCRxsyOHvR51josd2rq0DkvrZlVA/jLY9G8Tro6vcz+YRQ Iibq4uqph35Hgzl8I2VTAdfed/Fn2/38EQXAhyga7pl71Xiyrux4bw8dIiRbtnu5TqGc eB65xx59UHqHm3dWTPvTPYGgBZ+B2xkulGvIIFlyT7Q9vEx8+xsFr9JH1GaKkfxa+C5e 2sOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705730004; x=1706334804; 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=32TaQczC9OmufqEYU8kUvUJG1eIZ4551/xUC+cYzk84=; b=lity4x3gi2rkUED7rRpAz8EkgwdU44gVHzheV+WGPLwocnqjppic1DnTV6jlEgJI3m tLy4G0ehNKuMTtbBIb8j0+0+UeyNpuYtlkZz1k4RHa4LOesC934Wh/Uk9zBOQWv9/ZDs rLmU9cYNS4qjfadtxeiY/cJeM2KdVP4TzU0yyujPflJRXQ2N9BK23XRWn3x0tZi29yts HaIFs52OJGkGSRgr+/Y1hcNcWmPM4V4MhUhobLfSbW5hJ7/R6VEpS7oHgqwB0jrR/aeC MEG7G1L9b7aRA+XLb1IvLURgH7zpnFpT3Wzrc4NAoqpT166JKjK2PJmDWUy+vXwepqHe ugtw== X-Gm-Message-State: AOJu0YyTRynvJZlhi3Q/Wgys+5RnoIMv0p6Q7H6twcUeBJHQluY8gE9K WXa9J1rNLvkkRPS/NZvuYABgiLHVQflYFG1d2DCkMbECztWbmawf5WgX6rel X-Google-Smtp-Source: AGHT+IGrvOnVx5L2ggvM06IHXST2TQz5qU4khJepL/MY2fj7Dx3I86Ztux52py1eYwtYkvaVoUTPGw== X-Received: by 2002:a62:cf07:0:b0:6d9:ad3d:7d8 with SMTP id b7-20020a62cf07000000b006d9ad3d07d8mr1108172pfg.19.1705730004129; Fri, 19 Jan 2024 21:53:24 -0800 (PST) Received: from ryzen3950 ([2001:5a8:6105:2400:eb77:c6fa:caaf:aed5]) by smtp.gmail.com with ESMTPSA id h30-20020a056a00001e00b006d9ac70682bsm5974841pfk.167.2024.01.19.21.53.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jan 2024 21:53:23 -0800 (PST) From: Matt Huszagh To: Timothy , emacs-orgmode@gnu.org Cc: Subject: Re: [Pre-PATCH] Overhaul of the LaTeX preview system In-Reply-To: <87lek2up0w.fsf@tec.tecosaur.net> References: <87lek2up0w.fsf@tec.tecosaur.net> Date: Fri, 19 Jan 2024 21:53:22 -0800 Message-ID: <87frysk0tp.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::435; envelope-from=huszaghmatt@gmail.com; helo=mail-pf1-x435.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, T_SCC_BODY_TEXT_LINE=-0.01 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-Migadu-Spam-Score: -8.72 X-Migadu-Queue-Id: 9D5043ABCB X-Spam-Score: -8.72 X-Migadu-Scanner: mx11.migadu.com X-TUID: mywQixAQI66j Hi Timothy, Thanks for your work on this. I've run into an issue related to the change you made in 209e5f5f4047a34db27c3b5dff4077bb1da9ceed that makes org-latex-compile asynchronous. This breaks the org-babel-latex-pdf-svg-process functionality I introduced in commit ae35a345903c640397a8d29812112d72a9f8494a. To reproduce the issue, you can create an org file with the following single latex source block: #+header: :file "out.svg" #+begin_src latex :hidden \begin{equation}\tag{1.6.3.1} \mathbf{F} = q \mathbf{E}, \end{equation} #+end_src If you execute this with C-c C-c, it complains about the PDF file not being present. The problem can be found starting in line 182 of ob-latex.el of your current (as of this writing) feature branch commit 8384289762b41b26e75d2e80c37ec84bcc552d32. The issue is that org-babel-latex-tex-to-pdf (which delegates to org-latex-compile) creates the PDF after org-compile-file (in line 185) tries to generate an SVG file from it. In fact, I was initially confused because I couldn't reproduce the issue with edebug (obviously, because that gave a long enough delay for the file to be created before attempting the svg creation). org-latex-compile seems like it could be a dangerous function to change to be asynchronous, as it's used in a lot of places and its very possible that other people (like myself) were relying on it being synchronous when they made some change that used it. I haven't looked at its other invocations, but I wouldn't be surprised if this breaks other things too. I hesitate to suggest alternatives because I don't know enough about your use case. But, maybe you could achieve what you want through a new org-latex-compile-async function, or add a nondefault option to org-latex-compile? Matt