I have a [function in a package](https://github.com/pprevos/citar-denote/blob/185ab89244deda00770bd44c3fee20400091a9df/citar-denote.el#L76) I am working on that reads a bunch of Org files, extracts metadata and saves that in a list.
The problem I am facing is that Org mode enables all minor modes (such as LaTeX preview) while reading the file. This makes the function slow. I also need to manually kill these files. I only want their metadata.
Is there a way to temporarily open a file without activating any modes to just extract data I need and close it? Something like:
(with-temp-buffer FILE-NAME (CODE))
​