# How to force LaTeX to keep section/subsection headings with one line below it on the bottom of the current page?

By default, LaTeX allows a page break after the first two lines of paragraphs following section/subsection headings, but I would like to keep the section heading with even one line below it at the bottom of the current page. How to do it?
Please note that I'd prefer not to use any additional packages such as etoolbox or needspace.
Here is my MWE:

\documentclass{book}
\usepackage[showframe]{geometry}% just for this example
\usepackage{lipsum}
\newcommand{\dummy}{This is a test }
\begin{document}
\lipsum[1-6]
\section{bla}
This is a test  This is a test  This is a test This is a test
This is a test This is a test This is a test
This is a test
\end{document}

-

\makeatletter
\@nobreaktrue
\everypar{%
\if@nobreak
\@nobreakfalse
\clubpenalty 1
\if@afterindent \else
{\setbox\z@\lastbox}%
\fi
\else
\clubpenalty 1
\everypar{}%
\fi}}
\makeatother


MWE:

\documentclass{book}
\usepackage[showframe]{geometry}% just for this example
\usepackage{lipsum}
\newcommand{\dummy}{This is a test }

\makeatletter
\@nobreaktrue
\everypar{%
\if@nobreak
\@nobreakfalse
\clubpenalty 1
\if@afterindent \else
{\setbox\z@\lastbox}%
\fi
\else
\clubpenalty 1
\everypar{}%
\fi}}
\makeatother

\begin{document}
\lipsum[1-6]
\section{bla}
This is a test  This is a test  This is a test This is a test
This is a test This is a test This is a test
This is a test
\end{document}


Output:

-
unfortunately, this will also result two possibly unwanted outcomes: in the test provided, the next page contains only one short line; that would not be wonderful if it ended a chapter (unless it's done intentionally for effect). and any subsequent page may end with a single line of a longer paragraph, which may not be intended. –  barbara beeton Feb 23 '14 at 13:53
\documentclass{book}
\usepackage[showframe]{geometry}% just for this example
\usepackage{lipsum}
\newcommand\dummy{This is a test }
\widowpenalty=-1000 %%%%%%%%%%%%%%%%%%%%%%%%%%
\clubpenalty=-1000  %%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\lipsum[1-6]
\section{bla}
This is a test  This is a test  This is a test This is a test
This is a test This is a test This is a test
This is a test
\end{document}

-