This is a really simple question, and I'm a bit embarrassed to even have to ask it.
If $\mathcal{F}$ is a sheaf on a scheme $X$ and $s \in \mathcal{F}(U)$ is a local section, what does it mean to evaluate $s$ at a point $x \in X$?
On the one hand, I would expect the answer to be "the image of $s$ in the stalk $\mathcal{F}_x$ at $x$". For concreteness say $X = \text{Spec}(A)$ is affine and $\mathcal{F} = \widetilde{M}$ came from a module on $A$. Am I right in thinking that for $m \in M = \Gamma(X,\widetilde{M})$ a global section, the "evaluation" $m(\mathfrak{p})$ is just the image of $m$ under the map $M \to M_\mathfrak{p}$? In particular, does this section take values in the localization $M_\mathfrak{p}$?
On the other hand, in the special case $\mathcal{F} = \mathcal{O}_X$, then $s \in A$ is a regular function and I've heard people say that $s(\mathfrak{p})$ actually doesn't take values in $A_\mathfrak{p}$... Instead it takes values in the residue field $\kappa(\mathfrak{p}) = A_\mathfrak{p} / \mathfrak{p}$. Is this also correct?
How do we square these two interpretations, which seem to suggest some ambiguity in the target of a local section? Is it because $\mathcal{O}_X$ is a sheaf of rings rather than a sheaf of modules? That seems unlikely, in light of this recent answer (which inspired this question) which says that sections of this sheaf of modules (this line bundle) actually takes values in the residue field...
Thanks!