[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [BUG] LaTeX preview should use a subdirectory in /tmp
|
From: |
Emmanuel Charpentier |
|
Subject: |
Re: [BUG] LaTeX preview should use a subdirectory in /tmp |
|
Date: |
Wed, 17 Apr 2024 17:21:08 +0200 |
|
User-agent: |
Evolution 3.50.3-1 |
On 25/03/2024 19:49, Max Nikulin wrote:
> > (defun org-ensure-tmp-dir (dir-symbol prefix)
> > (let ((dir (symbol-value dir-symbol)))
> > ;; Temporary directory has not been cleaned.
> > (or (and dir (file-directory-p dir) dir)
>
>
>`if' should be used instead of `or' here.
>
>
>
>>
>> (setf (symbol-value dir-symbol)
>> (make-temp-file (or prefix "orgtmp-") 'dir)))))
>>
>> (defvar org-tex-tmpdir nil)
>>
>> Usage example: (org-ensure-tmp-dir 'org-tex-tmpdir "orgtex-")
> I do not like that the function may be called with
different `temporary-file-directory' and I can not figure out how to
adjust API to handle such case. On the other hand I am unsure if it is
a realistic case when this function is called with
alternating `temporary-file-directory'.
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).
- Re: [BUG] LaTeX preview should use a subdirectory in /tmp, copropriete27ruemoret, 2024/04/17
- Re: [BUG] LaTeX preview should use a subdirectory in /tmp,
Emmanuel Charpentier <=
- Re: [BUG] LaTeX preview should use a subdirectory in /tmp, Ihor Radchenko, 2024/04/17
- Re: [BUG] LaTeX preview should use a subdirectory in /tmp, Emmanuel Charpentier, 2024/04/17
- Re: [BUG] LaTeX preview should use a subdirectory in /tmp, Ihor Radchenko, 2024/04/17
- Re: [BUG] LaTeX preview should use a subdirectory in /tmp, Emmanuel Charpentier, 2024/04/17
- Re: [BUG] LaTeX preview should use a subdirectory in /tmp, Emmanuel Charpentier, 2024/04/18
- Re: [BUG] LaTeX preview should use a subdirectory in /tmp, Ihor Radchenko, 2024/04/19
- Re: [BUG] LaTeX preview should use a subdirectory in /tmp, emm . charpentier, 2024/04/19
- Re: [BUG] LaTeX preview should use a subdirectory in /tmp, Max Nikulin, 2024/04/20