From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: managing windows in two frames Date: Sun, 08 Sep 2013 13:55:44 -0400 Message-ID: References: <8561uiclrj.fsf@stephe-leake.org> <5225EF0F.1090109@gmx.at> <52260D12.4040002@gmx.at> <5226D26F.7090301@gmx.at> <52274BE9.1010504@gmx.at> <5229B427.9010303@gmx.at> <522A0D72.5060204@gmx.at> <522AF3D8.8010303@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1378662965 4583 80.91.229.3 (8 Sep 2013 17:56:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 8 Sep 2013 17:56:05 +0000 (UTC) Cc: Stephen Leake , emacs-devel@gnu.org To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Sep 08 19:56:07 2013 Return-path: Envelope-to: ged-emacs-devel@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 1VIjDT-0006VW-7P for ged-emacs-devel@m.gmane.org; Sun, 08 Sep 2013 19:56:07 +0200 Original-Received: from localhost ([::1]:46104 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VIjDS-0006em-Qz for ged-emacs-devel@m.gmane.org; Sun, 08 Sep 2013 13:56:06 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38965) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VIjDJ-0006e9-8l for emacs-devel@gnu.org; Sun, 08 Sep 2013 13:56:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VIjD9-0005Pf-OF for emacs-devel@gnu.org; Sun, 08 Sep 2013 13:55:57 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:57531) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VIjD9-0005PH-It for emacs-devel@gnu.org; Sun, 08 Sep 2013 13:55:47 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFG4rxBo/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GwS2NGoNwA6R6gV6DE4FL X-IPAS-Result: Av4EABK/CFG4rxBo/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GwS2NGoNwA6R6gV6DE4FL X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="26844328" Original-Received: from 184-175-16-104.dsl.teksavvy.com (HELO pastel.home) ([184.175.16.104]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 08 Sep 2013 13:52:29 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 4C3276306C; Sun, 8 Sep 2013 13:55:44 -0400 (EDT) In-Reply-To: <522AF3D8.8010303@gmx.at> (martin rudalics's message of "Sat, 07 Sep 2013 11:37:28 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.182 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:163260 Archived-At: >> Ah, indeed it's simpler. It does have the disadvantage of relying on an >> obsolete variable, tho. > I thought Jorge wanted something that works with existing (and elder) > Emacsen. Both needs exist: to work in older Emacsen, and to be "clean and simple". I care more about the second one. >> Maybe we should define a new macro `with-inhibit-window-changes' which >> could replace save-window-excursion for those uses (it might use >> save-window-excursion internally, just in case, but would also try to >> prevent creation of frames and window changes in other frames). > We could easily do that but for one issue: Some buffer display calls > expect that neither snow nor rain will prevent Emacs from producing a > suitable window (compare bug#15213). I know, which is why with-inhibit-window-changes would probably not really prevent changing windows; instead it would work hard to limit window changes to those that can be fully reverted by save-window-excursion. > Also, a user's expectation that code following > (pop-to-buffer (generate-new-buffer " *temp*")) > operates on the new buffer is not entirely silly given our current > understanding of `pop-to-buffer'. Indeed. After pop-to-buffer it should "always" be the case that current-buffer is the specified buffer and selected-window displays that buffer. Stefan