The classic case of Borer (selecting) involves a mixture with Ochel (food) and P’solet (waste), which is inedible. The Halacha only permits selecting from such a mixture if one removes the Ochel, by hand (without a utensil) for immediate consumption.
Tosafot (Shabbat 74), based on a variant reading of a Beraita and Rabbenu Hannanel, apply the prohibition of Borer even to a mixture in which both components are edible, but the person only desires to eat one of them. The desired food is considered Ochel relative to the undesired food, which becomes subjective P’solet. Rambam (8:12-13) also records this concept of “relative P’solet,” and it is codified by Maran.
The Poskim discuss whether the regular restrictions of Borer apply to such a mixture of Ochel and Ochel. Clearly, there is no leniency regarding the requirement of selecting by hand and choosing the desired item. The question is whether the requirement to only select for immediate consumption applies to mixtures of “relative P’solet.”
The Rambam uses an interesting language regarding the time frame. He says it is only prohibited when one selects in the morning for the afternoon. This implies that anything less than that would be permitted, such as selecting for use in three or four hours. Such a gap would not be permitted in a mixture with an objectively inedible component.
The Bet Yosef points out this inference, but questions why there should be any difference between the two types of mixtures. The Mishna Berura says that here is no difference; both are restricted to immediate consumption. This is also the opinion of Hacham Bension and Hacham Ovadia. Although the Kaf HaHaim (319:35) is lenient, in accordance with the Magen Abraham, the Halacha is in accordance with the strict opinion, since it is potentially an Issur D’oraita (Torah Prohibition).
There is no difference between a mixture of Ochel and P’solet and a mixture of two types of Ochel when one of them is undesired. Borer will only be permitted when done for immediate use.