From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#7728: 24.0.50; GDB backtrace from abort Date: Wed, 12 Jan 2011 08:54:17 +0100 Message-ID: <4D2D5E29.3010502@gmx.at> References: <30041A5C411E45A7B7AF7A9ECA3AA0BE@us.oracle.com> <83y67echvm.fsf@gnu.org> <837heopknq.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1294820675 7801 80.91.229.12 (12 Jan 2011 08:24:35 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 12 Jan 2011 08:24:35 +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 Wed Jan 12 09:24:29 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 1Pcw0H-0006g3-67 for geb-bug-gnu-emacs@m.gmane.org; Wed, 12 Jan 2011 09:24:25 +0100 Original-Received: from localhost ([127.0.0.1]:58314 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pcw0G-0005ug-0H for geb-bug-gnu-emacs@m.gmane.org; Wed, 12 Jan 2011 03:24:24 -0500 Original-Received: from [140.186.70.92] (port=49463 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pcw08-0005tX-2m for bug-gnu-emacs@gnu.org; Wed, 12 Jan 2011 03:24:17 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pcw06-0003EN-Tb for bug-gnu-emacs@gnu.org; Wed, 12 Jan 2011 03:24:15 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59235) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pcw06-0003EJ-O2 for bug-gnu-emacs@gnu.org; Wed, 12 Jan 2011 03:24:14 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1PcvQ6-0004NX-C0; Wed, 12 Jan 2011 02:47:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 12 Jan 2011 07:47:02 +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.129481841516818 (code B ref 7728); Wed, 12 Jan 2011 07:47:02 +0000 Original-Received: (at 7728) by debbugs.gnu.org; 12 Jan 2011 07:46:55 +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 1PcvPy-0004ND-TQ for submit@debbugs.gnu.org; Wed, 12 Jan 2011 02:46:55 -0500 Original-Received: from mailout-de.gmx.net ([213.165.64.22] helo=mail.gmx.net) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1PcvPv-0004Mz-9G for 7728@debbugs.gnu.org; Wed, 12 Jan 2011 02:46:52 -0500 Original-Received: (qmail invoked by alias); 12 Jan 2011 07:54:19 -0000 Original-Received: from 62-47-47-98.adsl.highway.telekom.at (EHLO [62.47.47.98]) [62.47.47.98] by mail.gmx.net (mp022) with SMTP; 12 Jan 2011 08:54:19 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX18+TE10RlA+BFh4OGn9D/e9ZRDC6QpSk5BT58rJVq U0KZC7AhgHbbj0 User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) In-Reply-To: X-Y-GMX-Trusted: 0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Wed, 12 Jan 2011 02:47:02 -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:43282 Archived-At: >> 2) Change the code of Fset_window_configuration and Fselect_window, >> to have some other way of preventing the latter from storing point >> in the old selected window, without setting selected_window to >> nil. > > That sounds like a better solution. E.g. move the code of > Fselect_window to another function, add a third argument to it > specifying whether to swap-out point in selected_window, and make > Fset_window_configuration call that new internal function. The /* Store the current buffer's actual point into the old selected window. It belongs to that window, and when the window is not selected, must be in the window. */ if (!NILP (selected_window)) { ow = XWINDOW (selected_window); if (! NILP (ow->buffer)) ... part of Fselect_window should be executed _before_ the sf = SELECTED_FRAME (); if (XFRAME (WINDOW_FRAME (w)) != sf) { ... part, so the selected window would have been already set. Unfortunately this would make not_selected_before false when Fselect_window is called back by Fselect_frame and the remaining parts of Fselect_window starting with Fset_buffer (w->buffer); if (NILP (norecord)) ... would not get executed in that case. Probably, there should be a common subroutine of Fselect_window and Fselect_frame such that the two won't have to call each other mutually. (That common subroutine would have to be robust in the sense that it can't call back neither Fselect_frame nor Fselect_window.) > But maybe Fselect_frame should simply not be run in this case. If I understand Eli's backtrace correctly, the problem was caused within the following part of Fset_window_configuration selected_window = Qnil; /* Arrange *not* to restore point in the buffer that was current when the window configuration was saved. */ if (EQ (XWINDOW (data->current_window)->buffer, new_current_buffer)) set_marker_restricted (XWINDOW (data->current_window)->pointm, make_number (old_point), XWINDOW (data->current_window)->buffer); Fselect_window (data->current_window, Qnil); so apparently the frame of data->current_window is _not_ the selected frame. Would you select the window and keep the old frame selected? martin