Hey
More then likely your problem is from the Idle control valve or the Idle control module in the glove box. I have had 3 E30's now, and two of them had problems with there idle systems. When one of them goes out, the other one usually does to. The idle control valve is always open, but only partially. The Idle control module under the glove box monitors the engine speed and adjusts the idle control valve to hold the engine at one set RPM.
This is a common problem amongst the older E30's. You can test either part by using an OHM meter, but I do not know what resistance ranges the parts are suppose to be in off the top of my head. Or you can just remove the idle control valve, plug the holes, and start the engine. Doing this the car will not run at 1800ish rpm, it should not even idle at all unless you have a big vaacuum leak someplace else. This is how i tested my 85' 318i's idle control system.
Its odd that it would start doing this after you removed the battery. Also may want to take a look at all the grounds and electrical connections before you go buying new expensive parts.
Later