Does Localization Commute with Direct/Inverse Limits Let $A$ be a ring and let $M_n$ be $A$-modules. For a prime ideal $P$ in $A$ is it true that $$(\varprojlim_n M_n)_P=\varprojlim_n (M_n)_P\text{ and } (\varinjlim_n M_n)_P=\varinjlim_n (M_n)_P?$$
If it is not true, are there conditions on $A$ and $M$ which do make it true?
 A: If $A$ is a commutative ring and $S \subseteq A$ is a subset, then localization $M \mapsto S^{-1} M$ provides a functor $\mathsf{Mod}(A) \to \mathsf{Mod}(S^{-1} A)$ which is left adjoint to the forgetful functor. In particular, it preserves all colimits. The forgetful functor $\mathsf{Mod}(S^{-1} A) \to \mathsf{Mod}(A)$ also preserves all colimits (the same is true for $\mathsf{Mod}(B) \to \mathsf{Mod}(A)$ for every $A$-algebra $B$), in fact they are created by the forgetful functor to $\mathsf{Ab}$. So in particular localization as a functor $\mathsf{Mod}(A) \to \mathsf{Mod}(A)$ preserves all colimits.
Localization also commutes with finite limits, because $S^{-1} A$ is a flat $A$-algebra. But usually it doesn't commute with infinite limits. For example, the canonical homomorphism $(\prod_{i \in I} \mathbb{Z}) \otimes_{\mathbb{Z}} \mathbb{Q} \to \prod_{i \in I} \mathbb{Q}$ is not surjective when $I$ is infinite. The image consists of those sequences of rational numbers whose denominators can be bounded.
