It was a most audacious application of the Emanuel rule.

"Never allow a crisis to go to waste," Rahm Emanuel said when he was President Barack Obama's chief of staff.

On Wednesday, Obama observed that recommendation in unorthodox fashion, invoking the grade-school massacre in Newtown, Conn., to advance his agenda, not just on gun control, but on taxes, the debt limit, energy and immigration reform.

"Goodness," Obama said. "If there's one thing we should have after this week, it should be a sense of perspective about what's important."

And what's important? "Right now what the country needs is for us to compromise, get a deficit-reduction deal in place, make sure middle-class taxes don't go up," the president said, adding to his wish list gun control and an end to debt-limit fights. "Focus on issues like energy, and immigration reform and all the things that will really make a determination as to whether our country grows."

It was an unfortunate juxtaposition and perhaps not what Obama intended. The statement itself was powerful: Obama added much-needed urgency and specificity to his call for gun-control measures

But the experience showed how difficult it will be to keep the focus on this issue. The first three questioners asked Obama about "fiscal cliff" negotiations. What was designed to draw attention to gun control turned into a forum for the president to taunt congressional Republicans over taxes and spending.

Obama accused Republicans of operating out of personal animus toward him. "At some point there's got to be, I think, a recognition on the part of my Republican friends that, you know, take the deal," he said. "You know," he added, "it is very hard for them to say yes to me. But, you know, at some point, you know, they've got to take me out of it and think about their voters and think about what's best for the country."

There's some truth to that, but it drew a predictably angry reply from House Speaker John Boehner, who said that Obama, if he doesn't come around to the Republicans' position, would "be responsible for the largest tax increase in American history."

Lost in the firefight was the real reason for the president's appearance: advancing measures to reduce gun violence. Reporters inquired skeptically about his dedication to the issue.

USA Today's David Jackson asked why this effort would be different from past failures.

ABC News' Jake Tapper asked Obama about his "political calculation" not to talk about gun violence until now. "Where have you been?" he asked.

"I don't think I've been on vacation," an irritated Obama replied.

But even as he vowed to take action on guns over the "next couple months," his immediate tactic was to use the shootings to strengthen his hand on the topic of the budget standoff.

The need to compromise on the fiscal cliff "has not yet taken up on Capitol Hill," he said. "And when you think about what we've gone through over the last couple of months -- a devastating hurricane, and now one of the worst tragedies in our memory -- the country deserves folks to be willing to compromise on behalf of the greater good and not tangle themselves up in a whole bunch of ideological positions that don't make much sense."

The country does deserve leaders who are willing to compromise on the fiscal cliff -- for reasons that have nothing to do with the Newtown dead.

Contact Dana Milbank at danamilbank@washpost.com.