The majority of residents of Calais might agree. The leader of the far-right National Front, Marine Le Pen, won a majority of the vote against Mr. Macron in the second round of the presidential election in May.

Mr. Macron wants a fresh start on policy regarding migrants, but until last week he had mainly allowed his tough-talking interior minister to set the tone: no coddling of migrants at Calais and harsh words for the humanitarian organizations working there.

The government wanted to avoid setting up new reception centers at Calais or do anything that would encourage migrants to head to that English Channel port, further exasperating local officials.

It has also pledged to step up the expulsion of economic migrants looking for work, as opposed to those seeking political asylum. Less than a third of the 91,000 illegal migrants arrested in France last year actually left the country.

Mr. Macron turned his attention to migrants last week in a speech in Orléans, vowing then to end the phenomenon of migrant encampments in France. “The first fight is to house everybody decently. Between now and the end of the year, I want no more men and women in the streets, in the woods, or lost,” he said.

“It’s a question of dignity, it’s a question of humanity, and of efficiency also,” he said at the end of a ceremony to swear in new French citizens.

“Most of those who are, dreadfully, called migrants today, are not all men and women demanding asylum, coming from countries where their lives are in danger,” Mr. Macron said. “There are many, more and more, who come from peaceful countries, and are following the economic migration routes, who are financing the smugglers, the bandits, even terrorists, and in those cases we need to be strict, tough even, rigorous, with those coming by those routes. We can’t welcome everybody.”