Subject: bug#72667: 31.0.50; gud-print moves the cursor after execution

From: Eli Zaretskii <[email-masked]>
Date: Sat, 17 Aug 2024 17:14:58 +0300

[Please use Reply All to reply, to keep the bug tracker CC'ed.]

> From: TatriX <[email-masked]>
> Date: Sat, 17 Aug 2024 15:41:54 +0200
> 
> > May I ask why you use gud-print and not gud-tooltip-mode?  The latter
> > will allow you to show values of variables without moving point.
> 
> I do use it sometimes. Most of the time I just switch to *gud* buffer
> and print the values manually, which requires quite some window
> switching.
> 
> I suppose what I would prefer is to be able to run something similar to
> gud-print which would ask me for an expression, defaulting to whatever
> is near the point. Still, moving the point is undesirable since it
> changes what is in focus.
> 
> I tried to change the behavior myself, but couldn't find what actually
> moves the point.

I think it happens in gud-refresh.