Small block idles rough only when in gear

I bet your A/F is wrong. I battled that for about 3 months and a turn of the screw fixed it. Cant remember if it was rich or lean...make sure the advance plate in the distributor is greased too. Found mine (340 dual point) to be gunked with hard grease limiting its return speed and position. check your timing in gear .
Found it! A cracked cap on the rear intake port was bad. Replaced and all is well. Thank you!