I would like to check whether a new file has been visited by an interactive command (e.g. visited using C-x C-f) or if it has been visited programmatically by some Lisp code.
Use case:
I cooked my own template/auto-insert/skeleton functionality using yasnippet
, and I mainly use it for LaTeX files. I would like the template functionality to apply only if I create the file by hand, and not whenever some Lisp code does that. In particular, my template function interactively asks for some input, and this should not happen when executing Lisp code.
Example:
AUCTeX creates LaTeX buffers (with the corresponding files) from time to time, for example the region.tex
file if you use TeX-pin-region
functionality. I don't want the template function to apply here.