Borer is one of the 39 forbidden Av Melachot of Shabbat. Borer can be defined as taking something out of a mixture at random and placing it in a designated group or pile. 
One violates Borer on a Deoritta level in one of three ways. The common factor between all of them is that such is the normal way Borer is done during the weekday. 
Separating refuse from food is a violation of Borer. Even if one takes the food with one’s hands with intent to eat the food immediately, one still violates Borer on a Deoritta level. 
Separating with a vessel used for separating such as a strainer or a sieve is a violation of Borer. Even if one takes the food from the refuse for immediate use, nonetheless, one violates Borer on a Deoritta level. 
Separating to eat the food after some time. Even if one separates with one’s hands the food from the refuse, one still violates Borer on a Deoritta level. 
In the Mishkan
In the construction of the Mishkan, Borer was performed as part of the process of manufacturing dyes. ; after the dye plants were threshed, any impurities that could not be removed by winnowing, such as rocks and pebbles were hand-selected out of the mixture. 
Separating for other people
One is permitted to separate for other people as long as one does it for immediate use, with one’s hand, and food from the refuse. 
One is permitted to separate for guests (or peel fruits) enough food that it should be presentable even if one knows that not all of the food will be eaten. 
It’s permitted to separate for animals as long as it’s for immediate use, with one’s hand, and one separates the food from the refuse. 
The permitted way to separate
In order to permit selecting on Shabbat one must fulfill the following three conditions:
You must separate what you want from what you don’t want.
You must separate with one’s hand.
You must separate for immediate use or just prior to a meal (the amount of time it takes to prepare the food). 
Clarification of the first condition
It's permissible to remove a the refuse together with a piece of a good food.  Nonetheless, one should make sure that one remove a substantial amount of good together with the bad. 
If one has food in one’s mouth one may remove what you don't want from what you want. 
If a food has a peel that covers it entirely one may remove the part that’s unwanted (peel) from the part that’s desired (fruit), however this action must be done right before the meal and with one's hand. 
Where it’s impossible to separate the food from the waste it’s permissible to take out the waste. For example, one who cuts open a cantaloupe may scoop out the seeds and leave the fruit. 
Taking refuse from the food
It is forbidden to separate on Shabbat by taking the refuse from the food. It is forbidden even when it’s done with one hand. 
One violates Borer by taking the refuse from the food even if one only separated a portion of the refuse and didn’t complete the separation. 
It’s forbidden to separate refuse from food even if the refuse is slightly edible. 
Taking a desired food from an undesired one
If there are two foods that are mixed and one wants one to eat one now and not the other, the one he wants to eat is called the ‘food’ and the unwanted one is called the ‘refuse’ and so it is forbidden to take the unwanted one from the other. 
For example, if almonds and walnuts are mixed, and one only intends to eat the almonds, one may take the almonds from the mixture but not the walnuts. 
Separating two foods to be used for later
If there’s two foods (meaning both are desired for use) there’s a dispute whether one is allowed to separate for later use, Ashkenazim should be strict and Sephardim may be lenient. 
It’s permissible to separate a food that’s not desired now but desired for later in the same meal from another food that’s desired right now. 
It’s permissible to remove a sticker, label, or foil stuck to challah, as long as it is done right before eating. 
One may remove honeydew or other melon seeds which are concentrated in the center of the fruit if done right before eating. 
A knife isn’t considered a vessel designated for borer and may be used to peel. 
One may remove a stem from a fruit right before eating. 
It’s permissible to crack a nut with a nutcracker. 
If a candy wrapper got stuck to the candy, one should only remove the wrapper right before eating. 
It is permissible to remove a inedible shell or peel from a food as long as it’s done by hand and immediately prior to eating. Examples include:
A utensil like a fork is permissible if it’s used as an extension to one’s hand, meaning it’s used not to get one’s hands dirty or in order to pick up a liquid but it doesn’t help one separate any better than if one did it with one’s hands. Some Sephardic authorities permit under all circumstances. 
Some say that using a peeler is an issue of using a tool designated for Borer.
Clarification of the third condition
It is only permitted to separate with intent to eat the food immediately, while it’s forbidden to separate with intent to eat the food after some time even within the same day. 
Separating before a meal for the time it takes to prepare the meal is considered separating for immediate use. For example if it takes one a half hour to prepare for the meal one may separate only within a half hour of the meal.  One may not separate and then take a few minute break before the meal. 
Separating right before a meal is permissible even if one will only eat the food later in meal which may be after several hours. However, separating to eat food after the meal or in another meal is forbidden. 
Some say that the time limit for separating food from other food has a longer time period that separating food from waste, however, Ashkenazim shouldn’t rely on this, and Sephardim shouldn’t rely on this unless there’s a great need. 
If one separated in order to eat immediately and then changed his mind and decided not to eat, some say that he violated Borer, while others say it’s permissible after the fact, therefore one should avoid such a situation. 
Alternative ways to permit Borer
One may throw all of the items of a mixture onto a table or on the ground so that they scatter. Once the items are separate identifiable units it is permitted to use each one separately without any prohibition of Borer. 
Taking off a piece of food (wanted part) along with the non-wanted food is permitted. 
What constitutes a mixture?
A group of identical items isn't considered a mixture and may be separated without violating borer. 
However, if there’s a difference in the species, taste, function, or quality in the foods the group of items is considered a mixture. 
The following are examples of groups that constitute a mixture being that the items are different in some of the above respects:
cooked and baked apples have different tastes 
boiled and roasted chicken have different tastes 
soup spoon and teaspoon have different functions 
kitchen and table knife have different functions 
large and small plates have different functions 
It’s permissible to take full matzah boards from a box which has broken pieces in order to have two full boards for Lechem Mishna even if one does this by taking out one board at a time and putting back the broken boards. 
However, one may not take all the broken pieces out of a stack of matzah’s with whole and broken boards of matzah unless one plans on using all the matzah (broken and whole) for that meal. 
Something as having a different qualities if the undesired one is eaten only out of necessity 
fresh and spoiled grapes have different qualities 
cooked and burnt meats have different qualities 
If only part of the fruit is spoiled one may remove that fruit from a mixture of good fruits. However, an altogether rotten fruit may not be removed from a mixture of good fruits. 
In a group of items of different sizes or colors, the difference in size or color doesn’t make it a mixture unless it changes it’s function. 
One may take items from a mixture of two different types but should be careful not to separate the different types by size. For example, one shouldn't assort a basket of apples and pears by separating by size. 
One may separate different items some of which are more aesthetically pleasing from others which are less aesthetically pleasing as long as both objects are equally usable. 
What type of arrangement is considered a mixture?
There's three possible arrangement of mixtures. 1) A mixture can consist of disparate objects that are near each other. 2) A mixture is formed when there's items attached to one another. 3) Items on top of one another also form a mixture. 
However, if the items are readily distinguishable because of a clear and striking difference of consistency or structure are not considered a mixture. For example, meatballs in sauce is not a mixture. 
Items that are close
A group of objects are considered a mixture if the individual items lose their identity as individuals and the items are seen as a group and not individuals. This includes examples such as
The greater amount of objects in a concentrated area makes the items form a mixture. The larger the objects the more items that are needed in order for the items to lose their identity. 
If the group of objects is possibly a mixture and it's unclear we’re strict to consider it a mixture not to do borer. 
A totally rotten fruit among good fruits constitutes a mixture and so one may not remove a good fruit if one doesn’t intend to eat it immediately. However, one may remove a fruit that’s surrounding the fruit that’s adjacent to the rotten fruit. 
Items that are attached are considered a mixture. This includes the following examples:
the pit of the fruit to the flesh of the fruit 
It's permissible to separate the items that are attached except at the junction of their connection (as opposed to close items where even the outer items may not be separated). For example, it's permissible to cut away fat on meat if one leaves a sliver of the fat attached to the meat. 
If items are piled on top of one another, they are considered a mixture even if each item is individually recognizable.  This includes the following examples:
It's permissible to remove unwanted top items in order to reach a wanted item on bottom of the mixture. 
Separating non-food items
It’s forbidden to separate a mixture of non-food items such as clothes or vessels. According to Sephardim some say that one may be lenient. 
One may not select clothes from the cabinet except right before using them, however, it’d be forbidden to take them out of the closet at night for the next morning. 
One shouldn’t remove a book from a bookcase except right before one plans on reading it. It’s permissible to remove the book, read a little in it immediately and leave it for later. 
A selection may be made prior to immediate use only if the immediate use is the primary purpose of that object. For example, one may not sort different mixed foods before storing them in the refrigerator as storing food is the primary use of food. Similarly, one may not remove the shell of an egg before continuing in the process of making egg salad if one doesn’t intend to eat the egg salad immediately after it’s made. 
One may not remove a drink bottle from a refrigerator where the bottles are jumbled together except for immediate use of drinking (or taking it out to lose its chill and then drink). 
Ideally, one should eat all the food that was separated in preparation for the meal, however, if there are leftovers of food that was separated for the meal or one changed one’s mind not to eat, the food may be eaten later on Shabbat. 
It’s forbidden to sort a mixed group of cutlery to put them into separate compartments. Similarly, it’s forbidden to pick out items of a certain variety, dry them and then place them back in their compartment. 
However, it is permitted to take one cutlery at a time, dry it and then place it in it’s compartment. 
Certainly, it’s permissible to sort cutlery even from a mixture so that one can set the table for the meal that’s going to start immediately after sorting the cutlery. 
Cutlery of different kind (knife, spoon, fork) and of different functions (cutlery for dairy and cutlery for meat, a serving spoon and a regular spoon) constitute a mixture. 
One is forbidden from sorting a jumbled assortment of toys. 
One may not organize a stack of papers in an order unless one intends on reading them immediately. 
Putting books back on shelf
One is permitted to take one book at a time and return it to the shelf if one isn’t particular about which book one takes. However, one should not make a pile of books and put back the books even if one does it one by one. Lastly, it’s permitted to make a pile of books if one doesn’t return them to the shelf. 
It’s permissible and preferable that each person who prays to return their Siddur so that it doesn’t cause those who have to clean up to be involved in separating. 
One may not sort different books in a pile to put them back on the shelf, however, if one wishes to clear the table, one may pick up each book one at a time and place it on the shelf in it’s appropriate shelf. 
Taking holy items out of garbage
If one finds a paper with Torah written on it in the garbage, one may remove the papers and read them a little right away. However, if one finds Tefillin or Tefillin straps in a garbage, one may remove the it. 
Borer by Mistake
If one took an object from a mixture with intent to eat it and it terns out to be undesirable one didn’t violate Borer. For example, if one takes a fruit from a mixture with intent to eat it and it turns out that it’s rotten one didn’t do Borer. 
It’s permitted to cause a mixture to separate naturally if the borer would have occurred naturally anyway without your interference. For example, it’s permitted to turn a bottle upright even though it’ll cause the sediment to fall to the bottom since that would have occurred anyway. 
Fish or meat bones
When preparing or eating fish or meat one must be careful not to separate the bones from the meat. One should eat the fish and spit out or remove the bones from one’s mouth after one separated the bones from the meat. If that’s not practical or convenient, one should hold the bone and eat the meat, hold the bone (with one’s knife or hand) and cut away the meat, or to remove each bone and suck it. If none of those are possible, one should remove the bones with a bit of meat attached. 
Some have the practice to remove the bones from fish or meat in the normal way, and they have what to rely on, however it may only be done in the course of eating. 
One shouldn’t remove bare bones from one’s plate when there’s other foods right next to it, rather they should be left as is on the plate. 
It is permissible to remove chicken skin from chicken on Shabbat right before eating. 
However, grilled chicken skin may be removed even not before eating. 
Regarding watermelon seeds, according to Ashkenazim one should eat the melon and spit out the seeds. If that’s difficult, one may shake off the seeds right before eating and those that remain remove with one’s hand right before eating. According to Sephardim, one may shake off the seeds and those that don’t come off may be removed. 
One may remove a pit from a fruit whether the pit doesn’t come away from the fruit without taking away part of the fruit. For example, plums and peaches have pits that may be removed since when you remove the pit the flesh of the fruit comes with it. 
However, one may not take the pit of a fruit if the pit will come clean without any of the flesh of the fruit, rather one should open the fruit and have the pit drop out, or take the fruit off the pit (and not the reverse). Some permit the removal of the pit even from such fruits if it’s done right before eating. 
Taking a particular bencher from a pile is considered Borer unless it fulfills the requirements of taking the food from refuse for immediate use with one’s hand. 
Filtering tap water on Shabbat
If the tap water is drinkable without filtering it is permissible to filter it on Shabbat. Those who hold that one should not drink New York tap water because of copepods, according to many poskim, may filter the water on Shabbat. 
Cluster of grapes
If there are rotten grapes among good grapes, one should eat the good grapes and leave the rotten ones and not remove the rotten ones to make the cluster presentable for guests.
One must check lettuce to make sure that there’s no bugs on it. On Shabbat, one may remove a large insect such as a caterpillar, however it’s preferable to take it off with a piece of lettuce. However, a small insect may not be removed unless one takes a piece of the lettuce with it. 
One should use a spoon to remove a teabag from a cup of tea, so that the drips of tea absorbed in the teabag aren't separated from the teabag. 
If a tea kettle has a mixture of tea and tea leaves and at the spout of the kettle there is a mesh wiring that separate out the leaves, one may pour from the kettle as long as the tea leaves have settled to the bottom of the pot and aren't being separated from the liquid going through the spout. However, once the flow comes to a trickle one shouldn't pour from the kettle because in doing so one would be separating the tea from the tea leaves using a strainer. 
One may not remove peas from the pod as this violates the melacha of threshing (Dosh) unless the pod is also edible. 
One may remove a grape from the bunch (or bananas from a bunch) as long as it’s done right before eating and the bunch is cut from the vine. Some are stringent regarding removing dates from the bunch. 
In a fruit bowl, one may remove a grape sitting on top of a plum in order to eat the plum, however if the top grape is rotten, it’s forbidden to remove it, rather one may spill out the whole bowl and pick out the plum. 
One may not strain fruit juice from pulp (the fruit’s flesh) if either most people in the world are particular to have juice strained or the particular person straining it is particular. 
One may wash off grapes if one is only doing so for cleanliness, however, one may not do so if one's intention is to remove some unwanted substance it is forbidden. 
↑Sh”t Mechaze Eliyahu in name of Rav Shlomo Zalman and Rav Elyashiv, Shabbos Kitchen pg 85. Mishna Brurah in his introduction to Siman 319 writes that Borer is one of the Av Melachot and incurs the same penalties of a Chatat Korban for an unintentional violation and stoning for intentional violation. Unfortunately, many people transgress this prohibition without thinking because it’s a very common activity and almost unavoidable.
The Gemara (74a) cites a cryptic Braisa, which seems self-contradictory: the Braisa first permits selecting from a food mixture and then rules that doing so is forbidden by Torah law. The Gemara suggests five ways to reconcile the Braisa, three of which remain relevant. First, one may select from a food mixture by hand but it is forbidden by Torah law to select using a specialized sorting instrument such as a sieve. Second, one may select from a food mixture as long as one takes the Ochel (food) from the Psoles (non-food) but it is forbidden by Torah law to select the Psoles from the Ochel. Third, one may select from a food mixture for purposes of immediate consumption but selecting and then putting aside for future use is forbidden by Torah law. * Rabbeinu Chananel (74a-b) understands that the three answers of the Gemara do not disagree; in order to avoid Borer one must fulfill all three conditions by separating the Ochel from the Psoles by hand for immediate use. While the halacha follows Rabbeinu Chananel, since Shulchan Aruch 317:1 agrees with him, it is interesting to note that not all rishonim agree.
For instance, Rashi 75a s.v. vehatanya holds that as long as a person does the separation immediately before eating it is permitted. Rashi’s opinion seems to be that the primary requirement is that perform an action as part of the process of eating. In any event, Tosfot 75a s.v. vahatanya disagrees with Rashi’s approach and seems to require at least that the selection be for immediate consumption as well done with one’s hand. Perhaps Tosfot believes it is only permitted to separate foods if it is significantly different from the way that a person would separate for storage.
↑ Rama 319:1 writes that it’s permissible to separate for others to eat. Mishna Brurah 319:6 clarifies that it’s permissible even if one is preparing for others but he himself isn’t eating from the food that was separated.
↑ Sh”t Rav Pealim 1:12 writes that it’s logical that it’s permissible to separate food to fill a plate or basket for guests even if the guests won’t eat all the food because one is separating for an immediate purpose of serving the guests respectfully. This is also the opinion of Ben Ish Chai (Beshalach 3), Or Letzion (vol 2 chap 31:3), and Shemirat Shabbat Kehilchata (chap 3:40 note 115) in name of Rav Shlomo Zalman.
↑ S”A 319:1-2, Shemirat Shabbat KeHilchata 3:2 bring these three requirements as halacha.
↑ Taz 319:13 writes that when removing a fly from a drink it’s permissible if one takes the fly with some liquid with it. Most achronim hold like the Taz including Kitzur Shulchan Aruch 80:19, Mishna Brurah 319:61, Shemirat Shabbat KeHilchata 3:18, and The 39 Melachos (Rabbi Ribiat, vol 3 pg 419).
Chazon Ish explained that the Taz means that since the fly was contained in a separate mixture of liquid removing that mixture entirely and not separating within the mixture is permissible. According to this, a significant amount of liquid must be removed with the fly so that it can form it’s own mixture.
However, Shabbos Kitchen (pg 104-5 in the note) writes that the Mishna Brurah disagrees with the Chazon ish and concludes that a particle of liquid suffices and that the Taz’s leniency would apply to dry foods. The Shabbat kitchen explains that the reason of the Taz’s leniency is because of it’s not similar to the way borer is normally done.
Iglai Tal #6 writes that the Taz’s leniency only allows you to do it right before the eating. Shabbos Kitchen argues that it should be permitted even for storing away. Menuchat Ahava 7:11 agrees. See Sh”t Tefillah lemoshe 1:49(9) who argues on the Chazon Ish.
↑Shabbos Kitchen (pg 103) in name of Rav Scheinberg
↑ S”A 319:4 writes that it’s forbidden to take the refuse from food even with one hand. Mishna Brurah 319:17 writes that even though some don’t have the words “one hand” in S”A, still one shouldn’t be lenient to take to take refuse from food with one hand. This halacha is also found in Shemirat Shabbat KeHilchata 3:22.
↑ The Pri Megadim (M”Z 319:2) writes that there’s a logic to permit separating two foods if one will eat both but just after some time since in this case there’s no food being taken from refuse, and concludes with a Tzarich Iyun. However, the Mishna Brurah (319:12, Beiur Halacha 319:3 s.v. Hayu) based on Tosafot Shabbat 74a d"h "hay lifanav shnei mini ochlin" argues that it’s a definite violation of Borer to separate the two foods. Or Letzion (vol 2 chap 31 note 4), Menuchat Ahava, and Shabbos Kitchen (84) rule like Mishna Brurah. Yalkut Yosef (Shabbat vol 3 pg 279; see Sh”t Yabia Omer 5:31:5) brings two opinions and leaves it as a doubt. Sh”t Maharshag 1:54 also leaves this question in doubt.
↑ Rabbi Moshe Feinstein in Sh”t Igrot Moshe O"C 1:126, Brit Olam (Borer #28), Shemirat Shabbat KeHilchata 3:45, and Shabbos Kitchen permit using utensils when they are used as because one can't touch it with one's hand (because of manners or the food is hot) but when it's used to aid in seperation, the utensils are forbidden. However, Yalkut Yosef (Shabbat vol 3 pg 261) in name of Rabbi Ovadyah Yosef, Menuchat Ahava (vol 2 7:7), and Sh"t Or Letzion (1:27 pg 68) permit it under all circumstances. Lastly, Rabbi Shlomo Amar in Sh"t Shema Shlomo 1:8 writes that it's preferable to be strict like the Igrot Moshe, however in cases of great need or if there's a doubt whether it's aidding the separation or it's for conveince, it's permissible.
↑ S”A 319:2 rules that separating food in one’s hand for later in the day is considered like separating to store the food and one violates Borer Deoritta.
↑ Mishna Brurah 319:45 says that the borer must be done right next to the meal. Even though the Ben Ish Chai (Beshalach 1) writes that within a half hour of the meal is considered immediately before the meal, Sh”t Igrot Moshe 4:74 (Borer #13) holds that one only has the time it takes to prepare the meal prior to the meal. So writes the Shemirat Shabbat KeHilchata 3:63, The 39 Melachos (Rabbi Ribiat, vol 3 pg 412), Shabbos Kitchen (pg 100), Yalkut Yosef (Shabbat vol 3 pg 265 486), and Menuchat Ahava (vol 2 7:6).
↑ Mishna Brurah 319:5 writes that separating with intent to eat the food after the meal or in another meal is forbidden.
↑Rambam (Shabbat 8:13) writes that one violates Borer if one separates for later in the day such as separating in the morning with intent to eat in the evening. Bet Yosef (319:1-3; Bet Yosef is the author of S”A) explains that the Rambam holds that by separating two foods (one that’s wanted and one unwanted) one is permitted to separate even if one will eat it in the next 3-4 hours, whereas separating a food from a refuse is permitted to only immediately prior to a meal. [Yalkut Yosef (Shabbat vol 3 pg 278) quotes Rabbi Moshe Hershler’s notes to Ramban (note 158) who explains that by food and refuse, separating makes the food edible and that’s only permissible if one eats it immediately, however by two foods, separating is only forbidden as it sets aside two foods and that only is forbidden if it’s stored away for a long time.] S”A 319:1-3 uses the same language of the Rambam which implies that S”A holds of the distinction he made in the words of the Rambam. So writes the Machasit HaShekel 319:6. However, Beiur Halacha (319:3 s.v. SheBirer) quotes the Tosefet Shabbat and Maaseh Rokeach who argue on the distinction of the Bet Yosef and the language of the Rambam is just imprecise. This is also the opinion of the Mishna Brurah 319:16. However, Rama 319:1 rules that it is only permitted to separate right before a meal, seemingly making no difference whether it’s separating between food and refuse or between two foods. So writes the Machasit HaShekel 319:6 (in explanation of Rama). Yalkut Yosef (Shabbat vol 3 pg 278) brings two opinions on this issue and even though that in the footnote it sounds like it’s permissible because of a Sfek Safeka, he concludes by leaving it unresolved.
↑ Shaar HaTziyun 319:5 quotes the Pri Megadim who says that after the fact the food is permitted if one had in mind to eat it immediately even if one changes his mind afterwards. Yalkut Yosef (Shabbat vol 3 pg 272) brings this as a doubt and says that one should avoid such a situation.
↑Based on Shabbat 74a, it seems that throwing a mixture out of the container so that the pieces separate so it’s not a mixture anymore would be permitted and allow one to put away each piece of the mixture separately. This is also the opinion of Shemirat Shabbat KeHilchata 3:3 (note 6 in name of Rav Shlomo Zalman), Sh”t Igrot Moshe 4:74 Borer #11
↑ Mishna Brurah 319:61 and 62. Chazon Ish (53:16) disagrees.
The Taz (319:13) writes that one cannot remove a fly from one’s soup because it would be considered Borer; however one can remove some soup with the fly. The Mishneh Brura (319:61) understood the Taz to mean that it’s not Borer when good was removed with the bad. However, the Chazon Ish 53:16 understood the Taz differently. He thought that only the soup surrounding the fly was considered mixed with the fly. Therefore the soup removed allowed the fly to be removed because the entire mixture was removed. It follows that removing a little good with the bad would be Asur.
↑ Rama 319:3 rules that it's permissible to seperate peices of fish by the size since it's all one type of food. Mishna Brurah 319:15 writes that even though the Taz argues on the Rama, most achronim agree with the Rama. So write's the Shabbos Kitchen (pg 87-88) and Shemirat Shabbat KeHilchata 3:24 that there's no borer when separating indentical objects.
↑ Kitzur Shulchan Aruch 80:17, Mishna Brurah 319:15, Shemirat Shabbat KeHilchata 3:1, Shabbos Kitchen pg 86, 39 Melachos (vol 2, pg 382), and Yalkut Yosef (Shabbat vol 3 pg 327). See the Aruch HaShulchan 319:7 who is lenient.
↑Rabbi Mansour on Dailyhalacha.com writes that it's permissible for Sephardim to sort silverware on Shabbat. Yalkut Yosef (Shabbat, vol 3, pg 330 and 490) and Sh"t Yabia Omer 5:31 is lenient in certain cases.
↑ Shemirat Shabbat KeHilchata 3:68. See, however, 39 Melachos (vol 2, pg 388) who writes that clothes in a closet is not considered a mixture.
↑ Shemirat Shabbat KeHilchata (in the old 3:81, in the new 3:88) and Or Letzion (vol 2 chap 31:4) writes that one may take a single book and return it to the shelf since one has no concern about which book he picks up. The Or Letzion adds that it’s permitted to make a pile of books if one doesn’t return them to the shelf, however, if one made a pile and now separates it one by one it’s forbidden because one is taking something wanted from others that are not wanted temporarily. Sh”t Yabia Omer 5:31 permits returning the books to the shelf in any fashion. 39 Melachos (vol 2, pg 391) writes that two sefarim piled one on the other is not a mixture.
↑ Or Letzion (vol 2 chap 31:2) writes that one is permitted to remove papers that have kedusha from a garbage if one uses it right away since that is considered removing good from bad with one’s hand for immediate use. However, if one finds Tefillin and it’s impossible to use the Tefillin on Shabbat, one is still permitted because one is considered as having separated for an immediate purpose of giving respect to the Tefillin. Yalkut Yosef (Shabbat vol 3 pg 333) writes that one doesn’t have to read from the pages.
↑ Rama 321:19 writes that one may only peel an onion right before eating it. Magen Avraham 321:30 writes that the same is true of peeling an apple because it is a form of Borer. Pri Megadim A”A 321:30 asks that peeling apples shouldn’t be considered Borer because most people eat the peel. Therefore, Rav Ovadyah in Chazon Ovadyah (vol 4, pg 195) and Yalkut Yosef (Shabbat vol 3 pg 304) rules like the Magen Avraham and only permits removing chicken skin right before eating. Ayil Meshulash (6:17) quoting Rav Elyashiv, Sh"t Bear Moshe 6:47 and Sh"t Az Nidbaru 7:16(1) agree.
Igrot Moshe 4:74 (Borer #8) writes that the halacha follows the Magen Avraham and not the Pri Megadim, however, chicken skin is a part of the chicken completely and removing it is like cutting a piece of chicken which is permitted even not immediately prior to eating unlike apple peels. Sh"t Rivevot Efraim 5:267 agrees. Orchot Shabbat (vol 1, 3:93, pg 166) writes that Rav Moshe was writing in a place where everyone would eat chicken skin, however, in Israel it may only be removed right before the meal like fruit peels. The English translation of Shemirat Shabbat KeHilchata 3:30 adds that whether chicken skin is usually eaten depends on each locality. However, Chut Shani (vol 2, pg 81) writes it’s possible to say since it’s totally food and it’s only because we’re spoiled we don’t eat it, it shouldn’t be considered waste, nonetheless, he concludes that one should remove it before the meal.
However, Shemirat Shabbat KeHilchata 3:30 (in new editions 3:34) writes that the Magen Avraham held most people don’t eat apple peels but fundamentally he agrees with the Pri Megadim; thus, he rules, since most people eat chicken skin one may remove it even not right before the meal. However, he adds that some are strict based on the Magen Avraham. See further Menuchat Ahava (vol 2 7:13) and Shabbos Kitchen (pg 114).
Aruch HaShulchan 321:26 writes that it should only be removed right before eating because of Mafshit. 39 Melachos (vol 2, pg 431) writes that preferably one should be strict for this opinion.
see also Ayil Meshullash 6: note 55 quoting Rav Elyashiv and Az Nidberu 7:16
↑ Orchot Shabbat (chap 3 note 106) writes that everyone eats grilled chicken skin and can be removed even not right before eating. Korei Oneg (vol 3, pg 55) agrees. Ayil Meshulash (pg 66 note 55) writes that grilled chicken skin is considered part of the food. Therefore, even someone who doesn't eat it may remove the skin.
↑ Kaf HaChaim 319:47 writes that one doesn’t have to eat the whole melon and spit out the seeds because that’s not considered the normal way of eating; rather one should shake off the seeds and those that don’t fall off remove with one’s hand but it’s preferable to do it with a shinui. Chazon Ovadyah (vol 4, pg 195) agrees.
Sh”t Igrot Moshe 4:74 (Borer #7) writes that one should eat the whole melon and spit out the seeds and if that’s difficult one should shake off the seeds and those that remain remove with one’s hand. Halachos of Shabbat (vol 3, pg 174), 39 Melachos (vol 2, pg 411), and Shemirat Shabbat KeHilchata 3:16 agree. Shemirat Shabbat KeHilchata 3:16 adds that those who do remove watermelon seeds right before eating watermelon have what to rely on.
↑ S”A 319:10, Mishna Brurah 319:34, Shemirat Shabbat KeHilchata 3:56 (in new editions 3:60), Chazon Ish 53 s.v. VeIm, 39 Melachos (Rabbi Ribiat, vol 3 pg 520)
↑Shemirat Shabbat KeHilchata 3:60 writes that if people don’t drink the water in a certain place because of bugs one shouldn’t use a filter, however, one may drink directly from the faucet without a cup.
However, Rav Hershel Schachter on “Kashrus of Bugs” on OU Kosher Tidbits (www.ouradio.org, min 39-45) permits using a filter for NY tap water on Shabbat based on 4 reasons: (1) The bugs might be considered kosher (see S”A YD 84:16) (2) The amount of bugs in the water varies at different times of the day and may not require checking (See RJJ vol 49, pg 34, by David Shabtai) (3) The bugs aren’t necessarily waste since non-Jews eat it and it’s only halacha that prevents us (Chaye Adam in Nishmat Adam 16:5) (4) The filter is built in and automatically filters all the water even that which is for non-drinking purposes (Minchat Yitzchak 7:23). Rav Doniel Nuestadt (Yeshurun vol 17, pg 535) discusses the last two reasons at length and argues that the third reason is a dispute in the rishonim. See Rav Belsky in Shulchan HaLevi 12 who writes that he holds the NY tap water is kosher, however, one who holds it needs filtering may not filter it on Shabbat and disagrees with the third argument.