Heat oven to 350° F. Heat the oil in an ovenproof (preferably nonstick) skillet over medium heat. Add the potatoes. Cook until almost tender, about 10 minutes.
Add the onion. Cook until softened, about 5 minutes. Pour off all but 1 tablespoon of the oil. Season the vegetables with 1 teaspoon salt and ¼ teaspoon pepper.
Meanwhile, in a medium bowl, combine the eggs, rosemary (if using), and ½ teaspoon salt. Pour over the potatoes. Reduce heat to low. Cook, without stirring, for 1 minute.
Stir once. Cook until the eggs begin to set, about 3 minutes.
Transfer skillet to oven and bake until set, about 8 minutes.
Use a knife to loosen the omelet from the side of the skillet. Slide or invert it onto a plate. Slice into wedges. Serve hot or at room temperature.