In 1947, the Republican controlled 80th Congress, in a fit of partisanship and anti FDR sentiment, changed the Presidential Succession Law of 1886, enacted during the first term of President Grover Cleveland.
That law made the succession for the Presidency beyond the Vice President to be as follows: Secretary of State, Secretary of the Treasury, Secretary of War, Attorney General, and then other cabinet agencies, including Interior and Agriculture.
That law made sense, as it meant that in case of tragedy hitting the President and Vice President, that members of that President’s cabinet, people loyal to him, knowledgeable in foreign and defense policies, and domestic policies, would be next in line, in case of an emergency.
But the Republicans after World War II were furious that Franklin D. Roosevelt had been elected four times, so not only added the 22nd Amendment, limiting any future President to two elected term, or a maximum of ten years if he succeeded during a term, but also decided to make the Speaker of the House and the President pro tempore of the Senate second and third in line behind the Vice President. That, of course, meant, that if anything had happened to President Harry Truman, and with no Vice President for the remainder of that term of office, that Speaker Joseph Martin, a Republican, would have succeeded him.
The idea of having the opposition party gain the Presidency during a term due to a tragedy was not based on what was good for the nation, but pure partisanship by the GOP.
But now, the extremism in the GOP, including the Tea Party Movement right wing whackos, makes the idea of John Boehner, or some other Republican gaining power of the executive branch under a Democratic administration totally reprehensible, as that would mean a dramatic turn to the far Right, although the people voted in a Democratic administration. Also, the President pro tempore of the Senate, a position which is honorary based on seniority in the majority party in the Senate, brings the danger, not only of partisanship, but also the reality of a very old Senator, unfit to serve, being third in line for the Presidency, and at the time of Truman, second in line to be President!
That is why there is a need to repeal the 1947 law and return to the 1886 law, which makes the most sense, as the Speaker of the House, while elected, is only chosen by one Congressional district out of 435, and is therefore NOT representative of the nation, as much as a cabinet member, selected by the President but subject to Senate confirmation, is representative of the policies and ideals of the elected President!
The likelihood of this happening short term is near zero, but it is worthy of consideration for the near future!