From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Date: Thu, 25 Oct 2018 23:48:09 +0300 Organization: LINKOV.NET Message-ID: <87in1phhx2.fsf@mail.linkov.net> References: <87efdnsp2k.fsf@mail.linkov.net> <87sh1ybyo6.fsf@mail.linkov.net> <5BA9E390.8030506@gmx.at> <87pnx1h1op.fsf@mail.linkov.net> <5BAB489E.5090002@gmx.at> <87h8ibvrs2.fsf@mail.linkov.net> <5BAD2507.6040605@gmx.at> <87a7nedidg.fsf@mail.linkov.net> <5BC5A558.9010401@gmx.at> <87zhvd7mg9.fsf@mail.linkov.net> <5BC6E52F.2070209@gmx.at> <87woqgw9a7.fsf@mail.linkov.net> <5BC83EC9.1090808@gmx.at> <877eiena58.fsf@mail.linkov.net> <5BC98A26.1030901@gmx.at> <87woqcnwas.fsf@mail.linkov.net> <5BCC3757.9020204@gmx.at> <87bm7njk2f.fsf@mail.linkov.net> <5BCD934D.4070906@gmx.at> <878t2owo8i.fsf@mail.linkov.net> <5BD03F4D.1000900@gmx.at> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1540500972 22648 195.159.176.226 (25 Oct 2018 20:56:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 25 Oct 2018 20:56:12 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: 32790@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 25 22:56:07 2018 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 1gFmfn-0005mw-5u for geb-bug-gnu-emacs@m.gmane.org; Thu, 25 Oct 2018 22:56:07 +0200 Original-Received: from localhost ([::1]:56953 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gFmht-0005Wy-NE for geb-bug-gnu-emacs@m.gmane.org; Thu, 25 Oct 2018 16:58:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51977) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gFmhi-0005VT-KJ for bug-gnu-emacs@gnu.org; Thu, 25 Oct 2018 16:58:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gFmhe-0006Kw-Hg for bug-gnu-emacs@gnu.org; Thu, 25 Oct 2018 16:58:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:38678) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gFmhd-0006Kl-Rq for bug-gnu-emacs@gnu.org; Thu, 25 Oct 2018 16:58:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gFmhd-0001Ht-Ot for bug-gnu-emacs@gnu.org; Thu, 25 Oct 2018 16:58:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 25 Oct 2018 20:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32790 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 32790-submit@debbugs.gnu.org id=B32790.15405010284854 (code B ref 32790); Thu, 25 Oct 2018 20:58:01 +0000 Original-Received: (at 32790) by debbugs.gnu.org; 25 Oct 2018 20:57:08 +0000 Original-Received: from localhost ([127.0.0.1]:42936 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gFmgm-0001GE-LC for submit@debbugs.gnu.org; Thu, 25 Oct 2018 16:57:08 -0400 Original-Received: from coral.maple.relay.mailchannels.net ([23.83.214.39]:48372) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gFmgk-0001G5-JG for 32790@debbugs.gnu.org; Thu, 25 Oct 2018 16:57:07 -0400 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 91F6443781; Thu, 25 Oct 2018 20:50:48 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a25.g.dreamhost.com (unknown [100.96.16.121]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 2289643242; Thu, 25 Oct 2018 20:50:48 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a25.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.16.2); Thu, 25 Oct 2018 20:50:48 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Zesty-Share: 75654548702e0d3c_1540500648322_789831089 X-MC-Loop-Signature: 1540500648321:139380615 X-MC-Ingress-Time: 1540500648321 Original-Received: from pdx1-sub0-mail-a25.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a25.g.dreamhost.com (Postfix) with ESMTP id BE691807DB; Thu, 25 Oct 2018 13:50:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=8h4MiJlUcZszCyNqcgeOkr/6NEM=; b= GUi8AfxfPGTsCHoXiUh5ix4Wk+aotaB5PGQf3UssDzmYjjcZwJOP2YVu3RQFO1at o99wy7LGS0+utJMd5cfd3seHkSWtfewjYiGD4uwCETC3x4aYiKvp0NDA9nYAnZID 6IWlQUOIcChUTynAiqY/87duun7Hhz5WCL6Liga3JCE= Original-Received: from mail.jurta.org (m91-129-105-154.cust.tele2.ee [91.129.105.154]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a25.g.dreamhost.com (Postfix) with ESMTPSA id 207E3807D7; Thu, 25 Oct 2018 13:50:45 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a25 In-Reply-To: <5BD03F4D.1000900@gmx.at> (martin rudalics's message of "Wed, 24 Oct 2018 11:45:49 +0200") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedrgeelgdduheeiucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdehrdduheegnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddthedrudehgedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgepud 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:151622 Archived-At: >> 2. based on display-buffer-alist, implement some more declarative >> definitions of window layouts, i.e. allow the user to describe >> the used windows in which buffers should be displayed in them. > > I'd need to see a proposal how that can be done. In a way it's > orthogonal to how 'window-state-put' tries to reconstruct a window > configuration and it's no entirely trivial to do that. I imagine it could be a structure like returned by 'window-state-get' but instead of a buffer name specify a regexp or a list of possible buffer names that are allowed to be displayed in the given window. Then display-buffer could search a buffer in such template and reconstruct the window state where the buffer will be displayed in the place specified in the template. > But I think that putting a function on > 'window-configuration-change-hook' can be dangerous when a window > showing the buffer in question already exists and gets reused. In > such case 'window-configuration-change-hook' is not run and the > changed value of 'display-buffer-overriding-action' will persist. So > we probably need a 'display-buffer-functions' hook to remove it > reliably. Basically, however, I think that using an overriding action > is justified here. Please note that in the code posted 3 days ago I used the hook that you proposed recently window-state-change-functions, so this code is not yet functional :)