Years ago, Joe Kieta was out to dinner at a nice restaurant with his wife, celebrating their second anniversary.

Mr. Kieta, then the editor of The Merced Sun-Star in Merced, Calif., had just published a series of articles that led to the ouster of the local district attorney. As he was eating, a friend of the district attorney showed up and asked Mr. Kieta to go outside.

The man “challenged me to a fight right in the middle of this fancy restaurant,” Mr. Kieta, now the editor of The Fresno Bee in California, said on Friday.

The fatal shooting a day earlier at The Capital Gazette in Annapolis, Md., reverberated throughout newsrooms across the country, not only for its tragedy but also for the familiarity of conflicts like the suspected gunman’s long-running feud with the paper. Many reporters and editors, especially at the local level, have stories of being confronted or harassed by a resident upset by something in the newspaper. Unlike Thursday’s shooting, in which five people were killed, few of these situations end in violence.