TobiasZawada / texfrag

Emacs package for previewing LaTeX fragments such as in doxygen comments.
GNU General Public License v3.0
68 stars 4 forks source link

Set global directory for texfrags #24

Closed mroman42 closed 4 years ago

mroman42 commented 4 years ago

The sub-directory for preview data can be customized in texfrag-subdir. Is it possible to use a single global directory for all texfrags? Say, ~/.texfrag?

Perhaps related to #14.

TobiasZawada commented 4 years ago

Using a single global directory is possible with some (very) minor constraints. Those constraints should not be visible if you do not access the LaTeX file corresponding to the file with active texfrag-mode. Thus you should not notify any negative effects of the absolute path as "normal" texfrag user. Open a new issue if anything goes wrong.

I've just changed the code a bit to allow absolute directories when the default directory of the file with active texfrag-mode is write-protected.

Pityingly, cleaning up the mess of temporary files is not yet implemented.

mroman42 commented 4 years ago

I see, this is 8b4159b59b510c9afd42ec6d8c19078b75b4f778. I think that closes the issue. Thank you for texfrag, it is amazing on org-mode files.

TobiasZawada commented 4 years ago

Hm, there slipped one of those spurious edits through. testing -> testig ?! I really checked the diff before the commit. Don't know how this could slip through. I will correct this spello with the next commit. Otherwise the commit is clean. I did the planned test. That test does intentionally not include a special case for the absolute path in texfrag-subdir. No test can cover all special cases and it is important to avoid bloating of the test. You know how to report when you stumble across a bug. Thanks for the report by the way.