From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id WJFQIBzpH2ZjAAEAqHPOHw:P1 (envelope-from ) for ; Wed, 17 Apr 2024 17:22:04 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id WJFQIBzpH2ZjAAEAqHPOHw (envelope-from ) for ; Wed, 17 Apr 2024 17:22:04 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=free.fr header.s=smtp-20201208 header.b=Z+qdyIK8; 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=free.fr ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1713367324; 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=fwWw+oMhRi7jJrQWgnyWDvo9kgKoLPspwo6T7mXAk54=; b=N4+7LufVQ9a+S/fnnav+a1NmMJS/nLdKNS/3D54LLAgWPZCiTAXLknDLz/IVGYd+eLbund Op6j0nuFiIe5U5shhOebO5JeFXP7y9fqqYBnMFN4h+H6oq11qJzc6W7ytTifr315dqeBxB 6cGYqobJUHTQyULV2SnQj7xQnBOjX79qsmhapyme8hLxiCm5lJJ1vM4RigSnnh4PNyjQQ1 ZVkYmpjgTEdobCu7kAZJXIHVQPhmYUcOpMTDHedrOcQeZlRqrTKpFTujrfctyQDqcKXQ5H udxugXsJNjQoJusAveAR0C0VrhCD5IabgFrwfS0d8mt9QkgGfNkl4VRVzaOoXQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1713367324; a=rsa-sha256; cv=none; b=EV5TPTMjsMfXoq8/PImRnmvFpX04IZWiqzuz2EWBw0c6Pi6E7aQH16bAHCklEFVI8dHCWD tbu0DwhuabC0IC8XwT3NpqYMSna18/YKfuoTCM4nFZuj6GFOuGZo2kZMQAZRzrDeTe008g 8Lqb6Uh8718N75Pui7fG8OkR357qqHoe+W8IYUF5NTmBIvizUNQ08xOOIH3E1mPYMgfsFz Jx9T8k4iRQUVAJd0kqdn+h9G2gACjhW4vJnF9lU9SEnTw55q2wI1SOAuAcrUNmF+so/bKJ FNF/UCJOfZ5/LgQ7Tw5ZFgb1d0eIdStuhoGfjzDp1tSiY+jIm2vqMcfP5+7Ajw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=free.fr header.s=smtp-20201208 header.b=Z+qdyIK8; 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=free.fr 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 56DED3DE28 for ; Wed, 17 Apr 2024 17:22:04 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rx765-0008Hu-Ns; Wed, 17 Apr 2024 11:21:17 -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 1rx763-0008HC-Ur for emacs-orgmode@gnu.org; Wed, 17 Apr 2024 11:21:15 -0400 Received: from smtp4-g21.free.fr ([2a01:e0c:1:1599::13]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rx761-0001f6-Nl for emacs-orgmode@gnu.org; Wed, 17 Apr 2024 11:21:15 -0400 Received: from [IPv6:2a01:e0a:59b:20f0:d638:c384:a929:b1a] (unknown [IPv6:2a01:e0a:59b:20f0:d638:c384:a929:b1a]) (Authenticated sender: emm.charpentier@free.fr) by smtp4-g21.free.fr (Postfix) with ESMTPA id C907219F593; Wed, 17 Apr 2024 17:21:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=free.fr; s=smtp-20201208; t=1713367270; bh=FQgRh7PDo3Ltm8QK0rt9XNyIWQlB5u5UI5voSs6nOdY=; h=Subject:From:To:Date:In-Reply-To:From; b=Z+qdyIK8lpcBI4Z5ONv0SBuj9sSan90iVAr1Krnk0nU0BRHLZXToQDaB6pvH3GnMw P3yiPghma/3pzrizcJZ/x1/ASgJhipze88ny6LOw3n7efQnldErpIa7h5Y5zwtIlL/ ns8C3SMGVHVgUB3lNLg33EQtksIQA7WWRWAPLdfyhWQ6AD/l9FLEDZ+Nax4/SlB3gF KoZ+yL2fXh7bbWi1id5rfVaeubOsECWDoa2406/yVSqOWtiXIBhyjEaExepZ/u+ptD AMZbSgz6zwM0TD9vxxOMHCBR2IHJAyBUHPsUNB6aEn2Njgh0Z/mjOStKH+QiGsSDQg zY45kzWY+YuGw== Message-ID: <70491d4bb65173aef34296dd71d7a1e55872bf26.camel@free.fr> Subject: Re: [BUG] LaTeX preview should use a subdirectory in /tmp From: Emmanuel Charpentier To: manikulin@gmail.com, emacs-orgmode@gnu.org Date: Wed, 17 Apr 2024 17:21:08 +0200 In-Reply-To: utubi0$12b0$1@ciao.gmane.io Organization: =?ISO-8859-1?Q?Organis=E9?= ? Moi ??? Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.3-1 MIME-Version: 1.0 Received-SPF: pass client-ip=2a01:e0c:1:1599::13; envelope-from=emm.charpentier@free.fr; helo=smtp4-g21.free.fr 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-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -7.07 X-Spam-Score: -7.07 X-Migadu-Queue-Id: 56DED3DE28 X-Migadu-Scanner: mx13.migadu.com X-TUID: jIClBV01g3fy 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`temporary-file-directory' and I can not figure out how to adjust API to=C2=A0handle 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-directory'. =20 I have a case where the current way of forcing the temporary directory to me `/tmp` is wrong. Running emacs on Ubuntu **under WSL2**,, exporting latex snippets to ODT *as images* fails : the `.dvi` files are correctly compiled 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 (exporting via mathml gave unsatisfying results).