From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#13336: 24.3.50; `next-frame' should not choose a frame (e.g. *Backtrace*) that did not exist when it was invoked Date: Mon, 30 Jan 2017 06:32:31 -0800 (PST) Message-ID: <796316f7-38a5-4927-88df-96b8b90c3cea@default> References: <1776CE98469A44C484752764DD29E2DE@us.oracle.com> <87sho1qcp9.fsf@users.sourceforge.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1485788416 22388 195.159.176.226 (30 Jan 2017 15:00:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 30 Jan 2017 15:00:16 +0000 (UTC) Cc: 13336@debbugs.gnu.org To: npostavs@users.sourceforge.net Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jan 30 16:00:08 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cYDR5-0005O3-CV for geb-bug-gnu-emacs@m.gmane.org; Mon, 30 Jan 2017 16:00:03 +0100 Original-Received: from localhost ([::1]:33129 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cYDRA-0008D3-Tm for geb-bug-gnu-emacs@m.gmane.org; Mon, 30 Jan 2017 10:00:08 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51067) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cYD10-0002iV-Bh for bug-gnu-emacs@gnu.org; Mon, 30 Jan 2017 09:33:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cYD0w-0005z4-Bj for bug-gnu-emacs@gnu.org; Mon, 30 Jan 2017 09:33:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:52598) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cYD0w-0005yf-86 for bug-gnu-emacs@gnu.org; Mon, 30 Jan 2017 09:33:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cYD0w-00088L-0c for bug-gnu-emacs@gnu.org; Mon, 30 Jan 2017 09:33:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 30 Jan 2017 14:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13336 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 13336-submit@debbugs.gnu.org id=B13336.148578676531243 (code B ref 13336); Mon, 30 Jan 2017 14:33:01 +0000 Original-Received: (at 13336) by debbugs.gnu.org; 30 Jan 2017 14:32:45 +0000 Original-Received: from localhost ([127.0.0.1]:50797 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cYD0f-00087r-5e for submit@debbugs.gnu.org; Mon, 30 Jan 2017 09:32:45 -0500 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:25969) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cYD0b-00087c-QK for 13336@debbugs.gnu.org; Mon, 30 Jan 2017 09:32:43 -0500 Original-Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v0UEWZAb026173 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 30 Jan 2017 14:32:35 GMT Original-Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v0UEWZvj008534 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 30 Jan 2017 14:32:35 GMT Original-Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id v0UEWWrX023814; Mon, 30 Jan 2017 14:32:33 GMT In-Reply-To: <87sho1qcp9.fsf@users.sourceforge.net> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 12.0.6753.5000 (x86)] X-Source-IP: aserv0022.oracle.com [141.146.126.234] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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" Xref: news.gmane.org gmane.emacs.bugs:128786 Archived-At: > retitle 13336 `other-frame' should not choose a frame (e.g. *Backtrace*) > that did not exist when it was invoked > severity 13336 wishlist > quit >=20 > > Set `special-display-regexps' or other so that `*Backtrace*' gets > > displayed in its own (special-display) frame. > > Evaluate the source code for `next-frame', then >=20 > I suppose you meant `other-frame' here (next-frame is a C > function) and in the title. No, not really. As you see from the backtrace, it is `next-frame' that returns frame *Backtrace*, which is inappropriate. FWIW, I have code that calls `next-frame' and does not use `other-frame'. This is not an `other-frame' bug (except indirectly, because it calls `next-frame', which is bugged). The bug is with `next-frame'. Please see the backtrace. > > M-x debug-on-entry next-frame, then C-x o. > > > > When stepping through the debugger, the next frame should never be > > *Backtrace* (unless a *Backtrace* frame existed before invoking `next > > frame'), but it can be. This is a bug IMO. >=20 > I again suppose you mean `other-frame' here, otherwise I would say it's > not a bug, since the the *Backtrace* frame does exist by the time > `next-frame' is called. See above. At least in the case of *Backtrace*, which is perhaps a special case, it makes no difference whether the frame exists by the time `next-frame' is called. Backtrace acts specially: it does not take its own context into account, but instead reflects the state of the rest of Emacs. The debugger should not return the *Backtrace* frame. > By the way, from your backtrace it looks like you did debug-on-entry on > `other-frame', but in that case there's no way for it to "snapshot" the > list of existing frames "before" the call, since you've stopped in the > debugger before any of its code is executed. It's only possible to fix > the case where you stop only later on next-frame. No, I did `M-x debug-on-entry next-frame'. The backtrace opens at the call to `next-frame', but it shows the trace back to the interactive call of `other-frame'. I just now reproduced the problem, using Emacs 24.3, starting from emacs -Q. I assume that it can also be reproduced with Emacs 25. (I believe I did mean `C-x 5 o', not `C-x o', in the recipe, however.)