From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id mJx+CxbnH2aPQAAA62LTzQ:P1 (envelope-from ) for ; Wed, 17 Apr 2024 17:13:26 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id mJx+CxbnH2aPQAAA62LTzQ (envelope-from ) for ; Wed, 17 Apr 2024 17:13:26 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=fI3spLe8; 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=1713366806; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=zRT/nCEVbxjX66kfjcUPRpK+87Tis7tmAv+MewMEbLk=; b=ssMJJS/N3pxL9+36M9ajcPrQO9JAgZSmTRxGaZdljwS/Z3RswTXMJdd20RSO8uC+eXYb/y F617l5gnmgs3NdwLfkq6pEWPIMHUkxUIFsIQH6dYth6nOiRBoypAh3SkiDZHnSE3lILTID l0rkSJ2/0vkSd8TT5pjFxDXofXIBj1vqDTxQPF9riYJwXop7oyETwWkUcXNTlBrpAWnqeV b/TxK48O48SnI3xNTIDuo371V3r9cZN+ohlQu44HIxlqEJnUg6ZmGCejy2PKiRRoCr5F6k wPcpT/qksx+pe+jhImUVtO/Z8N9EpWLXfprmkmiksC9Il8qWd51uPGl8Gy5bNg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=fI3spLe8; 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=1713366806; a=rsa-sha256; cv=none; b=BDKzvsSIIZK5aWZsN4iO6v4Wa0pfjrvh1YbmXW9W43oh3vhr3yrmu9dOla4xMMkEDe2oBV GN1r7KaooMfEVvSXjkQl3CuH6iROKzMqobkqunpuWf/OSfanUIje//eSJKj/cdwN3/tKFS PM66835hscBnqVjGQsTtkvarFGA0YJeXPaVDC6ZSqkCsgDdfogzFyPj5KxUX2J5jUH6LZt 4PiVY/59yMDHrtYFilwo6tts5a2cxpGNLNKSPId2wsjZceSECBL0u862gqlgbo/Vv0cJTv 6ntlSiIuj5PbKPjs4PnlSewXqKKgAnkA/g3aPOyJtErMSs6OaxlOR6m0JR4Zfg== 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 BD62E380F3 for ; Wed, 17 Apr 2024 17:13:25 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rx6xm-0006Cp-Ua; Wed, 17 Apr 2024 11:12:42 -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 1rx6xi-0006CP-7h for emacs-orgmode@gnu.org; Wed, 17 Apr 2024 11:12:38 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rx6xg-0008Mp-26 for emacs-orgmode@gnu.org; Wed, 17 Apr 2024 11:12:37 -0400 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-41879819915so21580985e9.1 for ; Wed, 17 Apr 2024 08:12:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713366753; x=1713971553; darn=gnu.org; h=mime-version:user-agent:content-transfer-encoding:in-reply-to:date :to:from:subject:message-id:from:to:cc:subject:date:message-id :reply-to; bh=zRT/nCEVbxjX66kfjcUPRpK+87Tis7tmAv+MewMEbLk=; b=fI3spLe81eeLFAC4+/P0Mk7z6NV+cjB3A0uKOEsZLbWInOIjDT35C5ofFQyPw7njrs 3zR4iEnB9LLIE7SzkEhS96MGSAaL/hLJtcianM2yHpCwAkjopaUqslzuCmN0cWpBArz/ gimo4tusCWQj+UEF1a2M1l75enLgAN8ZP+t2fsVFeVt0BRyJSTt8UWHMh59curgr2oLD 87eKDurki7VtSNUI2N5d/6bXIqpsPQdb3SqzqNVArrTekaNDp72nQxbCfOfzcnzJqKa8 irViZPmasrhVvN8lPn3afR2lA9ys6NyXxuMuWbuhL0axcrA/YWpxu5HVqCJNiNZPxh9r Gfpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713366753; x=1713971553; h=mime-version:user-agent:content-transfer-encoding:in-reply-to:date :to:from:subject:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=zRT/nCEVbxjX66kfjcUPRpK+87Tis7tmAv+MewMEbLk=; b=ZlrKwOYFSRqYD+lc2AcomfbPfKTi3GIafessf0tYkm2luEH+PDWBhg5H8O7eBjoWit 7bu4A4genRAk5F+l7e8iCS3S24rpMSXWMjtDYjKH5TS4J8HZTYk36+RDTQa0j0KPJeen X3CEG1invGlfLwF6Sciu/aSl7eK69JV8lHHTGZeEdvGDesXYUGcQ0V34J6UmIV1ZnBSn T7IKhqd0KjMtPj37u+m5jIyQu7ddFEg2cODkq4v2iyJm9kKBbvmgtdVuXugILmP/wqzC UGZthhY+9sQX4hH5TYjvUEGN4wKrvMiOQmlmK+MiyT9P7EUGRlLB8rXbUkK2TRsUHLqt ur9A== X-Forwarded-Encrypted: i=1; AJvYcCWBlC06ZDE5E3mg/cRqFEr0JFF7lBWGuQ9iXWndN9+25Ko63QFry6EdHBRYo/LaP7Fthf9VVNV2G+/uoW1juXUXLIPUiHE= X-Gm-Message-State: AOJu0YzyqMqCRU55MC4m6mAIo/xn1Wf2Z/2l1mMQ9ss12j9oMO2nINOZ +nUOVDT9cr16p5JRbXgcIf9hBrgKaIiLkVaOvgkY208qVz357i9JYu2DHw== X-Google-Smtp-Source: AGHT+IF1TTcdxAuLLRHaf9BOfDlwnkQeRBBVlWBcvSughMxidER2rV4j4myM7hYE6P/wbNzziwGoQg== X-Received: by 2002:a05:600c:3489:b0:418:d5b1:6fa9 with SMTP id a9-20020a05600c348900b00418d5b16fa9mr94889wmq.9.1713366753174; Wed, 17 Apr 2024 08:12:33 -0700 (PDT) Received: from ?IPv6:2a01:e0a:59b:20f0:d638:c384:a929:b1a? ([2a01:e0a:59b:20f0:d638:c384:a929:b1a]) by smtp.gmail.com with ESMTPSA id fl24-20020a05600c0b9800b00418d434ae4esm261548wmb.10.2024.04.17.08.12.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Apr 2024 08:12:32 -0700 (PDT) Message-ID: <4ecab29cfe4c5eca5ede74313e478e9c47ae7077.camel@gmail.com> Subject: Re: [BUG] LaTeX preview should use a subdirectory in /tmp From: copropriete27ruemoret@gmail.com To: manikulin@gmail.com, emacs-orgmode@gnu.org Date: Wed, 17 Apr 2024 17:12:31 +0200 In-Reply-To: utubi0$12b0$1@ciao.gmane.io Content-Type: text/markdown; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.3-1 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=copropriete27ruemoret@gmail.com; helo=mail-wm1-x332.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-Migadu-Spam-Score: -7.34 X-Migadu-Scanner: mx11.migadu.com X-Spam-Score: -7.34 X-Migadu-Queue-Id: BD62E380F3 X-TUID: DRn0O4ZjDHBC On 25/03/2024 19:49, Max Nikulin wrote: > > (defun org-ensure-tmp-dir (dir-symbol prefix) > > =C2=A0 (let ((dir (symbol-value dir-symbol))) > > =C2=A0=C2=A0=C2=A0 ;; Temporary directory has not been cleaned. > > =C2=A0=C2=A0=C2=A0 (or (and dir (file-directory-p dir) dir) > > >`if' should be used instead of `or' here. > > > >> >> =C2=A0=C2=A0=C2=A0=C2=A0(setf (symbol-value dir-symbol) >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (make-temp-file (= or prefix "orgtmp-") 'dir))))) >>=20 >> (defvar org-tex-tmpdir nil) >>=20 >> Usage example: (org-ensure-tmp-dir 'org-tex-tmpdir "orgtex-") > I do not like that the function may be called with different=C2=A0`tempor= ary-file-directory' and I can not figure out how to adjust API to=C2=A0hand= le such case. On the other hand I am unsure if it is a realistic=C2=A0case = when this function is called with alternating=C2=A0`temporary-file-director= y'. =20 I have a case where the current way of forcing the temporary directory to m= e `/tmp` is wrong. Running emacs on Ubuntu **under WSL2**,, exporting latex= snippets to ODT *as images* fails : the `.dvi` files are correctly compile= d and placed in `/tmp{, but the convert program tries to read them in `../.= ./../../tmp/`, which is indeed `/tmp` in a "normal" filesystem but **is not= ** in WSL, where the root (`/`) is in fact a mounted tree. Admittedly, this is a corner case, but it turned out to be necessary (expor= ting via mathml gave unsatisfying results).