From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#7728: 24.0.50; GDB backtrace from abort Date: Thu, 13 Jan 2011 16:24:27 -0500 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 X-Trace: dough.gmane.org 1294955845 16144 80.91.229.12 (13 Jan 2011 21:57:25 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 13 Jan 2011 21:57:25 +0000 (UTC) Cc: 7728@debbugs.gnu.org To: "Drew Adams" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jan 13 22:57:21 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 1PdV8m-0001Tw-PR for geb-bug-gnu-emacs@m.gmane.org; Thu, 13 Jan 2011 22:57:15 +0100 Original-Received: from localhost ([127.0.0.1]:60760 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PdV8Y-0004S2-TR for geb-bug-gnu-emacs@m.gmane.org; Thu, 13 Jan 2011 16:55:18 -0500 Original-Received: from [140.186.70.92] (port=36018 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PdV83-0004Ps-1O for bug-gnu-emacs@gnu.org; Thu, 13 Jan 2011 16:55:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PdV7b-0007RM-Ry for bug-gnu-emacs@gnu.org; Thu, 13 Jan 2011 16:54:20 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:37332) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PdV7b-0007RI-MH for bug-gnu-emacs@gnu.org; Thu, 13 Jan 2011 16:54:19 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1PdUYT-0001L0-Mp; Thu, 13 Jan 2011 16:18:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier 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 21:18:01 +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.12949534235075 (code B ref 7728); Thu, 13 Jan 2011 21:18:01 +0000 Original-Received: (at 7728) by debbugs.gnu.org; 13 Jan 2011 21:17:03 +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 1PdUXW-0001Jo-Ch for submit@debbugs.gnu.org; Thu, 13 Jan 2011 16:17:02 -0500 Original-Received: from tomts10.bellnexxia.net ([209.226.175.54] helo=tomts10-srv.bellnexxia.net) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PdUXU-0001JD-K2 for 7728@debbugs.gnu.org; Thu, 13 Jan 2011 16:17:01 -0500 Original-Received: from toip3.srvr.bell.ca ([209.226.175.86]) by tomts10-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20110113212433.KGPK15502.tomts10-srv.bellnexxia.net@toip3.srvr.bell.ca> for <7728@debbugs.gnu.org>; Thu, 13 Jan 2011 16:24:33 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAF76Lk1GHsfC/2dsb2JhbACkTHS8bIVMBIRo Original-Received: from bas1-montreal07-1176422338.dsl.bell.ca (HELO ceviche.home) ([70.30.199.194]) by toip3.srvr.bell.ca with ESMTP; 13 Jan 2011 16:24:32 -0500 Original-Received: by ceviche.home (Postfix, from userid 20848) id 980FE660BB; Thu, 13 Jan 2011 16:24:27 -0500 (EST) In-Reply-To: (Drew Adams's message of "Thu, 13 Jan 2011 09:57:11 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Thu, 13 Jan 2011 16:18:01 -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:43337 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'm just telling you what's the right way to do it. > Sorry, but I have never, ever suffered from "those things". Then either you were lucky to only use the code after I fixed it, or you don't know what I'm talking about. The typical misuse looks like: (save-window-excursion (let ((b (find-file "foo"))) blabla)) instead of (let ((b (find-file-noselect "foo"))) blabla) I.e. call code that may modify the window-layout whereas what the caller wants is something else, so he uses save-window-excursion to "undo" those changes. But of course, with pop-up-frames and friends, in many/most cases the code may not only modify the window-layout but also create a new frame, which can't really be undone because the creation itself is already user-visible, and save-window-excursion won't even try to undo it anyway. > And `save-window-excursion' _has_ always been used for this kind of > thing in Emacs AFAIK - revisionism notwithstanding. I didn't know that. Can you point at some examples? > 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. You know I always consider any crash as a bug in the C code, even if it's triggered by Elisp code. Stefan