Peel and slice the onions evenly in long slices, keep this aside.
To prepare the seasoning, heat oil in a pan (or use an iron skillet or a kadai for better results), and add mustard seeds.
When the mustard seeds starts spluttering add curry leaves, broken dry red chilies fry for a few seconds.
Add the sliced onions, ginger and garlic and salt, mix well, and saute the onions for few minutes until the onion starts browning or turns transparent in color. You don't have to caramelize the onions, but the the flavor of the dish will increase if you saute it for more time.
Once the onions are almost browned and cooked enough to your preference, add all the spices and mix everything well, let the onions get blended in the spices for about 2 to 3 minutes more.
Mix the tamarind paste in the water (you can make it without gravy also, if you do not want gravy you may skip this step) and add this to the onions, mix well. If needed you may add even more water for gravy and mix well.
Simmer the curry for about 2 to 3 minutes in low heat or until desired consistency (keep stirring in between as needed so it won't burn at the bottom of the pan. Serve the delicious, hot onion curry with chapathi or poori as you wish!