When LaTeX encounters an error, we see something like the following:

     ! LaTeX Error: \begin{itemize} on input line 21 ended by \end{document}.

However, I typically have many "\input" statements, so it is often annoying
to figure out which file contains the offending line.  (In an emacs shell,
I routinely type "\C-u\C-r([a-z]" to get back to the last opened file, but
this is only right some of the time.)  It seems it should not be hard to
improve the error message to say instead

   ! LaTeX Error: \begin{itemize} on input line 21 in foo.tex ended by
\end{document}.

As an optimization, if only one user file has been seen, "in foo.tex" could
be suppressed.

Thanks for your consideration,
Julius