Woods arent like plastic and metal; homogeneous materials with tight composition control, lots of consistency. They're heterogenous structures with many, many variables that affect how they end up sounding. 'Mahogany' or any other wood doesnt have one sound. Never mind wood from different countries or forests, wood from different trees; two peices of wood from the same tree will not sound and perform the same in a guitar. Where in the tree the wood was taken from affects it a lot. The exact piece of wood matters at least as much as the species, more even: oil and water content, grain density and distribution, pore size, everything is highly variable within one species, as well as including how a piece has been cut.
Then theres the shape of the guitar, its construction method and quality and the hardware, especially the bridge. All these are about as important as the wood, if not moreso.
Go in a shop and play as many theoretically identical guitars as you can. A lot of them will sound very alike, but some of them will be very different. Take a mate with you and if you can tell what species of woods are in the guitar blind.
Bottom line; use the species of woods used as a guide (which is all it is) by all means but find guitars you like (make and model doesnt matter, I mean specific guitars; you play a guitar you like in a shop, buy that exact one, because another thats the same on paper will be different; maybe a little different, maybe shockingly different), use the guitars that sound good and refuse to give a fuck what woods they're made from.
Edit: oh, and the neck wood affects the tone more than the body wood; the vibration course underneath the strings is the most important; a resonance feedback loop between the strings and through the guitar from the nut/frets to the bridge develops (which is why the guitar affects the sound at all; feedback of the gutiars resonance back into the string, making the string vibrate with the resonant modes of the guitar) and the neck is the biggest oscilator in that and affects the tone more than the body