AP

SO FAR, so presidential. The spin doctors who organised Barack Obama's world tour must be content with the public-relations success achieved by their man to date. The Democratic candidate visited Afghanistan over the weekend. Then, on Monday July 21st, he appeared in Iraq. He has enjoyed the sort of high-level reception generally reserved for heads of state; the accompanying press coverage will have his PR advisers salivating. Later this week he will visit Germany's capital, Berlin, where he may draw the size of crowd usually reserved for rock stars. The Democratic campaign must be delighted, not least by the neglect of his Republican rival, John McCain.

Yet, beyond public relations and an effort to make Mr Obama look more convincing as a potential commander-in-chief, the more substantial foreign policy news seems to be coming, if rather quietly, from Mr Obama's rivals. Over Iran's efforts to develop a nuclear programme, for example, George Bush had suggested that talking to America's enemies would be tantamount to appeasement. In contrast Mr Obama has long espoused direct talks with Iran. Although he has waffled a bit, saying that he would make appropriate “preparations”, his point has been that Iran should not be required to suspend its efforts to enrich uranium as a condition for holding talks.

Then came the news, this weekend, that William Burns, a high-ranking diplomat, sat down with Iranian envoys in Geneva to discuss Iran's nuclear programme. The meeting on Saturday did not produce spectacular results. Iran rejected Western demands that it stop enriching uranium, although it was given two more weeks to deliver a formal answer. But the meeting itself was news: it was the highest-level American contact with Iran during the Bush administration and it happened while Iran's centrifuges were spinning along, undermining the suggestion that holding talks with opponents in such circumstances is irresponsible. Mr McCain, however, continues to stress the need for a coercive approach to Iran with stringent preconditions necessary for any talks.

On Iraq, arguably, a shift has also taken place in the White House. Late last week news broke that Mr Bush and Iraq's prime minister, Nuri al-Maliki, had agreed to a “time horizon” for American troop withdrawals from the country. Precisely what this will mean is not yet clear. Mr Bush's officials were quick to talk about “aspirational goals” and to stress that any talk of withdrawal would continue to depend on a range of conditions: the facts on the ground would still determine any outcome, says the White House. Mr McCain, too, remains committed to leaving Iraq based on conditions, not calendars.

But Mr Maliki last week suggested in an interview with a German magazine that a timetable for American withdrawal would be welcome, even praising Mr Obama's timeframe of a phased exit over 16 months (without offering an endorsement of the candidate). He was quoted as saying “[He] Who wants to exit in a quicker way has a better assessment of the situation in Iraq.” His statement was later revised, perhaps under pressure from America, but it allowed Mr Obama's campaign to claim that his talk of timetables is justified. In contrast Mr McCain suggests that the Maliki-Bush agreement on “time horizons” was only possible because of the success of the surge of troops, begun in 2007, which he strongly advocated even when many others (including Mr Obama) thought it would be hopeless. Mr Obama has now removed his harshest criticism of the surge strategy from his campaign website.

Finally, on Afghanistan, although Mr McCain and Mr Bush admit no change of course, it has become clear that, along with Mr Obama, there is now general agreement on the need to renew the military effort with the provision of extra troops. Mr Obama is hoping to frame discussion of Afghanistan in his terms, and thereby to persuade voters that he is offering leadership on this particular issue: it helps that the Democrat can make the more plausible claim to beefing up in Afghanistan, if one assumes that he would be able redeploy troops from Iraq.