If one wants to eat a fruit on Shabbos and discovers that it is partly rotten, is it permitted to cut away the bad part and eat the rest?
Apparently this would fall under the category of borer, selecting the bad from the good, which is a no-no.
A shocker is in the Rabbeinu Chananel [Shabbos 74a] who writes that when the good, edible food is connected to the inedible, the melacha would be dosh [threshing] and not borer. Borer, explains Rabbeinu Chananel, is a mixture, not one unit. According to this, there would be no heter of cutting away the food from the rotten part [אוכל מתוך פסולת] right before eating, which is a special dispensation given in cases of borer [but see Birkas Avraham Shabbos 74a] but not other melachos.
However the Biur Halacha [שי"ט ד"ה מן העלין] seems to rule that one would be permitted to cut away the rotten part, as this is considered part of the normal eating process [such as removing a peel which is permitted]. So rules the Minchas Yitzchak [ה' ל"ח] and the Shmiras Shabbos Ki-hichasa [פ"ג הערה נו].
However Rabbi Yisrael Harfenes [נשמת שבת בורר סי' ק"י] begs to differ and feels that it WOULD be borer and is dissimilar to removing a peel whose development is part of the natural growth process of the fruit.
Bottom line: There is room to be lenient to cut away the rotten part of the fruit. It is better, however, to remove part of the edible fruit together with the rotten part and then it would be permitted to eat the rest. [But see נשמת שבת סי' קי"ב that some authorities don't like the idea of removing part of the food with the unwanted part].
Eytza: Eat your fruits before they start rotting.