From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#21777: 25.0.50; gud-gdb uses a pager, which is harmful inside emacs Date: Thu, 29 Oct 2015 18:16:02 +0200 Message-ID: <837fm53b25.fsf@gnu.org> References: <87ziz2x0j6.fsf@secretsauce.net> <87fv0uaas1.fsf@igel.home> <87twpaha8u.fsf@secretsauce.net> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1446135445 5720 80.91.229.3 (29 Oct 2015 16:17:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 29 Oct 2015 16:17:25 +0000 (UTC) Cc: 21777@debbugs.gnu.org, schwab@linux-m68k.org To: Dima Kogan Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 29 17:17:14 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Zrpt1-0007Hc-N6 for geb-bug-gnu-emacs@m.gmane.org; Thu, 29 Oct 2015 17:17:11 +0100 Original-Received: from localhost ([::1]:45210 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zrpt1-0002i6-52 for geb-bug-gnu-emacs@m.gmane.org; Thu, 29 Oct 2015 12:17:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57983) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zrpsx-0002hz-2Z for bug-gnu-emacs@gnu.org; Thu, 29 Oct 2015 12:17:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zrpss-00053Z-Ow for bug-gnu-emacs@gnu.org; Thu, 29 Oct 2015 12:17:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:53740) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zrpss-00053C-Lx for bug-gnu-emacs@gnu.org; Thu, 29 Oct 2015 12:17:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Zrpss-0002yr-3T for bug-gnu-emacs@gnu.org; Thu, 29 Oct 2015 12:17:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 29 Oct 2015 16:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21777 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21777-submit@debbugs.gnu.org id=B21777.144613537811401 (code B ref 21777); Thu, 29 Oct 2015 16:17:02 +0000 Original-Received: (at 21777) by debbugs.gnu.org; 29 Oct 2015 16:16:18 +0000 Original-Received: from localhost ([127.0.0.1]:44448 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zrps9-0002xo-JU for submit@debbugs.gnu.org; Thu, 29 Oct 2015 12:16:17 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:50820) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zrps6-0002xf-I8 for 21777@debbugs.gnu.org; Thu, 29 Oct 2015 12:16:15 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0NWZ00J00P46HV00@a-mtaout20.012.net.il> for 21777@debbugs.gnu.org; Thu, 29 Oct 2015 18:16:00 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NWZ00J5DP6OB660@a-mtaout20.012.net.il>; Thu, 29 Oct 2015 18:16:00 +0200 (IST) In-reply-to: <87twpaha8u.fsf@secretsauce.net> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:108147 Archived-At: > From: Dima Kogan > Date: Wed, 28 Oct 2015 15:57:37 -0700 > Cc: 21777@debbugs.gnu.org > > Hi. Thanks for replying. Looking at gdb/utils.c, apparently gdb looks at > the EMACS environment variable, which was set previously but is not > anymore: > > https://github.com/emacs-mirror/emacs/commit/beaab898968caf8b243a33d24824d430fabc31fc > > This patch in emacs is what broke it. Options: > > 1. revert above patch That patch fixed a real-life bug, so I don't think reverting it is an option we should seriously consider. > 2. patch gdb to look at INSIDE_EMACS not EMACS That should be done regardless, I will submit a patch to GDB. > 3. handle this inside emacs, not relying on gdb behavior > > I like 3. Emacs should be responsible for things emacs wants, not > external applications, even if they're GNU applications. 3 is okay in principle, but you didn't show any specific suggestions. What did you have in mind? Please also keep in mind that "M-x gud-gdb" is a legacy command, and the more modern "M-x gdb" doesn't have that problem. There's also: 4. Fix this locally in your GDB init files (using GDB scripting facilities). > Also, it looks like gdb checks EMACS in a few more places, and I haven't > looked at those yet. Maybe I'm missing something, but I don't see any additional places except the one pointed out by Andreas.