Any D series will fit any D series, although there are exeptions, year 91 and previous use link clutch (or however you call those) 92-00 you should be good with exchanging any transmisions. the acura 90 and below has a D series engine that will not fit a D series civic.
For B series the same exeption 93 integra and below use LINK (the oposite of hydraulic or cylinder, I really dont know the name) transmisions. and 90 TEG and below has D series as explained above. so integra 94+ and civic 92+ with Bseries can exchange transmissions.
The B20 block can use any Bseries transmision as well.
hope I got that right and I didn't confuse you more,
