On 09/03/2024 22:23, Max Nikulin wrote: > On 08/03/2024 18:16, Ihor Radchenko wrote: > >> Attaching tentative patch that fixes the problem. I propose to add unit tests, see first attachment. > I have tried to add some unit tests, but I faced an issue with > `org-create-math-formula'. It creates temporary files in > `default-directory' and does not remove them on failure. Moreover, it > does not work in a container where git is not installed: > > Debugger entered--Lisp error: (file-missing "Searching for program" "No > such file or directory" "git") > > that is called from `find-file-hook'. Is second attachment appropriate to fix the issue or it has some undesired effects.