Based on this fabulously simple answer by samcarter, I ask myself how one could insert \thesection.~\insertsection
as the frame title on each frame (that has no specified title).
MWE (stolen from that answer):
\documentclass[t]{beamer}
\makeatletter
\setbeamertemplate{frametitle}{
\ifbeamercolorempty[bg]{frametitle}{}{\nointerlineskip}%
\@tempdima=\textwidth%
\advance\@tempdima by\beamer@leftmargin%
\advance\@tempdima by\beamer@rightmargin%
\begin{beamercolorbox}[sep=0.3cm,wd=\the\@tempdima]{frametitle}
\usebeamerfont{frametitle}%
\vbox{}\vskip-1ex%
\if@tempswa\else\csname beamer@fteleft\endcsname\fi%
\strut\thesection.~\insertsection\strut\par%
{%
\ifx\insertframesubtitle\@empty%
\else%
{\usebeamerfont{framesubtitle}\usebeamercolor[fg]{framesubtitle}\insertframesubtitle\strut\par}%
\fi
}%
\vskip-1ex%
\if@tempswa\else\vskip-.3cm\fi% set inside beamercolorbox... evil here...
\end{beamercolorbox}%
}
\makeatother
\begin{document}
\section{bla}
\begin{frame}
\frametitle{Title}
\begin{itemize}
\item Line 1
\begin{itemize}
\item Line 2
\item Line 2
\end{itemize}
\end{itemize}
\end{frame}
\end{document}
Best Answer
When beamer builds the frame, it checks if the frametitle is empty and if not inserts the frametitle template. In the other if-case one can inject a different template.
(if the code does not live up to the "fabulously simple" expectation, xpatch could probably be used to shorten the amount of code)
Edit:
And taking starred sections into account: