We use the framework of effective field theories to discuss the determinationof the S-wave \pi N scattering lengths from the recent high-precisionmeasurements of pionic deuterium observables. The theoretical analysis proceedsin several steps. Initially, the precise value of the pion-deuteron scatteringlength a_{\pi d} is extracted from the data. Next, a_{\pi d} is related to theS-wave \pi N scattering lengths a_+ and a_-. We discuss the use of thisinformation for constraining the values of these scattering lengths in the fullanalysis, which also includes the input from the pionic hydrogen energy shiftand width measurements, and throughly investigate the accuracy limits for thisprocedure. In this paper, we also give a detailed comparison to other effectivefield theory approaches, as well as with the earlier work on the subject,carried out within the potential model and multiple scattering framework.