Divergent synthesis of 2,3-dihydro-1H-pyrroles, 3-alkyl-1H-pyrroles and 3-alkenyl-1H-pyrroles from 2,4-pentadienenitriles and isocyanides.