It sometimes happens that a person is staying one place for an extended period of time, during which he occasionally drinks. A common case is the night of Shabuot, when a person is inside the synagogue for several hours, and intermittently drinks tea or coffee throughout that time. In some communities, people spend several hours in the synagogue attending classes Sunday morning, and drink beverages intermittently.
Hacham Ovadia Yosef, in his Yehaveh Da’at, writes that if a person in this case had in mind when he recited "She’hakol" over the first cup of drink that he would be drinking subsequently, that Beracha suffices for the entire time he spends in that location. As long as he does not leave the building, the Beracha of "She’hakol" he recited over the first cup which he drank covers all subsequent cups, if he had this intention when he recited that first Beracha.
However, this situation poses a Halachic dilemma with regard to the Beracha of "Boreh Nefashot," which is to be recited after drinking a beverage. In the case of hot beverages, such as tea and coffee, this question does not arise, since "Boreh Nefashot" is not recited over a hot beverage which one sips slowly. However, if during the period a person spent in the given location, he drank a cup of water or juice, such that he must recite "Boreh Nefashot," he cannot delay this Beracha until after he drinks for the last time. The Beracha of "Boreh Nefashot" must be recited before the beverage is fully digested, and, unlike foods, beverages are digested very quickly. The Sitz Eliezer (Rav Eliezer Waldenberg, 1915-2006) maintained that one must recite "Boreh Nefashot" within a half-hour of drinking, while others say one has only a few minutes. The question then becomes, if somebody is in one location and drinking intermittently, after he recites "Boreh Nefashot" over a drink of water, does he then recite "She’hakol" when he drinks subsequently? Or, does his initial intention when he recited "She’hakol" over the first cup continue to remain in effect for subsequent drinks even after reciting "Boreh Nefashot"?
Hachan Ovadis cites the opinion of the Me’oreh Or who ruled, surprisingly, that the recitation of "Boreh Nefashot" does not interfere with the Beracha of "She’hakol" recited over the first cup. According to this opinion, a person in the situation described above who drinks water and must therefore recite "Boreh Nefashot" does not have to recite "She’hakol" when he drinks subsequently.
The Hafez Haim (Rav Yisrael Meir Kagan of Radin, 1839-1933), however, appears to have disagreed. In discussing the laws of the Seder in his Bi’ur Halacha, the Hafetz Haim addresses the case of a person who ate a Ke’zayit of Karpas at the Seder, and then recited "Boreh Nefashot" (despite the accepted practice not to recite "Boreh Nefashot" after eating the Karpas). The Hafetz Haim writes (based on the Rashba) that the person in this case must recite "Boreh Peri Ha’adama" before eating the Marror later in the Seder. Under normal circumstances, of course, we do not recite "Ha’adama" over the Marror, because the Marror is covered by the Beracha recited over the Karpas. However, the Hafetz Haim writes, if one recited "Boreh Nefashot" after eating the Karpas, this "cancels" the "Ha’adama" recited over the Karpas, thus necessitating a new Beracha over the Marror. It thus seems clear that the Hafetz Haim did not accept the ruling of the Me’oreh Or, and maintained that the recitation of "Boreh Nefashot" has the effect of "cancelling" the Beracha recited earlier, such that one who eats (or drinks) subsequently must recite a new Beracha. In his work Yabia Omer, Hacham Ovadia sides with this opinion, in opposition to the Me’oreh Or.
Returning to our case, of one who is in the same place for several hours and drinking intermittently, Hacham Ovadia offers two suggestions in order to avoid this question. If he drinks water first, before drinking hot beverages, he should have in mind for his Beracha of "She’hakol" to cover only this cup, and then he must recite a new Beracha of "She’hakol" when he drinks subsequently (after reciting "Boreh Nefashot") according to all views. Another option is to walk outside after reciting "Boreh Nefashot," which definitely has the effect of "ending" the effect of the original "She’hakol," so that according to all opinions the individual will need to recite a new Beracha of "She’hakol" when he drinks subsequently.
As mentioned, this issue does not arise if one drinks only hot beverages, such as tea or coffee. The Magen Abraham (Rav Abraham Gombiner, 1633-1683) ruled that after one drank a hot beverage, and the beverage has been fully digested, even though he does not require a "Boreh Nefashot," his Beracha of "She’hakol" is no longer in force, and he must recite a new Beracha when he drinks again. Hacham Ovadia, however, disputed this ruling, and maintained that since "Boreh Nefashot" is not recited, the initial "She’hakol" remains in force and covers the beverages drunk subsequently. Therefore, if one drinks only hot beverages, his initial "She’hakol" covers all his drinks throughout the time he remains in that location.
Summary: If a person stays in one place for several hours and intermittently drinks hot beverages such as tea and coffee, his initial Beracha of "She’hakol" recited over the first cup covers all the cups he drinks subsequently until he leaves, and so he does not repeat the Beracha over the subsequent cups. If he first drinks a cold beverage, such as water, and must therefore recite "Boreh Nefashot," he should have in mind when reciting "She’hakol" over the water that the Beracha covers only that cup. He then recites "Boreh Nefashot," and when he drinks again, he recites a new Beracha of "She’hakol." If he first drank a hot beverage and later drinks water, he should preferably leave the building for a moment after reciting "Boreh Nefashot" so that he will need to recite "She’hakol" over his next drinks according to all opinions. If he did not go outside, then he should recite "She’hakol" over his next drink, since his initial "She’hakol" is no longer effective one he recites "Boreh Nefashot."