Subject: bug#24021: FEATURE ADDITION: 25.0.94: goto-marker, jumps to a marker potentially in a different buffer

From: Noam Postavsky <[email-masked]>
Date: Mon, 18 Jul 2016 22:20:20 -0400

On Mon, Jul 18, 2016 at 10:05 PM, Robert Weiner <[email-masked]> wrote:
>>
>> If this is just a "simple function" (not an interactive command), it
>> shouldn't widen, or call switch-to-buffer.
>
> But it does need to do these things to leave the selected buffer and point where the marker points.  It only widens if the marker position is outside the restricted range.  It can be wrapped in save-restriction and save-excursion for times when it is used for temporary effect, e.g. to find the column of the marker position.

save-excursion or save-current-buffer don't counteract
switch-to-buffer, because it affects the UI selected buffer. You might
be right about the widen part, not sure.