Subject: Re: bug#21777: 25.0.50; gud-gdb uses a pager, which is harmful inside emacs

From: Lars Ingebrigtsen <[email-masked]>
Date: Wed, 23 Sep 2020 14:53:53 +0200

Eli Zaretskii <[email-masked]> writes:

> That's a different problem, then.  I think it is related to
> window-adjust-process-window-size-function and
> set-process-window-size, introduced in Emacs 25.  I guess gud-gdb
> should disable that feature.

But if the user has the pager enabled, then Emacs should notify gdb
about the size change...

Andreas Schwab <[email-masked]> writes:

>> I'm not sure I agree: how is an unlimited setting different from any
>> other setting?
>
> It is special, as it never matches any real terminal size.

Indeed.  If gdb has disabled the pager, then Emacs telling gdb about the
changed size shouldn't enable the pager.

But I'm still not sure this is actually what is going on, because I'm
just not finding exactly where this happens.  For instance,
`window--adjust-process-windows' is never called in buffers started with
`M-x gud-gdb'...  and adjusting the frame size in a buffer started with
`M-x gdb' does not make gdb switch the pager on.  

And debug-on-entry on set-process-window-size isn't triggered, either.

Grepping for SIGWINCH doesn't immediately give me any clues, either.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no