From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#45052: 27.1; GDB completion moves point Date: Sat, 05 Dec 2020 17:03:04 +0200 Message-ID: <831rg4cn2v.fsf@gnu.org> References: <87czzo71i6.fsf@posteo.net> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22432"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 45052@debbugs.gnu.org To: "Philip K." , martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 05 16:04:11 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1klZ6Y-0005iA-Ul for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 05 Dec 2020 16:04:10 +0100 Original-Received: from localhost ([::1]:58960 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1klZ6Y-00057B-1S for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 05 Dec 2020 10:04:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59788) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1klZ6Q-00055p-RL for bug-gnu-emacs@gnu.org; Sat, 05 Dec 2020 10:04:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36420) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1klZ6Q-0000uK-JN for bug-gnu-emacs@gnu.org; Sat, 05 Dec 2020 10:04:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1klZ6Q-0001s7-Dn for bug-gnu-emacs@gnu.org; Sat, 05 Dec 2020 10:04:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 05 Dec 2020 15:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45052 X-GNU-PR-Package: emacs Original-Received: via spool by 45052-submit@debbugs.gnu.org id=B45052.16071806087152 (code B ref 45052); Sat, 05 Dec 2020 15:04:02 +0000 Original-Received: (at 45052) by debbugs.gnu.org; 5 Dec 2020 15:03:28 +0000 Original-Received: from localhost ([127.0.0.1]:47966 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1klZ5s-0001rI-3L for submit@debbugs.gnu.org; Sat, 05 Dec 2020 10:03:28 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:41454) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1klZ5r-0001r5-33 for 45052@debbugs.gnu.org; Sat, 05 Dec 2020 10:03:27 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:46774) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1klZ5l-0000g5-2Z; Sat, 05 Dec 2020 10:03:21 -0500 Original-Received: from [176.228.60.248] (port=3942 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1klZ5j-0003uD-Ly; Sat, 05 Dec 2020 10:03:20 -0500 In-Reply-To: <87czzo71i6.fsf@posteo.net> (philipk@posteo.net) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:195033 Archived-At: > From: "Philip K." > Cc: 45052@debbugs.gnu.org > Date: Sat, 05 Dec 2020 15:48:01 +0100 > > Eli Zaretskii writes: > > >> It seems to work, and I can't see any unintended side-effects! > > > > Thanks. If you use gdb-mi.el a lot, how about if you run with this > > change for a week and report back if you saw any adverse effects? > > Then I'll install this if no problems are uncovered. > > Will do. And thanks for finding the bug! Not a bug, more like an unintended consequence. The completion machinery happens in this case to call the gdb-mi handlers for processing responses to GDB commands, and those handlers force redisplay to show the GUD window with the same window-start point, which is impossible when the completions window pops up and point is close to the bottom of the GUD window. So I made the window-start setting less forceful. My fear is that when those handlers are called in other situations, you will now see sub-optimal display after sending GDB commands. So please pay attention to any such effects on the gdb-mi related windows. If my "simple" solution has adverse effects, we will need to come up with a more thorough one, which will likely require changes on the C level. Martin, do we have any way of preventing the original problem via display-buffer actions, per chance? I couldn't find anything to that effect, FWIW.