From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs Subject: bug#7728: 24.0.50; GDB backtrace from abort Date: Thu, 13 Jan 2011 09:57:11 -0800 Message-ID: References: <30041A5C411E45A7B7AF7A9ECA3AA0BE@us.oracle.com><83y67echvm.fsf@gnu.org> <837heopknq.fsf@gnu.org> <4D2D5E29.3010502@gmx.at> <26B139ADC64E4827BE54938B3CF26872@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1294943076 10825 80.91.229.12 (13 Jan 2011 18:24:36 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 13 Jan 2011 18:24:36 +0000 (UTC) Cc: 7728@debbugs.gnu.org To: "'Stefan Monnier'" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jan 13 19:24:32 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PdRqZ-0004sS-28 for geb-bug-gnu-emacs@m.gmane.org; Thu, 13 Jan 2011 19:24:31 +0100 Original-Received: from localhost ([127.0.0.1]:49657 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PdRqY-00023R-7n for geb-bug-gnu-emacs@m.gmane.org; Thu, 13 Jan 2011 13:24:30 -0500 Original-Received: from [140.186.70.92] (port=46253 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PdRqO-00021Y-8V for bug-gnu-emacs@gnu.org; Thu, 13 Jan 2011 13:24:22 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PdRqN-0002NO-0k for bug-gnu-emacs@gnu.org; Thu, 13 Jan 2011 13:24:20 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:43862) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PdRqM-0002NJ-SO for bug-gnu-emacs@gnu.org; Thu, 13 Jan 2011 13:24:18 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1PdRJE-0003ft-0g; Thu, 13 Jan 2011 12:50:04 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 13 Jan 2011 17:50:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7728 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 7728-submit@debbugs.gnu.org id=B7728.129494098514097 (code B ref 7728); Thu, 13 Jan 2011 17:50:03 +0000 Original-Received: (at 7728) by debbugs.gnu.org; 13 Jan 2011 17:49:45 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PdRIv-0003fK-FW for submit@debbugs.gnu.org; Thu, 13 Jan 2011 12:49:45 -0500 Original-Received: from rcsinet10.oracle.com ([148.87.113.121]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PdRIt-0003f9-Hh for 7728@debbugs.gnu.org; Thu, 13 Jan 2011 12:49:44 -0500 Original-Received: from rcsinet13.oracle.com (rcsinet13.oracle.com [148.87.113.125]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id p0DHvFYO013216 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 13 Jan 2011 17:57:16 GMT Original-Received: from acsmt353.oracle.com (acsmt353.oracle.com [141.146.40.153]) by rcsinet13.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id p0DHvDYo015988; Thu, 13 Jan 2011 17:57:14 GMT Original-Received: from abhmt004.oracle.com by acsmt355.oracle.com with ESMTP id 923286511294941432; Thu, 13 Jan 2011 09:57:12 -0800 Original-Received: from dradamslap1 (/130.35.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 13 Jan 2011 09:57:11 -0800 X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcuzQ6MOSQxoEWveTDSbTMvULr5lOgAAtdQA In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5994 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Thu, 13 Jan 2011 12:50:04 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:43334 Archived-At: > > And just what code do you suggest for going off to do something on > > a different frame and returning? AFAIK we do not have > > a `save-frame-excursion'. > > Hmm... let's see... how 'bout `with-selected-frame'? ;-) Does not exist before Emacs 23, for one thing. My code needs to work with multiple Emacs versions. And please do not suggest that I add such macros to older versions just to be able to work around a newly introduced Emacs bug. And please do not suggest that I split the code to use the macro only for Emacs 23.3+ since this is a new bug (regression). > > I have always considered (and seen) `save-window-excursion' > > to be the way to do this. > > No, as Martin mentioned, save-window-excursion is the macro to use if > you want to write code that breaks in "odd" cases (sidenote: > one-buffer-per-frame is one of those "odd" cases that tend to trigger > bugs in code using save-window-excursion, so you probably > "often" suffer from those things, like me). Sorry, but I have never, ever suffered from "those things". And `save-window-excursion' _has_ always been used for this kind of thing in Emacs AFAIK - revisionism notwithstanding. In the case in question, the selected window and selected frame happen to be the _same_ as the destination window and frame (they are the minibuffer window and standalone frame). In this case the `save-window-excursion' should amount to a no-op in the end. The source and target window and frame need not be the same in general, but they are the same in the crashes I reported. If Emacs cannot save and restore without crashing in this case then Houston you really have a problem. Look - you know that you lost your car keys in the park, but because it's nighttime you decide to look for them in the living room. That's silly. * Let me repeat that the _source code works fine_ - no error, no crash, no bug. * Let me repeat too that the byte-compiled code (no matter which Emacs version it was compiled with) works fine in all Emacs versions except the current development code - no error, no crash, no bug. This is not a source-code problem. It is not a byte-code problem. This is a _regression_ due to some change in the development version that no longer plays well with the byte-compiled code. Please investigate that interaction: dev version + byte code. Your keys are in the park. Advice to change my source code so as to not use `save-window-excursion' is misplaced wrt this bug. It amounts to blaming the victim. You are looking under the lamp in the living room, but your keys are lying in the park somewhere. This is a problem with the byte code only - that is, the problem is with how the byte-code is handled by the latest dev code. No problem with Emacs 23.2 or even with dev code prior to when I filed the bug (exact date of regression unknown). You lost your keys in the park. Please do not ask me to move the couch in the living room. Whether my code could or should be improved in some way is orthogonal to fixing this Emacs bug. This is a regression. Emacs should handle the byte-code correctly, as it has always done before - and as it still correctly interprets the source code.