[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lyx-devel
Subject:    Re: LyX sometimes deletes a file and directory instead of making a pdf
From:       Pavel Sanda <sanda () lyx ! org>
Date:       2024-05-03 11:53:49
Message-ID: 20240503115348.GB841644 () jabberwock ! ucw ! cz
[Download RAW message or body]

On Fri, May 03, 2024 at 03:35:38AM +0000, Boylan, Ross wrote:
> Since I'm not sure this is a bug, or what it's a bug in, I thought I'd post here.  \
> First, I'd like to thank all the LyX developers for their work. 
> The core problem is that when I run `lyx -export pdf2 -v inst\doc\msep_num.lyx` \
> under some conditions-detailed below---the .lyx file and the doc directory it is in \
> are deleted, and no pdf is created in the top-level directory.  Here's the \
> accompanying output: [1] ""                                                         \
>  [2] "Running: git ls-files \"msep_num.lyx\" > \
> \"C:/Users/rdboylan/AppData/Local/Temp/3/lyx_tmpdir.PEIeNMGadmvT/lyxvcout.kdsSyY\"" \
> [3] ""                                                                              \
>  [4] "Running: pdflatex  \"msep_num.tex\" > nul"                                    \
>  [5] "This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023) (preloaded \
> format=pdflatex)\r"                               [6] " restricted \\write18 \
> enabled.\r"                                                                         \
>  [7] "entering extended mode\r"                                                     \
>  [8] "(./msep_num.tex\r"                                                            \
>  [9] "LaTeX2e <2023-06-01> patch level 1\r"                                         \
>  [10] "L3 programming layer <2023-08-03>\r"                                         \
>  [11] "\r"  
> 
> Some theories about the problem:
> 1. The file argument to lyx should not include paths.

You could try to cd into the directory inst\doc and run the export command to see \
whether it makes any difference.

> 3. The msep_num.lyx file is in inst/doc/ because of a git mv (and then later a git \
> restore when it got deleted) not git add, and the check is specific to add.

Can you describe in more details the exact file movement via git add/mv you are doing \
before/after the lyx export command?

> If I execute that code directly from RStudio it works fine.  But if I trigger a \
> check from RStudio, which builds the whole package, it fails as described above.

Current directory might be different for those two cases?

> I don't know why LyX is bothering with git at all,

It tries to detect whether the files is under version control. Not important for \
commandline usage, but if you run with GUI it sets the version control icon bar \
accordingly.

> and even if it has problems I wouldn't have expected them to delete files and \
> directories.  

At the moment I don't see anything in the lyx code that would cause deletion of the \
file (or even the directory) itself. Unless it is some sideeffect of running of "git \
ls-files" which I strongly doubt...

We only delete directories in temporary directory (like \
C:/Users/rdboylan/AppData/Local/Temp/3/lyx_tmpdir.PEIeNMGadmvT/) so another option \
coming to my mind is that you are operating inst\doc\msep_num.lyx inside the temp \
dir?

Pavel
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic