Cut each onion top to bottom: Peel away the skin.
Slice into half moons: Slice each half of the onion into thin, evenly-sized half moons.
Cut the half moon slices in half: You will have at least 6 cups of chopped onions. But don't worry too much about quantities with this recipe; if you have an extra onion to use up, throw it in!
Melt the butter with the oil: Melt the butter in the pan set over medium-low heat.
Add the onions: After the butter foams up and then settles down, add the onions and stir to coat with the butter.
Cover and cook for 15 minutes: Cover the pan and cook for 15 minutes on low heat.
Season the onions: Remove the lid. The onions should have wilted down somewhat. Stir in 1 teaspoon salt, a generous quantity of black pepper, and 1/2 teaspoon sugar (this helps the onions caramelize).
Cook the onions for 40 minutes to 1 hour: Turn the heat up to medium and cook, uncovered and stirring every few minutes, until the onions are deeply browned. Turn down the heat if the onions scorch or stick to the pan; the browning doesn't come through burning, but through slow, even caramelization.
Heat the broth: As the onions approach a deep walnut color, heat the broth in a separate pot.
Add the flour: Add 3 tablespoons flour to the caramelized onions and cook and stir for about 1 minute.
Add broth and simmer for at least 1 hour: Add the hot broth to the caramelized onions and bring to a boil. If using wine, add this now too. Lower the heat and partially cover the pan. (If you want to add other aromatics such as herbs or spices, do so now. We suggest thyme!) Cook gently over low heat for at least 1 hour or until the broth is slightly reduced.
Taste and season: Taste and season with additional salt and pepper if needed. Add a finishing splash of brandy, if desired!
Top with toast and cheese: Heat the oven to 350°F. Divide the soup between small but deep oven-safe bowls. Top each with a slice (or two) of toasted baguette and sprinkle grated cheese in a thick layer over the bread and up to the edge of the bowl.
Bake for 20 to 30 minutes: Place the bowls on a baking sheet or in a casserole dish. Bake until the cheese is thoroughly melted.
Broil until the cheese is browned: Turn the oven from bake to broil and broil the soup for 1 to 3 minutes or until the cheese is browned and bubbling. Remove carefully from the oven and let cool for a few minutes before serving on heatproof dishes or trivets. Serve with freshly ground pepper and minced fresh onion or shallot, which provides a welcome bite in contrast to the very sweet and mellow soup.