From unknown Fri Aug 15 17:54:54 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#32790 <32790@debbugs.gnu.org> To: bug#32790 <32790@debbugs.gnu.org> Subject: Status: 27.0.50; point jumps unexpectedly after delete-window Reply-To: bug#32790 <32790@debbugs.gnu.org> Date: Sat, 16 Aug 2025 00:54:54 +0000 retitle 32790 27.0.50; point jumps unexpectedly after delete-window reassign 32790 emacs submitter 32790 Juri Linkov severity 32790 minor thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 20 19:56:17 2018 Received: (at submit) by debbugs.gnu.org; 20 Sep 2018 23:56:17 +0000 Received: from localhost ([127.0.0.1]:47469 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g38nx-0000gd-71 for submit@debbugs.gnu.org; Thu, 20 Sep 2018 19:56:17 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34231) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g38nv-0000gR-Rr for submit@debbugs.gnu.org; Thu, 20 Sep 2018 19:56:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g38np-000220-Ts for submit@debbugs.gnu.org; Thu, 20 Sep 2018 19:56:10 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:37639) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g38np-00021J-IK for submit@debbugs.gnu.org; Thu, 20 Sep 2018 19:56:09 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55212) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g38no-0004fE-QD for bug-gnu-emacs@gnu.org; Thu, 20 Sep 2018 19:56:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g38no-00020o-56 for bug-gnu-emacs@gnu.org; Thu, 20 Sep 2018 19:56:08 -0400 Received: from pop.dreamhost.com ([64.90.62.162]:47402 helo=pdx1-sub0-mail-a36.g.dreamhost.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g38nn-000209-Ux for bug-gnu-emacs@gnu.org; Thu, 20 Sep 2018 19:56:08 -0400 Received: from pdx1-sub0-mail-a36.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a36.g.dreamhost.com (Postfix) with ESMTP id C62F37F2A6 for ; Thu, 20 Sep 2018 16:56:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to :subject:date:message-id:mime-version:content-type; s= linkov.net; bh=+Stzutb1mtU9SIwv68yAVWj2Duk=; b=Yt5unV4/mRJVwKM95 uzpM9vmA11mGswleBBlhm+YDiKOMwNF3f3T/Xkvv+8unxDREzWzP+ytIwvHvTTO0 ZDJlsjXL2gJH1kq21UkeaRA2h0dTJJpDKZQBqGNF7pw3GInAwrniFs25n7TMJ8Pi B2jOT/Pu3kQD/aoConC7lU2DGk= Received: from localhost.linkov.net (m91-129-107-237.cust.tele2.ee [91.129.107.237]) (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-a36.g.dreamhost.com (Postfix) with ESMTPSA id 1B1FB7F29A for ; Thu, 20 Sep 2018 16:56:05 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a36 X-DH-BACKEND: pdx1-sub0-mail-a36 From: Juri Linkov To: bug-gnu-emacs@gnu.org Subject: 27.0.50; point jumps unexpectedly after delete-window Organization: LINKOV.NET Date: Fri, 21 Sep 2018 02:33:55 +0300 Message-ID: <87efdnsp2k.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) 0. emacs -Q 1. C-h e 2. C-x o 3. C-x 2 4. C-x 0 It's expected that point will remain where it was visually on the screen, just will relocate to the window that takes place of the deleted window, but point jumps to an unexpected place in the opposite part of the frame. This is not a regression, but nevertheless very annoying behavior. From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 21 02:34:40 2018 Received: (at 32790) by debbugs.gnu.org; 21 Sep 2018 06:34:40 +0000 Received: from localhost ([127.0.0.1]:47582 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g3F1U-0002po-Di for submit@debbugs.gnu.org; Fri, 21 Sep 2018 02:34:40 -0400 Received: from mout.gmx.net ([212.227.17.20]:37023) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g3F1Q-0002pO-V9 for 32790@debbugs.gnu.org; Fri, 21 Sep 2018 02:34:37 -0400 Received: from [192.168.1.101] ([213.162.73.217]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0Mc9U3-1gKdoQ1vpH-00Jauy; Fri, 21 Sep 2018 08:34:29 +0200 Message-ID: <5BA490EA.4000502@gmx.at> Date: Fri, 21 Sep 2018 08:34:18 +0200 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov , 32790@debbugs.gnu.org Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> In-Reply-To: <87efdnsp2k.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:boToVU6eIb5FDiYW4YHlE8oZgfJveeqHoifi+ZREoZhfQtrwqkm X94QdJ1cxAwtvyrwAdHFZNTVEkqJDb3HyrFczPrwvzk06+u72g3+CkAKMlssUylDpKQvX80 1YNliw8atjNOHJoCSbQ/tIsAl3BX8HCdH2nRvTwjPzdsX776eyBaDiaOiqfz+cY8go+KR9z +H9+53TTAktohD0N7LJ7g== X-UI-Out-Filterresults: notjunk:1;V01:K0:vzeLsqrqI7s=:BD0O9vFCYPOo1mczN8+Bvq 3QdRBBUVHP6ARerinisoSmao9N3MSMdqhz58F73QzW63fKbEioNqJHkiD5zIC8QG/+p22nU6H 0LH8a02beHtTbOpUY/gwovuzGgpKP1RYaWWuqKqmMj0ISyPCPmCcD4SBycBGLuZJpZz2o7AYu gf30/rdxQz8GWt+NoLCHSsMu4TlBt0YhmRaHvcdrcvhcJvE5IiXY1VsKBgI22DZ3j4PopWDpA FTzFkQTniu8Ag/QFSeZWt+AY9ZmYzx2KsO+0vhGQiDT5X4gu6BkJsE5952DpsGVx/YufxiWq3 55wL2H62wYhwTkd4bZBBejSECSzEXd8rvtEUjg/ZWgFiJZvNK9d/sN1jk2L2EA4tfW84Rgb8c ufXE0YM3u9p6iOedSkKwd7IioHEs/cznFKSDf6wMhdfspzzD/rPOa8/nAhSI/kTS4Dbe5t4fu JwQLnDzqC0S8spSOgcQ5OwWvM26O1lNFI1keF/4czxO3hySDfGT7278vucM+SBDo1HsCcGHcT OeLkv8Ya2zBk+PNDUkmmCiS5KTRH4G+QkLFgXpwuR7ENMI+v3vKTlBM8g+pPA3u8szDQfxjm/ tpr/q5YqsIeQOhN11e6cTsOHLRf+UynqcU1IwfXjTN7YS6ww4sf+h9KrgQkyNuj8DnoB3fasF Hc2ZNbaUkNGqbSof67P9VwSxMuYj7taHlWFtVFZrEbh5GGSm/5F/w4lrSH+9VArxTXwNjo8fm eol6W3w44NiGz+URnOzmndbKD4dNkr5TMkzRO+ZznnjVui+JWjxFNpxVDa/LK06oV8HRAvW1l 7z1iJvzbsp/ql/HNnvX1WpNm/+FJkIuzY/UOy5ZKy3LTDgaLSg= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32790 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > 0. emacs -Q > > 1. C-h e > > 2. C-x o > > 3. C-x 2 > > 4. C-x 0 > > It's expected that point will remain where it was visually on the screen, That screen position will not show any buffer text after C-x 0. How do you want the cursor (I suppose that's what "point" refers to) remain there? > just will relocate to the window that takes place of the deleted window, > but point jumps to an unexpected place in the opposite part of the frame. > > This is not a regression, but nevertheless very annoying behavior. What should Emacs do instead? martin From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 21 02:56:03 2018 Received: (at 32790) by debbugs.gnu.org; 21 Sep 2018 06:56:03 +0000 Received: from localhost ([127.0.0.1]:47604 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g3FMB-0003Ln-B4 for submit@debbugs.gnu.org; Fri, 21 Sep 2018 02:56:03 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34596) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g3FMA-0003LK-15 for 32790@debbugs.gnu.org; Fri, 21 Sep 2018 02:56:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g3FM1-0007Kx-Fv for 32790@debbugs.gnu.org; Fri, 21 Sep 2018 02:55:56 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:46640) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g3FM0-0007JQ-FH; Fri, 21 Sep 2018 02:55:52 -0400 Received: from [176.228.60.248] (port=4005 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1g3FM0-0005Ar-0J; Fri, 21 Sep 2018 02:55:52 -0400 Date: Fri, 21 Sep 2018 09:55:37 +0300 Message-Id: <83zhwbcpau.fsf@gnu.org> From: Eli Zaretskii To: Juri Linkov In-reply-to: <87efdnsp2k.fsf@mail.linkov.net> (message from Juri Linkov on Fri, 21 Sep 2018 02:33:55 +0300) Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > From: Juri Linkov > Date: Fri, 21 Sep 2018 02:33:55 +0300 > > 0. emacs -Q > > 1. C-h e > > 2. C-x o > > 3. C-x 2 > > 4. C-x 0 > > It's expected that point will remain where it was visually on the screen, > just will relocate to the window that takes place of the deleted window, > but point jumps to an unexpected place in the opposite part of the frame. > > This is not a regression, but nevertheless very annoying behavior. You mean you expected that if the same buffer is displayed in another window, Emacs should prefer that other window when it decides what window to make the selected one? I don't think this is guaranteed, and in any case I could think of a scenario where the current behavior is the convenient one. From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 22 18:42:40 2018 Received: (at 32790) by debbugs.gnu.org; 22 Sep 2018 22:42:40 +0000 Received: from localhost ([127.0.0.1]:50016 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g3qbo-0000dQ-Kf for submit@debbugs.gnu.org; Sat, 22 Sep 2018 18:42:40 -0400 Received: from pop.dreamhost.com ([64.90.62.162]:34608 helo=pdx1-sub0-mail-a31.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g3qbl-0000dE-FV for 32790@debbugs.gnu.org; Sat, 22 Sep 2018 18:42:37 -0400 Received: from pdx1-sub0-mail-a31.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a31.g.dreamhost.com (Postfix) with ESMTP id 9ED877F32F; Sat, 22 Sep 2018 15:42:36 -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=ES+hymAlzLPU4A9/cAAnPBgWR84=; b= KbdXnBrNslImRqdfxHvRJ7o1TMlwvxQ90ewUZ6mU7snYLDDB4RW29EehIbAtG0jO 6Yub/+Ob4ItfafcQUJhM1qkkKef/6NdaVBW8cTeryuRstLGRSusqD2GkNi3iDY2O A+I4PjYrP2Moq1nP8Q9fICTGJhIt85NvgVZyLL8w9WA= Received: from localhost.linkov.net (m91-129-111-128.cust.tele2.ee [91.129.111.128]) (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-a31.g.dreamhost.com (Postfix) with ESMTPSA id AB1937F381; Sat, 22 Sep 2018 15:42:28 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a31 X-DH-BACKEND: pdx1-sub0-mail-a31 From: Juri Linkov To: martin rudalics Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Organization: LINKOV.NET References: <87efdnsp2k.fsf@mail.linkov.net> <5BA490EA.4000502@gmx.at> Date: Sun, 23 Sep 2018 01:23:16 +0300 In-Reply-To: <5BA490EA.4000502@gmx.at> (martin rudalics's message of "Fri, 21 Sep 2018 08:34:18 +0200") Message-ID: <87bm8pxjcb.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> 0. emacs -Q >> >> 1. C-h e >> >> 2. C-x o >> >> 3. C-x 2 >> >> 4. C-x 0 >> >> It's expected that point will remain where it was visually on the screen, > > That screen position will not show any buffer text after C-x 0. How > do you want the cursor (I suppose that's what "point" refers to) > remain there? Yes, I meant the cursor, but more specifically the cursor in the selected window (as opposed to cursor-in-non-selected-windows). >> just will relocate to the window that takes place of the deleted window, >> but point jumps to an unexpected place in the opposite part of the frame. >> >> This is not a regression, but nevertheless very annoying behavior. > > What should Emacs do instead? I believe Emacs could try to select the window that takes screen space of the deleted window. I wonder is it possible to define a simple rule in terms of the window tree, e.g. maybe it is the parent window of the deleted window that should be selected? Or it's not guaranteed that the parent window takes the screen space of the deleted subwindow in the same window combination? From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 22 18:42:49 2018 Received: (at 32790) by debbugs.gnu.org; 22 Sep 2018 22:42:49 +0000 Received: from localhost ([127.0.0.1]:50019 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g3qbw-0000dk-Ro for submit@debbugs.gnu.org; Sat, 22 Sep 2018 18:42:49 -0400 Received: from pop.dreamhost.com ([64.90.62.162]:34648 helo=pdx1-sub0-mail-a31.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g3qbv-0000dd-Ey for 32790@debbugs.gnu.org; Sat, 22 Sep 2018 18:42:47 -0400 Received: from pdx1-sub0-mail-a31.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a31.g.dreamhost.com (Postfix) with ESMTP id 9518D7F382; Sat, 22 Sep 2018 15:42:46 -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=7QGdIilQQKIMyQbbDat1JGfO0xU=; b= VEeyG328OIZkAlHtrAg4S3FRDumqZDF0F1yqQ/Y9DWrz8S+TMxATu8Bxmwq9Tsj5 YFQDuVoB9GyQ6IxWk3LhmL/p2H2j14AAuHEKTpoGybOuYD6IWDSDDrZ+RuLqImv3 PZzwO2Cyj1ANO6JA3cEsSCngImjCr+UMRll6iDz5/hA= Received: from localhost.linkov.net (m91-129-111-128.cust.tele2.ee [91.129.111.128]) (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-a31.g.dreamhost.com (Postfix) with ESMTPSA id 8BD2A7F381; Sat, 22 Sep 2018 15:42:44 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a31 X-DH-BACKEND: pdx1-sub0-mail-a31 From: Juri Linkov To: Eli Zaretskii Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Organization: LINKOV.NET References: <87efdnsp2k.fsf@mail.linkov.net> <83zhwbcpau.fsf@gnu.org> Date: Sun, 23 Sep 2018 01:34:43 +0300 In-Reply-To: <83zhwbcpau.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 21 Sep 2018 09:55:37 +0300") Message-ID: <87mus9upoc.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> 0. emacs -Q >> >> 1. C-h e >> >> 2. C-x o >> >> 3. C-x 2 >> >> 4. C-x 0 >> >> It's expected that point will remain where it was visually on the screen, >> just will relocate to the window that takes place of the deleted window, >> but point jumps to an unexpected place in the opposite part of the frame. >> >> This is not a regression, but nevertheless very annoying behavior. > > You mean you expected that if the same buffer is displayed in another > window, Emacs should prefer that other window when it decides what > window to make the selected one? Actually it's a rare case when the same buffer is displayed in two windows. But I meant a more general case where all windows display different buffers. This is a more appropriate recipe that avoids the same buffers: 0. emacs -Q 1. C-h e 2. C-x o 3. C-x 2 4. C-h i 5. C-x 0 From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 23 01:45:12 2018 Received: (at 32790) by debbugs.gnu.org; 23 Sep 2018 05:45:12 +0000 Received: from localhost ([127.0.0.1]:50249 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g3xCh-0004tJ-VQ for submit@debbugs.gnu.org; Sun, 23 Sep 2018 01:45:12 -0400 Received: from eggs.gnu.org ([208.118.235.92]:52092) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g3xCh-0004t1-87 for 32790@debbugs.gnu.org; Sun, 23 Sep 2018 01:45:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g3xCX-0002Pv-Av for 32790@debbugs.gnu.org; Sun, 23 Sep 2018 01:45:06 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:39708) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g3xCX-0002Pp-7W; Sun, 23 Sep 2018 01:45:01 -0400 Received: from [176.228.60.248] (port=4169 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1g3xCW-0004s9-QS; Sun, 23 Sep 2018 01:45:01 -0400 Date: Sun, 23 Sep 2018 08:44:51 +0300 Message-Id: <837ejcday4.fsf@gnu.org> From: Eli Zaretskii To: Juri Linkov In-reply-to: <87bm8pxjcb.fsf@mail.linkov.net> (message from Juri Linkov on Sun, 23 Sep 2018 01:23:16 +0300) Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <5BA490EA.4000502@gmx.at> <87bm8pxjcb.fsf@mail.linkov.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 32790 Cc: rudalics@gmx.at, 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > From: Juri Linkov > Date: Sun, 23 Sep 2018 01:23:16 +0300 > Cc: 32790@debbugs.gnu.org > > > What should Emacs do instead? > > I believe Emacs could try to select the window that takes screen space > of the deleted window. That's what it does here: it selects *scratch*, which reclaims the screen space that formerly belonged to one of the 2 windows displaying *Messages*. Isn't that what happens for you? From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 23 04:27:48 2018 Received: (at 32790) by debbugs.gnu.org; 23 Sep 2018 08:27:48 +0000 Received: from localhost ([127.0.0.1]:50284 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g3zk4-0000bR-1i for submit@debbugs.gnu.org; Sun, 23 Sep 2018 04:27:48 -0400 Received: from mout.gmx.net ([212.227.15.19]:35765) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g3zk2-0000bD-8p for 32790@debbugs.gnu.org; Sun, 23 Sep 2018 04:27:46 -0400 Received: from [192.168.1.101] ([212.95.5.115]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0M9b03-1fvUTn3LSh-00Cxvr; Sun, 23 Sep 2018 10:27:36 +0200 Message-ID: <5BA74E75.8000405@gmx.at> Date: Sun, 23 Sep 2018 10:27:33 +0200 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <5BA490EA.4000502@gmx.at> <87bm8pxjcb.fsf@mail.linkov.net> In-Reply-To: <87bm8pxjcb.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:DyMOQaBdEdQ5i8V7DioJCkr5R24PjVy6ddWSgi65zbc8j5FGzbx 7bXxYGHugAef5xo/YCCYZrfTV0QY+/j95nN42A1Xeezoz3tzAUhObMVkdfc8OeC7Y/5Jmjl gqVJWAAtuDq4ffkkmlz6hNJvNrhxKt3bM66T6HjKqwoORFyMuds+RGdwBZn++Q78eco2NLX b94tjjNu5/AXchON+bw9w== X-UI-Out-Filterresults: notjunk:1;V01:K0:XHquWZHZWbU=:8C0mqXchd8krKRByEgeAv+ 0Pyq9FyxbK/lq6otirTz/sljXjpm8K3o4xvSPQ1EAqo6TCuqA+mlvAk9QtWNZX5GIbQIAtNfu bsVQzBcSxSPZh2rZBlHbQ6uF0AB8ubgxn2IRcvYUP3wP8eduLpEfONkMOqm9FYAkiboS5h3Mk TR9SOYJE0y7KfasBQwyy7h2j+90RcPAM1pYaT6olsX9oS6tgzNL1bH5VPQI2gNNz8TNKIY40x QTRWgG4ztui+WIzH3R37v2uX9pExo/jWV5vd3B7e5dKeWlcA+wLZSwZBLf4/EU9AhMQqy0WtK llBc//Wi/OKa7u4cnQI3rzjmhf3t+wVrob3gHy5cNmviqFpQmYBRDj26Eerzkj2eZbVws4I18 yF1kuj7sflXod2XakDrUok35NCuoABjtO/HQCQnzUUHEhj3dbKO1Oliqe8WC9RBPs1djAUQyH rr1FrPmUZ+r+J30Hw023Tey2Mc7YQrD1yMLO49yYCz1wxEdnOVK/xgitO98GOOkmbkUMJhQ+b 6KVk8O5aPmVjiaRIQT8XVuMla7vhLC3s2DDhzzjD2VXyAN4vUjHoRSzpZ8K5uQb4GWndwKJbQ fQgg7n53ZYXtUAu7p+V29iQkmZPJ+cShuOI7bygLrgLqr+nZfjRcVlT10sV0G3Mv2CoWda/z3 8Z5nOo1guCI3oOmyIQo25O5p5rU5wpUZvfDmoG0k9+Qt7tBSyZhG737kR+c9qWP2MSLb/bIhl CmUN6FS68PH4jaD0pZo7BaKuljwNnjtJxNkfvP6rMYrND8E8JFGUaVyBJwjkKKgnP37eZfv5S OZkhp25ZCxLRDfYyktxvbC2Fe4zhQWFDQ83G4P0Q7gpvkRuTSk= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > I believe Emacs could try to select the window that takes screen space > of the deleted window. By default Emacs tries to select the most recently used window. Only if that fails, it uses the first live window on the frame as fallback. > I wonder is it possible to define a simple rule in terms of the > window tree, e.g. maybe it is the parent window of the deleted window > that should be selected? A parent window is internal and cannot be selected. You probably mean one of the former siblings of the deleted window. If we did that, we should make it customizable somehow. > Or it's not guaranteed that the parent > window takes the screen space of the deleted subwindow in the same > window combination? When the window to be deleted has only one sibling, then that sibling will get the space of the deleted window. If that sibling is a parent window, all its children will get the space proportionally. Otherwise, when the window do be deleted has a left sibling, that one will usualy get the space for historical reasons. If the window has no left sibling, the right one gets the space. In either cae, if 'window-combination-resize' is non-nil, all windows in the same combination may get the space proportionally. martin From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 23 04:28:26 2018 Received: (at 32790) by debbugs.gnu.org; 23 Sep 2018 08:28:26 +0000 Received: from localhost ([127.0.0.1]:50288 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g3zkg-0000co-Aa for submit@debbugs.gnu.org; Sun, 23 Sep 2018 04:28:26 -0400 Received: from mout.gmx.net ([212.227.15.19]:44569) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g3zke-0000cY-92 for 32790@debbugs.gnu.org; Sun, 23 Sep 2018 04:28:24 -0400 Received: from [192.168.1.101] ([212.95.5.115]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0M5dMm-1ft4Zs2Q24-00xdHh; Sun, 23 Sep 2018 10:28:16 +0200 Message-ID: <5BA74E9D.606@gmx.at> Date: Sun, 23 Sep 2018 10:28:13 +0200 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov , Eli Zaretskii Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <83zhwbcpau.fsf@gnu.org> <87mus9upoc.fsf@mail.linkov.net> In-Reply-To: <87mus9upoc.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:SwvkvuXvBQ6Oihde2ukYXjvzkTfWUOMLRxkOh1InjCGrZgNV1/h QZ52ILzmMcxtvJ0JIKsDK18SQQ3ITv/6PRqE8CDaephTxxXntFkO9ROETCNttKUvRoka11a dr2nn8Nfq8ZKfOFMoJmwU8A95zn9qUJvzux+mNlnDBbHumJwSK9aESPctBLmFByGQy0R8hq NJe1aAWYQTwX/d5FZbtXQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:Cnt2g3MjePM=:xDYc7FvOMGXgAZnIhdEhr3 fLSYge+IPQafBtRYayKZ7QM/ekc1y8KcRBbtMlOfzlssnJra/p+MQQU1947QTAJe8NlPQJTG1 8YB3uoYtr1i7R+pCbz6U/vMT6mEUXlupiTXijnoNnc0Ny6BAJXLyUYZdDWIizkcdpdSKiEx6s TQqEx3atbcVpkyhjrKEq0TioGosjCQFH6lPUms3hZO8HwbTBCxXSGSWJuda6/f6i+RU33VriP UvE7qba5KHEtnswvAUxrbOFPa+04fDJeYdrP+Jq365U+7zFowSTNr/h0+6vZq8d/vNjqAn3N1 XkTmB7O50iyLF9hEc/YhbHIQVUKaECXZ3wzyzh7uhC/LHnYEoEzvDW8Oe7QkJhffYGvMcx3bg pq130/PDmS9ssOycMulMD+G9wFjDSN2eytVUHoj+/EUL8vaTlsuDv6qAarT705AzU2DUQKXqJ 8iyaiW6WrzB8H6+JuBqRMgcE0396uzBZkOn6TRNWoKygk6wo1zCxyT7ac9kOGTbM1bQlDMHC5 P0vcg85G5IziCSI7RIhslPY0SMI6+mNLVT1wg/yK97N87UJcpb48pkJDmdi8x/Y57bYNznQTm BV3HpIijmbiPrRVPTu2A6XsQTwq9hfJDxOjgw/Ck/HgmFeMeO2dwmP+3XDA6mCNlGPkRNa0US uQNApKNFfV35ABHtxWJ5VH9OR0C41e/Q7b6ZiEyQqu4VXdMASRw63wcXvdY7AzlsjzsbT0Il9 UqZ6VLw6OSFJ2EAPakC+/i1KtPmHGvpz9JCN7jaKIBKA4WjN9y2dRkHjFYcnJLSBQdw5b1x3U EEoQAmEhMhjgr4uaP5eMBR82dAwLePEmmRqmO1dSUHxW+NaG3k= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> You mean you expected that if the same buffer is displayed in another >> window, Emacs should prefer that other window when it decides what >> window to make the selected one? > > Actually it's a rare case when the same buffer is displayed > in two windows. But I meant a more general case where all windows > display different buffers. This is a more appropriate recipe > that avoids the same buffers: > > 0. emacs -Q > > 1. C-h e > > 2. C-x o > > 3. C-x 2 > > 4. C-h i > > 5. C-x 0 C-x 2 in step 3 does _not_ "use" the new window on *Messages*. Hence at the time you do C-x 0 in step 5, the most recently used window (with exception of the one you are about to delete) is the window on *scratch*. Using a window means selecting it, see 'window-use-time'. Hence if, before C-x 0, you first select the window on *Messages* and then reselect the *Info* window, C-x 0 will select the *Messages* window instead. martin From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 23 06:56:28 2018 Received: (at 32790) by debbugs.gnu.org; 23 Sep 2018 10:56:28 +0000 Received: from localhost ([127.0.0.1]:50315 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g423v-0004H0-TZ for submit@debbugs.gnu.org; Sun, 23 Sep 2018 06:56:28 -0400 Received: from eggs.gnu.org ([208.118.235.92]:38635) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g423u-0004Gk-3T for 32790@debbugs.gnu.org; Sun, 23 Sep 2018 06:56:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g423j-0001sL-U8 for 32790@debbugs.gnu.org; Sun, 23 Sep 2018 06:56:20 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:42438) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g423j-0001sC-PY; Sun, 23 Sep 2018 06:56:15 -0400 Received: from [176.228.60.248] (port=4136 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1g423j-0004AY-Ag; Sun, 23 Sep 2018 06:56:15 -0400 Date: Sun, 23 Sep 2018 13:56:06 +0300 Message-Id: <83y3bsbhyx.fsf@gnu.org> From: Eli Zaretskii To: Juri Linkov In-reply-to: <87mus9upoc.fsf@mail.linkov.net> (message from Juri Linkov on Sun, 23 Sep 2018 01:34:43 +0300) Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <83zhwbcpau.fsf@gnu.org> <87mus9upoc.fsf@mail.linkov.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > From: Juri Linkov > Cc: 32790@debbugs.gnu.org > Date: Sun, 23 Sep 2018 01:34:43 +0300 > > Actually it's a rare case when the same buffer is displayed > in two windows. But I meant a more general case where all windows > display different buffers. This is a more appropriate recipe > that avoids the same buffers: > > 0. emacs -Q > > 1. C-h e > > 2. C-x o > > 3. C-x 2 > > 4. C-h i > > 5. C-x 0 I meanwhile understand that in your case "C-h e" splits the original window horizontally, i.e. you get 2 windows side by side, not one above the other. AFAICT, this was never explicitly mentioned in your bug report. In any case, Martin explained the logic behind selecting another window in this case. FWIW, I think the existing logic, which prefers the most recently selected window, is more sound than the one you propose, because screen positions can be more arbitrary/random than the MRU order. From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 23 17:03:08 2018 Received: (at 32790) by debbugs.gnu.org; 23 Sep 2018 21:03:08 +0000 Received: from localhost ([127.0.0.1]:51154 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g4BX2-000877-79 for submit@debbugs.gnu.org; Sun, 23 Sep 2018 17:03:08 -0400 Received: from pop.dreamhost.com ([64.90.62.162]:42498 helo=pdx1-sub0-mail-a31.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g4BX0-00086z-Db for 32790@debbugs.gnu.org; Sun, 23 Sep 2018 17:03:06 -0400 Received: from pdx1-sub0-mail-a31.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a31.g.dreamhost.com (Postfix) with ESMTP id AB8E47F978; Sun, 23 Sep 2018 14:03:05 -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=WqFVnPlYnKmp6F2NXyKmSiun/f8=; b= wiWptHILw5v+iYsv/jRxerPazzNzccw8onY7SKpJ1ZF0526IsliQ2R203nTesKED Qv1S+qKzCY3C+NAfD5n2rH5rEkg0FF9e45/v5+tZPs8UKePJj7HrjpV30ikOf8Ol Tr5VIF/OIXZIt8697eOcNLY71xkKxbrqWc1daiJUqfE= Received: from localhost.linkov.net (m91-129-111-128.cust.tele2.ee [91.129.111.128]) (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-a31.g.dreamhost.com (Postfix) with ESMTPSA id 05A3A7F96E; Sun, 23 Sep 2018 14:03:03 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a31 X-DH-BACKEND: pdx1-sub0-mail-a31 From: Juri Linkov To: Eli Zaretskii Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Organization: LINKOV.NET References: <87efdnsp2k.fsf@mail.linkov.net> <83zhwbcpau.fsf@gnu.org> <87mus9upoc.fsf@mail.linkov.net> <83y3bsbhyx.fsf@gnu.org> Date: Sun, 23 Sep 2018 23:49:37 +0300 In-Reply-To: <83y3bsbhyx.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 23 Sep 2018 13:56:06 +0300") Message-ID: <878t3srn5q.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> Actually it's a rare case when the same buffer is displayed >> in two windows. But I meant a more general case where all windows >> display different buffers. This is a more appropriate recipe >> that avoids the same buffers: >> >> 0. emacs -Q >> >> 1. C-h e >> >> 2. C-x o >> >> 3. C-x 2 >> >> 4. C-h i >> >> 5. C-x 0 > > I meanwhile understand that in your case "C-h e" splits the original > window horizontally, i.e. you get 2 windows side by side, not one > above the other. AFAICT, this was never explicitly mentioned in your > bug report. Sorry, I meant horizontally split windows. > In any case, Martin explained the logic behind selecting another > window in this case. FWIW, I think the existing logic, which prefers > the most recently selected window, is more sound than the one you > propose, because screen positions can be more arbitrary/random than > the MRU order. This problem is quite rare since it resurfaces only when a frame has more than 2 windows. And every time the cursor jumps far away from where it was before window deleting, it raises the question "Why?" Now I understand that it jumps to the most recently selected window, but this logic is not obvious. Then why not to the most recently displayed window? Maybe we should have an option or at least hook to define the preferred behavior. Like there is the option split-window-keep-point (applicable only to vertically split windows) whose nil value provides more smooth effect (selects the window depending on where point was before split, to avoid window scrolling). From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 23 17:03:13 2018 Received: (at 32790) by debbugs.gnu.org; 23 Sep 2018 21:03:13 +0000 Received: from localhost ([127.0.0.1]:51157 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g4BX7-00087P-Eg for submit@debbugs.gnu.org; Sun, 23 Sep 2018 17:03:13 -0400 Received: from pop.dreamhost.com ([64.90.62.162]:42526 helo=pdx1-sub0-mail-a31.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g4BX6-00087I-G4 for 32790@debbugs.gnu.org; Sun, 23 Sep 2018 17:03:12 -0400 Received: from pdx1-sub0-mail-a31.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a31.g.dreamhost.com (Postfix) with ESMTP id 990757F96E; Sun, 23 Sep 2018 14:03:11 -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=jrt0wNqqbz6OCFVAAAX6g0K8fmg=; b= iyN8Nz7T7R6jNWiTsntLbXfULrk9PUO5NAXEg2nrcBma7Cv+3YkON+h7VBSo3Pmm wsUUoPVlR9W/8Wo9dCQs7fiqy8zB6rFFKql/YkLVmJy8Q1tIa1ADj7xJmbGz1QyH DKUTQMMd/RSgPDn1OlsW5wDMunM7x3UyfAeEMAsPeEs= Received: from localhost.linkov.net (m91-129-111-128.cust.tele2.ee [91.129.111.128]) (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-a31.g.dreamhost.com (Postfix) with ESMTPSA id 7C6D87F29D; Sun, 23 Sep 2018 14:03:10 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a31 X-DH-BACKEND: pdx1-sub0-mail-a31 From: Juri Linkov To: martin rudalics Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Organization: LINKOV.NET References: <87efdnsp2k.fsf@mail.linkov.net> <5BA490EA.4000502@gmx.at> <87bm8pxjcb.fsf@mail.linkov.net> <5BA74E75.8000405@gmx.at> Date: Sun, 23 Sep 2018 23:57:35 +0300 In-Reply-To: <5BA74E75.8000405@gmx.at> (martin rudalics's message of "Sun, 23 Sep 2018 10:27:33 +0200") Message-ID: <87zhw8nd8g.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> I wonder is it possible to define a simple rule in terms of the >> window tree, e.g. maybe it is the parent window of the deleted window >> that should be selected? > > A parent window is internal and cannot be selected. You probably mean > one of the former siblings of the deleted window. If we did that, we > should make it customizable somehow. Yes, I meant siblings. Is it possible to make it customizable? Searching for this, I see others find the current behavior annoying too, e.g. https://github.com/wasamasa/dotemacs/blob/master/TODO.org#fix-emacs-selection-after-window-quitclose >> Or it's not guaranteed that the parent >> window takes the screen space of the deleted subwindow in the same >> window combination? > > When the window to be deleted has only one sibling, then that sibling > will get the space of the deleted window. If that sibling is a parent > window, all its children will get the space proportionally. > > Otherwise, when the window do be deleted has a left sibling, that one > will usualy get the space for historical reasons. If the window has > no left sibling, the right one gets the space. In either case, if > 'window-combination-resize' is non-nil, all windows in the same > combination may get the space proportionally. Does this mean that a simple rule would be just to use the left sibling, otherwise the right sibling? From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 24 04:24:00 2018 Received: (at 32790) by debbugs.gnu.org; 24 Sep 2018 08:24:00 +0000 Received: from localhost ([127.0.0.1]:51284 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g4M9w-0001ba-F4 for submit@debbugs.gnu.org; Mon, 24 Sep 2018 04:24:00 -0400 Received: from mout.gmx.net ([212.227.17.20]:55083) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g4M9u-0001bM-JP for 32790@debbugs.gnu.org; Mon, 24 Sep 2018 04:23:58 -0400 Received: from [192.168.1.101] ([212.95.5.130]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0Mg0IT-1gRmBl2QnV-00NSXe; Mon, 24 Sep 2018 10:23:48 +0200 Message-ID: <5BA89F0F.7000904@gmx.at> Date: Mon, 24 Sep 2018 10:23:43 +0200 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov , Eli Zaretskii Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <83zhwbcpau.fsf@gnu.org> <87mus9upoc.fsf@mail.linkov.net> <83y3bsbhyx.fsf@gnu.org> <878t3srn5q.fsf@mail.linkov.net> In-Reply-To: <878t3srn5q.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:PaRlGwTh/9vJEwkV9h5297ETZl5q0z8i+MIDKVQgQa7GO+PL3Qt icTOuS4G4RkIFkVASwsTWDYt1T7hQ+YCBCBjGtbX7oqDgBU4Unn0r+tK7d29j1u8Qn5TBfl xqfWtxhWzrjWQAlMzcr0n8Ok//FvNrgAfWpBXJp8YC4JangjbM48GdEMAwwgwP0LQRjYtDg IjTgRLUu1sup7+BcCHSyg== X-UI-Out-Filterresults: notjunk:1;V01:K0:bs3kKXpxp3U=:4NaXOsawaKvGItbkunKByW h81OIcNHpMtTGEVblr25hdMMKOx8L6SYFbGsaXD8N03P268VkOOYxaS8LeDYRbeTMDg/0Vych dFVWs/HArjYkxcWM3sZKAj7MpFenf6gM+heEqivgAZDVsv0eIgj++Jf9tsVmw6/O3nkgP06C+ kWPt+1KqfN3SJJ+PdDcPdv+8H6mvtmHkVKBXu8TGanT8qS5hcjnuB+1gQZmoVxVADm4LO++Qc aghqTbif8Un53B1G3MayK16SvwWq7TDorNRhHauiEIXXkb8aRXtOhbymTJjaf8nczvGIYqKxp fmLmXJ82dv3XPIBy6uCnorQyj2TIjqV3qMxZEihbAikyNHeYg5zPlbdZP2DJU9q7gK65c9MRs /aoq8OKPfQ9AaqiFj4RlJVdOsigWB3MoH8xWBiybf9RhE+43ZnjhH6L450KHmUQIHnIIovAf1 gavxU7PG5yWi7gIJ20Uz9bBNKze+T1BolUWuzcXa78DDuTEuudP61rVbEqHu4QeQfiOd6+lxT Lz4a2NkswArjUcSILU7Prexdhiaza8Ubt0F5hahhkZfhx6PTz0kRinSTY5tcVjO0qaPhoixVF k6FFsmdQF/0j5Nx2ynUJEMlCkeRbR3uCKevC0v5LWOIInKbgRYiE59pRm2hXHTp0DXZC71fBT JsKj1OS1a/xepz0FBUooMn3gq/jPCIKS1rcpHJwM8fu72mT1n5jsxfkldZSkJYwjgsJjqi4f0 9aXM5RevcMEcSdz27nFrozj9e7QgdBkROqjwboflBLGrw3J04ZpsvwRINIo7tBk0ESV0Ool4e IDdz+mbqkNURQna3osA7yZ2SJ1LO2SJzNsETdgrajzGS2GMQzM= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> I meanwhile understand that in your case "C-h e" splits the original >> window horizontally, i.e. you get 2 windows side by side, not one >> above the other. AFAICT, this was never explicitly mentioned in your >> bug report. > > Sorry, I meant horizontally split windows. How comes that C-h e splits the window horizontally? > Now I understand that it jumps to the most recently selected window, > but this logic is not obvious. Then why not to the most recently > displayed window? The idea to automatically select a window that has never been selected before is not overly intuitive IMHO. > Maybe we should have an option or at least hook > to define the preferred behavior. Like there is the option > split-window-keep-point (applicable only to vertically split windows) > whose nil value provides more smooth effect (selects the window > depending on where point was before split, to avoid window scrolling). The most recently displayed window might be the window that gets deleted and so we would have to either modify the semantics of 'window-use-time' (to optionally include the case that the window has been created without being selected) or add a new slot to the window structure and have 'delete-window' act accordingly if set. martin From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 24 04:31:05 2018 Received: (at 32790) by debbugs.gnu.org; 24 Sep 2018 08:31:06 +0000 Received: from localhost ([127.0.0.1]:51297 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g4MGn-0001o5-NO for submit@debbugs.gnu.org; Mon, 24 Sep 2018 04:31:05 -0400 Received: from eggs.gnu.org ([208.118.235.92]:51952) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g4MGm-0001nU-0W for 32790@debbugs.gnu.org; Mon, 24 Sep 2018 04:31:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g4MGd-0001Kq-Oh for 32790@debbugs.gnu.org; Mon, 24 Sep 2018 04:30:58 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:58945) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g4MGb-0001HU-Oy; Mon, 24 Sep 2018 04:30:53 -0400 Received: from [176.228.60.248] (port=1300 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1g4MGa-0008Bb-S4; Mon, 24 Sep 2018 04:30:53 -0400 Date: Mon, 24 Sep 2018 11:30:46 +0300 Message-Id: <83k1nbb8ll.fsf@gnu.org> From: Eli Zaretskii To: martin rudalics In-reply-to: <5BA89F0F.7000904@gmx.at> (message from martin rudalics on Mon, 24 Sep 2018 10:23:43 +0200) Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <83zhwbcpau.fsf@gnu.org> <87mus9upoc.fsf@mail.linkov.net> <83y3bsbhyx.fsf@gnu.org> <878t3srn5q.fsf@mail.linkov.net> <5BA89F0F.7000904@gmx.at> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > Date: Mon, 24 Sep 2018 10:23:43 +0200 > From: martin rudalics > CC: 32790@debbugs.gnu.org > > >> I meanwhile understand that in your case "C-h e" splits the original > >> window horizontally, i.e. you get 2 windows side by side, not one > >> above the other. AFAICT, this was never explicitly mentioned in your > >> bug report. > > > > Sorry, I meant horizontally split windows. > > How comes that C-h e splits the window horizontally? It does if the initial frame is wide enough. That's expected, I think. From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 24 04:33:25 2018 Received: (at 32790) by debbugs.gnu.org; 24 Sep 2018 08:33:25 +0000 Received: from localhost ([127.0.0.1]:51301 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g4MJ3-0001rc-4I for submit@debbugs.gnu.org; Mon, 24 Sep 2018 04:33:25 -0400 Received: from mout.gmx.net ([212.227.17.22]:46311) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g4MIz-0001rM-11 for 32790@debbugs.gnu.org; Mon, 24 Sep 2018 04:33:23 -0400 Received: from [192.168.1.101] ([212.95.5.130]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LyR1G-1fjvmo2A7i-015uF0; Mon, 24 Sep 2018 10:33:12 +0200 Message-ID: <5BA8A143.9040604@gmx.at> Date: Mon, 24 Sep 2018 10:33:07 +0200 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <5BA490EA.4000502@gmx.at> <87bm8pxjcb.fsf@mail.linkov.net> <5BA74E75.8000405@gmx.at> <87zhw8nd8g.fsf@mail.linkov.net> In-Reply-To: <87zhw8nd8g.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:bIqRE9OvZNONercqVhfa08OllZIOq+p+OLfxkB7AjmuN7A5IVOV OLWbyAJ6M8oG/TEFdTwYaaKtAk4rJ0AVr8cRTy7h4KKLH7IuC6W9WHUTJ2EGTzmwRSFTztp ZsYpbkTyJNLrKEYItVeKhHkAQv9zJv6Yt8TRYmJt5NM2KtiwyCgD+ShHkihRVho5KJKQ9vS MFIpviGFRDaRG/jGSesuA== X-UI-Out-Filterresults: notjunk:1;V01:K0:KzDW47uXSa0=:pUwh7S6XU8vMKyzOBOXcFe DILO1sq7EetGYBsVeXAAWJsNp99llZtQWUBFNba3HzI211rHi6rFSJHWQZ81MbCugbsSh03pW x6Qz8F45udExf5HLfVk15EUcvG37fath1EaOxr2z3sv7Zkxq/5rU2+Pf0qoSS61bY4mwvydIY Ypag1yx8j8fkQp72DixbF00aTiCm5lt1j92zN5Eq6Zc7v9lkZ0GxcXZ00kKQdzMvnrUdc3N4q QzZIobw2QMQ+ddfZqeKWmNpgGEvSedeQBS7UetL4LHsdDwR6lSrt3askcM35HrmicQtJz2ak6 +tN7qndkFPOetKrtuFI67hRrYU0RAOcTyf1vP12xb4qRBPlSuYmbI6wjCo4X+fPUk+8HbnQXA swYqd6OIn7roIyjU+nGZNXc7VDac6uw58dMW6ersQHz5sfxMGR0tW1iGWXwRQRtJHa9LWHOts PAqNbN2mveJPSEQQEzMB1KpWeA3pw7lrSI8/z8VPIA4GJElx7LJVX9whcXnMvpM8/x2zvoB7e 9Q7lvGzOls5p2G499jF81XKIuuvTJYgMmzvv4B22zJu32Oph5+jLef7QE9VIKEseTG+YmBeO8 h/DK5fye9fk8AbTDlEADunkRSRmtUZfU90dGVrKAOpnjuxHj4mR+FQcqyc3SnzRfBp7t1+Uzo NdtGUZRVvf/ili29PFIcO8N9bz4+sLwdUPOm4GWkjesjiYSVEkUvvfLVpnfTqy3/mdZ68TiHt arA+i5DSjE1qDKRCzM23S8L57s/jGORg5xlqo+zkIqNAdauSB1PoPvJL5X0KorZlefNfXzU2y siFnl0nFY6jcD7EhGPRN085hE+xkPjvce23f27rsuET9ZVsq6c= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> A parent window is internal and cannot be selected. You probably mean >> one of the former siblings of the deleted window. If we did that, we >> should make it customizable somehow. > > Yes, I meant siblings. Is it possible to make it customizable? I probably still have no good understanding what precisely your problem is with selecting the most recently selected window. Can you please elaborate once more? > Searching for this, I see others find the current behavior annoying too, e.g. > https://github.com/wasamasa/dotemacs/blob/master/TODO.org#fix-emacs-selection-after-window-quitclose C-x 3 C-x o C-x o C-x 2 C-x 0 What's the purpose of the 'other-buffer' calls if they don't express the user's wish to "work" in these windows? > Does this mean that a simple rule would be just to use the left sibling, > otherwise the right sibling? With "use" you mean choose for giving back the space of the deleted window? Then we should remember from which window Emacs obtained the space when creating a new window and return that space when deleting the new window, provided that old window still exists. martin From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 24 08:25:26 2018 Received: (at 32790) by debbugs.gnu.org; 24 Sep 2018 12:25:26 +0000 Received: from localhost ([127.0.0.1]:51433 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g4Pva-0003c1-3e for submit@debbugs.gnu.org; Mon, 24 Sep 2018 08:25:26 -0400 Received: from mout.gmx.net ([212.227.17.21]:60703) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g4PvY-0003bm-FE for 32790@debbugs.gnu.org; Mon, 24 Sep 2018 08:25:24 -0400 Received: from [192.168.1.101] ([212.95.5.130]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MPUFR-1g94d12qor-004hTK; Mon, 24 Sep 2018 14:25:14 +0200 Message-ID: <5BA8D7A5.8060703@gmx.at> Date: Mon, 24 Sep 2018 14:25:09 +0200 From: martin rudalics MIME-Version: 1.0 To: Eli Zaretskii Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <83zhwbcpau.fsf@gnu.org> <87mus9upoc.fsf@mail.linkov.net> <83y3bsbhyx.fsf@gnu.org> <878t3srn5q.fsf@mail.linkov.net> <5BA89F0F.7000904@gmx.at> <83k1nbb8ll.fsf@gnu.org> In-Reply-To: <83k1nbb8ll.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:MfgiKxiI96ijUNLUmUxETsd+V6V/d1EzKo1w+PYKXQi0SYgLlds krsXjNjY6/Wuhex2JYKPi5QYxg4c8UYZgMdW2F3J7qt7UBoTcnG3xKBqRismHx2nrYcZj2F 6BFmidoFqhgwvLX/TmtXdbJQ/26QHxuYhlD9UMkI7rj1+OmVKyGlBy49Ia9Kmn1heNHg4Ew PR+EB2gtjKc6J3OVXOBGw== X-UI-Out-Filterresults: notjunk:1;V01:K0:MkQQFTR8z2g=:2bQJ95FMxABm1454nIs9cI FUKR8KS4j5GaidmLebXTqL/9xyEX0SewgDUPpC8YfWWUwYJbwknf2S1HhNqCv7LHPtbgQq7s0 eClISWBMO7d9ugUl2YBmnVgpJBKcTXI+jZS0DUCaj5Quut/kxHzZQYOp20tyiIqNlE7DxVflH qnvBadwz6XUk0eyhfiZbz4U4ZO2/TBvuxo0jZ42hC9NS6R5rGy8mdHr3v8wwlv9c1mpbHQVWA 4FoON0qyF3F83jZpdGDozwu1CSId+qk6zoHZE8t7vWH5vRqOW2uc+jicueigzhvl5/YWdzbIR kUVT7QgS72L2PBXY5n194yDfNwgZVRv2j1DOO4xWYKmuqxGwRwmvTxx+nNlj6owAiHZPVu8m/ ThriuQOuidg0JlnnLXM+0v+FKRAWQHiitcvH3Uyo+uXnRKD7RIjA6jGX5Ma2sWqGhLCasJpv6 oaMuk/ztm5J/oFhGv19YkqlXkHOuVUjnblwRM2miP3SRTjW+5EQtGECfCqgwJp1nkrEZVCM7a ZU4d7UjM897rtKeERYZJKAsVsqSUvK7cdLzq/I5uAI5d+4s899CitJxeLFdrjhR71NFvi0RPi evcqSfeBzNV/GaoRVQwgYdSWpWi98zCAMdP10CpHsnwUQJcn5tj1nI0S40o4jmaXC2Exs759C kZqhxTeCWhusAiTvy7/5AUNhv1wzszqs068ddwh2MKmGszNGsbrbVOLILJIZTPfRWIfzhPo2S 2TeMEfWdxZWZFQ66hkOa6Q4Mk7Hwv1PjlTXp3hU5/JtgXEH7ddGUSQR4GHk/Vc3W3jg9nxisB hGzIQ0v89XjoR1N7pkyqBAFlrOoNJwwq9L9+nbAfTcLUBlvLic= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> How comes that C-h e splits the window horizontally? > > It does if the initial frame is wide enough. That's expected, I > think. So there must be some special settings in resources or the Emacs invocation. Our default initial frame is not wide enough. martin From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 24 15:14:23 2018 Received: (at 32790) by debbugs.gnu.org; 24 Sep 2018 19:14:23 +0000 Received: from localhost ([127.0.0.1]:52345 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g4WJL-0005VC-2F for submit@debbugs.gnu.org; Mon, 24 Sep 2018 15:14:23 -0400 Received: from pop.dreamhost.com ([64.90.62.162]:38648 helo=pdx1-sub0-mail-a31.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g4WJJ-0005V5-Dd for 32790@debbugs.gnu.org; Mon, 24 Sep 2018 15:14:21 -0400 Received: from pdx1-sub0-mail-a31.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a31.g.dreamhost.com (Postfix) with ESMTP id AFC477F977; Mon, 24 Sep 2018 12:14:20 -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=2BpiBM+F7XDZcsxgDtcUkX10BOs=; b= WkTeWIrMfIhoYvlNyutHcLXtCr/w2Vh7JHYMui5C20U/OL+BEOksm6O6/Xy4K5Ih L5/f1uNAnx3y/E5ri6SHhANtOD2V546mHYUk7ouExXF4Cb5MckpQJH0CP0/DxCw/ PcOXzri91UAPugAQYM9iREIxG/+VAsDsRerFSvGEuFw= Received: from localhost.linkov.net (m91-129-111-128.cust.tele2.ee [91.129.111.128]) (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-a31.g.dreamhost.com (Postfix) with ESMTPSA id A49517F6F6; Mon, 24 Sep 2018 12:14:19 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a31 X-DH-BACKEND: pdx1-sub0-mail-a31 From: Juri Linkov To: martin rudalics Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Organization: LINKOV.NET References: <87efdnsp2k.fsf@mail.linkov.net> <5BA490EA.4000502@gmx.at> <87bm8pxjcb.fsf@mail.linkov.net> <5BA74E75.8000405@gmx.at> <87zhw8nd8g.fsf@mail.linkov.net> <5BA8A143.9040604@gmx.at> Date: Mon, 24 Sep 2018 21:49:53 +0300 In-Reply-To: <5BA8A143.9040604@gmx.at> (martin rudalics's message of "Mon, 24 Sep 2018 10:33:07 +0200") Message-ID: <87sh1ybyo6.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > I probably still have no good understanding what precisely your > problem is with selecting the most recently selected window. Can you > please elaborate once more? The problem is that the cursor jumps to the distant part of the frame too far from the current focus. It takes additional efforts to bring it back where the input focus was. It's more about visual perception. > C-x 3 C-x o C-x o C-x 2 C-x 0 > > What's the purpose of the 'other-buffer' calls if they don't express > the user's wish to "work" in these windows? Just to play around in these windows, not to work or use them :-) >> Does this mean that a simple rule would be just to use the left sibling, >> otherwise the right sibling? > > With "use" you mean choose for giving back the space of the deleted > window? Then we should remember from which window Emacs obtained the > space when creating a new window and return that space when deleting > the new window, provided that old window still exists. It seems the logic of deciding to which sibling to give the space back is fine now. The need is to select the same window that got the space after C-x 0. From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 24 15:14:28 2018 Received: (at 32790) by debbugs.gnu.org; 24 Sep 2018 19:14:28 +0000 Received: from localhost ([127.0.0.1]:52348 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g4WJQ-0005VV-BV for submit@debbugs.gnu.org; Mon, 24 Sep 2018 15:14:28 -0400 Received: from pop.dreamhost.com ([64.90.62.162]:38722 helo=pdx1-sub0-mail-a31.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g4WJN-0005VN-SK for 32790@debbugs.gnu.org; Mon, 24 Sep 2018 15:14:26 -0400 Received: from pdx1-sub0-mail-a31.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a31.g.dreamhost.com (Postfix) with ESMTP id 2A9997F71F; Mon, 24 Sep 2018 12:14:25 -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=/7eiMudUdHOWHtDGOrzT0iyUmkY=; b= O35BCZFqnG02TW7Kz5OFzrAmdDmD0vRuhetdRWsjnMmXFQpkDFG7N+oEQjlXsalB csWV27QI+s2KtjGQzPVMIqopxCWtVQiCfpntmakkIpw8DraN9I71NvA/Ssrd5MEU ST+1DtS+gO7CCSkgxsfGS5jDT/fro2MucGvRRixZA2o= Received: from localhost.linkov.net (m91-129-111-128.cust.tele2.ee [91.129.111.128]) (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-a31.g.dreamhost.com (Postfix) with ESMTPSA id E3E7F7F6EC; Mon, 24 Sep 2018 12:14:23 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a31 X-DH-BACKEND: pdx1-sub0-mail-a31 From: Juri Linkov To: martin rudalics Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Organization: LINKOV.NET References: <87efdnsp2k.fsf@mail.linkov.net> <83zhwbcpau.fsf@gnu.org> <87mus9upoc.fsf@mail.linkov.net> <83y3bsbhyx.fsf@gnu.org> <878t3srn5q.fsf@mail.linkov.net> <5BA89F0F.7000904@gmx.at> Date: Mon, 24 Sep 2018 21:53:04 +0300 In-Reply-To: <5BA89F0F.7000904@gmx.at> (martin rudalics's message of "Mon, 24 Sep 2018 10:23:43 +0200") Message-ID: <87tvmeaikf.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32790 Cc: Eli Zaretskii , 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> Now I understand that it jumps to the most recently selected window, >> but this logic is not obvious. Then why not to the most recently >> displayed window? > > The idea to automatically select a window that has never been selected > before is not overly intuitive IMHO. OTOH, the fact that the user not yet used that window could mean that it's time to use it now, i.e. not less intuitive. > The most recently displayed window might be the window that gets > deleted and so we would have to either modify the semantics of > 'window-use-time' (to optionally include the case that the window has > been created without being selected) or add a new slot to the window > structure and have 'delete-window' act accordingly if set. Like we have buffer-display-time, maybe window-display-time is also needed in addition to window-use-time. From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 25 03:28:32 2018 Received: (at 32790) by debbugs.gnu.org; 25 Sep 2018 07:28:32 +0000 Received: from localhost ([127.0.0.1]:52805 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g4hlo-0005DB-ET for submit@debbugs.gnu.org; Tue, 25 Sep 2018 03:28:32 -0400 Received: from mout.gmx.net ([212.227.15.19]:48715) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g4hlm-0005Cy-MJ for 32790@debbugs.gnu.org; Tue, 25 Sep 2018 03:28:31 -0400 Received: from [192.168.1.101] ([46.125.249.3]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0M70HF-1fs91X2yzl-00wnQH; Tue, 25 Sep 2018 09:28:22 +0200 Message-ID: <5BA9E390.8030506@gmx.at> Date: Tue, 25 Sep 2018 09:28:16 +0200 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <5BA490EA.4000502@gmx.at> <87bm8pxjcb.fsf@mail.linkov.net> <5BA74E75.8000405@gmx.at> <87zhw8nd8g.fsf@mail.linkov.net> <5BA8A143.9040604@gmx.at> <87sh1ybyo6.fsf@mail.linkov.net> In-Reply-To: <87sh1ybyo6.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:1LRFjCT98C5XJLRRySUQdNw1IJKdXvI6vZ4FUXnPkKKMnMr5JSr SkYAJQC/52BNI66XSlCPTyEcNFfnqYaIgPzjaPJ1eQLQ+6ew/MhsZ3DqTXflDfhzAgqvTuC nU7xO6DFw9boPq89cv053kNUZdNwjZL/18QdgbFGbOhT0QORg/7KCsSsPDLjXB76dmkFjfK RdJ6GV8GojNKxygmUVLvg== X-UI-Out-Filterresults: notjunk:1;V01:K0:1xpALRoqFLY=:4e3PplkBUBBlk/b1Zf2LEU TIiLo7667juIf/Atk+uXNoyvKuCKfUCM/RNIsFJBbCB6XEAz2cB2UVxfjfu5ahBYQFrOJ0QNP +EDzL+tRyBU+tlefIzPjCMml8TN8ArAAyZISeEhCEQuG02sXq38Bc20cuDC1WajYajx+MlviJ 6fZ33vLe/heZLb+P4nNrVrQ7s+IPOl33x77KYCTGWG2tx5ikUWUc0F5MdD03hRVbqmhrn552F xsJzRROFo6j0l54RfIBIW+7a7UFVS/j4qgVvFZbWJUCB0at+SsA0YVdcKdGhVdIAwj5tbJCpx JzSFFLNWl8DkgJnUm2+G4iEkBfhwr7lTJBkUfLR3Fgcqm4FwIfuh05wFV1z7X5DuZydjAUXGn PRsWNwMMlwws3MVoNaxVASi1U9eJmAubPv+lqksVVIOoyw5TixsC+ExfV/3zyDb2GyRlyOup6 5m1AA+dDH1xBwenEh1LbvbAYlmWDWWCE3ukJyv+ohii45q8p1yU6kWJ2EwuRahuqYLjqvq717 Cepb+YRrSzUPwAY9KcwYaw6lQtYF97Vlm1OBHgMnU5HkQK2G7rZbVfC8TCJCn600VlIkfszp/ glY6jobS5RUnxA5qg3fTGqknzMJRlhZ9mRCOibcz6Anz0CRszDCiULCt/8zTkgLjSP6YhA+UJ fC6VD/smVg8i4SaRYnpdo4fh6T5GhrQO9NsrmIkerX3GMHEldZg6Bn9cLdtjup/DhaPKomo9m sbFn0VyuymCudqcWV+E17poOPhZDYir0gIeg188l8HYEMx+VkHj3ZL5MS0tIJcaHN/diQEmXB tMuvAVSB3m23rufWo7XMQ/6KCMEfHutSbylsg9H4P/L39G/T9w= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > The problem is that the cursor jumps to the distant part of the frame > too far from the current focus. It takes additional efforts to bring > it back where the input focus was. It's more about visual perception. But then we have to care about the position of each window's point as well. Consider the case of a vertical combination of three windows with all windows' points at their top. Deleting the middle window should then probably select the lower window. With all points at their windows' bottoms we probably should select the upper window. >> C-x 3 C-x o C-x o C-x 2 C-x 0 >> >> What's the purpose of the 'other-buffer' calls if they don't express >> the user's wish to "work" in these windows? > > Just to play around in these windows, not to work or use them :-) Obviously, these C-x o are needed to make the example work. Without them the window split off by C-x 2 would be selected. > It seems the logic of deciding to which sibling to give the space back > is fine now. The need is to select the same window that got the space > after C-x 0. We can add an option for that. How should we call it? martin From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 25 03:28:47 2018 Received: (at 32790) by debbugs.gnu.org; 25 Sep 2018 07:28:48 +0000 Received: from localhost ([127.0.0.1]:52808 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g4hm3-0005De-M9 for submit@debbugs.gnu.org; Tue, 25 Sep 2018 03:28:47 -0400 Received: from mout.gmx.net ([212.227.15.19]:47809) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g4hm2-0005DS-8L for 32790@debbugs.gnu.org; Tue, 25 Sep 2018 03:28:46 -0400 Received: from [192.168.1.101] ([46.125.249.3]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0M4GRv-1fnAgf2E6d-00rpag; Tue, 25 Sep 2018 09:28:38 +0200 Message-ID: <5BA9E3A1.7090308@gmx.at> Date: Tue, 25 Sep 2018 09:28:33 +0200 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <83zhwbcpau.fsf@gnu.org> <87mus9upoc.fsf@mail.linkov.net> <83y3bsbhyx.fsf@gnu.org> <878t3srn5q.fsf@mail.linkov.net> <5BA89F0F.7000904@gmx.at> <87tvmeaikf.fsf@mail.linkov.net> In-Reply-To: <87tvmeaikf.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:sD8Mc6rvh/7ULXqOrDaHES4pGUHIyVkpRNQMOVW8UX5lEqpQ8gA QU2T0vr83BZenQzGtm5wq6GbVHodakOlp0kVZwRdiMfC0OI1zecAOGlhSkmsjPDSlWDcWul pLlDofIE54NKxlbJNpr4jzYREnkyLPEeGWi2IKXolk5y/jdYzbue4oXab39qgb6NCAjuc09 lFOVUxl364h9y0L29aYow== X-UI-Out-Filterresults: notjunk:1;V01:K0:ysFBfxtWpjk=:qtYRtZjBZJbgSwbc3a+acf R/rQcaU/F+BRblmnm08zLqlmOa7vVi2kDAaUhmBZ5RQuPGRgk56PxB05KpJaKqrHJ0o0tBcFi e/WQjflg7DDQGBC9vWZktpyW+XwX8Ix/yv5M6EMU88/XPsylsRsO4Gm9nOVwfBnGTrwerJydy za/xNn2PkOkjEmfoOsKTL0iibahdLEq3xMECNAdkV/mAw4g5+x83gCUTDRLIgunlBrNwjLEbQ zMjdgyQHiTAKEfubOBZH8G3zlpmgDywduvsN94ExWGvmWSf/H2SSV184LxtIwuSDsFYJq9a9Q R1bvJ/A7NqJj6IY7isasE+0IDc4jUiiMI9mk5CnHWgyr35bS/2IkHtPumh1xf2OdbN6JFM4ds 8OdINAVPgL1osP7I0e6rVg/HFAM4inLC1MWjhEf2g8grjl3rUEGMVOcIz5IJ6zlMYdZsUpuIg OHlZEtAtyOs0u40HuJNZfvizP8ABA/Uuh7rEjCYzSwK/Pf+Qdtj+d8LgEzko+nv32GJlgOFaZ NYENm19kBf+jO+Ru7mmMQ4LqQPyD1Um0FNwPiBPfHGAM3XVhULQ3AWHC7CaV9P0yTAif8Ekkx XQ4jEzA2INoxVILvOcd76XI/xhkZ6Arw1PBMOFfhrJ/aaoKnTsncC+CN6G7AroIMXJs3Zw5vH wwalEb9O4OQhcxZ50stbuAPqitGRKMP90dC3B3yVJDuNePhZ1YtBrZU5Rz5VmYOOvfd+HW8qx +Yvt1KMdE782GNdoq0XfjzqmnbIsPu9OjY3DB0/pLmwJqWEeo1u7eDlT4SQZnyOZ25i2r4TSH hOhHNNY8SyBzebl1OstAqyaQnQa1TeVuuVU4/DXwvPGaEUJmTs= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32790 Cc: Eli Zaretskii , 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >>> Now I understand that it jumps to the most recently selected window, >>> but this logic is not obvious. Then why not to the most recently >>> displayed window? >> >> The idea to automatically select a window that has never been selected >> before is not overly intuitive IMHO. > > OTOH, the fact that the user not yet used that window could mean that > it's time to use it now, i.e. not less intuitive. Consider the case of a user continuously editing a buffer in one and the same window, occasionally popping up temporary windows to display tags, completions, matches, help or info. Should deleting such a temporary window really select another temporary window? We wouldn't get away unpunished with such a solution. martin From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 25 15:37:14 2018 Received: (at 32790) by debbugs.gnu.org; 25 Sep 2018 19:37:14 +0000 Received: from localhost ([127.0.0.1]:54036 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g4t90-0000qK-BR for submit@debbugs.gnu.org; Tue, 25 Sep 2018 15:37:14 -0400 Received: from pop.dreamhost.com ([64.90.62.162]:36684 helo=pdx1-sub0-mail-a31.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g4t8x-0000q4-2G for 32790@debbugs.gnu.org; Tue, 25 Sep 2018 15:37:11 -0400 Received: from pdx1-sub0-mail-a31.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a31.g.dreamhost.com (Postfix) with ESMTP id 476F77F6F6; Tue, 25 Sep 2018 12:37:10 -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=8iFMTz7ZGbEQDZpIVZThZxeM5Og=; b= SsfSz/wzOcCD5CvmgcQqdznE/z9++gHY9GQvY/smGrIu7ePt9p8NpMdX5SvpJJmw V9K+Pgx0JVHeEHb1d0pikZhCYYTEkI0Ui0T1hKTCKwHDVOBizQNZNVZz+ejKIixD y38V5V1LcosFfyGG7JlSTCbaba0MGcn6O+G6x3eelWI= Received: from localhost.linkov.net (m91-129-111-128.cust.tele2.ee [91.129.111.128]) (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-a31.g.dreamhost.com (Postfix) with ESMTPSA id 52C047F37D; Tue, 25 Sep 2018 12:37:09 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a31 X-DH-BACKEND: pdx1-sub0-mail-a31 From: Juri Linkov To: martin rudalics Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Organization: LINKOV.NET References: <87efdnsp2k.fsf@mail.linkov.net> <5BA490EA.4000502@gmx.at> <87bm8pxjcb.fsf@mail.linkov.net> <5BA74E75.8000405@gmx.at> <87zhw8nd8g.fsf@mail.linkov.net> <5BA8A143.9040604@gmx.at> <87sh1ybyo6.fsf@mail.linkov.net> <5BA9E390.8030506@gmx.at> Date: Tue, 25 Sep 2018 22:28:06 +0300 In-Reply-To: <5BA9E390.8030506@gmx.at> (martin rudalics's message of "Tue, 25 Sep 2018 09:28:16 +0200") Message-ID: <87pnx1h1op.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> The problem is that the cursor jumps to the distant part of the frame >> too far from the current focus. It takes additional efforts to bring >> it back where the input focus was. It's more about visual perception. > > But then we have to care about the position of each window's point as > well. Consider the case of a vertical combination of three windows > with all windows' points at their top. Deleting the middle window > should then probably select the lower window. With all points at > their windows' bottoms we probably should select the upper window. A good analogy is what other tabbed UI like web browsers do on tab closing. For example, Firefox add-on Tab Mix Plus http://www.tabmixplus.org/support/viewtopic.php?t=3 provides an option with such values When closing the current tab, focus (select one): - First tab - Left tab - Right tab - Last tab - Last selected tab - Opener/Right tab (the tab containing the link that opened this tab or the tab to the right) - Last opened tab The current Emacs behavior that selects the most recently used window corresponds to "Last selected tab". "Last opened tab" could correspond to the most recently displayed window. And "Left tab" could mean to select the left sibling. >> It seems the logic of deciding to which sibling to give the space back >> is fine now. The need is to select the same window that got the space >> after C-x 0. > > We can add an option for that. How should we call it? The name depends on possible values. If the values are 'sibling, 'mru, and possibly a user-defined function, then a suitable name could be say, after-delete-window-select, or if this name looks like a hook name, then simply delete-window-select. From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 26 04:51:58 2018 Received: (at 32790) by debbugs.gnu.org; 26 Sep 2018 08:51:58 +0000 Received: from localhost ([127.0.0.1]:54376 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g55Y5-0006UH-S0 for submit@debbugs.gnu.org; Wed, 26 Sep 2018 04:51:58 -0400 Received: from mout.gmx.net ([212.227.15.18]:35699) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g55Y3-0006U1-NA for 32790@debbugs.gnu.org; Wed, 26 Sep 2018 04:51:56 -0400 Received: from [192.168.1.101] ([213.162.73.24]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Lux3h-1feWEk1AFV-0101d1; Wed, 26 Sep 2018 10:51:47 +0200 Received: from [192.168.1.101] ([213.162.73.24]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Lux3h-1feWEk1AFV-0101d1; Wed, 26 Sep 2018 10:51:47 +0200 Message-ID: <5BAB489E.5090002@gmx.at> Date: Wed, 26 Sep 2018 10:51:42 +0200 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <5BA490EA.4000502@gmx.at> <87bm8pxjcb.fsf@mail.linkov.net> <5BA74E75.8000405@gmx.at> <87zhw8nd8g.fsf@mail.linkov.net> <5BA8A143.9040604@gmx.at> <87sh1ybyo6.fsf@mail.linkov.net> <5BA9E390.8030506@gmx.at> <87pnx1h1op.fsf@mail.linkov.net> In-Reply-To: <87pnx1h1op.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:2mNGR2vYHiyJUsjeryj4jLzhXhcNRmSHtlsFfLJaEL2kobiWoRL 62FvF9QI6v8GMMUbnV+buuZysVBtoPxTV242xMibqlrdhHAsNF4BTNcGXt0LO+XTVsXX0zb o8gNMkSGq/duMo3apS61pZRsIi1xvl70bjJn9J2ki8YUqWAF/Gud5qrD2WK6+rrzI7vGgyj CPV2WCxLQLhTXDjdlmyIQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:AncnKk8ZmpM=:tuuiXgS4xxP8nQghVkZKvX aEvtAR7g95I20j+7CrubLE8+7W2rJ1ecmhYoAbXoG5iQUY7thrAyMUngyui1VtsDCNGI9zvFM QGmiaMPPgcet9GXUnm0grD7C3cDavZHonWJp6A8jVUTteZhnqyLPZ5f6fSYvoOvx2q4s2OdLh GH+5CCKmfjHlr+J8/D69bIhe5hGJDfBsshJ++VHLwGmvDuDIwMHYIy1vWkKhfGIhokAdKOcbZ xss3V4SRNe31FJnijdF8XokSzhdo3T19YBkPeomq5GPMBt1aCgPJQFZ9vomeamfqQ1gooM5NY lwwqOdogorngeDuKUwcTR845/LWr8RYSkpUHSVlvlXdmtfmVpr+l/pWk+aDhYbE/Mix17azXY IC5BECwr2Q/ho9SX6n1a4Xbl8+RW03WNNkL/cbgW6nXP/5U7Oe0vyYcIxYgw1O3M8BELkmR4H fiG2r1jkFDzoSpXl/OmTTqL9HEGhkN1um9BHj0OESK944obYa2W8K1USKJFo9d1tHtZklNIMG gSgs0Jg5Xrm2NEzUEoVZshHU9dWKSLBepw1Doykj65pOQS0I5s5G6Vivfd9JUX/NHjdmqzsX5 d/TQ8wo8aEERELgdJ+fEv/8qb4GLkChiNtjBbEBig/tp8vDKCaEOhkqzaxa6jjPBA1uajSLsd dvRyE/56p1Lz7FYlHOkpCflGQa7Fgk/Fy3FkXPqTERWqyHozj5ubjR6iv7QEGwVWVqisF8SHt dIymZQHfMLtevQRTJfZ/sZf/w4FyKtKCLminpXIUGOq4OGlOP4N7NjccPqogib01YaTpFBzmV 7Oj/5EcGCqwBz1V8imQ0XRXFs1DnP+5oS5RXFmkYC6A9hQQPT0= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > A good analogy is what other tabbed UI like web browsers do > on tab closing. For example, Firefox add-on Tab Mix Plus > > http://www.tabmixplus.org/support/viewtopic.php?t=3 > > provides an option with such values > > When closing the current tab, focus (select one): > > - First tab > - Left tab > - Right tab > - Last tab > - Last selected tab > - Opener/Right tab (the tab containing the link that opened this tab or the tab to the right) The last one is the option I use, mainly for returning to the "parent" tab. I'd prefer "the tab containing the link that opened this tab or the last selected tab" but that's not available. > - Last opened tab > > The current Emacs behavior that selects the most recently used window > corresponds to "Last selected tab". "Last opened tab" could correspond > to the most recently displayed window. And "Left tab" could mean to > select the left sibling. Make a complete list with the desired names, please. > If the values are 'sibling, 'mru, and possibly a user-defined function, > then a suitable name could be say, after-delete-window-select, or if this > name looks like a hook name, then simply delete-window-select. Let's reconsider after you made the list with the value names ("sibling" is probably too internal, IIRC even you used "parent" instead). martin From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 26 20:04:57 2018 Received: (at 32790) by debbugs.gnu.org; 27 Sep 2018 00:04:58 +0000 Received: from localhost ([127.0.0.1]:55772 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g5Jnd-0005nL-MS for submit@debbugs.gnu.org; Wed, 26 Sep 2018 20:04:57 -0400 Received: from pop.dreamhost.com ([64.90.62.162]:46232 helo=pdx1-sub0-mail-a31.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g5Jnb-0005nD-6R for 32790@debbugs.gnu.org; Wed, 26 Sep 2018 20:04:55 -0400 Received: from pdx1-sub0-mail-a31.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a31.g.dreamhost.com (Postfix) with ESMTP id 608AA7F977; Wed, 26 Sep 2018 17:04:54 -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=gNI28R8ob+kk1lD0HrBJc5rkJkc=; b= zX4ahcZLOD1EJkRk+4PS2j6IBVoPbLG6ZdI+MqkdRifUFtBnn2gIkM/JBVRiXcuP 5l5WxDY+g9WtvlffRT8RQVFg6NGy83Hkk6xFieLI9QUKjN9GAKct6Uq2JZwDYgiY bhus8h3xvJvCY0ZhV9SW8+seIOPH1y7JEU7sIXB4+wQ= Received: from localhost.linkov.net (m91-129-111-128.cust.tele2.ee [91.129.111.128]) (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-a31.g.dreamhost.com (Postfix) with ESMTPSA id 889B97F29D; Wed, 26 Sep 2018 17:04:51 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a31 X-DH-BACKEND: pdx1-sub0-mail-a31 From: Juri Linkov To: martin rudalics Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Organization: LINKOV.NET References: <87efdnsp2k.fsf@mail.linkov.net> <5BA490EA.4000502@gmx.at> <87bm8pxjcb.fsf@mail.linkov.net> <5BA74E75.8000405@gmx.at> <87zhw8nd8g.fsf@mail.linkov.net> <5BA8A143.9040604@gmx.at> <87sh1ybyo6.fsf@mail.linkov.net> <5BA9E390.8030506@gmx.at> <87pnx1h1op.fsf@mail.linkov.net> <5BAB489E.5090002@gmx.at> Date: Thu, 27 Sep 2018 02:05:17 +0300 In-Reply-To: <5BAB489E.5090002@gmx.at> (martin rudalics's message of "Wed, 26 Sep 2018 10:51:42 +0200") Message-ID: <87h8ibvrs2.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > Make a complete list with the desired names, please. I think we need exactly the same customization as we created for compare-windows-get-window-function, but instead of finding a window to compare, we need to find a window to select after deleting the selected window. (defcustom compare-windows-get-window-function 'compare-windows-get-recent-window "Function that provides the window to compare with." :type '(choice (function-item :tag "Most recently used window" compare-windows-get-recent-window) (function-item :tag "Next window" compare-windows-get-next-window) (function :tag "Your function")) :group 'compare-windows :version "25.1") I suppose that for the option "Next window" the window next to the deleted window is its sibling that will get its space after deletion, right? >> If the values are 'sibling, 'mru, and possibly a user-defined function, >> then a suitable name could be say, after-delete-window-select, or if this >> name looks like a hook name, then simply delete-window-select. > > Let's reconsider after you made the list with the value names ("sibling" > is probably too internal, IIRC even you used "parent" instead). Regarding the name, what about select-window-after-delete-function? From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 27 14:44:44 2018 Received: (at 32790) by debbugs.gnu.org; 27 Sep 2018 18:44:44 +0000 Received: from localhost ([127.0.0.1]:56896 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g5bHI-0008Oy-I6 for submit@debbugs.gnu.org; Thu, 27 Sep 2018 14:44:44 -0400 Received: from mout.gmx.net ([212.227.15.19]:59039) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g5bHG-0008Oi-Cc for 32790@debbugs.gnu.org; Thu, 27 Sep 2018 14:44:42 -0400 Received: from [192.168.1.100] ([46.125.249.105]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Lh6sJ-1fRINq0Hxf-00oXVw; Thu, 27 Sep 2018 20:44:33 +0200 Received: from [192.168.1.100] ([46.125.249.105]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Lh6sJ-1fRINq0Hxf-00oXVw; Thu, 27 Sep 2018 20:44:33 +0200 Message-ID: <5BAD2507.6040605@gmx.at> Date: Thu, 27 Sep 2018 20:44:23 +0200 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <5BA490EA.4000502@gmx.at> <87bm8pxjcb.fsf@mail.linkov.net> <5BA74E75.8000405@gmx.at> <87zhw8nd8g.fsf@mail.linkov.net> <5BA8A143.9040604@gmx.at> <87sh1ybyo6.fsf@mail.linkov.net> <5BA9E390.8030506@gmx.at> <87pnx1h1op.fsf@mail.linkov.net> <5BAB489E.5090002@gmx.at> <87h8ibvrs2.fsf@mail.linkov.net> In-Reply-To: <87h8ibvrs2.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:QZ6Kc1BxioInOT/nqaz+3pmtzf1cA+2hTpA69zc5GPOqoW8UQs0 mqbmXcuv+10g+VJ2E/LMaKGI4cEJuUPhtQxybIkK5iO8UvIGhcI8VBGdoz1Eng3EqvpdkQQ MPeWDkPbbiGVYt9wmRYnamz7/turMTBzumCi/LBfsarPXVoM5fu9lzL5LTjY8RZwDsjsW/a 6r3Dvk23vXHci4tOCzmWA== X-UI-Out-Filterresults: notjunk:1;V01:K0:e5tiqZN0lYw=:mmoGa/n3k+7EFFv+G36BJk hc2GyPcdPgDgYWXaO4ffqFtKDnEWEqQZabkhFKVSF1bw0ntcRPQZJLIFF9OuH0WQSOhCy+qyO XdcC1MN/rFGWQKIVZiPy19Wl3X61sMPzOHm9xmVnWYGPYPbbROyKrml3opkKFOdT1XQdhKC2l 7zimatBrYRNzBrxpDyVNtNQ5f7ajsnVq8tGwd4u8iUnVWAcHpU8nnTEh6OYESvSlrt1EbURrG 3BU15XO/OSevMJCu62ZRBPOBv9r5hy5nbBRJYhTt0sMLE3r/k//WQJW5UiUH/oSsgdO8YTHvt 3GBWz1rA2W+zjSJlyXb8G35Aru5fntXU9/J2oWmAthIWsIO5JwfpTEre7j6m1moo28mKK+f/R QFiWs90y036yAgnONfPUKmZaoPyeDx2eMO63bECfTacPC6FPs1/lghf6sC4C0pBc9O64tj0L6 dmo9loLbbny+KEH6cR8b4VIExyqU2VIvJWD8mt6oU8Bc+QQ34k4VsO+6ht+lgYlVs2SXzsGnA NNQPQ6dUQtdzVZmijRaMNiP20dETeFi79rotEHIBbKn7ZhQEMi/8tihvaQIlseoUS5ZXXvo/N iaXBkmU8twyRK072N6ZjlufxdWhDjAHMuBE+NSp00lueU8NcwMfdGIlil8PY3iIflkfk2to44 ze/8YiKN2FBd71dI9/O4Y8YZvGkAPOPgbPTZMEJEI22+LM647oGJ+8ayyvnLT+k4LB/zcRsOO gxe3AXG7tBYtTpuHuxebh6vYJdIAurQkg5jChmN5Syqtq0n5xNhICNXUyozyu+g45rNGeks2x bsQhXGKJNwltrekN+JzSczX64VqfPZdQvxQ/zCEAn7jbgh1+kw= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > I think we need exactly the same customization as we created for > compare-windows-get-window-function, but instead of finding a window to > compare, we need to find a window to select after deleting the > selected window. > > (defcustom compare-windows-get-window-function > 'compare-windows-get-recent-window > "Function that provides the window to compare with." > :type '(choice > (function-item :tag "Most recently used window" > compare-windows-get-recent-window) > (function-item :tag "Next window" > compare-windows-get-next-window) > (function :tag "Your function")) > :group 'compare-windows > :version "25.1") > > I suppose that for the option "Next window" the window next to the > deleted window is its sibling that will get its space after > deletion, right? Not usually. 'delete-window' prefers the left sibling because that's the classic way to work with windows: The new window appears on the right of or below the window split. Deleting the new window "returns" its space to the window on the left or above, if that exists. The "next window" of any window OTOH is preferably its right sibling, if that exists, or something "further down" in the window tree. So first of all we have to decide which window should get the space when we delete a window and make that customizable, if necessary. Note, however, that when an application or a user has bound the non-option 'window-combination-limit' to t, each window has only one sibling and there is nothing to customize - the space will be always returned to that sibling. OTOH, if 'window-combination-resize' is non-nil, the space is returned proportionally to all windows in the same combination and again there is nothing to customize. When that first issue has been settled, we can easily add to the option we talk about here a value that selects the window that has received the space of the deleted window - with the restrictions noted above. > Regarding the name, what about select-window-after-delete-function? If we make the value a function like compare-w.el does. Note in this context that we probably do not want to select a window on another frame (including iconified or invisible ones) so the functions compare-w provides are probably not very useful here. BTW I didn't even know about compare-w - its name is too obscure to associate it with windows. martin From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 15 17:30:56 2018 Received: (at 32790) by debbugs.gnu.org; 15 Oct 2018 21:30:56 +0000 Received: from localhost ([127.0.0.1]:51559 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gCAS0-0005E1-HP for submit@debbugs.gnu.org; Mon, 15 Oct 2018 17:30:56 -0400 Received: from pop.dreamhost.com ([64.90.62.162]:41342 helo=pdx1-sub0-mail-a75.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gCARy-0005Dt-8q for 32790@debbugs.gnu.org; Mon, 15 Oct 2018 17:30:54 -0400 Received: from pdx1-sub0-mail-a75.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a75.g.dreamhost.com (Postfix) with ESMTP id B7C8880578; Mon, 15 Oct 2018 14:30:53 -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=egICI/QHa02uzxvXAxs/Hoai0v4=; b= s4Q8uDs7wx0sqi/nWmhVmgU1nT9ilSOu3dW3WY7FFir2cI0h6lRqV+buvTGU9EDG TFTZVlobqxueDFDlTVhaMQ55QDLTR6FrBtWUlxqDKivlE1fmIQotFGCYuSRJbR79 oPnhzXVMatgJxvjtFvWn3UWsY8sseulwBEFXRcOJzsY= Received: from localhost.linkov.net (m91-129-104-210.cust.tele2.ee [91.129.104.210]) (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-a75.g.dreamhost.com (Postfix) with ESMTPSA id 68E6F805A7; Mon, 15 Oct 2018 14:30:51 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a75 From: Juri Linkov To: martin rudalics Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Organization: LINKOV.NET References: <87efdnsp2k.fsf@mail.linkov.net> <5BA490EA.4000502@gmx.at> <87bm8pxjcb.fsf@mail.linkov.net> <5BA74E75.8000405@gmx.at> <87zhw8nd8g.fsf@mail.linkov.net> <5BA8A143.9040604@gmx.at> <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> Date: Tue, 16 Oct 2018 00:12:27 +0300 In-Reply-To: <5BAD2507.6040605@gmx.at> (martin rudalics's message of "Thu, 27 Sep 2018 20:44:23 +0200") Message-ID: <87a7nedidg.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedrvdelgdduvdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddtgedrvddutdenucfrrghrrghmpehmohguvgepshhmthhppdhhvghloheplhhotggrlhhhohhsthdrlhhinhhkohhvrdhnvghtpdhinhgvthepledurdduvdelrddutdegrddvuddtpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtoheprhhuuggrlhhitghssehgmhigrdgrthenucevlhhushhtvghrufhiiigvpedu X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > When that first issue has been settled, we can easily add to the > option we talk about here a value that selects the window that has > received the space of the deleted window - with the restrictions noted > above. I understand now what exactly is annoying about the current behavior: when there is already 2 or more windows on the frame, after splitting the selected window, you create a new window that displays the same buffer, then you decide you need to undo the recent split, and the quickest way to do this is to delete the selected window with 'C-x 0'. After that, the window configuration looks exactly as before the split, with only one difference - the cursor jumps to an unrelated window. From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 16 04:46:31 2018 Received: (at 32790) by debbugs.gnu.org; 16 Oct 2018 08:46:31 +0000 Received: from localhost ([127.0.0.1]:51777 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gCKzm-0002BP-R2 for submit@debbugs.gnu.org; Tue, 16 Oct 2018 04:46:31 -0400 Received: from mout.gmx.net ([212.227.17.21]:42885) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gCKzl-0002BC-DT for 32790@debbugs.gnu.org; Tue, 16 Oct 2018 04:46:29 -0400 Received: from [192.168.1.101] ([212.95.5.116]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LdHLB-1flUZJ49yL-00iPkB; Tue, 16 Oct 2018 10:46:21 +0200 Received: from [192.168.1.101] ([212.95.5.116]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LdHLB-1flUZJ49yL-00iPkB; Tue, 16 Oct 2018 10:46:21 +0200 Message-ID: <5BC5A558.9010401@gmx.at> Date: Tue, 16 Oct 2018 10:46:16 +0200 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <5BA490EA.4000502@gmx.at> <87bm8pxjcb.fsf@mail.linkov.net> <5BA74E75.8000405@gmx.at> <87zhw8nd8g.fsf@mail.linkov.net> <5BA8A143.9040604@gmx.at> <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> In-Reply-To: <87a7nedidg.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:oaVZPnamDYK96hlzqDYmvDV3IvExpof/w0tTH26hl4lgydPudBn sCVnZd3Tp4rVa1Emz/fNgMHTRPwHakVY/3OBhA3bp2RvOCeux8n1ldGeNLwJWzObobZ/77X Vi/HM6OuQJ1RB2VFBCLtb2X1N6bhJJmJwKqUxVp2U31TIqp3HXzLEs9nKYd7PfcoTAhrDjH qDE+iO0n6QCusiSWn4UxA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:rn9E3k1ahys=:g1w70jZMzmA9Sc5/EN5F7a cr1xcXLu7MuoNAOOAptWU0xspYk9hNMEb3KcKIQuw4K1O46EPa/Z+YhThG8m8DJL/c6tEPXGg aShQu4BQ8JGOYisS3M3cG55N5dNu0lfYDNEHyaAu+UNTCn9gPCuW9mJBd4aCOk8FRL58t9ol0 jtmYOKyd0mLG+kdiOI73FU3erTIoUsyH0upF0y3WNQy1h9x4s4cPBtyOzdXWlZ1ro7Do60yTc Y7zr4u3zGjfMTAfa4GIbw5peiUvouzSGBJXqCsU2VxSvFXqRXXeNTIcbaC5jW7dzK+E1y6/Gp uqxZs8+eqCOgAC0N7l36MW1fIMSShHT2CuJt3dhdexkQTXa/XXhkzJLe1Nr6ei7vwx72Am+LM 9Db00PgXfev/0hAiqDPoWX9jDAn+XGMIAb7IwsaIGOGtde8YUGObzgzPZ4xX5bpapUKpzwNQD Gww4trDNzxuavQSdLReFgNs3f8PUevEMv20AhlfYWsA+XcBMuYne3aH3vVylZJm4FLwTV83Rm HkCx/qo4cafm7wO6nxZId0Wx+ZQI5m+v50E1bUvp9REtOtaxIZulSyx/KmVIAGSukp1GGGx2L 4+NyuxfWabAJd5OBSLME6mSTcsEITeV5mv0OBcqbQFVBHo4Djc7h2sjKBD93l68qXHpa1l8fJ sx/q3Lix63qOitVNMVfqWMEYpGyStkDg3ILJY+LGPdsDMqN9flbSLpEMm50MwmUyXW62N7zbt MLYFfwSXL7pQrVeePFy8vzVoOeVmvAvMGwoitlFJ4/eCxgubujlDzP/Y8+4kNTDY/IZi997kI aEgCO53+Gw0eeMmXyRN+VkCYs7cRIb5GJ7PTrTrHRx5kPy5WeE= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > I understand now what exactly is annoying about the current behavior: > when there is already 2 or more windows on the frame, after splitting the > selected window, you create a new window that displays the same buffer, then > you decide you need to undo the recent split, and the quickest way to do this > is to delete the selected window with 'C-x 0'. Yours is a bad habit. Deleting the old window will also delete its old associations, like window parameters and overlays with a 'window' property. Here I have one key binding for selecting and one for deleting a window on any side of the selected one. I always use them in such a case. > After that, the window > configuration looks exactly as before the split, with only one difference - > the cursor jumps to an unrelated window. I'll try to make this customizable, probably by adding an option like 'window-set-use-time-upon-creation'. martin From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 16 18:38:43 2018 Received: (at 32790) by debbugs.gnu.org; 16 Oct 2018 22:38:43 +0000 Received: from localhost ([127.0.0.1]:54081 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gCXz8-0006Ig-Ow for submit@debbugs.gnu.org; Tue, 16 Oct 2018 18:38:42 -0400 Received: from pop.dreamhost.com ([64.90.62.162]:38666 helo=pdx1-sub0-mail-a7.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gCXz6-0006IW-8C for 32790@debbugs.gnu.org; Tue, 16 Oct 2018 18:38:40 -0400 Received: from pdx1-sub0-mail-a7.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a7.g.dreamhost.com (Postfix) with ESMTP id 8C8557F68A; Tue, 16 Oct 2018 15:38:39 -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=0TEpLtb+GbxsAahZNdUVMzDMRcs=; b= DsK0UrCmwhja2s9/ku0d7EQur5Wiv7YaHWZyf0oLh5q5G+G6f/GBBKAuSicM58LB ZWeyzdstM/W52VP2pfB1nCwbB6qSo9HMplWvSNwFgJGnkNmGd+lehD94YNquwdSU fkQlwBcnrzZfUIoWygOI/RnOoeIghzMgeVGdBz6zCjA= Received: from localhost.linkov.net (m91-129-96-249.cust.tele2.ee [91.129.96.249]) (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-a7.g.dreamhost.com (Postfix) with ESMTPSA id 142837F688; Tue, 16 Oct 2018 15:38:37 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a7 From: Juri Linkov To: martin rudalics Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Organization: LINKOV.NET References: <87efdnsp2k.fsf@mail.linkov.net> <5BA490EA.4000502@gmx.at> <87bm8pxjcb.fsf@mail.linkov.net> <5BA74E75.8000405@gmx.at> <87zhw8nd8g.fsf@mail.linkov.net> <5BA8A143.9040604@gmx.at> <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> Date: Wed, 17 Oct 2018 01:20:10 +0300 In-Reply-To: <5BC5A558.9010401@gmx.at> (martin rudalics's message of "Tue, 16 Oct 2018 10:46:16 +0200") Message-ID: <87zhvd7mg9.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedrfedugdduudcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledrleeirddvgeelnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehlohgtrghlhhhoshhtrdhlihhnkhhovhdrnhgvthdpihhnvghtpeeluddruddvledrleeirddvgeelpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtoheprhhuuggrlhhitghssehgmhigrdgrthenucevlhhushhtvghrufhiiigvpedu X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > Here I have one key binding for selecting and one for deleting > a window on any side of the selected one. I always use them in such > a case. For window selection I use (windmove-default-keybindings 'hyper), so e.g. '' selects the left window. Could you recommend a command to bind to e.g. 'C-x ' that will delete the left window? From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 17 03:31:12 2018 Received: (at 32790) by debbugs.gnu.org; 17 Oct 2018 07:31:12 +0000 Received: from localhost ([127.0.0.1]:54329 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gCgIS-0006Pa-D7 for submit@debbugs.gnu.org; Wed, 17 Oct 2018 03:31:12 -0400 Received: from mout.gmx.net ([212.227.17.20]:33123) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gCgIQ-0006PM-Sr for 32790@debbugs.gnu.org; Wed, 17 Oct 2018 03:31:11 -0400 Received: from [192.168.1.101] ([212.95.5.87]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MZlEg-1fvZPv2rIk-00LZ3Z; Wed, 17 Oct 2018 09:31:01 +0200 Received: from [192.168.1.101] ([212.95.5.87]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MZlEg-1fvZPv2rIk-00LZ3Z; Wed, 17 Oct 2018 09:31:01 +0200 Message-ID: <5BC6E52F.2070209@gmx.at> Date: Wed, 17 Oct 2018 09:30:55 +0200 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <5BA490EA.4000502@gmx.at> <87bm8pxjcb.fsf@mail.linkov.net> <5BA74E75.8000405@gmx.at> <87zhw8nd8g.fsf@mail.linkov.net> <5BA8A143.9040604@gmx.at> <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> In-Reply-To: <87zhvd7mg9.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:MA/nuH/wWbWwveaFjFZfdZmDXzilZ6D1ylY/gjo/IgGNGDDCXDQ ieGYF1dUHSirhcAfqovMC34anEVkQD70np8gbQIYtLlM/EiEGrrFHRTZRCwkDhSrI+e/p0p m4sxs436+Ev0erBCVUV9+fc6hICO63w1AmNCaRSuSUJ16YAb8byaV5QtFNRO7SmpUS8YHid YFfthnT18y+rYXxveuGpg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:QQB3PSMaYnM=:+HDRdP1oXxaS+0FZ/dZWIv sLIxWjarv3Lrm+26RHp+XnXvP2UjZ0PwVi2P7bKJejZpyx96jiyJmHoZIl5rh5WHVCrWEmdtL lupWhk1KGMsrhcQiKNwYk9LJi8kLanxWypnQLNlcq8jJgVhdw4W+BHCn8aF0AlUdY62XOhOX8 5f2WqHEGeNnhwBaLmCT67LEjXimpdHpqTf00KrpBuWx1+h69Svqk/W2BIRRrkECmxAb1OIgKp JVi2PCd5h1a8A2gs0X7HQr0wxTvhxw6J5zJok7Lr+7iDONxe3RYRy4Go8gGHg0HTIAvRfnPFF ywvG8Mpd5OlPdiz3uiwqCby3mA4sCxd2U0M4JnDTf2on8XArtR/nR+T2Yw5MFQucGFgcnK7jG a3LjomzOnS0wiLeXDjqgMLFojtqDhggb2mKy49zPxd/jjqbHjbZrGjDYx1AZUFwOCLIOT53Ns I4YbRxsewFOTWUZO1FoIddOen8QSpk+plk9olsw5ka9u+pFKkJJPU3QjbXweYjtwKxkP2L/zD P7UK6snS9AmoZKPZqwh+MGij9fNKygUEU1jm2k9HQSQhcVhhPceh7aAKGpoqNCmphFKwwVqti 9FiI7ic4GkAl/VxOUPB4Fl5adUaGAXL1ydebUeINwHdF1OME3fqwSE84RhDoWD4/9Aj6jwmN6 Xndzr+s13HYBZBtyCxh5JKG9XVGVwMJ5y24zSGdiAdwptGRLWvPky3HdTnDgiANuu/OYumbgV w+Y9nMNrrSVStN1OthrDit03BShcNrBoUQkU++UJDHvHdfj7gjFiGYYTeLC31oQ9QYP09xxXP gR+YVEwQ0tkKLr6254syt9HKMKjxZbtPLvDlTBJSUL1ZyqXCsE= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > For window selection I use (windmove-default-keybindings 'hyper), > so e.g. '' selects the left window. Could you recommend > a command to bind to e.g. 'C-x ' that will delete the left > window? Here drags the character under the cursor by one character to the left and drags the current line up by one line. I use for selecting the window on the left. either deletes the window on the left of the selected window provided there is one or makes a new window on the left of the selected window provided the selected window is already on the left of the frame. The code for that command is below. martin (defun window-delete-or-split-left () "If selected window has a window on left delete that window. Otherwise split selected window horizontally and select left window." (interactive) (unless (condition-case nil (save-selected-window (if (fboundp 'window-in-direction) (let ((window (window-in-direction 'left))) (when window (delete-window window) t)) (windmove-do-window-select 'left) (delete-window) t)) (error nil)) (if (fboundp 'window-in-direction) (let ((window (split-window nil nil 'left))) (select-window window)) (split-window-horizontally)))) From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 17 18:29:14 2018 Received: (at 32790) by debbugs.gnu.org; 17 Oct 2018 22:29:15 +0000 Received: from localhost ([127.0.0.1]:55926 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gCuJW-0003p7-NL for submit@debbugs.gnu.org; Wed, 17 Oct 2018 18:29:14 -0400 Received: from pop.dreamhost.com ([64.90.62.162]:58046 helo=pdx1-sub0-mail-a75.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gCuJV-0003oz-13 for 32790@debbugs.gnu.org; Wed, 17 Oct 2018 18:29:13 -0400 Received: from pdx1-sub0-mail-a75.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a75.g.dreamhost.com (Postfix) with ESMTP id 3F1C3807FB; Wed, 17 Oct 2018 15:29:12 -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=J/1EYUonYVcMaT1EHEVTKUU2S1o=; b= otDHS6M2BJJQJu+ccZAIVTuGb0RciqxgJRATTsa9LKowrIX7k6YMLryhm20qrW8L ns6xpz9ox2RQWl3I6LXw2qr9IM/qUnyGMphLAigFcTYQqY+ohnRySmjIPgKiaZlN mlVG0C/EoVLX8vEC/Kj9qKXeQUN99w1uD8sgl0chLj0= Received: from localhost.linkov.net (m91-129-96-249.cust.tele2.ee [91.129.96.249]) (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-a75.g.dreamhost.com (Postfix) with ESMTPSA id 0900D807EE; Wed, 17 Oct 2018 15:29:09 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a75 From: Juri Linkov To: martin rudalics Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Organization: LINKOV.NET References: <87efdnsp2k.fsf@mail.linkov.net> <5BA490EA.4000502@gmx.at> <87bm8pxjcb.fsf@mail.linkov.net> <5BA74E75.8000405@gmx.at> <87zhw8nd8g.fsf@mail.linkov.net> <5BA8A143.9040604@gmx.at> <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> Date: Thu, 18 Oct 2018 00:30:40 +0300 In-Reply-To: <5BC6E52F.2070209@gmx.at> (martin rudalics's message of "Wed, 17 Oct 2018 09:30:55 +0200") Message-ID: <87woqgw9a7.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedrfeefgddtkecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledrleeirddvgeelnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehlohgtrghlhhhoshhtrdhlihhnkhhovhdrnhgvthdpihhnvghtpeeluddruddvledrleeirddvgeelpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtoheprhhuuggrlhhitghssehgmhigrdgrthenucevlhhushhtvghrufhiiigvpedt X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> For window selection I use (windmove-default-keybindings 'hyper), >> so e.g. '' selects the left window. Could you recommend >> a command to bind to e.g. 'C-x ' that will delete the left >> window? > > Here drags the character under the cursor by one character to > the left and drags the current line up by one line. I use > for selecting the window on the left. either > deletes the window on the left of the selected window provided there > is one or makes a new window on the left of the selected window > provided the selected window is already on the left of the frame. The > code for that command is below. Thanks for sharing the code. Now I have a good configuration: (defun my-windmove (&optional arg) (interactive "P") (let ((dir (event-basic-type (aref (this-command-keys) 0)))) (condition-case nil (windmove-do-window-select dir arg) (error (select-window (split-window nil nil dir)))))) (defun my-windelete (&optional arg) (interactive "P") (let ((dir (event-basic-type (aref (this-command-keys) 1)))) (delete-window (window-in-direction dir)))) (let ((modifiers '(hyper))) (dolist (key '(left right up down)) (define-key global-map (vector (append modifiers (list key))) 'my-windmove) (define-key ctl-x-map (vector (append modifiers (list key))) 'my-windelete))) The only problem is the mismatch between key names and direction names. Could you add aliases for 'up' and 'down' in window-in-direction? Then we won't need such special handling in windmove.el: (window-in-direction (cond ((eq dir 'up) 'above) ((eq dir 'down) 'below) (t dir)) window nil arg windmove-wrap-around t) From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 18 04:05:50 2018 Received: (at 32790) by debbugs.gnu.org; 18 Oct 2018 08:05:50 +0000 Received: from localhost ([127.0.0.1]:56109 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gD3JV-0008Jk-PP for submit@debbugs.gnu.org; Thu, 18 Oct 2018 04:05:49 -0400 Received: from mout.gmx.net ([212.227.17.22]:59169) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gD3JU-0008JX-Gl for 32790@debbugs.gnu.org; Thu, 18 Oct 2018 04:05:48 -0400 Received: from [192.168.1.101] ([213.162.73.189]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0Lxgnf-1fYDyC04KJ-017G9d; Thu, 18 Oct 2018 10:05:39 +0200 Received: from [192.168.1.101] ([213.162.73.189]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0Lxgnf-1fYDyC04KJ-017G9d; Thu, 18 Oct 2018 10:05:39 +0200 Message-ID: <5BC83EC9.1090808@gmx.at> Date: Thu, 18 Oct 2018 10:05:29 +0200 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <5BA490EA.4000502@gmx.at> <87bm8pxjcb.fsf@mail.linkov.net> <5BA74E75.8000405@gmx.at> <87zhw8nd8g.fsf@mail.linkov.net> <5BA8A143.9040604@gmx.at> <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> In-Reply-To: <87woqgw9a7.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:LIa/3RkwSYRtcxnFspUxmcQbou/urL1GYuDa87Jpppb+NixlrcI EC5w0Ih8ZesD7i3M+7YL4imlREUBn7i3L/Bh6rnYWyLpqzhBg9lnYkVKQobazdqqeXEh5Hd Eolo3eUR5hfvMVIIu30dbr1nvsoGQXa7lX214EwVemhS6ML3FG7tZv1cNshpn7MAtEjwUwm DlOthBPv3aWQk5ute9w4Q== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:baFRZ6oiXlk=:8Eu8NOEH3sRwL+9BisxYPC Inw/vaALVW/nYgvF+pHMXAFv1BFcXMSylVMjzvmEDk8i21M4fWxGPXP5r6jMpwKhAek5b1N4F mZth73xhC2wLAc1FOH3lnGH9v2G1jjUWWeJy8E5bQ5iH6iRYkUp8O22+LjHyUvlbFQb3CkpDc YZbZd+Ol7t5tV8DqK4Hl+PnnyLVXu5AjZEKYWB+7tvP6gVgWju+uIWRpwlawq8PjX3HxC4rXp bRTgsWveKUqqDcpIYJgTYree9hb9bsOzGC2tWHmhj+793HRfeDX97KyYYhstV1hRgqFG+iyM6 +hyvP+z+XZq0ho+CmOA0Awu+SmZdZUYOvjL5fFU01K7w9GDKTYx8/NuP6fZm45wrN2BlF+JDo ZA4cTchAyGa9EK/26oxZK2x+q6mC3Vehj6pH24SapLvQfu+yaN9vsbhsf+9IjmRC8lqGJRUYK rdQQOU5MpwiQucwRAjHUnKQmVSMCilmsRRxOt3PlU+V5vnl3Y9xf1mWIn+JvNVj4AiO2eS2ut pp56w6RrG4rGhxOoF18d0/mvXUb80urfhgZry97uRzQw1k+TdPL0nRKfGnalwL1XSevN3w+Y+ L93xIzzBucHDqSfI2g/B6SZRUHwMfU7+APYsErjyxX7OngW6qYoQ9YOCewuD+3lOXvaGAKPco v0QUYeRop448ljDagoecd0dQAwq0HSIHSiK1D9dmjiw5YxsypMcCMwdAtiowykt/rTsrbWcKV ryZjERI7eA+FuJy/J+v2OXtOJGJTqpE1L7L3Wvcm0Jqx/hWlD9N2dTSwtbHXXKhyYrJlThG7q 1jibpqW6Vo28TfYhLhzzjMjrg972aGwH9QzYu5v4K+bNat7+GM= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > Could you add aliases for 'up' and 'down' in window-in-direction? > Then we won't need such special handling in windmove.el: > > (window-in-direction > (cond > ((eq dir 'up) 'above) > ((eq dir 'down) 'below) > (t dir)) > window nil arg windmove-wrap-around t) Should be done now on master. Please test. martin From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 18 18:50:06 2018 Received: (at 32790) by debbugs.gnu.org; 18 Oct 2018 22:50:06 +0000 Received: from localhost ([127.0.0.1]:57505 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gDH7G-0001Fz-DW for submit@debbugs.gnu.org; Thu, 18 Oct 2018 18:50:06 -0400 Received: from pop.dreamhost.com ([64.90.62.162]:54748 helo=pdx1-sub0-mail-a25.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gDH7E-0001Fn-Sj for 32790@debbugs.gnu.org; Thu, 18 Oct 2018 18:50:05 -0400 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 C56A37FFED; Thu, 18 Oct 2018 15:50:03 -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=5g4faeB+KutC/i8gpeI84NrvQ2A=; b= vTXOMd39yUkJVZtoCpBAY/xKr/V++jFmnUrAeSm35C692L67iLOv1b0JnYqWkzSk kx0hQ3yVlMCNrQvrDygJpS/j61VdBxXV6dzKqIjogvQzzq2McV6E6ln+0w7fHX7S 9tNPa9Hgzi+e1yVxAkiEgzSeWtaii2IqdmwrrTMRTKk= Received: from mail.jurta.org (m91-129-96-249.cust.tele2.ee [91.129.96.249]) (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 F29C67FFE6; Thu, 18 Oct 2018 15:49:57 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a25 From: Juri Linkov To: martin rudalics Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Organization: LINKOV.NET References: <87efdnsp2k.fsf@mail.linkov.net> <5BA490EA.4000502@gmx.at> <87bm8pxjcb.fsf@mail.linkov.net> <5BA74E75.8000405@gmx.at> <87zhw8nd8g.fsf@mail.linkov.net> <5BA8A143.9040604@gmx.at> <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> Date: Fri, 19 Oct 2018 01:49:07 +0300 In-Reply-To: <5BC83EC9.1090808@gmx.at> (martin rudalics's message of "Thu, 18 Oct 2018 10:05:29 +0200") Message-ID: <877eiena58.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedrfeehgdduiecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledrleeirddvgeelnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledrleeirddvgeelpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtoheprhhuuggrlhhitghssehgmhigrdgrthenucevlhhushhtvghrufhiiigvpedt X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> Could you add aliases for 'up' and 'down' in window-in-direction? >> Then we won't need such special handling in windmove.el: >> >> (window-in-direction >> (cond >> ((eq dir 'up) 'above) >> ((eq dir 'down) 'below) >> (t dir)) >> window nil arg windmove-wrap-around t) > > Should be done now on master. Please test. Sorry, it still fails with (split-window nil nil 'up) :-( From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 19 03:39:40 2018 Received: (at 32790) by debbugs.gnu.org; 19 Oct 2018 07:39:41 +0000 Received: from localhost ([127.0.0.1]:58067 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gDPNk-0007Tm-MU for submit@debbugs.gnu.org; Fri, 19 Oct 2018 03:39:40 -0400 Received: from mout.gmx.net ([212.227.15.18]:60953) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gDPNi-0007TY-Qp for 32790@debbugs.gnu.org; Fri, 19 Oct 2018 03:39:39 -0400 Received: from [192.168.1.101] ([212.95.5.57]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MMCFR-1gGRmX2GOT-0080rX; Fri, 19 Oct 2018 09:39:28 +0200 Received: from [192.168.1.101] ([212.95.5.57]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MMCFR-1gGRmX2GOT-0080rX; Fri, 19 Oct 2018 09:39:28 +0200 Message-ID: <5BC98A26.1030901@gmx.at> Date: Fri, 19 Oct 2018 09:39:18 +0200 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <5BA490EA.4000502@gmx.at> <87bm8pxjcb.fsf@mail.linkov.net> <5BA74E75.8000405@gmx.at> <87zhw8nd8g.fsf@mail.linkov.net> <5BA8A143.9040604@gmx.at> <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> In-Reply-To: <877eiena58.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:QyaoW5nIJ6WL6z5G57bfTMiKRSl8bGIPaVxM8S/jnEGFVbSBRVd 1vG1zGGd2aVU+fbpdtiHB3X1rE4HLjDA7j9x+5+zv9yPEzp9HrXcBulMmijOsrG1nQBSate Keo2RkJZYA58MiJO8mB4h8zIY7bbY+CvoVB17fPgrrofO8oUZGnbkR6XOdG4r1Ee8sPq7Ge LTjrsjLZzBTMIz4c0f5pA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:GiI2mrEFr2Y=:ePgo67fUsa4HraCHmOpkwf lS5eyld1bh/pMHWnoL0AINlsgQlFQpacTnLWYbpG0Ah2kvNzsmpReR0//G/8bGvKlTcp5kdr+ fkScmxwfg+3PWoxqx+0kZ7ciKDmOSIPAOiQMXzlqVzHxkcDa6U9GtCaYJwKQXUTY/frupriMd twiFzodEDnYgA9sfngjmPQhIBiipIljbQNw3iEXM1SriDtQgCW6zyD/TJAHo8oUA8PlTa0UVK uVMVqkcezG4dbf0i3HlZKsgMhebeaRxt+7pbPOx5mu6uGs1S9kXAIivr+/BXjIFAcS2D4E6Zq xQc7Q6QeNl7aZZxv8h/obhUQVTreGLtYJwKIS28NKq02nbPGAlVaJUKAIHOXuoMHxZvA83mm7 /ndi2i3NE2ywmf7MpYlw9EZGSoBVnum2dJsFy5/HXD87sHjCKpiqWM83kjGGrf+QQoUhSymkW 7etpnRcZS3jUDvJYleJHxNsgW1gewc8WFnXdqE5dnYr1536e4G0Iq8cfVh6BV+bKdLf4mErfT 4WDLwJ5M14btigqAWV1DW+SLV2tL3jT2T1gk9WNSN32di4wKBinbiH0uA3kPTbytrXfJDm4Q4 sywvG7Kp7ervjhtI4zR1puwxmmKiNLO6Gi2fLt2gneoxKS52xbAae/m1QjegGjPMDVjiJzY70 sbcodIHikA+fhgbrAzgbZPHjgsrT6lrQnqZIk+nmJMxihZpJAIn9cvS+Ii46VSvqEpkh9IIpu f9ldhVQDuZZ2OThueOwgJQRpyjFVLHdl17+f7c/3tj0S2k1/etzf6pU4m8t3TcdWiaivFKDAx lUz+vxo0QEGErL/shWIL+hP9F5LSEujnvv6YMjo9iNSOjgQiL4= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > Sorry, it still fails with (split-window nil nil 'up) :-( OK. 'split-window' handles your ups and downs too now ;-) martin From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 20 18:36:12 2018 Received: (at 32790) by debbugs.gnu.org; 20 Oct 2018 22:36:12 +0000 Received: from localhost ([127.0.0.1]:33578 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gDzqu-0001lV-J9 for submit@debbugs.gnu.org; Sat, 20 Oct 2018 18:36:12 -0400 Received: from pop.dreamhost.com ([64.90.62.162]:42300 helo=pdx1-sub0-mail-a10.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gDzqt-0001lN-9q for 32790@debbugs.gnu.org; Sat, 20 Oct 2018 18:36:11 -0400 Received: from pdx1-sub0-mail-a10.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a10.g.dreamhost.com (Postfix) with ESMTP id 72BB880381; Sat, 20 Oct 2018 15:36:10 -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=MOHRBND6Ccp1Puz6oHEXb/Mxac0=; b= IfZRytLLddzB98Y1yb6ZOIqx8CFSroqCQjNCPJoL8XNFoEDPY5iaNq8Ga4+d8KzP XSf80fB1zMasyXtpsrUgWh36oRSWEcFy/gEdLLzhCg5meu9eprY8JkLt/GwrS+Tb B5WSDalS6I6a8IMGo30yrepJ5N56cfXA3/3mC7Q1jJ0= Received: from mail.jurta.org (m91-129-96-249.cust.tele2.ee [91.129.96.249]) (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-a10.g.dreamhost.com (Postfix) with ESMTPSA id 3C8468037C; Sat, 20 Oct 2018 15:36:07 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a10 From: Juri Linkov To: martin rudalics Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Organization: LINKOV.NET References: <87efdnsp2k.fsf@mail.linkov.net> <5BA490EA.4000502@gmx.at> <87bm8pxjcb.fsf@mail.linkov.net> <5BA74E75.8000405@gmx.at> <87zhw8nd8g.fsf@mail.linkov.net> <5BA8A143.9040604@gmx.at> <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> Date: Sun, 21 Oct 2018 00:27:23 +0300 In-Reply-To: <5BC98A26.1030901@gmx.at> (martin rudalics's message of "Fri, 19 Oct 2018 09:39:18 +0200") Message-ID: <87woqcnwas.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedrfeekgddujeejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrdeliedrvdegleenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrdeliedrvdegledprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgeptd X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> Sorry, it still fails with (split-window nil nil 'up) :-( > > OK. 'split-window' handles your ups and downs too now ;-) Thank you! I hope that now using the same logic we could solve the long-standing annoyance in Emacs window management. See for example such situation: in two horizontally split windows, one window displays a *grep* buffer (`emacs -Q C-x 3 M-x grep ... RET'). But what to do if grep results need to be displayed in a new third window above the *grep* buffer? `C-x 2 C-x o RET' will display the source buffer in the wrong window (with the *scratch* buffer). Using arrow keys as a prefix will allow to tell Emacs explicitly where do you want to display the buffer, e.g. H-up RET will display grep results in the above window after creating it H-left C-h f will display the *Help* buffer in the left window H-right C-x v d will display the vc-dir buffer in the right window H-down C-x C-b will display the buffer list in the bottom window The possibilities are limitless. From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 21 04:22:59 2018 Received: (at 32790) by debbugs.gnu.org; 21 Oct 2018 08:22:59 +0000 Received: from localhost ([127.0.0.1]:33753 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gE90k-0003Fh-OP for submit@debbugs.gnu.org; Sun, 21 Oct 2018 04:22:58 -0400 Received: from mout.gmx.net ([212.227.15.15]:33601) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gE90j-0003FM-4u for 32790@debbugs.gnu.org; Sun, 21 Oct 2018 04:22:57 -0400 Received: from [192.168.1.101] ([46.125.250.51]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MGSDw-1gRIAD1ysq-00DIze; Sun, 21 Oct 2018 10:22:49 +0200 Received: from [192.168.1.101] ([46.125.250.51]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MGSDw-1gRIAD1ysq-00DIze; Sun, 21 Oct 2018 10:22:49 +0200 Message-ID: <5BCC3757.9020204@gmx.at> Date: Sun, 21 Oct 2018 10:22:47 +0200 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <5BA490EA.4000502@gmx.at> <87bm8pxjcb.fsf@mail.linkov.net> <5BA74E75.8000405@gmx.at> <87zhw8nd8g.fsf@mail.linkov.net> <5BA8A143.9040604@gmx.at> <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> In-Reply-To: <87woqcnwas.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:wT98MyUpHBenSWxJK4XDPidW4fqSlD82zDc8s0bOvdzik7KXuy3 YIMNtfFUBX93/oFIYda0fuAKBeyLfyJQJhC2ZGt0Ep+C7mP2OAAN01pL2OOATWCHARighyQ CCiev/Bg4bv64dzl22Djqv8L+ao6kesklWSa9vdUxALw96KTGsgABqzkshLFz7HV+lPZXf4 Qx8OFIkW5pCqDIbCp8Cpg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:iwvi8ZqirTI=:MkFtLHse1gpKDFMUL2Uce3 AE1Yhf4AP4Oe49jDfq6rZ+viQUjqrIfdcx/gZWzQ3K8dok4AhlvVuaFyUIkvOSdUCLh7Zwq1e NFve5Uxb4Cpf9jYpVohWEdTu5pMX6unyoB6ESG4JRAri3Lt+aloqK3n450nirupD8/qUF5E0/ bq2ZFhes4CSxoHq0fPSsPtXdRlfPpJreOksM2RdcgPV3VBrMPKkOGpZpzAzEE5YM3u9+ZVarG D/HGQzLDzU/vgQAkxeuxUBUyZLg9nWo5lVHgGI+HjWimtOZ4XwnShMm9RKOSBTaxVBPkjiQim Dse5UY3PtNv9PPWkET/ay7LQGI8safBN4qcwHU5TLqEzrvpbdb7c3/hAMSvxADUJnmgKWDHFL 5kNsDqCtXTL6FDvdmvlbFaRfBIIxOdDnes0imAjgTDvGunK6Igytbt/wl4xbcVtM/xo0wn6S6 5FGdiBjDSYt7J7vsNmxjC9SkP1ZF8/DtxTloLoWv3zJ44sXTW/U4NuWS9db49Mq28Jjj/EyXc yMlG8lugum8UU1j2aY5XfCpf34PWBD2Uh1GUipjW5g4FgiKBIa1l1JGr78P5o3NJzcHuevyed Ar21Zf125JNgw/3Xiom6MxFGTxpSycRSF+aTZZQzBbHTFhncvNoNXdlintoZliYfhpqUFxeFX qqkv9Or9FqU1/Ea8w0o0eGoTxRqHQMt3ZOEc1jIklAlZPoLp5I6ITnE3IF5zgqEntHoAnSZLW VnRpb7NYA3m09RjwF0nGYo9MlilSOt2nVFQ8iCGg5/FPSLqtjFFB47dk923ITD3TxFBQ958jW 0akrWT5eIj7DexlOMXsTzPXyanLvWRnJsrd+VePeB5a076cEUg= X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.2 (/) > Thank you! I hope that now using the same logic we could solve the > long-standing annoyance in Emacs window management. See for example > such situation: in two horizontally split windows, one window displays > a *grep* buffer (`emacs -Q C-x 3 M-x grep ... RET'). > > But what to do if grep results need to be displayed in a new third > window above the *grep* buffer? `C-x 2 C-x o RET' will display > the source buffer in the wrong window (with the *scratch* buffer). > > Using arrow keys as a prefix will allow to tell Emacs explicitly > where do you want to display the buffer, e.g. > > H-up RET will display grep results in the above window after creating it > > H-left C-h f will display the *Help* buffer in the left window > > H-right C-x v d will display the vc-dir buffer in the right window > > H-down C-x C-b will display the buffer list in the bottom window > > The possibilities are limitless. I fail to see the connection between hyper key bindings and the way to display a buffer. If at all, isn't that something Stephen Leake's 'other-frame-window' package is supposed to provide? martin From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 21 15:19:05 2018 Received: (at 32790) by debbugs.gnu.org; 21 Oct 2018 19:19:05 +0000 Received: from localhost ([127.0.0.1]:34585 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gEJFg-0004Gr-Qh for submit@debbugs.gnu.org; Sun, 21 Oct 2018 15:19:05 -0400 Received: from pop.dreamhost.com ([64.90.62.162]:57554 helo=pdx1-sub0-mail-a61.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gEJFf-0004Gi-2q for 32790@debbugs.gnu.org; Sun, 21 Oct 2018 15:19:03 -0400 Received: from pdx1-sub0-mail-a61.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a61.g.dreamhost.com (Postfix) with ESMTP id 9FEE380007; Sun, 21 Oct 2018 12:19:02 -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=pk+aDl4oTA/Lc/Km10M8DmTUcxc=; b= Y6CGduhMwizkw2sdbqi3mkFsiIV2550hqohTnFL8JKXtzAJ/y5658Vn5MpYZrDD/ /t6tfDXUoBD0YHuDYcBDQE1uy7U4ozgrJhKU+qNP/ZiIzsgl627XKfZ/yqqNaHAE 7iUMTaNG3TlLGqtv48ZR8UPMA5FHV1SBzSSbar5CRgg= Received: from mail.jurta.org (m91-129-96-249.cust.tele2.ee [91.129.96.249]) (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-a61.g.dreamhost.com (Postfix) with ESMTPSA id 2601580005; Sun, 21 Oct 2018 12:19:00 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a61 From: Juri Linkov To: martin rudalics Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Organization: LINKOV.NET References: <87efdnsp2k.fsf@mail.linkov.net> <87bm8pxjcb.fsf@mail.linkov.net> <5BA74E75.8000405@gmx.at> <87zhw8nd8g.fsf@mail.linkov.net> <5BA8A143.9040604@gmx.at> <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> Date: Sun, 21 Oct 2018 21:17:28 +0300 In-Reply-To: <5BCC3757.9020204@gmx.at> (martin rudalics's message of "Sun, 21 Oct 2018 10:22:47 +0200") Message-ID: <87bm7njk2f.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedrgedtgddufeejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrdeliedrvdegleenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrdeliedrvdegledprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgepud X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> Using arrow keys as a prefix will allow to tell Emacs explicitly >> where do you want to display the buffer, e.g. >> >> H-up RET will display grep results in the above window after creating it >> >> H-left C-h f will display the *Help* buffer in the left window >> >> H-right C-x v d will display the vc-dir buffer in the right window >> >> H-down C-x C-b will display the buffer list in the bottom window >> >> The possibilities are limitless. > > I fail to see the connection between hyper key bindings and the way to > display a buffer. If at all, isn't that something Stephen Leake's > 'other-frame-window' package is supposed to provide? other-frame-window is limited to the coarse choice, i.e. to display the buffer in a random window on the same frame, or in another frame. Whereas the needed feature is to allow the user to point out exactly in which window the buffer should be displayed. This can be achieved with something like this: (let ((modifiers '(hyper))) (dolist (key '(left right up down)) (define-key global-map (vector (append modifiers (list key))) 'display-buffer-directionally))) (defun display-buffer-directionally () "Specify in which direction the buffer should be displayed." (interactive "P") (let* ((dir (event-basic-type (aref (this-command-keys) 0))) (win (window-in-direction dir))) (unless win (setq win (split-window nil nil dir))) (let ((hook (list 'lambda))) (setcdr hook `((window) (when (eq window ,win) ;; When a new buffer was displayed in that window, ;; we can restore a previous value. (setq display-buffer-overriding-action ',display-buffer-overriding-action) (remove-hook 'window-state-change-functions ',hook)))) (add-hook 'window-state-change-functions hook)) (setq display-buffer-overriding-action `((lambda (buffer alist) (window--display-buffer buffer ,win 'reuse alist)))))) Do you think conceptually this is the right direction of development? From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 22 05:07:44 2018 Received: (at 32790) by debbugs.gnu.org; 22 Oct 2018 09:07:45 +0000 Received: from localhost ([127.0.0.1]:35108 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gEWBa-00079b-VD for submit@debbugs.gnu.org; Mon, 22 Oct 2018 05:07:44 -0400 Received: from mout.gmx.net ([212.227.15.15]:55145) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gEWBX-00079O-1U for 32790@debbugs.gnu.org; Mon, 22 Oct 2018 05:07:39 -0400 Received: from [192.168.1.101] ([213.162.73.34]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0McVns-1fwzIX1d6u-00Hj8x; Mon, 22 Oct 2018 11:07:29 +0200 Received: from [192.168.1.101] ([213.162.73.34]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0McVns-1fwzIX1d6u-00Hj8x; Mon, 22 Oct 2018 11:07:29 +0200 Message-ID: <5BCD934D.4070906@gmx.at> Date: Mon, 22 Oct 2018 11:07:25 +0200 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <87bm8pxjcb.fsf@mail.linkov.net> <5BA74E75.8000405@gmx.at> <87zhw8nd8g.fsf@mail.linkov.net> <5BA8A143.9040604@gmx.at> <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> In-Reply-To: <87bm7njk2f.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:v7w3y41xN4bKgXkOr2zPzvyGqHu01UEWdU+YwjiLARcOijyS1bf vmlaCHNkS+P2bIHCTUxLz9Cf39F+Lkp9LRr2OWJ0ghT3S3VTCLQd506dm/DiVn4KnJYKey6 6o1P8JBmSVhpCbWCkFxLl7csNyPmOPKGahhrGPXRsPGBDalhoNgCkdb8OKSFv8MvFZlrw6M nptr00ortM8+0Fg4ZtXkQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:rUL6m1WDZIk=:y2xWBnDSpsxRl4qr3Vdkn0 xqp9IxX7ckwvJEkPYM5vwh6XoQE76iWW2KrnFdMfNKLNqVLJEfPZcrUmzCOfzoN28nw2asOPm yTllYo6Fni4cL0uAlgKyWECDolIrvYaB2tOG6aPkocoOwlZpShJh5s5bz5Fwa2/9orTJP2HFK XheWiI6S/M7LUSi4vSF2Nln5g4MZ49ajQT+tO+/KQAp0itAE41MFDk413annd2K+930mQQ0U/ ukwLV7Xy30LaaX/jG7wPd8fgcrGxtsvv8UQnZu8SD+Gmbxs7YjFrhkUdc7n+v9n6a6PvkjJsR p5muW61qjklJ0x14xBmT3EOvjvGmFEp+Yza2EPgxCUtkzS8yMysf5W+Q3kDhZ+782+3LQKLGV 0Vltxl6YK6MHy6+lLrOoDhqnjfgwpOxSbs575xsXl+oZ2pT55EY5jmzmhhJv+zA9D/2a4kEuy w1GsqRI8Zoqh+10Ovz5C++0r7BJoc5EAmILgRCQaSvAiZhyNS9w7uUdF/q6jkEGuhO1vW9C3q 6HIIkcyV/RpE++oQZa/Y3EwC9MYnOqSdpQ8dGhbqgnGsD4McqwXVB023+KirxrR7zfeYFPkg3 NTlFnjF2So/xNGumROg7rAIk0AeTK+PFR60UWlDCP0DrrwSPtIA2nIoOQ4lxnBMMfYrHQJXKX 7puFlmMDNABiV9M4Av3nbXVNI/5y6dSG2UUbGDy/TSGVkYKXgRkhy3dWnk+1F7uC8JHS3VKEG P1jPRRVLTHnpUdoYXe2wozuD5XK/mbJ7dMVRuqyg0iGCAOhGT/fYw3riu5PrD58YevUHHdkH2 XFFyJu3+WfoZn8jmXmc5IkHtG55hdiNAxgBWR+GMj90K2ny/lU= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > other-frame-window is limited to the coarse choice, i.e. to display the > buffer in a random window on the same frame, or in another frame. It would indeed be nice to fix that there in some way. > Whereas the needed feature is to allow the user to point out exactly > in which window the buffer should be displayed. This can be achieved > with something like this: > > (let ((modifiers '(hyper))) > (dolist (key '(left right up down)) > (define-key global-map (vector (append modifiers (list key))) > 'display-buffer-directionally))) > > (defun display-buffer-directionally () > "Specify in which direction the buffer should be displayed." > (interactive "P") > (let* ((dir (event-basic-type (aref (this-command-keys) 0))) > (win (window-in-direction dir))) > (unless win > (setq win (split-window nil nil dir))) > (let ((hook (list 'lambda))) > (setcdr hook `((window) > (when (eq window ,win) > ;; When a new buffer was displayed in that window, > ;; we can restore a previous value. > (setq display-buffer-overriding-action > ',display-buffer-overriding-action) > (remove-hook 'window-state-change-functions ',hook)))) > (add-hook 'window-state-change-functions hook)) > (setq display-buffer-overriding-action > `((lambda (buffer alist) > (window--display-buffer buffer ,win 'reuse alist)))))) > > Do you think conceptually this is the right direction of development? Good idea. But IIUC we can't use 'hyper' in Emacs because it is not supposed to be generally present and must be bound to a key first. So we'd need some other mechanism. martin From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 23 17:17:26 2018 Received: (at 32790) by debbugs.gnu.org; 23 Oct 2018 21:17:27 +0000 Received: from localhost ([127.0.0.1]:38601 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gF43K-0003Fn-Li for submit@debbugs.gnu.org; Tue, 23 Oct 2018 17:17:26 -0400 Received: from pop.dreamhost.com ([64.90.62.162]:43788 helo=pdx1-sub0-mail-a73.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gF43H-0003Fe-UB for 32790@debbugs.gnu.org; Tue, 23 Oct 2018 17:17:24 -0400 Received: from pdx1-sub0-mail-a73.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a73.g.dreamhost.com (Postfix) with ESMTP id 7F01180233; Tue, 23 Oct 2018 14:17:23 -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=BeI4UczclGSFNmoML0HQg0hRRqw=; b= d8RLFkB/WHmpbyIEtMjouQ7I5gqRHVJ+cWbnePGhf2hQQazHn7wRlXZhDk3WXAJ3 drI4s1jxSYokPxOQQKt6XDGka3LWAIjEtuth78KES2UwuJ4/JglPyFxfCkOASPI1 8+LWVFZs0I7XW3MDhpJVWeytmgptHUZ5kSZip11TbDY= Received: from mail.jurta.org (m91-129-96-249.cust.tele2.ee [91.129.96.249]) (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-a73.g.dreamhost.com (Postfix) with ESMTPSA id 818F780232; Tue, 23 Oct 2018 14:17:22 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a73 From: Juri Linkov To: martin rudalics Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Organization: LINKOV.NET References: <87efdnsp2k.fsf@mail.linkov.net> <87zhw8nd8g.fsf@mail.linkov.net> <5BA8A143.9040604@gmx.at> <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> Date: Tue, 23 Oct 2018 23:55:49 +0300 In-Reply-To: <5BCD934D.4070906@gmx.at> (martin rudalics's message of "Mon, 22 Oct 2018 11:07:25 +0200") Message-ID: <878t2owo8i.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedrgeeggdduheelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrdeliedrvdegleenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrdeliedrvdegledprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgepvd X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > It would indeed be nice to fix that there in some way. There are not too many options that can be supported to make Emacs window management more manageable. I see at least these: 1. If the user knows beforehand in which window to display some particular buffer, then it's possible to customize display-buffer-alist. For example, instead of displaying *Backtrace* in a random window to make its placement more predictable: (custom-set-variables '(display-buffer-alist '(("\\`\\*Backtrace.*" display-buffer-below-selected)))) 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. 3. in some cases there is an one-off need to point out explicitly where to display the result of the next display-buffer command. If this will require only short code addition then better to have this feature in window.el. > Good idea. But IIUC we can't use 'hyper' in Emacs because it is not > supposed to be generally present and must be bound to a key first. So > we'd need some other mechanism. This is the same mechanism as already used by windmove-default-keybindings. From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 24 05:46:06 2018 Received: (at 32790) by debbugs.gnu.org; 24 Oct 2018 09:46:06 +0000 Received: from localhost ([127.0.0.1]:39075 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gFFjq-000226-Ee for submit@debbugs.gnu.org; Wed, 24 Oct 2018 05:46:06 -0400 Received: from mout.gmx.net ([212.227.17.22]:48109) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gFFjo-00021E-Le for 32790@debbugs.gnu.org; Wed, 24 Oct 2018 05:46:05 -0400 Received: from [192.168.1.101] ([212.95.5.202]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LbA4j-1frQJp17dZ-00ki7E; Wed, 24 Oct 2018 11:45:56 +0200 Received: from [192.168.1.101] ([212.95.5.202]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LbA4j-1frQJp17dZ-00ki7E; Wed, 24 Oct 2018 11:45:56 +0200 Message-ID: <5BD03F4D.1000900@gmx.at> Date: Wed, 24 Oct 2018 11:45:49 +0200 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <87zhw8nd8g.fsf@mail.linkov.net> <5BA8A143.9040604@gmx.at> <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> In-Reply-To: <878t2owo8i.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:5v6LWBVrJMOshkelKoWvVVtpUOPVyg89bdcmvb8DKuMRV2w7UwQ 1Fg8neSJ896DPRKw/B1frIVEWbUykq2Aycbq8WAmOx1xPaDW7KbbkSC3iaaWSL4lcb72kmE GBB2S8mpDtSYKg3BRFT2zZjF4JZI0SHUpoparxEp4N7/cGN6eAtYLN8nONMrgP2T7zHKiOS JikbUjoJfrSh2EE5E/HZg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:hPz5Cp/aQO4=:Xiyah9/kjgbOkdoG4/72T0 vhDAJLDABAPBjfbvqam8cKXRYrn7kfoPVI5+ijYOppzyLH5KrBQXpoqnv7xj8WXd85suIkovX JajjgUgt3rRZGeUbIYGTtxvpNui8XcU4u4342Ao9eEjCAS1z9aLNNbx5jN6xZmI6DYasProIU G0UuxaeQ3ypJ9p9A9GAm1NOwQQX/309k9jZ5CFaibusugBhTPE39YeU5doUh5hbqLk9bIBAb6 u/neVyznqcV/6ICdh7r0CPHcdbDGYpXKp3gmwCOfdP07JCiiPruWYAuAlIWigipr4gbOMsp09 OzJNK4oYvXhvqtNZsxHFiwcPHLY6nzv4EmJ1qQwfJZC9xqHPzP0Ew0lHMlxC2CEdclVDy3r2y rCaJGDJ8FlV+0QRpX+/mbyD+qxZjct8kz8Ki0lauWVbRy9PrkOEd6CCSmPvsn5OjAqC0X1krU rwXSPdh92xeou3VTrN6lAc8/1RgKmF/yVWERRzHtG3TQ792oDnrATvGQxR7ZijkibeJjeoI8P z4HRmm3apACNkZQAha1lZDw9KiEWdl8vunmU/0Rv4yBaXvRPnb9lnpkobqn84H7Ek9f5gLqWZ elifUaG3CRPb53Kg9ofrQ8SWdRzQ4h1lzWW/rEllb42ZoV6ADDFpe8W7AOvxOljCw27knsbS9 L6JKn8yb5BwAHJN0L5KBCCyQFpiQjTIcYuIsAbP3sKPT8BiysJZbLeq7+9dR67JWypOB+ajBu ALGA1hl6UMjQSxqw5jqQp1OVNmyr2AkqpzFrZ/yZFtgR3vjW0vNSwdPO1pTZl/yXqbe/+wUU2 Grz0UcoSK22uPmyKiP0QvpDYYvIvdffIjpKyYwvcNsU6mKgMuo= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> It would indeed be nice to fix that there in some way. > > There are not too many options that can be supported to make > Emacs window management more manageable. I see at least these: > > 1. If the user knows beforehand in which window to display some > particular buffer, then it's possible to customize display-buffer-alist. > For example, instead of displaying *Backtrace* in a random window > to make its placement more predictable: > > (custom-set-variables > '(display-buffer-alist > '(("\\`\\*Backtrace.*" display-buffer-below-selected)))) That's the status quo, I suppose. > 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. > 3. in some cases there is an one-off need to point out explicitly > where to display the result of the next display-buffer command. > If this will require only short code addition then better to have > this feature in window.el. I think that 'display-buffer-directionally' is supposed do that. But this should rather go to windmove.el because directional key bindings are already in use there. >> Good idea. But IIUC we can't use 'hyper' in Emacs because it is not >> supposed to be generally present and must be bound to a key first. So >> we'd need some other mechanism. > > This is the same mechanism as already used by windmove-default-keybindings. 'windmove-default-keybindings' binds only the 'shift' modifier which is "standard" so to say. Binding the 'hyper' modifier is not standard to my knowledge. We could bind any combination of 'shift', 'control' and 'meta' though. 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. martin From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 25 16:57:08 2018 Received: (at 32790) by debbugs.gnu.org; 25 Oct 2018 20:57:08 +0000 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 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 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) 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 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 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= 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 From: Juri Linkov To: martin rudalics Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Organization: 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> Date: Thu, 25 Oct 2018 23:48:09 +0300 In-Reply-To: <5BD03F4D.1000900@gmx.at> (martin rudalics's message of "Wed, 24 Oct 2018 11:45:49 +0200") Message-ID: <87in1phhx2.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedrgeelgdduheeiucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdehrdduheegnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddthedrudehgedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgepud X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> 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 :) From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 26 03:41:54 2018 Received: (at 32790) by debbugs.gnu.org; 26 Oct 2018 07:41:54 +0000 Received: from localhost ([127.0.0.1]:43156 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gFwkk-0000J5-09 for submit@debbugs.gnu.org; Fri, 26 Oct 2018 03:41:54 -0400 Received: from mout.gmx.net ([212.227.15.15]:43663) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gFwki-0000Iq-IT for 32790@debbugs.gnu.org; Fri, 26 Oct 2018 03:41:52 -0400 Received: from [192.168.1.101] ([212.95.5.134]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0McEI3-1fz6Js2wQZ-00Jeoj; Fri, 26 Oct 2018 09:41:43 +0200 Received: from [192.168.1.101] ([212.95.5.134]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0McEI3-1fz6Js2wQZ-00Jeoj; Fri, 26 Oct 2018 09:41:43 +0200 Message-ID: <5BD2C52E.2060607@gmx.at> Date: Fri, 26 Oct 2018 09:41:34 +0200 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window 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> <87in1phhx2.fsf@mail.linkov.net> In-Reply-To: <87in1phhx2.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:Y4pHRInkCfXmO5xM1eKFJnLdaHRNtU3PISt+D1jUg7Khi0Re3ec mnPCbM7Jopylw4W0gnzDiR1uM9qnlPOPI9PQySfHks6ePVmsPSnaC5oWX8ld7bOxiVxC+hs K4ason08QxoWOKmJcRkiLxPkEoFs7sBruaB+zZ/fK8Bf8cXEM0zwHYEdMBTi15+3kNwaE48 t3nOp1qj3YPq/B1TLf5vQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:5WoBkJrWATY=:Hs/Vb+TNkdOigg2ZrLtWBQ 0bqub1BOMn9PQgpd+/LdD42HwNm/nGvdvoPUqeN3VjdpSWzSihN6L8MxtWuPWOieJ9axknCOr EB43MfvlyXLlRv/hrB78OFCkaWURainpsIRW2Ps/y9/OIPyQzo/SMm/86afn6kMadIxXIAOWY VASfXQ78D17lRuHEDc5w1GEgZ4N43r90i/zHjMyuOh1TehhIDqv6XdJRPfGqfSz7mHJIvMDcp hW0k63ihtU5imkYBwEQHJJ075iQ1aC4dgFbspCyxkkYcPgg1ol2MzhY76IxmnP07pGm2sOpr9 +ILWiZpf8VBkBa+fOVS1kz2Npd34Mj7TPT5kBPbfVBI82GS7y8k6GfwOjs/ate6jldn793h61 9n0JZ+gCc1yz4tkuznYBwj2v/7U2HBipue0bcvveTA5mUlUI10L4NXlC8igvjkqXyY8/zfwab cXGoWGVicm9OyC1K0CCgzOaMOUa5GMZJs5pWw4t0naPT2TrQO5pV+epMljtVRfGWPx5iCiund Bz/lvuk02C8xbaP8/2AoPk0+xXOczg3XCZDZsBtE2OwnVFESnp2Jmn+pbbzHtUaaQykVQtb68 sY1tQyF868BGqy0OYMSJ2fWE6Ixb8WrNj6hBMICl5koKmdpy23h4SS9QUOyWyvrrZpWLzIJvK bRDuDIGfsll12s4vYlVpmojG8bio5rg2y1Q49pomw7FR3Q6mwt57+N1SqG75HTHiRsjyLvMiu zFchjUvtbnh9Xa4bhHggSF5uetNEZepnXn3tS6w6ZKedO0ZwoDGpZxbkohg2cLT1M7tBrcOZ+ GQP3UFULuggXNiLsGV1WHktlfrkPapzhthe/hL6oIrQyW1QIp8= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > 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. I see what you mean. But it will take us some time till we get there. Alone specifying such a thing would be a quite challenging endeavour. > 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 :) Ahh.. That hook has not been written yet and I'm not sure whether I'll be able to ever do that. In either case: The window state will not change when a window gets just reused by 'display-buffer' and no selection takes place. So can't you simply use 'post-command-hook' for your purpose? martin From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 27 16:20:28 2018 Received: (at 32790) by debbugs.gnu.org; 27 Oct 2018 20:20:28 +0000 Received: from localhost ([127.0.0.1]:45783 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGV4N-00005v-Ra for submit@debbugs.gnu.org; Sat, 27 Oct 2018 16:20:28 -0400 Received: from chocolate.maple.relay.mailchannels.net ([23.83.214.35]:48707) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGV4J-00005g-Ec for 32790@debbugs.gnu.org; Sat, 27 Oct 2018 16:20:23 -0400 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id AB2DD5E2D18; Sat, 27 Oct 2018 20:20:21 +0000 (UTC) Received: from pdx1-sub0-mail-a3.g.dreamhost.com (unknown [100.96.20.98]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 678595E2A78; Sat, 27 Oct 2018 20:20:21 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a3.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); Sat, 27 Oct 2018 20:20:21 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Gusty-Descriptive: 280e1d5472d19bed_1540671621552_3240520372 X-MC-Loop-Signature: 1540671621552:2441350540 X-MC-Ingress-Time: 1540671621551 Received: from pdx1-sub0-mail-a3.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a3.g.dreamhost.com (Postfix) with ESMTP id 30CFD7F694; Sat, 27 Oct 2018 13:20:21 -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=TNh5apoNP5e/C7rYDK4l2HU2zgM=; b= FOgYjD0f/4/YzKs51PNd/cMYS6apclT+seUlP3AUgHu9qFqS/0MD9BXrQG7C/TJd R3hMTfBoQ5n6RKaGVr55GB42+0E2TWOXW5RZMhgRf/ekl7yoO21zjI9lT2h+/wpQ gB7c1YaYhFHW2q4GGR1gZ+TfUnLp4OJ0uBE7+BXyJg0= 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-a3.g.dreamhost.com (Postfix) with ESMTPSA id EDE277F68D; Sat, 27 Oct 2018 13:20:19 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a3 From: Juri Linkov To: martin rudalics Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Organization: LINKOV.NET References: <87efdnsp2k.fsf@mail.linkov.net> <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> <87in1phhx2.fsf@mail.linkov.net> <5BD2C52E.2060607@gmx.at> Date: Sat, 27 Oct 2018 22:51:05 +0300 In-Reply-To: <5BD2C52E.2060607@gmx.at> (martin rudalics's message of "Fri, 26 Oct 2018 09:41:34 +0200") Message-ID: <87ftwrgwp2.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedrheeggdduhedvucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesmhdtreertdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdehrdduheegnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddthedrudehgedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgeptd X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain >> 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 :) > > Ahh.. That hook has not been written yet and I'm not sure whether I'll > be able to ever do that. In either case: The window state will not > change when a window gets just reused by 'display-buffer' and no > selection takes place. So can't you simply use 'post-command-hook' > for your purpose? The implementation of window-state-change-functions posted to bug#32672 uses post-command-hook. It makes possible display-buffer-directionally, e.g. S-M-up ffap RET will open a file link in the upper window, etc. --=-=-= Content-Type: application/emacs-lisp Content-Disposition: inline; filename=display-buffer-directionally.2.el Content-Transfer-Encoding: quoted-printable (defun display-buffer-directionally () "Specify in which direction the buffer should be displayed. Arrows show the direction. Mod-0 forces to display in the same window." (interactive) (let* ((dir (event-basic-type (aref (this-command-keys) 0))) (win (if (eq dir ?0) (selected-window) (or (window-in-direction dir) (split-window nil nil dir))))) (let ((hook (list 'lambda))) (setcdr hook `((window alist) (when (and (eq window ,win) (not (eq (nth 1 (assq 'buffer alist)) (nth 2 (assq 'buffer alist))))) ;; When a new buffer was displayed in that window, ;; we can restore a previous value. (setq display-buffer-overriding-action ',display-buffer-overriding-action) (remove-hook 'window-state-change-functions ',hook))= )) (add-hook 'window-state-change-functions hook)) (setq display-buffer-overriding-action `((lambda (buffer alist) (window--display-buffer buffer ,win 'reuse alist)))))) (let ((modifiers '(shift meta))) (dolist (key '(left right up down ?0)) (define-key global-map (vector (append modifiers (list key))) 'display-buffer-directionally))) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 28 05:00:08 2018 Received: (at 32790) by debbugs.gnu.org; 28 Oct 2018 09:00:08 +0000 Received: from localhost ([127.0.0.1]:46650 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGgvY-0008MV-K7 for submit@debbugs.gnu.org; Sun, 28 Oct 2018 05:00:08 -0400 Received: from mout.gmx.net ([212.227.15.18]:55381) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGgvX-0008Kx-48 for 32790@debbugs.gnu.org; Sun, 28 Oct 2018 05:00:07 -0400 Received: from [192.168.1.101] ([212.95.5.102]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MAxyW-1gOMR90nxM-009v4O; Sun, 28 Oct 2018 09:59:59 +0100 Received: from [192.168.1.101] ([212.95.5.102]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MAxyW-1gOMR90nxM-009v4O; Sun, 28 Oct 2018 09:59:59 +0100 Message-ID: <5BD57A8D.8080408@gmx.at> Date: Sun, 28 Oct 2018 09:59:57 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <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> <87in1phhx2.fsf@mail.linkov.net> <5BD2C52E.2060607@gmx.at> <87ftwrgwp2.fsf@mail.linkov.net> In-Reply-To: <87ftwrgwp2.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:qtH62OEHQ0yDUA03bRdGyh6ivYzPxQkLVs/D7ur1C+E6t8be6zI LZB1MFtPKpwGA9f/fouSQhFToLd52ZOVHEGK4UPIxsThHemL9CAkcggMMQFG1Ce+GQ8o2xi 4rEWTru8/FQDtwAnCgaDdc1NEaCJFYBavGzDg1xJJyRrjvxtcvUi0CZgcsvNCRvtlGbN1ym SVq8dNKjnf4LhyIQJLqsQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:iDk6MiXEM1o=:HwT3UTRMMN/VS2Dg8w2Zh1 khPGe/l6Bfrz44kp18wwJqvDNSEvUb7F1/BWyhsaqx1f3y6WXMnebxbfxvMaLuESv4VikU4Ef fev3NvqyHt6VM7HJkw5c+h59eA+81Q4RAvhLsyB8fm2S8JpCkwZhhMWzjIMe960x8xmnCTQSw haxOcQVc7fKEXFbY3hcLkKeithJcMsYypzoRUmJTx3GERF/ehpZCAYBtgEyM/6TBl8j128Br8 v9hUqSvT66knhyyoCeaIUK1MiCs2hAV3e5/UNxOau0LhwqeCo/DWAi2lzMszkaxTwUCJ1wBSR CJcqzUI0rSF3GvAW7ZPr2g1s/dIRNezMMsLmelmZ7LEPF5CBIGOB/ZzxWfNC1/6i2/3aybzjO nHEpanA13uDyLbMp19IN/CJdMMfMqc08ez1+vQAZisZctlpB0qzwT26ES+nlyvmeFAmvLN/Ko VUGugcbdoBJ7BbFUQwDOOxCZixB9p8BQ3oPZVxpDMRZe6D/UWgX5HJeCfBmOquPq9KWrGU+x6 JN7qQEzrHqPpMwQAOOwLw3F+l5DqRfu7/MQnh+SqwuN9NgvI/kjjU1rDG0GbKJyqiA+96Nc1F PuUmUs14X8U79neL/4YrVvGf+wWyScs1qB2N4cT+/Rf4+sH3nonmPw7pzRNc1IvTh0KdNnKN/ qopZI1rjpXJ2Kr/UR0LfP2O2b2oz5PyShDirtn6Kas5OmoJstxBat6k4564bUyF1E2m2s5QVs uLiGg515vl36R2vuAfM9/HxVoSZosYhBcZx0/mL3gLd/jGdbX8IJIbxJ+Ba07sC9ppM7SEDve miX8fCtagIjykoLRTzSY1MuuZf9UzwmM0eHlpN6NxHLnMxGEKE= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > The implementation of window-state-change-functions posted to bug#32672 > uses post-command-hook. It makes possible display-buffer-directionally, > e.g. S-M-up ffap RET will open a file link in the upper window, etc. Yes. But as I said in the thread for Bug#32672 running 'window-state-change-functions' only after a command gets executed may miss a number of important cases where the hook should be run as well. Once more: What could go posibly wrong if you added 'hook' to 'post-command-hook' and unconditionally (that is completely disregarding whether a buffer display action succeeded or not) removed the overriding action there. If you are paranoiac about this, you can even restore the old value of 'display-buffer-overriding-action' if and only if the new value (when running 'post-command-hook') is the one you wrote there ealier and leave any other value alone (because it was probably put there by the command executed). martin From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 28 15:40:35 2018 Received: (at 32790) by debbugs.gnu.org; 28 Oct 2018 19:40:36 +0000 Received: from localhost ([127.0.0.1]:49347 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGqvL-00053U-Mj for submit@debbugs.gnu.org; Sun, 28 Oct 2018 15:40:35 -0400 Received: from coral.maple.relay.mailchannels.net ([23.83.214.39]:19542) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGqvK-00053K-8K for 32790@debbugs.gnu.org; Sun, 28 Oct 2018 15:40:34 -0400 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id A0AC440C97; Sun, 28 Oct 2018 19:40:32 +0000 (UTC) Received: from pdx1-sub0-mail-a9.g.dreamhost.com (unknown [100.96.29.126]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 5EC1D42316; Sun, 28 Oct 2018 19:40:32 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a9.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); Sun, 28 Oct 2018 19:40:32 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Obese-Fumbling: 5424b44c19efc59a_1540755632478_1148911897 X-MC-Loop-Signature: 1540755632478:2950243769 X-MC-Ingress-Time: 1540755632478 Received: from pdx1-sub0-mail-a9.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a9.g.dreamhost.com (Postfix) with ESMTP id 2BB877F794; Sun, 28 Oct 2018 12:40:32 -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=u76OFWuwJkJmOYk/YlR4JKjl+hM=; b= WuTq0opY/0dSJMftMoO92I52k2cxcT9dXTJ82HzR6mWHKKxIPU/TmKeoDh/c+1vZ PdpP6kZh/WFD4267OubK7EjiGDIvzYtfDsmreuATdxAjtD/TqMT2gWgd/uXIfJGf oKoO9+L2jCbdf5sK2SE93RlmVrz4sa77OCpffrWVnmg= 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-a9.g.dreamhost.com (Postfix) with ESMTPSA id F07577F790; Sun, 28 Oct 2018 12:40:29 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a9 From: Juri Linkov To: martin rudalics Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Organization: LINKOV.NET References: <87efdnsp2k.fsf@mail.linkov.net> <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> <87in1phhx2.fsf@mail.linkov.net> <5BD2C52E.2060607@gmx.at> <87ftwrgwp2.fsf@mail.linkov.net> <5BD57A8D.8080408@gmx.at> Date: Sun, 28 Oct 2018 21:36:54 +0200 In-Reply-To: <5BD57A8D.8080408@gmx.at> (martin rudalics's message of "Sun, 28 Oct 2018 09:59:57 +0100") Message-ID: <875zxmx95h.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedrheeigddufedvucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdehrdduheegnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddthedrudehgedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgepud X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > Once more: What could go posibly wrong if you added 'hook' to > 'post-command-hook' and unconditionally (that is completely > disregarding whether a buffer display action succeeded or not) removed > the overriding action there. Please note that for example S-M-up M-x ffap RET RET involves the minibuffer before a buffer-displaying command is executed. From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 29 04:45:07 2018 Received: (at 32790) by debbugs.gnu.org; 29 Oct 2018 08:45:07 +0000 Received: from localhost ([127.0.0.1]:49917 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gH3AZ-00030D-85 for submit@debbugs.gnu.org; Mon, 29 Oct 2018 04:45:07 -0400 Received: from mout.gmx.net ([212.227.17.21]:38121) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gH3AX-0002z8-Su for 32790@debbugs.gnu.org; Mon, 29 Oct 2018 04:45:06 -0400 Received: from [192.168.1.101] ([46.125.249.45]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MRCCJ-1g92Zi09U7-00UYAB; Mon, 29 Oct 2018 09:44:57 +0100 Received: from [192.168.1.101] ([46.125.249.45]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MRCCJ-1g92Zi09U7-00UYAB; Mon, 29 Oct 2018 09:44:57 +0100 Message-ID: <5BD6C885.7050804@gmx.at> Date: Mon, 29 Oct 2018 09:44:53 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <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> <87in1phhx2.fsf@mail.linkov.net> <5BD2C52E.2060607@gmx.at> <87ftwrgwp2.fsf@mail.linkov.net> <5BD57A8D.8080408@gmx.at> <875zxmx95h.fsf@mail.linkov.net> In-Reply-To: <875zxmx95h.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:mmK5SGY8kH0pAiDZm0vRgYydhF5kVVi/IBXaHSQIhSA+/4rEtgd fMBJLtfdT9lVWggm4DRq4r2RoGJuMQgMmp5Od2b50Am91LiaFCZOKsbac7FBTmYUoBIOmGB SIW839AS9Uq03CzobtGJs76MkkzAUS/BOp9YP80G3KL6xPfvBieFC9MLdIaABFAcMKHSno2 QwOGSkgssf4j708TiE5/w== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:FXU77Z6ygD4=:jzgw4RnaUHuzJpP3kajHIL sRBtTuppHgvK+lXWulXgnxCzWab4y/OdwuM1uhwNm4wprSCRdN4QiSIEwijjTkvsts6T95U4y K2fIIWQuQXFCQOGFm9x2DD92OEYdqWJhNay9XmNfyfo58UuNM4yRQBuzTOIDRGrfKjh9faSSW Cp4+GtWUChwLtXBQWGJ4Yrmwd+6HMPe3uCtu+FNNzZ9R1IzS3sasau1jZx08EYjrw4SdmVtrj dQbkxuS4ydJsTDG3iVWXz1aXaDPqbuGFCAnVewDT4b2CqLnf2Tr3DFj9Ut5uW/QzA/tZKCndm JO7jiyZlsMW+dh++Yal6/lPJJPwMRSrNjfVfTTyP1Fzmw+AB+yXDn9vHZq0I4R5vd5S24sXhB bu2wdkGu8+AwttUijAb4P15Q6diibrylCyyRiHH58UflggUBwlx53yKavcthKMSjtAbcano6k 19LQZkaHAowcgpAeTR+mYYltwjjzHPTsA8huVnXzKazrMdliSh+mDbkYbngNvQ7Ri7F2JwKII wcj+0vj3iwNS7d/YlCeg99hC0HHYddyUm52z8xzoJ4aYoimIUXcfT1VAXrPV9OrE83fbJz3Sq vFPZsEuZiiqtqTvMaTgP/iwibrlTzjC0x5wWt922y1g+SFbbV4q/Wp2bHJFbTPyLJooQM3fpL FUMxMma6Z+deuZ6r2AXxZ9XAgcwggy6Nqg30JPtCmbDBTlaS4h+Wk7WlZyEiefRVQanciFs0I 8tLuGYwZ9k9SoCjhSafgz0HdpnKNILQTQmsyMXudppsn84zEYsvIfhKTEoZhiE/kzV36edYAs TfKg+Oa1isog4+Qsh9n8Q7t2EwyC4Z5xbFtOyvUysgP478tBNY= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> Once more: What could go posibly wrong if you added 'hook' to >> 'post-command-hook' and unconditionally (that is completely >> disregarding whether a buffer display action succeeded or not) removed >> the overriding action there. > > Please note that for example S-M-up M-x ffap RET RET involves > the minibuffer before a buffer-displaying command is executed. One more argument against using 'window-state-change-functions' or the like. Selecting the minibuffer window would count as a state change and immediately reinstall the previous overriding action. Rather, the function on 'post-command-hook' would have to be more intelligent - check whether the minibuffer-window is selected and leave the overriding action untouched in that case. Moreover, using 'post-command-hook' would automatically fix any problems when quitting an S-M-up action. I see no way to catch quitting via a state change of windows. martin From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 29 09:46:16 2018 Received: (at 32790) by debbugs.gnu.org; 29 Oct 2018 13:46:16 +0000 Received: from localhost ([127.0.0.1]:50014 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gH7rx-000647-3l for submit@debbugs.gnu.org; Mon, 29 Oct 2018 09:46:15 -0400 Received: from mout.gmx.net ([212.227.17.21]:52369) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gH7rv-00063u-0Z for 32790@debbugs.gnu.org; Mon, 29 Oct 2018 09:46:11 -0400 Received: from [192.168.1.101] ([46.125.249.45]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MGEv5-1gJe2g12DH-00FC4u; Mon, 29 Oct 2018 14:46:01 +0100 Received: from [192.168.1.101] ([46.125.249.45]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MGEv5-1gJe2g12DH-00FC4u; Mon, 29 Oct 2018 14:46:01 +0100 Message-ID: <5BD70F14.8080509@gmx.at> Date: Mon, 29 Oct 2018 14:45:56 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <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> <87in1phhx2.fsf@mail.linkov.net> <5BD2C52E.2060607@gmx.at> <87ftwrgwp2.fsf@mail.linkov.net> <5BD57A8D.8080408@gmx.at> <875zxmx95h.fsf@mail.linkov.net> In-Reply-To: <875zxmx95h.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:f3qbXPJdY5AXbx0UtOZsK1li/Ia7mYQHDZ1ePt38SzBZLIAGlg6 llkthkThsz/xXhH/YsIIoK5yAE6N9h1miKCzYoyUlqbJwjYUzqUBS+aGARSIS0NJpS7GGdx Dt7tjJYlOr8Yysu9ZIfgXvD/1yBA6C5fSMGVKSSuxgJgsgSpRXUOJOgwoQzP7gmK95YMhrJ nlCbxC52/DBqcaNeF3O4w== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:pCEkFiYfKWg=:aF3HBlFF6+zw/cjexpsmAh BTIG7NVFcoU8hu/wNi0260poDnxeqHF4jmZIKez6fm4o6NFZ9/nl7TceokOJZFjtWkL+vi+sI hmKSmmk5Ek6k9oTQxelxbBStAW+hkXq+dN3urq3ISM3c3IYGI/Ywbaw85jKjwex5JfNcu5wxj 4560n/k5bejPqzBH/13D3Mb3wx9qptfVbLko/o7jx5cmm2ZefOocXFGgE8AlmMkfzNFiajrHh wUFNE4b+IMY349IO6RvjpJMuVGhny9Z++qoNuM1wA/irP4NgE23Ua2SptwFES82C5esDC1w9q gSPmXXfSE1wPsT4dmBiDynql/CEZ9AKJRv8A6zlUFzSC18wN2wokhUyDo9WSpKHED1XF3RqAW KKyxIZV87pbBeLwTsalwwfiwr5taX8nEjyUt5x03Z7mMy/NJD/mzkI8589wyGygZyyPuGEVM7 xzReSrHt9TngtsziU9Y97TTxwrwq9Cyei590JR7T6bL3uAD8WqUjlir80ZRYqbMWVTVl8tyU8 88vzCTmBtCaq3tZZTmvQyirwDk0XszVaxOLlMWpagKL3y6heiI5Rf4nnEwCOpfDM9Yf1AiU97 2lMKZeQuaaInwn2tM202Ye3TyBz/2mymL/hl55EXIMQSsvjlcwR8a2Vs1gsWn2cVaUqG6LHBs tFNBgzNS16RcJJjo1Unn7qddvDk0vAgw4VAYmFqCLsCjKtp9rizY70hBLy+K+1BB0K8UStFyy cVhZJBCn6btJ4vCRSv2d8/o7DGQM6e+E0kbGWwpct0GGqv2AkO4xkFDA9/EYEhY2nXQL+uYGW jOCv0oiaRU1C4Ja8Sijbgq8nbzpxQM2r3LI8f3ZzYREESQWCRI= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > Please note that for example S-M-up M-x ffap RET RET involves > the minibuffer before a buffer-displaying command is executed. I forgot to ask: If that ffap pops up completions, they will appear above the selected window. Right? martin From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 29 18:53:17 2018 Received: (at 32790) by debbugs.gnu.org; 29 Oct 2018 22:53:17 +0000 Received: from localhost ([127.0.0.1]:52295 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHGPN-0004mT-9G for submit@debbugs.gnu.org; Mon, 29 Oct 2018 18:53:17 -0400 Received: from giraffe.birch.relay.mailchannels.net ([23.83.209.69]:28568) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHGPK-0004mI-G7 for 32790@debbugs.gnu.org; Mon, 29 Oct 2018 18:53:15 -0400 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id B2AC4123C80; Mon, 29 Oct 2018 22:53:12 +0000 (UTC) Received: from pdx1-sub0-mail-a54.g.dreamhost.com (unknown [100.96.33.121]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 6568F121F47; Mon, 29 Oct 2018 22:53:12 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a54.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); Mon, 29 Oct 2018 22:53:12 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Bored-Eight: 2370b9c9574785fe_1540853592546_1944013306 X-MC-Loop-Signature: 1540853592545:2611984032 X-MC-Ingress-Time: 1540853592545 Received: from pdx1-sub0-mail-a54.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a54.g.dreamhost.com (Postfix) with ESMTP id 1D1BB80834; Mon, 29 Oct 2018 15:53:12 -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=93DXcZEoc/dX8ffL0GOYH8wvgJY=; b= Tpiid3EU33n1nopdtMT+oIQhJyZBlMJ8KWb8Fxv2II8UBra0Oof34pD8e1AyXRCF WUneKrG/ft7hjaW2YE/7WwVDhdHlD2liYmnMTQbbmQr8CarMaYEtui9O9Vng0EEP 71gk3kaF5RaclskPsl224tMf+4Fkh3mXhhDT9Rp1MXw= Received: from mail.jurta.org (m91-129-101-157.cust.tele2.ee [91.129.101.157]) (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-a54.g.dreamhost.com (Postfix) with ESMTPSA id A389980831; Mon, 29 Oct 2018 15:53:10 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a54 From: Juri Linkov To: martin rudalics Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Organization: LINKOV.NET References: <87efdnsp2k.fsf@mail.linkov.net> <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> <87in1phhx2.fsf@mail.linkov.net> <5BD2C52E.2060607@gmx.at> <87ftwrgwp2.fsf@mail.linkov.net> <5BD57A8D.8080408@gmx.at> <875zxmx95h.fsf@mail.linkov.net> <5BD70F14.8080509@gmx.at> Date: Tue, 30 Oct 2018 00:38:08 +0200 In-Reply-To: <5BD70F14.8080509@gmx.at> (martin rudalics's message of "Mon, 29 Oct 2018 14:45:56 +0100") Message-ID: <87lg6g750v.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedrheelgddtfecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddtuddrudehjeenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutddurdduheejpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtoheprhhuuggrlhhitghssehgmhigrdgrthenucevlhhushhtvghrufhiiigvpedt X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > Rather, the function on 'post-command-hook' would have to be more > intelligent - check whether the minibuffer-window is selected and > leave the overriding action untouched in that case. It's possible to implement it with post-command-hook, but the implementation will be more contorted - note that adding a hook to post-command-hook by a command will run it immediately at the end of this command and immediately remove the hook. [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.3 RCVD_IN_RP_RNBL RBL: Relay in RNBL, https://senderscore.org/blacklistlookup/ [23.83.209.69 listed in bl.score.senderscore.com] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [23.83.209.69 listed in list.dnswl.org] X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > Rather, the function on 'post-command-hook' would have to be more > intelligent - check whether the minibuffer-window is selected and > leave the overriding action untouched in that case. It's possible to implement it with post-command-hook, but the implementation will be more contorted - note that adding a hook to post-command-hook by a command will run it immediately at the end of this command and immediately remove the hook. Whereas window-state-change-functions elegantly checks if the window displays a new buffer. > Moreover, using 'post-command-hook' would automatically fix any > problems when quitting an S-M-up action. I see no way to catch > quitting via a state change of windows. What do you mean by quitting an S-M-up action? minibuffer-exit? > I forgot to ask: If that ffap pops up completions, they will appear > above the selected window. Right? Right. Since I agree this is not an expected behavior, here is a better version without this problem. Instead of display-buffer-overriding-action, it uses display-buffer-alist because only display-buffer-alist supports a condition necessary to check for an active minibuffer. (defun display-buffer-directionally () "Specify in which direction the buffer should be displayed. Arrows show the direction. Mod-0 forces to display in the same window." (interactive) (let* ((dir (event-basic-type (aref (this-command-keys) 0))) (win (if (eq dir ?0) (selected-window) (or (window-in-direction dir) (split-window nil nil dir))))) (let ((hook (list 'lambda))) (setcdr hook `((window alist) (when (and (eq window ,win) (not (eq (nth 1 (assq 'buffer alist)) (nth 2 (assq 'buffer alist))))) (setq display-buffer-alist (cdr display-buffer-alist)) (remove-hook 'window-state-change-functions ',hook)))) (add-hook 'window-state-change-functions hook)) (setq display-buffer-alist (cons `((lambda (_buffer-name _action) ; condition (= (minibuffer-depth) 0)) (lambda (buffer alist) ; action (window--display-buffer buffer ,win 'reuse alist))) display-buffer-alist)))) From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 30 05:00:27 2018 Received: (at 32790) by debbugs.gnu.org; 30 Oct 2018 09:00:28 +0000 Received: from localhost ([127.0.0.1]:53286 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHPsx-0003Hh-8Z for submit@debbugs.gnu.org; Tue, 30 Oct 2018 05:00:27 -0400 Received: from mout.gmx.net ([212.227.15.18]:46635) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHPsv-0003By-MQ for 32790@debbugs.gnu.org; Tue, 30 Oct 2018 05:00:26 -0400 Received: from [192.168.1.101] ([213.162.73.177]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LkfdE-1fjS2d19E4-00aULA; Tue, 30 Oct 2018 10:00:15 +0100 Received: from [192.168.1.101] ([213.162.73.177]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LkfdE-1fjS2d19E4-00aULA; Tue, 30 Oct 2018 10:00:15 +0100 Message-ID: <5BD81D97.2000000@gmx.at> Date: Tue, 30 Oct 2018 10:00:07 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <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> <87in1phhx2.fsf@mail.linkov.net> <5BD2C52E.2060607@gmx.at> <87ftwrgwp2.fsf@mail.linkov.net> <5BD57A8D.8080408@gmx.at> <875zxmx95h.fsf@mail.linkov.net> <5BD70F14.8080509@gmx.at> <87lg6g750v.fsf@mail.linkov.net> In-Reply-To: <87lg6g750v.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:mEODriaY0I9He7MLh/uxNgeXFOtrJV92HkP88t7r23jQLCI0NwI xnWMIsE6xTkEyQaqVyrHnu4YKzE5+LBupFj12CmfLwsA6AEadMgNqq1KcasUrHphYdQ/tgK puvmVcBm9DwMpZoFYdVRDnuwR0M0x6TdQr/jlHzcAQIA7u90qGWfcooxIrA3G944Kv/9dHC KZOXMK6ZMcvVAHnOM6uXg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:kLsFnvfTXWU=:XiKzvA42OIufKrXfdmyeGA PNCkOVRRQHGg7pbWTA+v8GysHrxMnVRQ6UdKDWazHiHgkkL9fpiMooK8Hqx7mwZd/45+YOPwr ljVXJpjh33RsFCprD1pf4uSksZVRWOT/q1Owtxs17XxbmlVDas11IXd5mUr3wkX9oSxTZtKIo 6DsLk6me1+7rao0yiJbh+5lwCY8Sl5eeCdXYXw9G+wjzFa1rH/Jq9QB2JBkZ45RzVkyirhobe 0Hryr9C+aUIHav5gjgNxf902AhUKvDSVrSRhJK+BU3EvmLNIRpSxb5ZemNxlCpwbS/F/O0skE njFhSruCRnNXpU5gLnL21ZlKogOSbYo1xB14i4B38Ze37k5rK5/szNha67PgD9BfIzDnGMd4W xQz7Qd9oDjKN7zqm8HaKnP6KBcv8bDKCcrL3bPSa1aLRPYuoiMxjdtROyI+6fPUZucE3rJaej wGdurTKLmhyAOGMX7PU3M2S1DHfi2ptxTFwuoBIymVfQ31m+o4BOpz88on6xvpbHJrHv9nvmB IiQjb0RIouUQDrjdoisdcNW4cGPsr7dDNJ/Zp0aC1AvSObuJyh9RSE+kg5Do0147rlKsryKx9 U9VRJiuTBmhuFXEkhzVc9Kp5lPleI3HgNd8fOUI6QMLwD5qaeY5HJBKbC/hpP6p7t6wS5iqHW FcxBV9kHKizk693PEVPs2Xu32Ntc228myaLXv6U4P16tc30tOtp1FWGqa5d8tEtmdjpPSJlyn HxtwT1bNHQGdXcgIp3ahAuSXYR+uMc7ywsCEU1WpJudbp8ydahPEniOZtnqB0iitDHGn+W29H Iql3bj/p6EM2FfQBtZhlbiPnhFZWohq4KlTzLO9c0Iqy/amu+o= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> Rather, the function on 'post-command-hook' would have to be more >> intelligent - check whether the minibuffer-window is selected and >> leave the overriding action untouched in that case. > > It's possible to implement it with post-command-hook, but the > implementation will be more contorted - note that adding a hook > to post-command-hook by a command will run it immediately > at the end of this command and immediately remove the hook. The mechanism must be safe in the first place and safety means here to remove the mechanism before anything bad happens. > Whereas window-state-change-functions elegantly checks > if the window displays a new buffer. But it fails when a window gets reused. In general, any outcome of 'display-buffer' is possible, even 'allow-no-window'. As soon as 'display-buffer' returns and no change of the window state happened we are lost. >> Moreover, using 'post-command-hook' would automatically fix any >> problems when quitting an S-M-up action. I see no way to catch >> quitting via a state change of windows. > > What do you mean by quitting an S-M-up action? minibuffer-exit? Let's say anything C-g does. I'm not sure whether we can catch that always via 'minibuffer-exit-hook' though. But it should not harm to remove the overriding action in that case as well. >> I forgot to ask: If that ffap pops up completions, they will appear >> above the selected window. Right? > > Right. Since I agree this is not an expected behavior, here is a better > version without this problem. Instead of display-buffer-overriding-action, > it uses display-buffer-alist because only display-buffer-alist > supports a condition necessary to check for an active minibuffer. As a rule, code must never fiddle with 'display-buffer-alist'. If anything gets wrong, the user is left with a broken customization. If 'display-buffer-overriding-action' is not capable of handling this scenario, then it's useless and we have to provide something better anyway. Now 'display-buffer-overriding-action' has the same deficiencies as 'pop-up-frames' and 'pop-up-windows'. If you bind them around a minibuffer interaction needed to find the buffer to display, you affect that minibuffer interaction and any recursive 'display-buffer' call that interaction emits too. So what we need is a mechanism that (1) specifies a display action for a buffer whose identity has not been specified yet at the time 'display-buffer' (or one of its callers) gets called and (2) does not affect any calls of 'display-buffer' needed to get the identity of the buffer needed by (1). I think we agree on that. So we want to delay the effect of 'display-buffer-overriding-action' until it applies to the buffer the user had in mind when activating the key combination. Since we don't know the name of the buffer yet (and in the worst case the name of the buffer the user wants to display in a specific position is that of a buffer needed to find the name), we need some sort of workaround. I'm afraid we have to agree on that as well. I'm not sure whether checking 'minibuffer-depth' within the function put on 'display-buffer-overriding-action' is sufficient. That is, have the overriding action take effect iff the depth is zero. Please check that first (I have no idea why you didn't try that before and went for setting 'display-buffer-alist' instead). If it doesn't help, we could equip 'display-buffer' itself with some sort of recursion depth and allow the S-M- combination to apply only when the level is zero. We'd need some sort of escape to reset that depth when a user aborts the buffer display action. And it obviously would disallow recursive application of the S-M- mechanism (like the 'minibuffer-depth' check approach). So hopefully we find something better. But as soon as we have found a solution, we could provide prefixes to handle all sorts of -same-window/-other-window/-other-frame and the default display in a similar fashion. martin From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 30 17:53:31 2018 Received: (at 32790) by debbugs.gnu.org; 30 Oct 2018 21:53:31 +0000 Received: from localhost ([127.0.0.1]:55974 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHbx5-0000yY-EF for submit@debbugs.gnu.org; Tue, 30 Oct 2018 17:53:31 -0400 Received: from glow.birch.relay.mailchannels.net ([23.83.209.71]:52782) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHbx2-0000yM-0U for 32790@debbugs.gnu.org; Tue, 30 Oct 2018 17:53:29 -0400 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 8459C5C3D60; Tue, 30 Oct 2018 21:53:26 +0000 (UTC) Received: from pdx1-sub0-mail-a74.g.dreamhost.com (unknown [100.96.33.121]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id B91CB5C3EFA; Tue, 30 Oct 2018 21:53:24 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a74.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); Tue, 30 Oct 2018 21:53:26 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Squirrel-Power: 693a2aee015d0d36_1540936404980_3742752086 X-MC-Loop-Signature: 1540936404979:2201527062 X-MC-Ingress-Time: 1540936404979 Received: from pdx1-sub0-mail-a74.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a74.g.dreamhost.com (Postfix) with ESMTP id 284FF80AD7; Tue, 30 Oct 2018 14:53:23 -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=8nTTtmMW/yFLSNfBmL0l06xUiVQ=; b= fyWXa4R1nPdyxAAwfeC3TBRXREVNT1ewNyqX2URBJYdOtcqKJjl2W4AfG6i3HpUg sNUbYM43Bu815qsmfUrk/yDih5opRjx4PTnfc7Badb28NnjTWF7KyfZ5afNPv7K6 OI2LzosuNvLVCxZIDDo8gXYYRoqKHwP8BY7uxTb9Q4k= Received: from mail.jurta.org (m91-129-101-157.cust.tele2.ee [91.129.101.157]) (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-a74.g.dreamhost.com (Postfix) with ESMTPSA id B14227F273; Tue, 30 Oct 2018 14:53:21 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a74 From: Juri Linkov To: martin rudalics Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Organization: LINKOV.NET References: <87efdnsp2k.fsf@mail.linkov.net> <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> <87in1phhx2.fsf@mail.linkov.net> <5BD2C52E.2060607@gmx.at> <87ftwrgwp2.fsf@mail.linkov.net> <5BD57A8D.8080408@gmx.at> <875zxmx95h.fsf@mail.linkov.net> <5BD70F14.8080509@gmx.at> <87lg6g750v.fsf@mail.linkov.net> <5BD81D97.2000000@gmx.at> Date: Tue, 30 Oct 2018 23:42:07 +0200 In-Reply-To: <5BD81D97.2000000@gmx.at> (martin rudalics's message of "Tue, 30 Oct 2018 10:00:07 +0100") Message-ID: <87bm7bru1c.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedriedtgdduhedvucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutddurdduheejnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtuddrudehjedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgepvd X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>> Moreover, using 'post-command-hook' would automatically fix any >>> problems when quitting an S-M-up action. I see no way to catch >>> quitting via a state change of windows. >> >> What do you mean by quitting an S-M-up action? minibuffer-exit? > > Let's say anything C-g does. I'm not sure whether we can catch that > always via 'minibuffer-exit-hook' though. But it should not harm to > remove the overriding action in that case as well. Ok, after a small change it handles also C-g: (defun display-buffer-directionally () "Specify in which direction the buffer should be displayed. Arrows show the direction. Mod-0 forces to display in the same window." (interactive) (let* ((dir (event-basic-type (aref (this-command-keys) 0))) (win (if (eq dir ?0) (selected-window) (or (window-in-direction dir) (split-window nil nil dir))))) (let ((hook (list 'lambda))) (setcdr hook `(() (unless (or ;; Remove the hook immediately ;; after exiting the minibuffer. (> (minibuffer-depth) 0) ;; But don't remove immediately after ;; adding the hook by the same command. (eq this-command ',this-command)) (setq display-buffer-overriding-action ',display-buffer-overriding-action) (remove-hook 'post-command-hook ',hook)))) (add-hook 'post-command-hook hook)) (setq display-buffer-overriding-action `((lambda (buffer alist) (unless (> (minibuffer-depth) 0) (window--display-buffer buffer ,win 'reuse alist))))))) From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 31 04:12:09 2018 Received: (at 32790) by debbugs.gnu.org; 31 Oct 2018 08:12:09 +0000 Received: from localhost ([127.0.0.1]:56235 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHlbl-00037X-8q for submit@debbugs.gnu.org; Wed, 31 Oct 2018 04:12:09 -0400 Received: from mout.gmx.net ([212.227.15.19]:59947) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHlbj-000374-Uk for 32790@debbugs.gnu.org; Wed, 31 Oct 2018 04:12:08 -0400 Received: from [192.168.1.101] ([213.162.73.82]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Lp3Lw-1ffQZw0XCe-00es5T; Wed, 31 Oct 2018 09:12:00 +0100 Received: from [192.168.1.101] ([213.162.73.82]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Lp3Lw-1ffQZw0XCe-00es5T; Wed, 31 Oct 2018 09:12:00 +0100 Message-ID: <5BD963C8.9090905@gmx.at> Date: Wed, 31 Oct 2018 09:11:52 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <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> <87in1phhx2.fsf@mail.linkov.net> <5BD2C52E.2060607@gmx.at> <87ftwrgwp2.fsf@mail.linkov.net> <5BD57A8D.8080408@gmx.at> <875zxmx95h.fsf@mail.linkov.net> <5BD70F14.8080509@gmx.at> <87lg6g750v.fsf@mail.linkov.net> <5BD81D97.2000000@gmx.at> <87bm7bru1c.fsf@mail.linkov.net> In-Reply-To: <87bm7bru1c.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:elkrpoxZKcq99RcNfkc3rdeja/+v5Nn37mnSLt7eCsmkpxZ4abl SxAA1I2IlMaTR8vvXOXBAwxAgSST3z77p0CZ5vwQJbOjl5+dT0s52YkKrgdPG3NnkfhqRkW e5w4YyK/ZZI5Ta9TuWXiY56arsG/FLcldtfqxf4e0bqH+gLHn009XJYbRdBJ06mSHPwio3/ DYsyWxX2PS64/vrKAH04A== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:8qr4FCzZPl4=:Ax/x6BPfV+1fgl4hn6sYeE pJ08c/OVGYf3nk1CdmULjX3XOnx3Wn5wef6Ek+Mf7sBGObutDsQAF1JfjOMf1BUqYwUKq7bcj GPO3l2512oRwDwfrpTZudC5nIy7Hf29LWIEsza8mmbAGA2VSZ4jK4xrkPMzh0MzLWWeGWSffG lmlesKQOPOf7l5ZvouhHJ41EpPnbjrYdG5C7Im3IoBNk/MVaSK7duYQF9yIjShCnGzSB+Y4Yf kUvvmEjc1avb3zrcty+x6BL8gJlc9H5iGQkIdiDr8z4u4jNwkAGeHJs08HbzY141EmUmBG8Ba NYYyCgLvDNZM6GyAP61uswXl/OBBke406joEs5raKtTKUztLhDXKKtXWUZ16Deqob5kNoTIHJ x+zGD461r97usdo9FqFAO0A7jp8HGu+nv3A+Y6u9FSyL9dH8luzNeGlSxJnn0vyFN9kf9SOlW mMJDE1FCBELHEy24lZ10gxYAApV9yQ/3TnyOKTFYJAhMMtedmsQNQZaJAZotB2ev8yKLzRgNa scTGXlkFDV00NLPRdllylWQF75Ib4Sdr7iNjqQgrqh395WC1gJsw8gBpB0ciHdUoSrlKwUKfw VtwoGCMeOiHUHlH8sUEuKM0NbcKuFe6nn++faeTxrBuUIE+YRy2BoXLL7DOGged9X3UvtfS3P cV+QFPEdBzBkyCfNeEGN6FbD4ZgC/OUyW0yx85ZrsnimnK0QLCHQxDFK1EOHEUkUxif97Ppum 8zekjDz8BSlJMLMezsuCHW9f9YvNiV3HujiZEbLVhW0k1zsLPQItw1xaYYNaeHlU3+CgbdsKr 0GjyrCq1VmoMPd+2rrqhlnSCwQXjh7vwjp/1l6usR1BCnjKPDc= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > Ok, after a small change it handles also C-g: I forgot (or never learned) how to use it. Can you please include an example so people can try it. > (defun display-buffer-directionally () > "Specify in which direction the buffer should be displayed. > Arrows show the direction. Mod-0 forces to display in the same window." > (interactive) > (let* ((dir (event-basic-type (aref (this-command-keys) 0))) > (win (if (eq dir ?0) > (selected-window) > (or (window-in-direction dir) > (split-window nil nil dir))))) > (let ((hook (list 'lambda))) > (setcdr hook `(() > (unless (or > ;; Remove the hook immediately > ;; after exiting the minibuffer. > (> (minibuffer-depth) 0) > ;; But don't remove immediately after > ;; adding the hook by the same command. > (eq this-command ',this-command)) Can you give the rationale for the latter? I don't grok it. > (setq display-buffer-overriding-action > ',display-buffer-overriding-action) > (remove-hook 'post-command-hook ',hook)))) > (add-hook 'post-command-hook hook)) > (setq display-buffer-overriding-action > `((lambda (buffer alist) > (unless (> (minibuffer-depth) 0) > (window--display-buffer buffer ,win 'reuse alist))))))) 'reuse' holds only for the ?0 case. When we split, the third argument should be 'window'. martin From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 31 17:36:36 2018 Received: (at 32790) by debbugs.gnu.org; 31 Oct 2018 21:36:37 +0000 Received: from localhost ([127.0.0.1]:57509 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHyAG-0007SB-NC for submit@debbugs.gnu.org; Wed, 31 Oct 2018 17:36:36 -0400 Received: from coral.maple.relay.mailchannels.net ([23.83.214.39]:10014) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHyAB-0007Rs-W2 for 32790@debbugs.gnu.org; Wed, 31 Oct 2018 17:36:32 -0400 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 3F0155C38A5; Wed, 31 Oct 2018 21:36:30 +0000 (UTC) Received: from pdx1-sub0-mail-a37.g.dreamhost.com (unknown [100.96.33.121]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id EB2945C3EE2; Wed, 31 Oct 2018 21:36:29 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a37.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); Wed, 31 Oct 2018 21:36:30 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Belong-Left: 03292a301638cd9d_1541021790097_2739480210 X-MC-Loop-Signature: 1541021790097:1618976781 X-MC-Ingress-Time: 1541021790096 Received: from pdx1-sub0-mail-a37.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a37.g.dreamhost.com (Postfix) with ESMTP id 9E81B7FE57; Wed, 31 Oct 2018 14:36:29 -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=r+3BqYkSJs3iqBu5+1r4tTHDKa8=; b= 1WLJrvhmRr5nkpsMwkc9OV84XVPrmHE+8OEC7dv/WnymnJZ+OcRoIXTDDVSOBcm0 MzUuWYUli7NnhCIXuU0hCBXTNtN2erQ0clei65IrEgTGaIIUyMvevcW/rGI0wco7 W78JsMksxZU1eleoqg/KJnYCiS6Ex4pepeFFGD00pNA= Received: from mail.jurta.org (m91-129-101-157.cust.tele2.ee [91.129.101.157]) (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-a37.g.dreamhost.com (Postfix) with ESMTPSA id 5A8427FE49; Wed, 31 Oct 2018 14:36:27 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a37 From: Juri Linkov To: martin rudalics Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Organization: LINKOV.NET References: <87efdnsp2k.fsf@mail.linkov.net> <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> <87in1phhx2.fsf@mail.linkov.net> <5BD2C52E.2060607@gmx.at> <87ftwrgwp2.fsf@mail.linkov.net> <5BD57A8D.8080408@gmx.at> <875zxmx95h.fsf@mail.linkov.net> <5BD70F14.8080509@gmx.at> <87lg6g750v.fsf@mail.linkov.net> <5BD81D97.2000000@gmx.at> <87bm7bru1c.fsf@mail.linkov.net> <5BD963C8.9090905@gmx.at> Date: Wed, 31 Oct 2018 23:20:13 +0200 In-Reply-To: <5BD963C8.9090905@gmx.at> (martin rudalics's message of "Wed, 31 Oct 2018 09:11:52 +0100") Message-ID: <87h8h195ki.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedrieegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutddurdduheejnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtuddrudehjedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgeptd X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> Ok, after a small change it handles also C-g: > > I forgot (or never learned) how to use it. Can you please include an > example so people can try it. An example is this: (let ((modifiers '(shift meta))) (dolist (key '(left right up down ?0)) (define-key global-map (vector (append modifiers (list key))) 'display-buffer-directionally))) >> ;; But don't remove immediately after >> ;; adding the hook by the same command. >> (eq this-command ',this-command)) > > Can you give the rationale for the latter? I don't grok it. When display-buffer-directionally is called, it adds the hook to post-command-hook, and when display-buffer-directionally finishes, post-command-hook is called, and immediately removes itself from post-command-hook. This condition ensures that the hook is removed only when post-command-hook is called after a next command finishes (while the minibuffer is inactive). >> (setq display-buffer-overriding-action >> ',display-buffer-overriding-action) >> (remove-hook 'post-command-hook ',hook)))) >> (add-hook 'post-command-hook hook)) >> (setq display-buffer-overriding-action >> `((lambda (buffer alist) >> (unless (> (minibuffer-depth) 0) >> (window--display-buffer buffer ,win 'reuse alist))))))) > > 'reuse' holds only for the ?0 case. When we split, the third argument > should be 'window'. I noticed that when replaced with (window--display-buffer buffer ,win ',(if (eq dir ?0) 'reuse 'window) alist) then 'window means that killing the buffer will delete its window. Another observation is that switch-to-buffer is unaffected by this command. From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 01 05:03:41 2018 Received: (at 32790) by debbugs.gnu.org; 1 Nov 2018 09:03:41 +0000 Received: from localhost ([127.0.0.1]:57725 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gI8tB-0003Fe-EQ for submit@debbugs.gnu.org; Thu, 01 Nov 2018 05:03:41 -0400 Received: from mout.gmx.net ([212.227.17.20]:36007) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gI8t9-0003FS-TW for 32790@debbugs.gnu.org; Thu, 01 Nov 2018 05:03:40 -0400 Received: from [192.168.1.101] ([46.125.250.45]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0M6SE3-1fKIAr0q4J-00yUDy; Thu, 01 Nov 2018 10:03:30 +0100 Received: from [192.168.1.101] ([46.125.250.45]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0M6SE3-1fKIAr0q4J-00yUDy; Thu, 01 Nov 2018 10:03:30 +0100 Message-ID: <5BDAC159.1060008@gmx.at> Date: Thu, 01 Nov 2018 10:03:21 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <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> <87in1phhx2.fsf@mail.linkov.net> <5BD2C52E.2060607@gmx.at> <87ftwrgwp2.fsf@mail.linkov.net> <5BD57A8D.8080408@gmx.at> <875zxmx95h.fsf@mail.linkov.net> <5BD70F14.8080509@gmx.at> <87lg6g750v.fsf@mail.linkov.net> <5BD81D97.2000000@gmx.at> <87bm7bru1c.fsf@mail.linkov.net> <5BD963C8.9090905@gmx.at> <87h8h195ki.fsf@mail.linkov.net> In-Reply-To: <87h8h195ki.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:5eo6X/BSOKxKv+fkaB9M8td1VDO/h7sF06gSkB+KZpiRhUNFriP R4wsQn4stlw2yDcumI+aSty1W1v4tiVNyU5nQgrQmaaMuKR7UOlmQhfRS9I1Fh4CTcedrFy UKSBMF3ocQNtw7fnN4+icZgPcKeeCLuCJ4TjPC1gi3buMQVqMshDN1S/gaYaKyGIto6Sw/J 9GufysEnqgkuqDSBPNlWg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:gZltGUJN6Xw=:mBYNdEkP+ZbQV5ycJw+0Ju Bp0HpMnBaE7iNr39c8/JCUIvR+Mcl4iyq1k1GXAR4ikWJ0tMO5zqm/3+SGYRwHSMLPmBNglIg csEc0pjhBbOk3PbQTpNnIOGwoKDZ6WMP5pLwYsDfj3FXeYOOm1dLbdxgxpoGy/nq6r08u+/Eh wUx5Zqt3ywn/GtR5kFVLFMr1a/13Jqfk3eIwXqsbkUAjnpXqDe7QjqGeHE2P28M+qOoZAKvnK zig7MZOZLB5fkom3/35VphwjStIRi9bcYDY6dmDudvA0DKmbx0H1swdVImvMu0NV+nHiUrJdI J8fiORtM7Xt4vyvyAGPdF0mCvYcdE638A201pVtr9yicL0cBYwiL4TFlfJK13uicoT8j6R9cO dat8Ym4BBlxHB19XEE2ICCAWhgFfPp77Fz+5II3Kv14/ZqzM88hC0GdIr4K8FMtN14L82PkQ5 GfgK7zKolp5oI2VV2jhbrohL8LRFZVUFKTAcYBYKs55n7YWOe9/iptp6nOq0RWDxGtdGA8evP JAOkKpkWklFMnObl/3IvdEGGmHeI+/xv5CyMW6H3dbTxXJEM1dfIQjH8DVCnedcRZd3JTaN85 7pvO/VO+uaqNOHvoYYprwEZ5EKzixoXymQJnWftXDdY4I5Y2+Nnx9boOUYVDIv65o67ip21Z3 VKaQVQwRfnXUnMjHtb2pQNGDb0J7rkuonjQWJ1CoNksfPV/gFhYZqpkSmyjRmACqllpmqYH25 FBnrZwrjSJdbXKDmWRXlF4R5iSnw3J8ZKDFK+p8aC/XpJf1TXjsQCBg3CdTHO8gYfeHlVzOtp 102n0+aC4yXdxcDlTd2UgQKhsRKHXOjFji7/Fnpdf+9EltOq9hUiL3iZ/aOx1npEH/tlnLjkl 6Ue4fAARAHAYmQ5sO2+Tz57F3j+LjGKSlgEkZ9KSFz5NZ5Jgz+vEgKZI0hHDm2 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> I forgot (or never learned) how to use it. Can you please include an >> example so people can try it. > > An example is this: [...] Yes. But when I now try your earlier example S-M-up M-x ffap RET RET with emacs -Q, after the S-M-up the *scratch* window is just split. What am I missing? > When display-buffer-directionally is called, it adds the hook > to post-command-hook, and when display-buffer-directionally finishes, > post-command-hook is called, and immediately removes itself from > post-command-hook. This condition ensures that the hook is removed > only when post-command-hook is called after a next command finishes > (while the minibuffer is inactive). Can you give an example of a sequence of events how this should work in practice and which scenario it is supposed to avoid? The term "next command" is not clear to me here. And wouldn't it be more intuitive to check the minibuffer depth instead? That is, let the lambda succeed to do its job iff the current value of 'minibuffer-depth' equals the value of 'minibuffer-depth' at the time 'display-buffer-overriding-action' was set to the lambda. >>> (window--display-buffer buffer ,win 'reuse alist))))))) >> >> 'reuse' holds only for the ?0 case. When we split, the third argument >> should be 'window'. > > I noticed that when replaced with > > (window--display-buffer buffer ,win ',(if (eq dir ?0) 'reuse 'window) alist) > > then 'window means that killing the buffer will delete its window. What's bad about that? What else do you want the window to show? If the window got reused, it's natural to show the buffer it showed previously. If the window was created anew, it's the most natural thing to delete it when its buffer gets killed. If we want to change that, we can add an option. But the way you do it, you completely mess up the semantics of the 'quit-restore' mechanism by faking its history. > Another observation is that switch-to-buffer is unaffected by this command. As long as it does not end up calling 'display-buffer', yes. martin From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 01 18:46:42 2018 Received: (at 32790) by debbugs.gnu.org; 1 Nov 2018 22:46:42 +0000 Received: from localhost ([127.0.0.1]:59012 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gILje-0006SA-Eb for submit@debbugs.gnu.org; Thu, 01 Nov 2018 18:46:42 -0400 Received: from glass.birch.relay.mailchannels.net ([23.83.209.70]:33086) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gILjb-0006Ry-Sm for 32790@debbugs.gnu.org; Thu, 01 Nov 2018 18:46:40 -0400 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 90619501D5B; Thu, 1 Nov 2018 22:46:38 +0000 (UTC) Received: from pdx1-sub0-mail-a35.g.dreamhost.com (unknown [100.96.30.62]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 4E80E502965; Thu, 1 Nov 2018 22:46:38 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a35.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, 01 Nov 2018 22:46:38 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Minister-Eyes: 2bbe1b262be9d479_1541112398415_3180785655 X-MC-Loop-Signature: 1541112398415:3409762107 X-MC-Ingress-Time: 1541112398415 Received: from pdx1-sub0-mail-a35.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a35.g.dreamhost.com (Postfix) with ESMTP id 1823D7F4DE; Thu, 1 Nov 2018 15:46:38 -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=8/XQKV3bcQQjhzF1jh5KJUzzObA=; b= CdDKjkuGWsSrxThhT57G+qFK4drIESpHRdY/dxd8MDmV4tXXWReMwY4kcBXawECw iCQEMVwSq4ueR5OaaM+p5HGP5BMvWQrdp3lToBCXwg1Nn/k8aX+5d14+EAX4sr0a 8hJqTn6Y26Or1FOq67XnFjgibTMqeVA3K9OGZqePNZU= Received: from mail.jurta.org (m91-129-101-157.cust.tele2.ee [91.129.101.157]) (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-a35.g.dreamhost.com (Postfix) with ESMTPSA id D56047F4DB; Thu, 1 Nov 2018 15:46:35 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a35 From: Juri Linkov To: martin rudalics Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Organization: LINKOV.NET References: <87efdnsp2k.fsf@mail.linkov.net> <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> <87in1phhx2.fsf@mail.linkov.net> <5BD2C52E.2060607@gmx.at> <87ftwrgwp2.fsf@mail.linkov.net> <5BD57A8D.8080408@gmx.at> <875zxmx95h.fsf@mail.linkov.net> <5BD70F14.8080509@gmx.at> <87lg6g750v.fsf@mail.linkov.net> <5BD81D97.2000000@gmx.at> <87bm7bru1c.fsf@mail.linkov.net> <5BD963C8.9090905@gmx.at> <87h8h195ki.fsf@mail.linkov.net> <5BDAC159.1060008@gmx.at> Date: Fri, 02 Nov 2018 00:42:57 +0200 In-Reply-To: <5BDAC159.1060008@gmx.at> (martin rudalics's message of "Thu, 01 Nov 2018 10:03:21 +0100") Message-ID: <87muqsh11q.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedrieeigdduudcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddtuddrudehjeenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutddurdduheejpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtoheprhhuuggrlhhitghssehgmhigrdgrthenucevlhhushhtvghrufhiiigvpedu X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: >>> I forgot (or never learned) how to use it. Can you please include an >>> example so people can try it. >> >> An example is this: > [...] > > Yes. But when I now try your earlier example > > S-M-up M-x ffap RET RET > > with emacs -Q, after the S-M-up the *scratch* window is just split. > What am I missing? [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [23.83.209.70 listed in list.dnswl.org] 1.3 RCVD_IN_RP_RNBL RBL: Relay in RNBL, https://senderscore.org/blacklistlookup/ [23.83.209.70 listed in bl.score.senderscore.com] X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) >>> I forgot (or never learned) how to use it. Can you please include an >>> example so people can try it. >> >> An example is this: > [...] > > Yes. But when I now try your earlier example > > S-M-up M-x ffap RET RET > > with emacs -Q, after the S-M-up the *scratch* window is just split. > What am I missing? This is intended behavior - the window is split, so you can see the window where a new buffer will be displayed after you invoke the next command (e.g. 'ffap'). >> When display-buffer-directionally is called, it adds the hook >> to post-command-hook, and when display-buffer-directionally finishes, >> post-command-hook is called, and immediately removes itself from >> post-command-hook. This condition ensures that the hook is removed >> only when post-command-hook is called after a next command finishes >> (while the minibuffer is inactive). > > Can you give an example of a sequence of events how this should work > in practice and which scenario it is supposed to avoid? The term > "next command" is not clear to me here. An example of "next command" is 'ffap' in the earlier example. > And wouldn't it be more intuitive to check the minibuffer depth > instead? That is, let the lambda succeed to do its job iff the > current value of 'minibuffer-depth' equals the value of > 'minibuffer-depth' at the time 'display-buffer-overriding-action' was > set to the lambda. Yes, this will allow using S-M-up from the active minibuffer. >>>> (window--display-buffer buffer ,win 'reuse alist))))))) >>> >>> 'reuse' holds only for the ?0 case. When we split, the third argument >>> should be 'window'. >> >> I noticed that when replaced with >> >> (window--display-buffer buffer ,win ',(if (eq dir ?0) 'reuse 'window) alist) >> >> then 'window means that killing the buffer will delete its window. > > What's bad about that? What else do you want the window to show? If > the window got reused, it's natural to show the buffer it showed > previously. If the window was created anew, it's the most natural > thing to delete it when its buffer gets killed. If we want to change > that, we can add an option. But the way you do it, you completely > mess up the semantics of the 'quit-restore' mechanism by faking its > history. Yes, killing the buffer without deleting its window will display some random buffer in its place - this is bad. >> Another observation is that switch-to-buffer is unaffected by this command. > > As long as it does not end up calling 'display-buffer', yes. I'm not sure if switch-to-buffer should use pop-to-buffer-same-window, probably not. From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 02 04:45:09 2018 Received: (at 32790) by debbugs.gnu.org; 2 Nov 2018 08:45:09 +0000 Received: from localhost ([127.0.0.1]:59240 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gIV4m-0006Qe-T7 for submit@debbugs.gnu.org; Fri, 02 Nov 2018 04:45:09 -0400 Received: from mout.gmx.net ([212.227.15.15]:55749) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gIV4k-0006Pw-Lc for 32790@debbugs.gnu.org; Fri, 02 Nov 2018 04:45:07 -0400 Received: from [192.168.1.101] ([213.162.73.248]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LyEqr-1fVX6F2dl7-015cNd; Fri, 02 Nov 2018 09:44:58 +0100 Received: from [192.168.1.101] ([213.162.73.248]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LyEqr-1fVX6F2dl7-015cNd; Fri, 02 Nov 2018 09:44:58 +0100 Message-ID: <5BDC0E81.1050806@gmx.at> Date: Fri, 02 Nov 2018 09:44:49 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <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> <87in1phhx2.fsf@mail.linkov.net> <5BD2C52E.2060607@gmx.at> <87ftwrgwp2.fsf@mail.linkov.net> <5BD57A8D.8080408@gmx.at> <875zxmx95h.fsf@mail.linkov.net> <5BD70F14.8080509@gmx.at> <87lg6g750v.fsf@mail.linkov.net> <5BD81D97.2000000@gmx.at> <87bm7bru1c.fsf@mail.linkov.net> <5BD963C8.9090905@gmx.at> <87h8h195ki.fsf@mail.linkov.net> <5BDAC159.1060008@gmx.at> <87muqsh11q.fsf@mail.linkov.net> In-Reply-To: <87muqsh11q.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:yMqvnftGoCx+XIS/BKST3D+apag00R0ni7rfqMsqoh5rjsTzE9O Yf/20VadhJgDsBm5BTOTywgnW79C5JoTHVCa1zl3Lv3j2xkYyIN0gKvxnCy/oBPDQg5J8z6 UYwnxs1tg0nHk4ryXzFLE+DMjd7XDxYKiycHFqQlGe2+D9w37iNjOVSQn9zwBG43phy8XLI XLsIABf4sW4ybTJzuPjtQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:pwnaoc9rp6I=:dHfU8/Wr8wuuNpwYAUuPk2 dZatBwf58azxiCCKsmb6wD5b/AFtvM1m8juQ6GtWiXrzNsOu12p2PFj0LSeeW8n0Qk9IQUCKp ELnXd4vpd18RVrFeZUIk/dK0Wdx0i+C1O4RzY21jEyppc1/rbrM0/YIum6QTes/OO/7JoCaud kAlZ/lFwXa4Q5ALvx/hnghgA/k3EnI23wa/s4t5RErunELqZcK57ddHdyWRPcsDcsw/VIpbWi A3S0wl7i0QVEuxx8D9M/V4LTwKeLPEhGDz8E/1XZh46ci1JeVT0+luxKfzQZfB1fOSiZ9BeFJ NdaBkSx0Nz6570kACHXjPRg1QZI+I7uTWfcuW0lWDkGqozsFNaNJ5NVaJ3zqaNc4G1dvT6bTz O2y2dX87K5sZ1xKjQ+VYzkAAZnQhjjyZrogAae4pbvYpSfZn8Gq5nrpUKWMyslbOzS+hYSIGy b8hSpwppW0/agdKaW5WHM7lHmcjIG1nayljhaGpWkqw2N14BHN1Y90xxSz3EN1qRl/Y9gh+E+ xGYwAIw49QWuo5UmtRi72bFKmfej2thpFWx95t9w6e0/Mmi2am18QHpjbND1Ikq5naNEl8Nkg XrNKh8IyEH+eO2twX5DWu2Vk7DUJ93hW3tHDYxN+hfUAVd/CoOSBAYCjJP06hbwoxfC8XRbo5 2uZ1i2eSXKvr5+/Cwh1eJhyrcDOQdCYt/zqwopvuJOawOZkvHPTiwT3xY8Tnj3dEyil3gY/cP qLLdUHcXNZu/5DH53FCoSSTKto/2UKg6L7s67Dg9ms/zo/SIkLPGLkKBJS6hSaPSicgxBO1L5 m+S+MVR5t8V0c1JBShMpVaM+DbNg9shsc89aDxJU/+YAgGFTXU= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> S-M-up M-x ffap RET RET >> >> with emacs -Q, after the S-M-up the *scratch* window is just split. >> What am I missing? > > This is intended behavior - the window is split, so you can see the > window where a new buffer will be displayed after you invoke > the next command (e.g. 'ffap'). Looks uncomfortable, unprofessional. Do you think we can ever sell that? >> Can you give an example of a sequence of events how this should work >> in practice and which scenario it is supposed to avoid? The term >> "next command" is not clear to me here. > > An example of "next command" is 'ffap' in the earlier example. I understand now. >> And wouldn't it be more intuitive to check the minibuffer depth >> instead? That is, let the lambda succeed to do its job iff the >> current value of 'minibuffer-depth' equals the value of >> 'minibuffer-depth' at the time 'display-buffer-overriding-action' was >> set to the lambda. > > Yes, this will allow using S-M-up from the active minibuffer. I had that in mind as a side-effect. But we should really get rid of this split-first-decide-what-to-put-there-afterwards approach first. > Yes, killing the buffer without deleting its window will display > some random buffer in its place - this is bad. We could display a buffer that was previously shown in that window if there is one. But I think that such a buffer might be there just due to a temporary excursion so I don't think it's a good idea. > I'm not sure if switch-to-buffer should use pop-to-buffer-same-window, > probably not. 'switch-to-buffer' obeys 'switch-to-buffer-preserve-window-point' while 'pop-to-buffer-same-window' doesn't. That's the main reason to keep the present code (and one reason to replace 'switch-to-buffer' with 'pop-to-buffer-same-window' in Lisp code). There is also that special handling of dedicated windows but I doubt it's ever needed in practice. Dedicated windows are Stefan's department and while I had to live with the ugliness of 'display-buffer-mark-dedicated' it also relieved me from caring about specifying dedicatedness in buffer display elsewhere. martin From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 02 10:36:44 2018 Received: (at 32790) by debbugs.gnu.org; 2 Nov 2018 14:36:44 +0000 Received: from localhost ([127.0.0.1]:60319 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gIaZ2-0002Pn-DZ for submit@debbugs.gnu.org; Fri, 02 Nov 2018 10:36:44 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:60500) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gIaZ1-0002Pa-LG for 32790@debbugs.gnu.org; Fri, 02 Nov 2018 10:36:44 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id wA2EXh4f172790; Fri, 2 Nov 2018 14:36:37 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=q5qHS+FhVRl847sDtMdz34rqfRH6GNLd53psTrJ8i6Q=; b=G9OjJYvjpCNQpM0Y7+JKAoefcdoTNKbB+ETCepbsuZrPHa8Lvo2hBnSbx+5nhAB/RfCU 7A+g70K7tw3c5z2tzM+0O5nN1kppCJd06+7Ur9LHcZY098JyBlwzkeRQ9dQHUJP4PM3m oxe3I8A5fS/VSeE/uPFmaWVpIlWDMCZB7ERvNagE7jb7IAjdX5y8GhVdgFK6deTR1sdm Mlls4tJFtxaP21I4nj7meM4p2u055AOHhbhYb2438oBK+6GN550T0mV6MX6P6mSeb1mX 3FOQQQvLzkZevFUke+I8yhoNof2Si9MKg7s++564m9VxLW97wlLlkPaKePYQaVy0MEo1 +Q== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp2120.oracle.com with ESMTP id 2ncgnreu9t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 02 Nov 2018 14:36:37 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id wA2EaaZV003876 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 2 Nov 2018 14:36:36 GMT Received: from abhmp0004.oracle.com (abhmp0004.oracle.com [141.146.116.10]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id wA2EaZc1019356; Fri, 2 Nov 2018 14:36:35 GMT MIME-Version: 1.0 Message-ID: <3027ced3-4c59-4871-89f2-21aaccd75de5@default> Date: Fri, 2 Nov 2018 07:36:34 -0700 (PDT) From: Drew Adams To: martin rudalics , Juri Linkov Subject: RE: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <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> <87in1phhx2.fsf@mail.linkov.net> <5BD2C52E.2060607@gmx.at> <87ftwrgwp2.fsf@mail.linkov.net> <5BD57A8D.8080408@gmx.at> <875zxmx95h.fsf@mail.linkov.net> <5BD70F14.8080509@gmx.at> <87lg6g750v.fsf@mail.linkov.net> <5BD81D97.2000000@gmx.at> <87bm7bru1c.fsf@mail.linkov.net> <5BD963C8.9090905@gmx.at> <87h8h195ki.fsf@mail.linkov.net> <5BDAC159.1060008@gmx.at> <87muqsh11q.fsf@mail.linkov.net> <5BDC0E81.1050806@gmx.at> In-Reply-To: <5BDC0E81.1050806@gmx.at> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4756.0 (x86)] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9064 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=789 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1811020133 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) FWIW - I distinguish interactive use of `kill-buffer' from programmatic use. Interactively I want any windows showing the buffer to disappear too. Interactively I substitute `kill-buffer-and-its-windows'. I've been doing this at least since the mid-90s. =20 Dunno whether I'm alone in this preference, or would be even if it were offered more widely. Just for reference, here's the definition I'm still using, but you can no doubt come up with something better or more recent. (defun kill-buffer-and-its-windows (buffer) "Kill BUFFER and delete its windows." (interactive (list (read-buffer "Kill buffer: " (current-buffer) 'existing))) (setq buffer (get-buffer buffer)) (if (buffer-live-p buffer) (let ((wins (get-buffer-window-list buffer nil t))) (when (kill-buffer buffer) (dolist (win wins) (when (window-live-p win) (condition-case nil (delete-window win) (error nil)))))) (when (interactive-p) (error "Cannot kill buffer. Not a live buffer: `%s'" buffer)))) From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 04 17:22:43 2018 Received: (at 32790) by debbugs.gnu.org; 4 Nov 2018 22:22:43 +0000 Received: from localhost ([127.0.0.1]:34372 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gJQn4-0001xL-Rk for submit@debbugs.gnu.org; Sun, 04 Nov 2018 17:22:43 -0500 Received: from bisque.maple.relay.mailchannels.net ([23.83.214.18]:43649) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gJQn3-0001xC-FM for 32790@debbugs.gnu.org; Sun, 04 Nov 2018 17:22:42 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 5E2E341EA6; Sun, 4 Nov 2018 22:22:39 +0000 (UTC) Received: from pdx1-sub0-mail-a60.g.dreamhost.com (unknown [100.96.19.78]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 1F55F41D8E; Sun, 4 Nov 2018 22:22:39 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a60.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); Sun, 04 Nov 2018 22:22:39 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Whimsical-Arithmetic: 7ee1d2ae7628d294_1541370159232_1874307898 X-MC-Loop-Signature: 1541370159232:4077698642 X-MC-Ingress-Time: 1541370159231 Received: from pdx1-sub0-mail-a60.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a60.g.dreamhost.com (Postfix) with ESMTP id E05B08027D; Sun, 4 Nov 2018 14:22:38 -0800 (PST) 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=PX29Ydrg5a1pJ/fTcF13oQQPLKs=; b= pcjkUiQAjINmbuimJaRl9p7joIurONZR44E7ZIDk3AWeurOb7CTto8Ol7FGyEaA3 tBPU+6UcKqC28twOAGgqoimXv9TVIx/dnvoIMq6wC2uE7p6tpD8q4ynSjynLH+Cu PJmdQRLQgPggQOa44TAwqxJqta50imNhwGqxlOqi2uY= Received: from mail.jurta.org (m91-129-101-157.cust.tele2.ee [91.129.101.157]) (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-a60.g.dreamhost.com (Postfix) with ESMTPSA id C05198027B; Sun, 4 Nov 2018 14:22:36 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a60 From: Juri Linkov To: martin rudalics Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Organization: LINKOV.NET References: <87efdnsp2k.fsf@mail.linkov.net> <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> <87in1phhx2.fsf@mail.linkov.net> <5BD2C52E.2060607@gmx.at> <87ftwrgwp2.fsf@mail.linkov.net> <5BD57A8D.8080408@gmx.at> <875zxmx95h.fsf@mail.linkov.net> <5BD70F14.8080509@gmx.at> <87lg6g750v.fsf@mail.linkov.net> <5BD81D97.2000000@gmx.at> <87bm7bru1c.fsf@mail.linkov.net> <5BD963C8.9090905@gmx.at> <87h8h195ki.fsf@mail.linkov.net> <5BDAC159.1060008@gmx.at> <87muqsh11q.fsf@mail.linkov.net> <5BDC0E81.1050806@gmx.at> Date: Mon, 05 Nov 2018 00:01:25 +0200 In-Reply-To: <5BDC0E81.1050806@gmx.at> (martin rudalics's message of "Fri, 02 Nov 2018 09:44:49 +0100") Message-ID: <87d0rkijci.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedrjeeggddtiecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddtuddrudehjeenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutddurdduheejpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtoheprhhuuggrlhhitghssehgmhigrdgrthenucevlhhushhtvghrufhiiigvpedt X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> Yes, killing the buffer without deleting its window will display >> some random buffer in its place - this is bad. > > We could display a buffer that was previously shown in that window if > there is one. But I think that such a buffer might be there just due > to a temporary excursion so I don't think it's a good idea. Actually there is some problem with the third argument 'window' of window--display-buffer: 0. emacs -Q 1. C-h e displays *Messages* in another window 2. in *scratch* eval: (window--display-buffer (get-buffer-create "test1") (next-window) 'window) displays "test1" in the window where *Messages* was displayed 3. C-x o select the window with "test1" 4. M-: (quit-window 1) the window is deleted. I'd expect that it shouldn't delete the window, but should restore the buffer previously displayed in that window, i.e. the *Messages* buffer, because this is what quit-window does when the "test1" buffer was created manually with e.g. 'C-x b test1'. From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 04 17:22:47 2018 Received: (at 32790) by debbugs.gnu.org; 4 Nov 2018 22:22:47 +0000 Received: from localhost ([127.0.0.1]:34375 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gJQn9-0001xd-31 for submit@debbugs.gnu.org; Sun, 04 Nov 2018 17:22:47 -0500 Received: from bisque.maple.relay.mailchannels.net ([23.83.214.18]:46712) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gJQn7-0001xV-8L for 32790@debbugs.gnu.org; Sun, 04 Nov 2018 17:22:45 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 301DF41F11; Sun, 4 Nov 2018 22:22:44 +0000 (UTC) Received: from pdx1-sub0-mail-a60.g.dreamhost.com (unknown [100.96.26.166]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id EDF9441F00; Sun, 4 Nov 2018 22:22:43 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a60.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); Sun, 04 Nov 2018 22:22:44 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Grain-Reign: 34e4e5d11d2c0d27_1541370164066_1426178405 X-MC-Loop-Signature: 1541370164066:355429534 X-MC-Ingress-Time: 1541370164065 Received: from pdx1-sub0-mail-a60.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a60.g.dreamhost.com (Postfix) with ESMTP id B60048027D; Sun, 4 Nov 2018 14:22:43 -0800 (PST) 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=Oq24SL/3O80ocPbWxVeDS6rsDkA=; b= FQO0PEtcl0CoXFjBAZwVtuRa4fJuAB6CFvMkgo9UHQ0eNzPxLtc+8RbmaDj5iNKU igdhTG37/sp7WeOfaLZHrb8gmD8eeLChXe4ii+0RJ8hzRaBH1n2z8iNDFlDlmld3 y8NN8tMkXCb/cac49QeQPQy/QIpr8S/yjvZRlJNxuoo= Received: from mail.jurta.org (m91-129-101-157.cust.tele2.ee [91.129.101.157]) (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-a60.g.dreamhost.com (Postfix) with ESMTPSA id 334448027B; Sun, 4 Nov 2018 14:22:41 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a60 From: Juri Linkov To: martin rudalics Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Organization: LINKOV.NET References: <87efdnsp2k.fsf@mail.linkov.net> <5BA490EA.4000502@gmx.at> <87bm8pxjcb.fsf@mail.linkov.net> <5BA74E75.8000405@gmx.at> <87zhw8nd8g.fsf@mail.linkov.net> <5BA8A143.9040604@gmx.at> <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> Date: Mon, 05 Nov 2018 00:07:35 +0200 In-Reply-To: <5BC6E52F.2070209@gmx.at> (martin rudalics's message of "Wed, 17 Oct 2018 09:30:55 +0200") Message-ID: <8736sgij28.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedrjeeggddtiecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddtuddrudehjeenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutddurdduheejpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtoheprhhuuggrlhhitghssehgmhigrdgrthenucevlhhushhtvghrufhiiigvpedt X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > Here drags the character under the cursor by one character to > the left and drags the current line up by one line. I use > for selecting the window on the left. either > deletes the window on the left of the selected window provided there > is one or makes a new window on the left of the selected window > provided the selected window is already on the left of the frame. Making a new window is especially good idea. So I implemented this feature in windmove.el: diff --git a/lisp/windmove.el b/lisp/windmove.el index 42e10b591f..69f2a9665a 100644 --- a/lisp/windmove.el +++ b/lisp/windmove.el @@ -149,6 +149,15 @@ windmove-wrap-around :type 'boolean :group 'windmove) +(defcustom windmove-create-window nil + "Whether movement off the edge of the frame creates a new window. +If this variable is set to t, moving left from the leftmost window in +a frame will create a new window on the left, and similarly for the other +directions." + :type 'boolean + :group 'windmove + :version "27.1") + ;; If your Emacs sometimes places an empty column between two adjacent ;; windows, you may wish to set this delta to 2. (defcustom windmove-window-distance-delta 1 @@ -471,8 +480,15 @@ windmove-find-other-window (defun windmove-do-window-select (dir &optional arg window) "Move to the window at direction DIR. DIR, ARG, and WINDOW are handled as by `windmove-other-window-loc'. -If no window is at direction DIR, an error is signaled." +If no window is at direction DIR, an error is signaled. +If `windmove-create-window' is non-nil, instead of signalling an error +it creates a new window at direction DIR ." (let ((other-window (windmove-find-other-window dir arg window))) + (when (and windmove-create-window + (or (null other-window) + (and (window-minibuffer-p other-window) + (not (minibuffer-window-active-p other-window))))) + (setq other-window (split-window window nil dir))) (cond ((null other-window) (user-error "No window %s from selected window" dir)) ((and (window-minibuffer-p other-window) @@ -493,7 +509,8 @@ windmove-left \"left\" is relative to the position of point in the window; otherwise it is relative to the top edge (for positive ARG) or the bottom edge \(for negative ARG) of the current window. -If no window is at the desired location, an error is signaled." +If no window is at the desired location, an error is signaled +unless `windmove-create-window' is non-nil." (interactive "P") (windmove-do-window-select 'left arg)) @@ -504,7 +521,8 @@ windmove-up is relative to the position of point in the window; otherwise it is relative to the left edge (for positive ARG) or the right edge (for negative ARG) of the current window. -If no window is at the desired location, an error is signaled." +If no window is at the desired location, an error is signaled +unless `windmove-create-window' is non-nil." (interactive "P") (windmove-do-window-select 'up arg)) @@ -515,7 +533,8 @@ windmove-right \"right\" is relative to the position of point in the window; otherwise it is relative to the top edge (for positive ARG) or the bottom edge (for negative ARG) of the current window. -If no window is at the desired location, an error is signaled." +If no window is at the desired location, an error is signaled +unless `windmove-create-window' is non-nil." (interactive "P") (windmove-do-window-select 'right arg)) @@ -526,7 +545,8 @@ windmove-down \"down\" is relative to the position of point in the window; otherwise it is relative to the left edge (for positive ARG) or the right edge \(for negative ARG) of the current window. -If no window is at the desired location, an error is signaled." +If no window is at the desired location, an error is signaled +unless `windmove-create-window' is non-nil." (interactive "P") (windmove-do-window-select 'down arg)) From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 04 17:22:51 2018 Received: (at 32790) by debbugs.gnu.org; 4 Nov 2018 22:22:51 +0000 Received: from localhost ([127.0.0.1]:34378 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gJQnD-0001xu-Dm for submit@debbugs.gnu.org; Sun, 04 Nov 2018 17:22:51 -0500 Received: from bisque.maple.relay.mailchannels.net ([23.83.214.18]:59509) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gJQnB-0001xm-My for 32790@debbugs.gnu.org; Sun, 04 Nov 2018 17:22:50 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id A361F5C3863; Sun, 4 Nov 2018 22:22:48 +0000 (UTC) Received: from pdx1-sub0-mail-a60.g.dreamhost.com (unknown [100.96.19.74]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 4E6255C39B7; Sun, 4 Nov 2018 22:22:48 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a60.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); Sun, 04 Nov 2018 22:22:48 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Illustrious-Daffy: 763683f401ff23bc_1541370168475_195172697 X-MC-Loop-Signature: 1541370168475:188764287 X-MC-Ingress-Time: 1541370168474 Received: from pdx1-sub0-mail-a60.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a60.g.dreamhost.com (Postfix) with ESMTP id 13EF08027D; Sun, 4 Nov 2018 14:22:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:message-id:mime-version:content-type; s=linkov.net; bh=OBIUrRRWPALdDue0ypIpifzHOxU=; b=H+jvxFAIi+shmM OD8t2FWQOw+gHc1hOkNinujPQyoEvbWgRon3hPbCbvT3VyEc4BbBdCjl9Mxdy7cB Ek3l8wJvgAn7OMKmalVVePrTDoONkD1rggFuDVb7jg30jdLkwMEyPn2W3QsOsuzI 4baXRv+UeA6qdjDl38O95HWKzROmU= Received: from mail.jurta.org (m91-129-101-157.cust.tele2.ee [91.129.101.157]) (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-a60.g.dreamhost.com (Postfix) with ESMTPSA id 0F9F68027B; Sun, 4 Nov 2018 14:22:46 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a60 From: Juri Linkov To: martin rudalics Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Organization: LINKOV.NET References: <87efdnsp2k.fsf@mail.linkov.net> <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> <87in1phhx2.fsf@mail.linkov.net> <5BD2C52E.2060607@gmx.at> <87ftwrgwp2.fsf@mail.linkov.net> <5BD57A8D.8080408@gmx.at> <875zxmx95h.fsf@mail.linkov.net> <5BD70F14.8080509@gmx.at> <87lg6g750v.fsf@mail.linkov.net> <5BD81D97.2000000@gmx.at> <87bm7bru1c.fsf@mail.linkov.net> <5BD963C8.9090905@gmx.at> <87h8h195ki.fsf@mail.linkov.net> <5BDAC159.1060008@gmx.at> <87muqsh11q.fsf@mail.linkov.net> <5BDC0E81.1050806@gmx.at> Date: Mon, 05 Nov 2018 00:21:14 +0200 Message-ID: <87tvkwh4bp.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedrjeeggddtiecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhffffkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutddurdduheejnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtuddrudehjedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgeptd X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > I had that in mind as a side-effect. But we should really get rid of > this split-first-decide-what-to-put-there-afterwards approach first. I agree split-first-decide-what-to-put-there-afterwards is too ugly. So following your suggestion I reimplemented this feature in windmove.el because it fits its description "directional window-selection routines": diff --git a/lisp/windmove.el b/lisp/windmove.el index 42e10b591f..69f2a9665a 100644 --- a/lisp/windmove.el +++ b/lisp/windmove.el @@ -1,4 +1,4 @@ -;;; windmove.el --- directional window-selection routines +;;; windmove.el --- directional window-selection routines -*- lexical-binding:t -*- ;; ;; Copyright (C) 1998-2018 Free Software Foundation, Inc. ;; @@ -551,6 +571,86 @@ windmove-default-keybindings (global-set-key (vector (append modifiers '(up))) 'windmove-up) (global-set-key (vector (append modifiers '(down))) 'windmove-down)) +;;; Directional window display + +(defun windmove-display-in-direction (dir) + "Display the next buffer in the window at direction DIR. +Create a new window if there is no window in that direction." + (interactive) + (let* ((command this-command) + (depth (minibuffer-depth)) + (action display-buffer-overriding-action) + (clearfun (make-symbol "clear-display-buffer-overriding-action")) + (exitfun + (lambda () + (setq display-buffer-overriding-action action) + (remove-hook 'post-command-hook clearfun)))) + (fset clearfun + (lambda () + (unless (or + ;; Remove the hook immediately + ;; after exiting the minibuffer. + (> (minibuffer-depth) depth) + ;; But don't remove immediately after + ;; adding the hook by the same command. + (eq this-command command)) + (funcall exitfun)))) + (add-hook 'post-command-hook clearfun) + (push (lambda (buffer alist) + (unless (> (minibuffer-depth) depth) + (let ((win (if (eq dir 'same-window) + (selected-window) + (or (window-in-direction dir) + (split-window nil nil dir))))) + (window--display-buffer + buffer win (if (eq dir 'same-window) 'reuse 'window) alist)))) + display-buffer-overriding-action) + (message "[display-%s]" dir))) + +;;;###autoload +(defun windmove-display-left (&optional _arg) + "Display the next buffer in window to the left of the current one." + (interactive "P") + (windmove-display-in-direction 'left)) + +;;;###autoload +(defun windmove-display-up (&optional _arg) + "Display the next buffer in window above the current one." + (interactive "P") + (windmove-display-in-direction 'up)) + +;;;###autoload +(defun windmove-display-right (&optional _arg) + "Display the next buffer in window to the right of the current one." + (interactive "P") + (windmove-display-in-direction 'right)) + +;;;###autoload +(defun windmove-display-down (&optional _arg) + "Display the next buffer in window below the current one." + (interactive "P") + (windmove-display-in-direction 'down)) + +;;;###autoload +(defun windmove-display-same-window (&optional _arg) + "Display the next buffer in window below the current one." + (interactive "P") + (windmove-display-in-direction 'same-window)) + +;;;###autoload +(defun windmove-display-default-keybindings (&optional modifiers) + "Set up keybindings for directional display. +Keybindings are of the form MODIFIERS-{left,right,up,down}, +where MODIFIERS is either a list of modifiers or a single modifier. +Default value of MODIFIERS is `shift-meta'." + (interactive) + (unless modifiers (setq modifiers '(shift meta))) + (unless (listp modifiers) (setq modifiers (list modifiers))) + (global-set-key (vector (append modifiers '(left))) 'windmove-display-left) + (global-set-key (vector (append modifiers '(right))) 'windmove-display-right) + (global-set-key (vector (append modifiers '(up))) 'windmove-display-up) + (global-set-key (vector (append modifiers '(down))) 'windmove-display-down) + (global-set-key (vector (append modifiers '(?0))) 'windmove-display-same-window)) (provide 'windmove) From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 05 04:35:46 2018 Received: (at 32790) by debbugs.gnu.org; 5 Nov 2018 09:35:46 +0000 Received: from localhost ([127.0.0.1]:34594 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gJbIQ-0001FD-Fw for submit@debbugs.gnu.org; Mon, 05 Nov 2018 04:35:46 -0500 Received: from mout.gmx.net ([212.227.17.20]:37773) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gJbIO-0001Ey-TJ for 32790@debbugs.gnu.org; Mon, 05 Nov 2018 04:35:45 -0500 Received: from [192.168.1.101] ([46.125.250.97]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LqF9o-1foxNQ1N9E-00dmzj; Mon, 05 Nov 2018 10:35:36 +0100 Received: from [192.168.1.101] ([46.125.250.97]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LqF9o-1foxNQ1N9E-00dmzj; Mon, 05 Nov 2018 10:35:36 +0100 Message-ID: <5BE00EE7.80501@gmx.at> Date: Mon, 05 Nov 2018 10:35:35 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <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> <87in1phhx2.fsf@mail.linkov.net> <5BD2C52E.2060607@gmx.at> <87ftwrgwp2.fsf@mail.linkov.net> <5BD57A8D.8080408@gmx.at> <875zxmx95h.fsf@mail.linkov.net> <5BD70F14.8080509@gmx.at> <87lg6g750v.fsf@mail.linkov.net> <5BD81D97.2000000@gmx.at> <87bm7bru1c.fsf@mail.linkov.net> <5BD963C8.9090905@gmx.at> <87h8h195ki.fsf@mail.linkov.net> <5BDAC159.1060008@gmx.at> <87muqsh11q.fsf@mail.linkov.net> <5BDC0E81.1050806@gmx.at> <87d0rkijci.fsf@mail.linkov.net> In-Reply-To: <87d0rkijci.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:TzGPtxWMAMiqfvXHddM9BOkQh145f2CVz/RQxjuwH9I2z/2jYBJ /u0SSigEHBvTCxPnzbi3fSwWdPe3yBMAjfZcsbtwunjrYMSQ7J2twzs7CPLr/0GGWneRczo 5qT45kja+QrosjZoHJje3lfOyCGWCL58U/ThBr7xsw48cB9oyr9MK/mWKe9VCoODO/uNfqn FX4wvA4PU5z+6r6/AXkiQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:8YRuih9aCiw=:tRcW9cVUJeoPCfsTVSFmSf Cvjx5nFoNbTQ/G3nIMfRy5VmSe+vJ10hHFYIZ9pje3T9N5FfSeKVr+m0v/6vkKTTA1UxwJnGH tzvc7ZLywF6gOZoAZUTndUgN9h3AKI0BDFfz+cV0kVUEo4bsbvVqswLhn7iYw+9lToVWnMuEe 6CI+okP6dMvqfVzplsB3zKurBc5CWDCvJkW43b1ZK0DKCqCkBuwPtFg2V3R0OcXwaDzsFFWyL F/MqO20kH8SQJx7dEde8kTCiJG26sM/J6ghLpzG0DL19BPAGLzPUICJYB0zMZjA3SAdF/naWv 2tyNTgeXDKNMEeNX4TV9CJnn1W1jkCuZX9+J7TjutaX74C6ui+Rcm+8z7AOIgDkPdspRau8fQ ZtVAcvp4PtGEkvL2gT0GoC6Az3z3nsXQwyc44zNCOLwZObaXPRFylecW3hrCavgPrEgujxzdv y/cVfbA9ipoGhJDzcAXQKvWVJFqnwfLSfvTFJ4m/XmEZwMG6b2yVrW1lZkMMzfEpZ6XUcW0ef HkrgMICWJ6t4OnINCCBAfHtLwr32pYcwRIVvCxooTI0PJSu7uNloMP/6OY3+FQxD53B22nuYt G7SjbaBhJ8a3gJ+09P4PP3jPwXG/VT3zOcbaLXugOuLHbnbUnr9UFt2kx2OrbZ2PvhqlYUt56 TU5K9veGT3AU8LrGW0hHzYetyNlZsG929U/ZD3EOyl3UVZ+2lIgxg9MmK9Wd2crK+oyRYXN23 DEIAKwMh/zCIr26K6Da6CAkpo3I8a4IxPmLOQ7WwShDwSIQXaSy+ZhtPBe/FgxSEN0KFuGuz4 DzQH/X45blNC/hyMWW2+g2/WJXPQBWvdG2W660wkDHSw5NVM7TBynLFyC44qdetAuH3WQ4kMm 8g1DleFsjta6ly+c3xrsipOoK2Y9wVUUWtmDWSitNCM1lqc0Q/ErcTKSBsyn0X X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > Actually there is some problem with the third argument 'window' of > window--display-buffer: > > 0. emacs -Q > > 1. C-h e > displays *Messages* in another window > > 2. in *scratch* eval: > > (window--display-buffer (get-buffer-create "test1") (next-window) 'window) > > displays "test1" in the window where *Messages* was displayed > > 3. C-x o > select the window with "test1" > > 4. M-: (quit-window 1) > the window is deleted. > > I'd expect that it shouldn't delete the window, but should restore the > buffer previously displayed in that window, i.e. the *Messages* buffer, > because this is what quit-window does when the "test1" buffer was created > manually with e.g. 'C-x b test1'. That's because you told 'window--display-buffer' a lie: You did _not_ create a new window but reused an existing one. Try with (window--display-buffer (get-buffer-create "test1") (next-window) 'reuse) instead. Ideally, 'window--display-buffer' would find out itself whether a new window or frame was made or an existing one reused. But for that purpose 'display-buffer' would have to store away the identity of all windows and frames that existed before any action function was called so 'window--display-buffer' could compare these against the state after display. I earlier used such a solution in 'display-buffer-pretend' and may revive it if that function ever gets installed. But for normal 'display-buffer' the overhead is somehow annoying. martin From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 05 04:36:00 2018 Received: (at 32790) by debbugs.gnu.org; 5 Nov 2018 09:36:00 +0000 Received: from localhost ([127.0.0.1]:34597 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gJbId-0001Fh-OP for submit@debbugs.gnu.org; Mon, 05 Nov 2018 04:35:59 -0500 Received: from mout.gmx.net ([212.227.17.21]:38267) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gJbIc-0001FR-G5 for 32790@debbugs.gnu.org; Mon, 05 Nov 2018 04:35:58 -0500 Received: from [192.168.1.101] ([46.125.250.97]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0McPvw-1g24Pd3E4e-00Hhdg; Mon, 05 Nov 2018 10:35:49 +0100 Received: from [192.168.1.101] ([46.125.250.97]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0McPvw-1g24Pd3E4e-00Hhdg; Mon, 05 Nov 2018 10:35:49 +0100 Message-ID: <5BE00EF5.5040305@gmx.at> Date: Mon, 05 Nov 2018 10:35:49 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <5BA490EA.4000502@gmx.at> <87bm8pxjcb.fsf@mail.linkov.net> <5BA74E75.8000405@gmx.at> <87zhw8nd8g.fsf@mail.linkov.net> <5BA8A143.9040604@gmx.at> <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> <8736sgij28.fsf@mail.linkov.net> In-Reply-To: <8736sgij28.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:Ll/7U9eEZ/TGNjXFsrOUOiwHGPeh08pQJM9WbrKW7fFDIkbcGLR k9InAFTMUhr9/vZhsE++POH/r0uHuc4wViiDvaKIvqE2skCZZeeQTJX5JMALkWJWe32CRvA tIPMbGF/kEOHjhdfK/5lTfFzyLxj5MMCqmSi7Ia5JPGc14AI/51xemU91AcufixOBNn1vTy VLQ3ZwJZ1W3sC+gQ89Kow== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:XN0MC7D1m7g=:woPrFrq337etaHLU5v1r5v eVdnu1Iz982B5TnoAEpVkwpJSQQIfhp5cwIGoqVdY/G10T/9EIcLOuS5rlMxG0dN2sXsjP7lV Yw0V5A118g8UqjsVwuBbU95tL/9AtEOWTEZwydyzgUO2Jy9Cqp2Ws/TpuHmQk2RNTPKB5/dVl C7aA1cKLrb0lefXyMMOGNgH++WXRhYky8C7F/zh+uW3B70nWf9y/YDbndxTk0se9OW0opuf9U 4YFtShxBgMPMoQaJVNZxOJkMEkfO+eUIioKwHaWBt28gElVDmPEAcemgBCL3M/dizXuYIAr5W N0gjr4/Snp48Ov+YoKS3L+giALNrNzuUu4qWyJyVozB66v/gNOfydYk/aaZhpo+q1v49WZjRE UGNLSrM3Cu1juYYb+SlJcl3VC/G7sCUFLi+9lav0NcVK+KW3LP7th3kinGdC/decNRv1WRJ48 OjO+fvziWH8qBKABWvSAhR6uw8W9+/dFVGRNXBxPajmW4YIQOf1B3C3N4Y1uSaMc1jCHZfMsG 4roS/+wvr+SXwoKxK8oZ89PsUCzJJPBsWXpOoK0L29JEfI7IJVZ0W/Dz21HoTYiyEmLt4FeAC QgRnMSEFPiA6t08KFdeD4EdIiTS5jzdBW0NWXe6n8kbHe47rhSPUYC1RZtv5yZq9KqHMKhREy 2qcuKwVA29uIvD2YOeqOA9wLmHm6Q6btfSXFrPPK8WjUU7nKGLmJg8/8T4br6p6/glXVL4lIi VXLkm0Wo9NmaIXkTYZUg67hfZhy2CgfsONp4ti5ANVs4nJHOG7QCmQykzqnVJyhD0W3TStwLr ZolaGt4tmATUJhFHn7/09//jvdHuNSm2T2Gp8bvotGUfkFBENo= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > +(defcustom windmove-create-window nil > + "Whether movement off the edge of the frame creates a new window. > +If this variable is set to t, moving left from the leftmost window in > +a frame will create a new window on the left, and similarly for the other > +directions." You should say here that a non-nil values abolishes the wrap-around behavior and in the doc-string of 'windmove-wrap-around' say that it has no effect if 'windmove-create-window' is non-nil. And how gracefully should we handle failures of 'split-window'? martin From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 05 04:36:28 2018 Received: (at 32790) by debbugs.gnu.org; 5 Nov 2018 09:36:28 +0000 Received: from localhost ([127.0.0.1]:34606 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gJbJ6-0001HF-9y for submit@debbugs.gnu.org; Mon, 05 Nov 2018 04:36:28 -0500 Received: from mout.gmx.net ([212.227.17.20]:53853) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gJbJ4-0001Gz-LD for 32790@debbugs.gnu.org; Mon, 05 Nov 2018 04:36:26 -0500 Received: from [192.168.1.101] ([46.125.250.97]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LiIgB-1fh0y11zW7-00nNrW; Mon, 05 Nov 2018 10:36:18 +0100 Received: from [192.168.1.101] ([46.125.250.97]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LiIgB-1fh0y11zW7-00nNrW; Mon, 05 Nov 2018 10:36:18 +0100 Message-ID: <5BE00F12.5000703@gmx.at> Date: Mon, 05 Nov 2018 10:36:18 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <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> <87in1phhx2.fsf@mail.linkov.net> <5BD2C52E.2060607@gmx.at> <87ftwrgwp2.fsf@mail.linkov.net> <5BD57A8D.8080408@gmx.at> <875zxmx95h.fsf@mail.linkov.net> <5BD70F14.8080509@gmx.at> <87lg6g750v.fsf@mail.linkov.net> <5BD81D97.2000000@gmx.at> <87bm7bru1c.fsf@mail.linkov.net> <5BD963C8.9090905@gmx.at> <87h8h195ki.fsf@mail.linkov.net> <5BDAC159.1060008@gmx.at> <87muqsh11q.fsf@mail.linkov.net> <5BDC0E81.1050806@gmx.at> <87tvkwh4bp.fsf@mail.linkov.net> In-Reply-To: <87tvkwh4bp.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:b0iX/7EncnTDkHS42fPpQVlIKsZ/ywtD4DjH4tyAJIQrjNGM98n DB23o9QUffSIIK/QIFA7kiwiVBkC740BIkG8TDDCm5dpxfjtw52Y5+Y53xTFh21Q7Mvc68v zISIoirZXQdsj3OKf4PxJ7RIlTbwLUFj//87vdV80yp7NUT1xK9ssSlOF6Of0hf3GScLXat Oz/msf+QfbP2Z3xAYd7yw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:040sEXKIw8c=:7dIQOEESv+kImm0Sb42rph hWnFhKjElsta6q9Itst6vbHW+rbgljj7hkQ/DLnyORsaOn4h0bft9t/HNw0sHyp4NgciR2J3X 4b81kf1fiJFKretjyMqPPAFoEADITQNWX54jJULqqF+ROmY7IY4KtLypCa8HZL9WZ50/TO6UK nckfGuBOUwbwnYKRUP30nnsWKresEcI3MHXZMAzLoImUKiarArupqayjRY1b8Nu09aUZ148GX tbyns+JaePlHbV0eIRb54rnD+X9oN2Lpuq2q5o4OKhBXxlugW1dD+HXZOSllKmnUizqNNYMZw u9oGD7EjyKo/z7XQogU1UK38kGP9EOJsfBG+tJ1Y6qnaFHnXbpW2JZvcweo0uKeDmrcwcgS4h iXtk0aqdgrv31a/fqn3r9BMZv2mewiRgJ5NAFe3bY8mRJtygfrwqU0yJMKLedVFDrz69XrD6k NtWEhJ0imYydhdHdrzNytGgRdKlIsQcWFLFTDh0QUiEhbVaOzvZ+sRtj63EGuf9NYbq7hsgNT fAXjreAJEXv1ssIkcgtIpueq7TdcvRYBcndTX4reNllMAVryxFCcoRo43S+HO+0bQmlrBclW8 snGldPrwrpeuvZ/k67eSnnS83NxFARb7Hmkkp/3sIBry72dl6YztBs5MN9wgr2FD2FWC2srjx JiHs/cJLP+zWp6nxjmyYMBVsOZbYwbYblM3Pp+l3BrwbnJsg+evnefh7RCAqKeVMYjjG3P6Dm 3s2tI1PBrj7cA8CEG7tAnKPMvGJWtNngtQxrFQvYlXPD/CbvenmbtsKFXbQNdSs9Vks/S12wB dTRIikg0cahN6hoBzMWhVsp1AF5PfFGswjVGoyjrE1eERbkHQtiPZ/eEa1ksMXQccqVfKLp7f ksOLgnB0cKcTdWICa5gzzD2FpbiYIwnCl3cRuqCnIql8XZSUiSrxty6K/pIdrE X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > So following your suggestion I reimplemented this feature in windmove.el > because it fits its description "directional window-selection routines": Looks very good now. This one > +;;;###autoload > +(defun windmove-display-default-keybindings (&optional modifiers) should be wrapped in a 'defcustom' IMHO. And while I think that the prompt-like (message "[display-%s]" dir) is a good idea, it might fire back when the selected frame does not have an echo area. So I think it should be made customizable too. IMHO we should provide l, r, u/t, d/b directional keybindings as well. And eventually we could provide something for handling frames too---in particular, moving to and/or popping up a new frame adjacent to the selected one on either side. martin From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 05 17:15:55 2018 Received: (at 32790) by debbugs.gnu.org; 5 Nov 2018 22:15:55 +0000 Received: from localhost ([127.0.0.1]:35813 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gJnA3-00071j-KA for submit@debbugs.gnu.org; Mon, 05 Nov 2018 17:15:55 -0500 Received: from cichlid.maple.relay.mailchannels.net ([23.83.214.36]:22928) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gJnA1-00071Y-S7 for 32790@debbugs.gnu.org; Mon, 05 Nov 2018 17:15:54 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 6429B123DC6; Mon, 5 Nov 2018 22:15:52 +0000 (UTC) Received: from pdx1-sub0-mail-a31.g.dreamhost.com (unknown [100.96.35.77]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 0D728124287; Mon, 5 Nov 2018 22:15:52 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a31.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); Mon, 05 Nov 2018 22:15:52 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Broad-Reign: 1742475f73128be3_1541456152137_15695396 X-MC-Loop-Signature: 1541456152136:447140171 X-MC-Ingress-Time: 1541456152135 Received: from pdx1-sub0-mail-a31.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a31.g.dreamhost.com (Postfix) with ESMTP id C96F0804D9; Mon, 5 Nov 2018 14:15:51 -0800 (PST) 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=x8WNKfyXg14340ck/RoAvSFyi+g=; b= imsxYC82AdgYOo3kVYmY9vL95vp0Ht0hsUBeV5xWsmq67E28VHxcuzyCG4AHzhVU WxQF4XOgdDapcy1YRcR2OrzfthxGu1DVe+PoB0spThHfom9tvimgK+6a37vW+qae WwCI60DJTYdZ1LdKqNcXWdidZQD2T8GmAQ1YzjAUB/o= Received: from mail.jurta.org (m91-129-107-244.cust.tele2.ee [91.129.107.244]) (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-a31.g.dreamhost.com (Postfix) with ESMTPSA id ADA25804C0; Mon, 5 Nov 2018 14:15:49 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a31 From: Juri Linkov To: martin rudalics Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Organization: LINKOV.NET References: <87efdnsp2k.fsf@mail.linkov.net> <5BA490EA.4000502@gmx.at> <87bm8pxjcb.fsf@mail.linkov.net> <5BA74E75.8000405@gmx.at> <87zhw8nd8g.fsf@mail.linkov.net> <5BA8A143.9040604@gmx.at> <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> <8736sgij28.fsf@mail.linkov.net> <5BE00EF5.5040305@gmx.at> Date: Tue, 06 Nov 2018 00:12:01 +0200 In-Reply-To: <5BE00EF5.5040305@gmx.at> (martin rudalics's message of "Mon, 05 Nov 2018 10:35:49 +0100") Message-ID: <87efbzw5d2.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedrjeehgdduieduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdejrddvgeegnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtjedrvdeggedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgeptd X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> +(defcustom windmove-create-window nil >> + "Whether movement off the edge of the frame creates a new window. >> +If this variable is set to t, moving left from the leftmost window in >> +a frame will create a new window on the left, and similarly for the other >> +directions." > > You should say here that a non-nil values abolishes the wrap-around > behavior and in the doc-string of 'windmove-wrap-around' say that it > has no effect if 'windmove-create-window' is non-nil. 'windmove-create-window' is very useful with non-nil value of 'windmove-wrap-around' - this is what I actually use. This means that no more than 2 windows can be created in any direction, and this is fine. > And how gracefully should we handle failures of 'split-window'? Not important for windmove-do-window-select. From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 05 17:16:04 2018 Received: (at 32790) by debbugs.gnu.org; 5 Nov 2018 22:16:04 +0000 Received: from localhost ([127.0.0.1]:35817 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gJnAB-00072j-Qf for submit@debbugs.gnu.org; Mon, 05 Nov 2018 17:16:03 -0500 Received: from indri.birch.relay.mailchannels.net ([23.83.209.92]:3334) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gJnAA-00071u-5R for 32790@debbugs.gnu.org; Mon, 05 Nov 2018 17:16:02 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 8FB3C682696; Mon, 5 Nov 2018 22:15:59 +0000 (UTC) Received: from pdx1-sub0-mail-a31.g.dreamhost.com (unknown [100.96.30.62]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 58A5C68267C; Mon, 5 Nov 2018 22:15:59 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a31.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); Mon, 05 Nov 2018 22:15:59 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Zesty-Belong: 20a6de9737eeb3a4_1541456159441_1251820366 X-MC-Loop-Signature: 1541456159441:1313948947 X-MC-Ingress-Time: 1541456159441 Received: from pdx1-sub0-mail-a31.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a31.g.dreamhost.com (Postfix) with ESMTP id 22DDB804D9; Mon, 5 Nov 2018 14:15:59 -0800 (PST) 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=WavbSMtafH+s0B3dUrPIfX5vGJ8=; b= Gz2sknqw9YLOa/Tp/yJbU8y8F3a8ZgGtyhSPSRnsFFWtzKB4hI3ZBKRbq1R/QpHa //7fsyatEtthq2ddw2UExhURaamVQHHezA7A09xIq+XF5FWv+zc0jW6OEjo0/0QH wz9NVa+cjd1jv66RKQ1+pYWWQDb1ZGX0W47CDOzdXgA= Received: from mail.jurta.org (m91-129-107-244.cust.tele2.ee [91.129.107.244]) (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-a31.g.dreamhost.com (Postfix) with ESMTPSA id 1F4FF804DD; Mon, 5 Nov 2018 14:15:56 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a31 From: Juri Linkov To: martin rudalics Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Organization: LINKOV.NET References: <87efdnsp2k.fsf@mail.linkov.net> <87bm7njk2f.fsf@mail.linkov.net> <5BCD934D.4070906@gmx.at> <878t2owo8i.fsf@mail.linkov.net> <5BD03F4D.1000900@gmx.at> <87in1phhx2.fsf@mail.linkov.net> <5BD2C52E.2060607@gmx.at> <87ftwrgwp2.fsf@mail.linkov.net> <5BD57A8D.8080408@gmx.at> <875zxmx95h.fsf@mail.linkov.net> <5BD70F14.8080509@gmx.at> <87lg6g750v.fsf@mail.linkov.net> <5BD81D97.2000000@gmx.at> <87bm7bru1c.fsf@mail.linkov.net> <5BD963C8.9090905@gmx.at> <87h8h195ki.fsf@mail.linkov.net> <5BDAC159.1060008@gmx.at> <87muqsh11q.fsf@mail.linkov.net> <5BDC0E81.1050806@gmx.at> <87tvkwh4bp.fsf@mail.linkov.net> <5BE00F12.5000703@gmx.at> Date: Tue, 06 Nov 2018 00:14:11 +0200 In-Reply-To: <5BE00F12.5000703@gmx.at> (martin rudalics's message of "Mon, 05 Nov 2018 10:36:18 +0100") Message-ID: <87d0rjuq8c.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedrjeehgdduieduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdejrddvgeegnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtjedrvdeggedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgepud X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> So following your suggestion I reimplemented this feature in windmove.el >> because it fits its description "directional window-selection routines": > > Looks very good now. This one > >> +;;;###autoload >> +(defun windmove-display-default-keybindings (&optional modifiers) > > should be wrapped in a 'defcustom' IMHO. This is a copy of the existing windmove-default-keybindings that has no defcustom. > And while I think that the prompt-like > > (message "[display-%s]" dir) > > is a good idea, it might fire back when the selected frame does not > have an echo area. So I think it should be made customizable too. What bad will happen when the selected frame has no echo area? > IMHO we should provide l, r, u/t, d/b directional keybindings as well. Maybe then h/j/k/l or b/f/n/p? > And eventually we could provide something for handling frames too---in > particular, moving to and/or popping up a new frame adjacent to the > selected one on either side. I agree, this would be nice. From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 06 03:47:20 2018 Received: (at 32790) by debbugs.gnu.org; 6 Nov 2018 08:47:20 +0000 Received: from localhost ([127.0.0.1]:35980 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gJx16-0005aE-Fx for submit@debbugs.gnu.org; Tue, 06 Nov 2018 03:47:20 -0500 Received: from mout.gmx.net ([212.227.17.20]:36235) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gJx14-0005a0-Vm for 32790@debbugs.gnu.org; Tue, 06 Nov 2018 03:47:19 -0500 Received: from [192.168.1.101] ([213.162.68.231]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0M9OMc-1gF2fZ0MJy-00ClBA; Tue, 06 Nov 2018 09:47:11 +0100 Received: from [192.168.1.101] ([213.162.68.231]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0M9OMc-1gF2fZ0MJy-00ClBA; Tue, 06 Nov 2018 09:47:11 +0100 Message-ID: <5BE1550C.5080804@gmx.at> Date: Tue, 06 Nov 2018 09:47:08 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <5BA490EA.4000502@gmx.at> <87bm8pxjcb.fsf@mail.linkov.net> <5BA74E75.8000405@gmx.at> <87zhw8nd8g.fsf@mail.linkov.net> <5BA8A143.9040604@gmx.at> <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> <8736sgij28.fsf@mail.linkov.net> <5BE00EF5.5040305@gmx.at> <87efbzw5d2.fsf@mail.linkov.net> In-Reply-To: <87efbzw5d2.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:lfjdC1PLsi5ZeheCPnJmDJAVIVItuEC5oBX1SFAsX2pjOV5t2tS AF5qv2cAYzWuVlMbCTHOIgsrTeHRlko2IuUIzO0E5W89SQd7dkPNGlBwZ8x1pXm8L3x8Bd1 fsxnR0lRr6jzhBDMYLMjTjXPxAFi2JG4nrkDy1jDeSp+5xd4DBBlfRQTjPv4H+tyW7I/CJd 45bfZpxyA8CF0B6dzqD7Q== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:KVKSAxveCUo=:hABAHBILeVcauHa4kxD+Tp IGpwGfM1MoCw/wRcbPP/2aLJbkG5v7lZZOOMrhX/nJM7NRDs6tL1l3k4ifMj/GvGOqSb/DyQ5 otBFJlPHzwG5QBpAsQMQPiErLrPjQiEwaajgogczEfJLX2kISeuwYjTLmUDcn22uirpR6Cm4f ZDxqDubVBalVCgTSxwpNHjGmpmwFdPZhCMPpIsCJTH8Y/oNvldtFahWwe6y6WrVZ90U5GRgs9 kzelgQnONVnQ/Vmp1B7BYsgvaVEU8gPZ2mJju1DI0yXDOAp6zKV3ooB4PzjMTFPdaptpw4KiL 9rqd1pvbtABPBSYNPp7z9wkMUL5sz92sPEWJoI6OeWtqD6DyFnOGQRF8wr8jhiWsqbNx3N20f lNVmzAbX95qUmJoNY5NIm/f8xfK0eivL2j7mpdylSpJTYrGcV4XPkU9qPN/+3g2hM6ZuLcPZn zAK33FzdmaTltZNrczN99C4wowZY6R2ohk+ptcqBMtonAE7C1QuHpKa1BEWA4PQKykX//6qf3 8SGJUIQY3l7Xxdmsj8gZaV2itFYDxn4OCsR6VC4ltKXtQ2mmsmdjRTh7GT3AqJ0ebW3OOSNHB o5Csg7j/CMKbgcQ5dENcSPxHHylrZ/epfKfQm7Q6AJf9g5maCKs7mKH9rMJX2EfCImxZPEa/0 gTqDalaanO2Baof5NalfsjftVx35rGFc8FW2Cqozz1qUB2XtC8y1sojMyVg6WAM8lcMaF2JjM zfjF30u3c2wMIPkS9w3nxMDmXQBq2PjPfpVsbX4GZtVw0q/51p2Dd4FQc9S6PtU0NjTdxdCRJ nbGqw9/T/H7Ejo8LMxT7ZLFuz1XNOCLAflPpB01o1bHFnTHolILw3Cu+12YFSQH8vuUgisK4f nwKFyGeJW72wz96itCWn2aH+0WO+2DPYtX5jj5/OXGStuMvYgf+xmhDf0n5rXM X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.2 (/) > 'windmove-create-window' is very useful with non-nil value of > 'windmove-wrap-around' - this is what I actually use. > > This means that no more than 2 windows can be created in any direction, > and this is fine. > >> And how gracefully should we handle failures of 'split-window'? > > Not important for windmove-do-window-select. But both answers resemble your personal preferences. Other users might disagree. martin From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 06 03:48:31 2018 Received: (at 32790) by debbugs.gnu.org; 6 Nov 2018 08:48:31 +0000 Received: from localhost ([127.0.0.1]:35985 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gJx2E-0005c5-TW for submit@debbugs.gnu.org; Tue, 06 Nov 2018 03:48:31 -0500 Received: from mout.gmx.net ([212.227.17.20]:35405) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gJx2C-0005br-Mk for 32790@debbugs.gnu.org; Tue, 06 Nov 2018 03:48:29 -0500 Received: from [192.168.1.101] ([213.162.68.231]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LcnRD-1fdUwt2cH1-00kAHE; Tue, 06 Nov 2018 09:48:20 +0100 Received: from [192.168.1.101] ([213.162.68.231]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LcnRD-1fdUwt2cH1-00kAHE; Tue, 06 Nov 2018 09:48:20 +0100 Message-ID: <5BE15552.4040507@gmx.at> Date: Tue, 06 Nov 2018 09:48:18 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <87bm7njk2f.fsf@mail.linkov.net> <5BCD934D.4070906@gmx.at> <878t2owo8i.fsf@mail.linkov.net> <5BD03F4D.1000900@gmx.at> <87in1phhx2.fsf@mail.linkov.net> <5BD2C52E.2060607@gmx.at> <87ftwrgwp2.fsf@mail.linkov.net> <5BD57A8D.8080408@gmx.at> <875zxmx95h.fsf@mail.linkov.net> <5BD70F14.8080509@gmx.at> <87lg6g750v.fsf@mail.linkov.net> <5BD81D97.2000000@gmx.at> <87bm7bru1c.fsf@mail.linkov.net> <5BD963C8.9090905@gmx.at> <87h8h195ki.fsf@mail.linkov.net> <5BDAC159.1060008@gmx.at> <87muqsh11q.fsf@mail.linkov.net> <5BDC0E81.1050806@gmx.at> <87tvkwh4bp.fsf@mail.linkov.net> <5BE00F12.5000703@gmx.at> <87d0rjuq8c.fsf@mail.linkov.net> In-Reply-To: <87d0rjuq8c.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:4QI7FUuBvloMLJXhFUXli42lAoxhUVtyTbF9OJis09+zHVLb7lu 3lzKhCvX4s2etf1qR40X509Hk+mujvMef8QZp5GcbFq4qdN1bNqZ1klNDS7BdoGEGeesNG5 peucixGaNjIvkUlDrmTuhS0fzc9g/l5pttGS+RQNy8P5tA+vkN2+GtBaykLO1+yLZHJs2f1 7EbZZmoHg5HqZshMTSCoQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:zsMFN2Xg27Y=:v0UX1JGLUK2inCFzVbouNq 7OzFm061pdnWVysMFoMJdHTnoSwuxUwuXnoPY8JRZ1j9vtpsZpYbrRvG39jvyvxT6liq4TT4p QsDcaqx6d+do8yIQxqUDpLlwW8+1JdlZVHmPfF1CtKA8x7MaBPsgdYVUPWatfZNej+d6tIaH/ hanRR1Xhodjbo38QMcDL+eJEtt9cdKM6wVmXdDxV3c1KIvB8shijbrED3OhOLNePbmAYpHSDv +kKmAYZSdogjCyioTRjvwkMcAWuvydiMaVRh4RLaOhlaxbPnbU7HWpRWvHRB9Wy3fz31VdYom TsWxWe97Na8d78WcQSk7i8L/abtcaozryEJrp2VrIzubxRT8qc6i/U+91oqW5Qtluhp1bArSS V7uo62h/KHS7Ks/iZcTJXUTkhMxbZrd0vGnNgNIuvb/xM0Ygl/DJYwfoDfgJJaoJ7GNjzmgHf oseCI474CafMyBJqalH6ANU+mHOV0GGAuh0zJnmuysqNuA0TN6sVdW/HSmT8+5MLEGjWJh1Nr uCT6waWoc6WX2fNWIvv4suaHvUKNekoSRZy/6PaZ4EUFLEq7K/c1dYCdSNd73HTkH+sXPRpI2 lEWcLo+N1OVjlJ2EegL/eSIruLfesJazE/11cdqfpJgAbfTqgBYzoPUU1+1FRTK8K8DPC1XNR nYHvuVN8NgG0ij+yaZxO24cChuQnLYSQ9M20z7QgWf2BRDv/UAgqSoAgU+58Ju+aaAI3oaTq5 vp2FbAzYean5kEyK+H95FcUh7QzjZpXiOob8FxfPsWqSoOG4gu/2zn6MSmarNyJfM0Xn5cXr/ QBzM8E6eDgR0Ej5aTkNTTywVIH5KVF6eVSy8FfxR/SHczm9Qa+nNm4c4Q9VCi15jjUPwge/zc cAH3xnwNH2LdM48/IkXcrB9feBx7uOWqJWGbQTzLDGATpBUjWz7Sj97ZgNggP1 X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.2 (/) >> Looks very good now. This one >> >>> +;;;###autoload >>> +(defun windmove-display-default-keybindings (&optional modifiers) >> >> should be wrapped in a 'defcustom' IMHO. > > This is a copy of the existing windmove-default-keybindings > that has no defcustom. IME the windmove user community is quite small. Don't we expect directional buffer display to attract more users than that? Per se S-M- C-x 4 C-o is a pain to type. So we could provide attractive key bindings because windmove is pretty independent in this regard. And we should advertise them in the user manual. >> And while I think that the prompt-like >> >> (message "[display-%s]" dir) >> >> is a good idea, it might fire back when the selected frame does not >> have an echo area. So I think it should be made customizable too. > > What bad will happen when the selected frame has no echo area? I can't give you a good answer because I hardly ever work with minibuffer-less frames. But I could imagine that the message would cause the respective echo-area frame to pop up even if the subsequent step (namely that of finding out which buffer should get displayed) does not involve the minibuffer because the buffer is already known from the context (the line of the dired buffer where a file to be displayed is listed, the file name around the position of point in a grep buffer). >> IMHO we should provide l, r, u/t, d/b directional keybindings as well. > > Maybe then h/j/k/l or b/f/n/p? I intended l(eft), r(ight), u(p)/t(op) and d(own)/b(ottom). What did you intend? martin From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 06 17:29:23 2018 Received: (at 32790) by debbugs.gnu.org; 6 Nov 2018 22:29:23 +0000 Received: from localhost ([127.0.0.1]:37928 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gK9qd-0002gP-HY for submit@debbugs.gnu.org; Tue, 06 Nov 2018 17:29:23 -0500 Received: from otter.birch.relay.mailchannels.net ([23.83.209.139]:51565) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gK9qb-0002gD-0m for 32790@debbugs.gnu.org; Tue, 06 Nov 2018 17:29:21 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 8DC0A683783; Tue, 6 Nov 2018 22:29:19 +0000 (UTC) Received: from pdx1-sub0-mail-a56.g.dreamhost.com (unknown [100.96.29.126]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 577306835FE; Tue, 6 Nov 2018 22:29:19 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a56.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); Tue, 06 Nov 2018 22:29:19 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Battle-Share: 1f92578e31e62038_1541543359438_1258551677 X-MC-Loop-Signature: 1541543359438:2626058534 X-MC-Ingress-Time: 1541543359437 Received: from pdx1-sub0-mail-a56.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a56.g.dreamhost.com (Postfix) with ESMTP id 25A658060D; Tue, 6 Nov 2018 14:29:19 -0800 (PST) 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=PM09GlDo+rxKBVY9eQ+1xXMoE48=; b= U0qtoKfNQRpjA0KFf6+QfquOEP9vF1swMHxiVUgVkEL02FTdCY3DQ9xZXs8etvkL LZX2XOT+uNii49QCntzEwUQf0gAZAFIqd6u4E7J9tK366JI6sFMYltA7IvOw3DzZ RA7PVr5ChbDWozUAK9IyJbozGKpjafxOYe4Flohe0cU= Received: from mail.jurta.org (m91-129-107-244.cust.tele2.ee [91.129.107.244]) (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-a56.g.dreamhost.com (Postfix) with ESMTPSA id 3F6CB80611; Tue, 6 Nov 2018 14:29:16 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a56 From: Juri Linkov To: martin rudalics Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Organization: LINKOV.NET References: <87efdnsp2k.fsf@mail.linkov.net> <878t2owo8i.fsf@mail.linkov.net> <5BD03F4D.1000900@gmx.at> <87in1phhx2.fsf@mail.linkov.net> <5BD2C52E.2060607@gmx.at> <87ftwrgwp2.fsf@mail.linkov.net> <5BD57A8D.8080408@gmx.at> <875zxmx95h.fsf@mail.linkov.net> <5BD70F14.8080509@gmx.at> <87lg6g750v.fsf@mail.linkov.net> <5BD81D97.2000000@gmx.at> <87bm7bru1c.fsf@mail.linkov.net> <5BD963C8.9090905@gmx.at> <87h8h195ki.fsf@mail.linkov.net> <5BDAC159.1060008@gmx.at> <87muqsh11q.fsf@mail.linkov.net> <5BDC0E81.1050806@gmx.at> <87tvkwh4bp.fsf@mail.linkov.net> <5BE00F12.5000703@gmx.at> <87d0rjuq8c.fsf@mail.linkov.net> <5BE15552.4040507@gmx.at> Date: Wed, 07 Nov 2018 00:22:29 +0200 In-Reply-To: <5BE15552.4040507@gmx.at> (martin rudalics's message of "Tue, 06 Nov 2018 09:48:18 +0100") Message-ID: <87y3a5rgm2.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedrjeejgdduieduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdejrddvgeegnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtjedrvdeggedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgepfe X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > IME the windmove user community is quite small. Don't we expect > directional buffer display to attract more users than that? Per se > S-M- C-x 4 C-o is a pain to type. So we could provide > attractive key bindings because windmove is pretty independent in this > regard. And we should advertise them in the user manual. What key bindings are more attractive in your opinion? >>> IMHO we should provide l, r, u/t, d/b directional keybindings as well. >> >> Maybe then h/j/k/l or b/f/n/p? > > I intended l(eft), r(ight), u(p)/t(op) and d(own)/b(ottom). What did > you intend? h/j/k/l was a joke, but I really intended more Emacsy b/f/n/p as a reference to navigation keys C-b/C-f/C-n/C-p. From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 07 04:24:07 2018 Received: (at 32790) by debbugs.gnu.org; 7 Nov 2018 09:24:07 +0000 Received: from localhost ([127.0.0.1]:38146 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gKK4F-0003oa-Hr for submit@debbugs.gnu.org; Wed, 07 Nov 2018 04:24:07 -0500 Received: from mout.gmx.net ([212.227.17.21]:56499) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gKK4C-0003ng-Fj for 32790@debbugs.gnu.org; Wed, 07 Nov 2018 04:24:04 -0500 Received: from [192.168.1.101] ([212.95.5.136]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MfVzj-1g97fk2d3L-00P95e; Wed, 07 Nov 2018 10:23:55 +0100 Received: from [192.168.1.101] ([212.95.5.136]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MfVzj-1g97fk2d3L-00P95e; Wed, 07 Nov 2018 10:23:55 +0100 Message-ID: <5BE2AF28.2020505@gmx.at> Date: Wed, 07 Nov 2018 10:23:52 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <878t2owo8i.fsf@mail.linkov.net> <5BD03F4D.1000900@gmx.at> <87in1phhx2.fsf@mail.linkov.net> <5BD2C52E.2060607@gmx.at> <87ftwrgwp2.fsf@mail.linkov.net> <5BD57A8D.8080408@gmx.at> <875zxmx95h.fsf@mail.linkov.net> <5BD70F14.8080509@gmx.at> <87lg6g750v.fsf@mail.linkov.net> <5BD81D97.2000000@gmx.at> <87bm7bru1c.fsf@mail.linkov.net> <5BD963C8.9090905@gmx.at> <87h8h195ki.fsf@mail.linkov.net> <5BDAC159.1060008@gmx.at> <87muqsh11q.fsf@mail.linkov.net> <5BDC0E81.1050806@gmx.at> <87tvkwh4bp.fsf@mail.linkov.net> <5BE00F12.5000703@gmx.at> <87d0rjuq8c.fsf@mail.linkov.net> <5BE15552.4040507@gmx.at> <87y3a5rgm2.fsf@mail.linkov.net> In-Reply-To: <87y3a5rgm2.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:uLyXw8OVKjurNYZKGCAPrckrWkPShM0YeXa9uFQQLHzeRXlm0v1 Kw8zGVBTdeuT0y8nsycVg4K+jjTl1+06EiSwQevYgqlOdf6CKtyNyQXkCF4x17q0eBUiSvk maeQMTTOOrlLvJIVaxAODJ6KRWjcjNc0MluNUQsnn10F9W11+/fGcfpjQ4ld7dFmwhpZQ1v LVFcQhrn39LrNzgzbHBCg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:qTWMgAb7ZFE=:+72pV5cU7AbKBoKCMe6H0i 5d+vyU56EaX8+RdGd4uswK+58rxRGehJUTyLA11tT4SiuJG1T/l8DEyUY4UcsxXKg6Q04/n3I x+dkooJg3dpeiskJprX7IGRA013qcXDWL3ZeGSPicvUQVfL9u2PNLvTYgDvDKYKCOjzlK6yDF 804SBsxDWCT/5jWEd8KsA1Dnw8535JIhuqO7entipLB6JPkj8w1QkUfhl1THiyw2W6rhsOCxp YG1h5TcX8xHrVvYNDpvXWmci0ruhwNbuxoLmlQXUebLf36FFY9s1VxXRFbAz/0KrqA1OqDoz8 QSFuPv621CvHn2jWE0rOvsPIC9NcKBmpnniZZG4XN/4UvNYn0+8uYGqDkrX2B7v8HryWjQIi1 6wKSG8DAEYn6xAY5iE+wv7OpVToz7apr6mxjKxVDRypy6HElUqY+3sOHM8HsQ42JDvHNSkObI WXvLU85Trkyy6iWoHv/V2tPAi0LGfVgMomQvRZseqOimZO/67+xvs3VpNKBD9XUmrXDKIMwBx G2O4Ne1DcOU4JEMCpllZtRnDZ+RTaMb08/NZzNfl9WYQKQyWAmACYhebVkS27jz0oWhQZISf1 XzJvgAATY8ZkO5Dw/F62IgAPAD+8d1XBYp3hVP0JonwqNIIHLQs2c2ZO0kwTzqtk2R/A7cWlr cZPRc6wdfzPQsZyxsJ+Bch4iHKyLGCwT/61Dbz/kZ8PMUwwq1pwEZz+qVRwVf6f1XB5Iu6S4O 1owJ8K9sGcyqVbHs8p+pjI8qWEslkNzF34DJFJt/f+t6tu+I5EvZsfwEVIjaB4UFG5JcGI8ra Iumd+RHJnfmmcVxMS51H8ArrxnZ+Gkaip/CZldx1DY+MkmqrfM= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > What key bindings are more attractive in your opinion? What I meant here is that if a user has typed a (customizable directional) prefix like S-M- the next key should already supply all that's needed for the most common usages of the prefix. Note that in its current form windmove.el is practically not needed any more - most of its job is now done by 'window-in-direction'. All that remains in practice are its keybindings. This gives us broad opportunities to provide bindings for moving to a window in a certain direction or create a window in that direction if, for example, no window in that direction exists. A new window could be made adjacent to the selected window, full-width or full-height adjacent to a border of the selected frame, on another frame in the indicated direction, in a side or atomic window, on a child frame ... martin From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 07 16:59:03 2018 Received: (at 32790) by debbugs.gnu.org; 7 Nov 2018 21:59:03 +0000 Received: from localhost ([127.0.0.1]:40018 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gKVqp-0007ZN-Ba for submit@debbugs.gnu.org; Wed, 07 Nov 2018 16:59:03 -0500 Received: from catfish.maple.relay.mailchannels.net ([23.83.214.32]:15132) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gKVqn-0007Yo-HA for 32790@debbugs.gnu.org; Wed, 07 Nov 2018 16:59:02 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 5CAEE42E43; Wed, 7 Nov 2018 21:58:59 +0000 (UTC) Received: from pdx1-sub0-mail-a61.g.dreamhost.com (unknown [100.96.26.166]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 0D70741708; Wed, 7 Nov 2018 21:58:59 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a61.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); Wed, 07 Nov 2018 21:58:59 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Quick-Oafish: 47ed5062732a6037_1541627939220_2794290603 X-MC-Loop-Signature: 1541627939219:1680823356 X-MC-Ingress-Time: 1541627939219 Received: from pdx1-sub0-mail-a61.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a61.g.dreamhost.com (Postfix) with ESMTP id CC669806C3; Wed, 7 Nov 2018 13:58:58 -0800 (PST) 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:content-transfer-encoding; s=linkov.net; bh=JZwbfT vsDDYopCHWetqfWHRCsTc=; b=VLTtu6Yxx1j7WcOlPDspOi0LWyqGBcitwab+BZ D8ZHkxzVdVsCxSP22VKSHDkbxXrvwgHyo/DvM6FyXemPGOexyBRvPf8K3If+ec41 pEBf/qDMy84Uxib+JvgzUnjAxP7jFzfNFyQIRsQUai1GeJqQa8hXJJMKyJtaL5Sz iYh5Y= Received: from mail.jurta.org (m91-129-107-244.cust.tele2.ee [91.129.107.244]) (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-a61.g.dreamhost.com (Postfix) with ESMTPSA id B5054806C2; Wed, 7 Nov 2018 13:58:56 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a61 From: Juri Linkov To: martin rudalics Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Organization: LINKOV.NET References: <87efdnsp2k.fsf@mail.linkov.net> <87in1phhx2.fsf@mail.linkov.net> <5BD2C52E.2060607@gmx.at> <87ftwrgwp2.fsf@mail.linkov.net> <5BD57A8D.8080408@gmx.at> <875zxmx95h.fsf@mail.linkov.net> <5BD70F14.8080509@gmx.at> <87lg6g750v.fsf@mail.linkov.net> <5BD81D97.2000000@gmx.at> <87bm7bru1c.fsf@mail.linkov.net> <5BD963C8.9090905@gmx.at> <87h8h195ki.fsf@mail.linkov.net> <5BDAC159.1060008@gmx.at> <87muqsh11q.fsf@mail.linkov.net> <5BDC0E81.1050806@gmx.at> <87tvkwh4bp.fsf@mail.linkov.net> <5BE00F12.5000703@gmx.at> <87d0rjuq8c.fsf@mail.linkov.net> <5BE15552.4040507@gmx.at> <87y3a5rgm2.fsf@mail.linkov.net> <5BE2AF28.2020505@gmx.at> Date: Wed, 07 Nov 2018 23:44:27 +0200 In-Reply-To: <5BE2AF28.2020505@gmx.at> (martin rudalics's message of "Wed, 07 Nov 2018 10:23:52 +0100") Message-ID: <877ehowp0c.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedrjeelgddugeduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgfgsehtkeertddtreejnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddtjedrvdeggeenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdejrddvgeegpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtoheprhhuuggrlhhitghssehgmhigrdgrthenucevlhhushhtvghrufhiiigvpedt Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>> IME the windmove user community is quite small. Don't we expect >>> directional buffer display to attract more users than that? Per se >>> S-M- C-x 4 C-o is a pain to type. So we could provide >>> attractive key bindings because windmove is pretty independent in thi= s >>> regard. And we should advertise them in the user manual. >> >> What key bindings are more attractive in your opinion? > > What I meant here is that if a user has typed a (customizable > directional) prefix like S-M- the next key should already > supply all that's needed for the most common usages of the prefix. I see now how this relates to your example above =E2=80=98S-M- C-x= 4 C-o=E2=80=99. And I agree that it's really a pain to type such long key sequences as =E2=80=98S-M- C-x 4 .=E2=80=99 Shouldn't xref support a shorter and easier to type key sequence =E2=80=98S-M- M-.=E2=80=99 with the following patch: diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index 6b1421a6f7..6aab174bcf 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -425,7 +425,7 @@ xref--pop-to-location (xref-location-marker (xref-item-location item)))) (buf (marker-buffer marker))) (cl-ecase action - ((nil) (switch-to-buffer buf)) + ((nil) (pop-to-buffer-same-window buf)) (window (pop-to-buffer buf t)) (frame (let ((pop-up-frames t)) (pop-to-buffer buf t)))) (xref--goto-char marker)) > Note that in its current form windmove.el is practically not needed > any more - most of its job is now done by 'window-in-direction'. All > that remains in practice are its keybindings. Then maybe all unused code should be removed including windmove-other-window-loc, windmove-reference-loc, windmove-wrap-loc-for-movement, windmove-constrain-loc-for-movement, etc. From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 08 03:53:11 2018 Received: (at 32790) by debbugs.gnu.org; 8 Nov 2018 08:53:11 +0000 Received: from localhost ([127.0.0.1]:40253 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gKg3q-0000K0-VC for submit@debbugs.gnu.org; Thu, 08 Nov 2018 03:53:11 -0500 Received: from mout.gmx.net ([212.227.17.21]:58913) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gKg3p-0000Jo-Qa for 32790@debbugs.gnu.org; Thu, 08 Nov 2018 03:53:10 -0500 Received: from [192.168.1.101] ([212.95.5.129]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MRTiG-1fwMnk03M8-00ScLf; Thu, 08 Nov 2018 09:53:00 +0100 Message-ID: <5BE3F967.8080809@gmx.at> Date: Thu, 08 Nov 2018 09:52:55 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <87in1phhx2.fsf@mail.linkov.net> <5BD2C52E.2060607@gmx.at> <87ftwrgwp2.fsf@mail.linkov.net> <5BD57A8D.8080408@gmx.at> <875zxmx95h.fsf@mail.linkov.net> <5BD70F14.8080509@gmx.at> <87lg6g750v.fsf@mail.linkov.net> <5BD81D97.2000000@gmx.at> <87bm7bru1c.fsf@mail.linkov.net> <5BD963C8.9090905@gmx.at> <87h8h195ki.fsf@mail.linkov.net> <5BDAC159.1060008@gmx.at> <87muqsh11q.fsf@mail.linkov.net> <5BDC0E81.1050806@gmx.at> <87tvkwh4bp.fsf@mail.linkov.net> <5BE00F12.5000703@gmx.at> <87d0rjuq8c.fsf@mail.linkov.net> <5BE15552.4040507@gmx.at> <87y3a5rgm2.fsf@mail.linkov.net> <5BE2AF28.2020505@gmx.at> <877ehowp0c.fsf@mail.linkov.net> In-Reply-To: <877ehowp0c.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:BHw10Vk7yRcRS+c1WRiqs8+qNKoJCl7z08TIImeuRg4wYqDcBdH c+KyV8RiL5gHOt97K7y09qVAfOs2kWVCgtMsNV6bySYeJU7WS+312iFkfZIlHXhguQVF9zx 2RktUVUx4YML9fLEKfkCkg9RNuEbz7Lq4ljzgP3aSgLvfsdcMBuNOgSKQShP2aE8HpKWjoL kyxbsl3IUX6aP9YgnioHw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:ki6QHR+jqbI=:zUNZlXP/RHH5FDYStv1+42 /9b5bupSjg3fqgaws5FOoIvhUZnkXHlvjOrMZHOVIWsbZNj5Y0e+9QCXVohlWmJAKVRWGG56z zGCEu2c9FEG5hHvQMsX7KahS/xvxceGRJrj1vDW4QizV8ImfrtlijL+ZMRqH7Xmsehyw8f8al Q3+WPXRjLxyj3lc3bsPGt9geY435gytcvCJ9hdRPngKs6a6qyszUEmvq75iJxsvcOjoIulQNg GLLrJr/r1EUGUo3WMj77MKdpw9bvNzQl9JGEOO7PON1IiVdp1ipwluiOUwHc+iqxu2xO9qAc1 Gn6GChA5oBkxJ2QGC9vqsyhpS1BivFJSHm4dsBQGq/vN8PT7njz/uB7dj01u6vFnybkD2n1P5 e/Rzi2E1mpLmjPhcb+iPDx4f1MFI1lUwcMN48Xf61tZQvHslgn3o/DnfGmgtDZ4omBUnaaccb qoMyV8bGsNg3quwVK/sEe4DkBaCe5m/uCq8Oe3Za7VgsayLPGB7BZg3NQI1gvBTtaY8WNTys6 xYGMj+alvdbq1gnmHsdfLVgMYdJYPNDBEddQRD6V9cHVex+rSH28eeAClQ/HS3JIssM7VE9Zw NLR79g9/8JQp7nqJKVksW7LCm05nCi1sP0IvYM39HTDibtUpuvTaxzRl4cpsIsPfhiZbzzQTr QZZqpKU+gX716Ph1U1+DOBofqgmQakkK7DbqmF3vdQgMBDcAt65emm6nZkgwYPSVdgK4X9wAR di8ZOUpnK1IR8acx8CZqBir4OxQeodhF0fNvNcRn2KLQQhDbGSInGPCd8OR3jGfxoS750K+EQ j4C/QfpqsTOEEevCACbn7gxZ3c+8CUl8sqn1D4/u9AOdJYjqgfSO7T1lHzYdBO9rTBCkwBaa4 9sRHretmJaO5vus3QtnmcaSbItryboVgTJvKmRfLhzXsjdRm0yOnUALf+d3Esu X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > Shouldn't xref support a shorter and easier to type key sequence > =E2=80=98S-M- M-.=E2=80=99 with the following patch: > > diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el > index 6b1421a6f7..6aab174bcf 100644 > --- a/lisp/progmodes/xref.el > +++ b/lisp/progmodes/xref.el > @@ -425,7 +425,7 @@ xref--pop-to-location > (xref-location-marker (xref-item-location item)))= ) > (buf (marker-buffer marker))) > (cl-ecase action > - ((nil) (switch-to-buffer buf)) > + ((nil) (pop-to-buffer-same-window buf)) > (window (pop-to-buffer buf t)) > (frame (let ((pop-up-frames t)) (pop-to-buffer buf t)))) > (xref--goto-char marker)) I think so. In particular because 'xref--goto-char' does not cohabit well with 'switch-to-buffer-preserve-window-point' in the first place. Dmitry should consent, though. > Then maybe all unused code should be removed including > windmove-other-window-loc, windmove-reference-loc, > windmove-wrap-loc-for-movement, windmove-constrain-loc-for-movement, > etc. Citing from a discussion with Dmitry: > I thought you might go ahead and just port windmove to use > `window-in-direction'. windmove has an extra ARG to distinguish the upper left corner of a window and its position of point as reference points. I can't easily dismiss that. I'm not sure whether it's still relevant but if so we'd have to include it in 'window-in-direction'. martin From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 08 16:42:51 2018 Received: (at 32790) by debbugs.gnu.org; 8 Nov 2018 21:42:51 +0000 Received: from localhost ([127.0.0.1]:41939 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gKs4f-0000u4-VL for submit@debbugs.gnu.org; Thu, 08 Nov 2018 16:42:51 -0500 Received: from purple.birch.relay.mailchannels.net ([23.83.209.150]:30029) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gKs4d-0000tu-8a for 32790@debbugs.gnu.org; Thu, 08 Nov 2018 16:42:47 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id E63CF5C26D7; Thu, 8 Nov 2018 21:42:44 +0000 (UTC) Received: from pdx1-sub0-mail-a66.g.dreamhost.com (unknown [100.96.19.74]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id A046A5C3E14; Thu, 8 Nov 2018 21:42:44 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a66.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, 08 Nov 2018 21:42:44 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Gusty-Thoughtful: 70dbb6cf4cb50611_1541713364763_1003297233 X-MC-Loop-Signature: 1541713364763:3135011908 X-MC-Ingress-Time: 1541713364763 Received: from pdx1-sub0-mail-a66.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a66.g.dreamhost.com (Postfix) with ESMTP id 62BE5806DD; Thu, 8 Nov 2018 13:42:44 -0800 (PST) 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:content-transfer-encoding; s=linkov.net; bh=iS1Chp DMywsXBKSPGymZHWJBSug=; b=aP1YHqEmue2UqlOWzl0hEbLy8pIpxfr+6SlXd2 x/bP6qdH9k9zNTlRt9jaASUEBDBNEbHLbLJQP1tl3YS2nzHqoMhCXNw8K56+48QO 4jG2NoMKYfr96w+mqFjhSLokTBd0z3GUGiJS1exN8C916V5DuXj6jChC4D2D9/z9 k9ybU= Received: from mail.jurta.org (m91-129-107-244.cust.tele2.ee [91.129.107.244]) (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-a66.g.dreamhost.com (Postfix) with ESMTPSA id A5A8880695; Thu, 8 Nov 2018 13:42:40 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a66 From: Juri Linkov To: martin rudalics Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Organization: LINKOV.NET References: <87efdnsp2k.fsf@mail.linkov.net> <87ftwrgwp2.fsf@mail.linkov.net> <5BD57A8D.8080408@gmx.at> <875zxmx95h.fsf@mail.linkov.net> <5BD70F14.8080509@gmx.at> <87lg6g750v.fsf@mail.linkov.net> <5BD81D97.2000000@gmx.at> <87bm7bru1c.fsf@mail.linkov.net> <5BD963C8.9090905@gmx.at> <87h8h195ki.fsf@mail.linkov.net> <5BDAC159.1060008@gmx.at> <87muqsh11q.fsf@mail.linkov.net> <5BDC0E81.1050806@gmx.at> <87tvkwh4bp.fsf@mail.linkov.net> <5BE00F12.5000703@gmx.at> <87d0rjuq8c.fsf@mail.linkov.net> <5BE15552.4040507@gmx.at> <87y3a5rgm2.fsf@mail.linkov.net> <5BE2AF28.2020505@gmx.at> <877ehowp0c.fsf@mail.linkov.net> <5BE3F967.8080809@gmx.at> Date: Thu, 08 Nov 2018 23:38:08 +0200 In-Reply-To: <5BE3F967.8080809@gmx.at> (martin rudalics's message of "Thu, 08 Nov 2018 09:52:55 +0100") Message-ID: <87lg63ntbz.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedrkedugdduheegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgfgsehtkeertddtreejnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddtjedrvdeggeenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdejrddvgeegpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtoheprhhuuggrlhhitghssehgmhigrdgrthenucevlhhushhtvghrufhiiigvpedt Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org, Dmitry Gutov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> Shouldn't xref support a shorter and easier to type key sequence >> =E2=80=98S-M- M-.=E2=80=99 with the following patch: >> >> diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el >> index 6b1421a6f7..6aab174bcf 100644 >> --- a/lisp/progmodes/xref.el >> +++ b/lisp/progmodes/xref.el >> @@ -425,7 +425,7 @@ xref--pop-to-location >> (xref-location-marker (xref-item-location item)))= ) >> (buf (marker-buffer marker))) >> (cl-ecase action >> - ((nil) (switch-to-buffer buf)) >> + ((nil) (pop-to-buffer-same-window buf)) >> (window (pop-to-buffer buf t)) >> (frame (let ((pop-up-frames t)) (pop-to-buffer buf t)))) >> (xref--goto-char marker)) > > I think so. In particular because 'xref--goto-char' does not cohabit > well with 'switch-to-buffer-preserve-window-point' in the first place. > Dmitry should consent, though. Dmitry, do you agree this is a change for the better? >> Then maybe all unused code should be removed including >> windmove-other-window-loc, windmove-reference-loc, >> windmove-wrap-loc-for-movement, windmove-constrain-loc-for-movement, >> etc. > > Citing from a discussion with Dmitry: > > > I thought you might go ahead and just port windmove to use > > `window-in-direction'. > > windmove has an extra ARG to distinguish the upper left corner of a > window and its position of point as reference points. I can't easily > dismiss that. > > I'm not sure whether it's still relevant but if so we'd have to include > it in 'window-in-direction'. I see that an extra ARG when =E2=80=98C-u=E2=80=99 is not interpreted as = a positive arg, and =E2=80=98M--=E2=80=99 is not interpreted as a negative arg. So I pro= pose to support these prefix keys as well: diff --git a/lisp/windmove.el b/lisp/windmove.el index 598e495c7a..ea4506049b 100644 --- a/lisp/windmove.el +++ b/lisp/windmove.el @@ -512,7 +512,7 @@ windmove-left If no window is at the desired location, an error is signaled unless `windmove-create-window' is non-nil that creates a new window." (interactive "P") - (windmove-do-window-select 'left arg)) + (windmove-do-window-select 'left (and arg (prefix-numeric-value arg)))= ) =20 ;;;###autoload (defun windmove-up (&optional arg) @@ -524,7 +524,7 @@ windmove-up If no window is at the desired location, an error is signaled unless `windmove-create-window' is non-nil that creates a new window." (interactive "P") - (windmove-do-window-select 'up arg)) + (windmove-do-window-select 'up (and arg (prefix-numeric-value arg)))) =20 ;;;###autoload (defun windmove-right (&optional arg) @@ -536,7 +536,7 @@ windmove-right If no window is at the desired location, an error is signaled unless `windmove-create-window' is non-nil that creates a new window." (interactive "P") - (windmove-do-window-select 'right arg)) + (windmove-do-window-select 'right (and arg (prefix-numeric-value arg))= )) =20 ;;;###autoload (defun windmove-down (&optional arg) @@ -548,7 +548,7 @@ windmove-down If no window is at the desired location, an error is signaled unless `windmove-create-window' is non-nil that creates a new window." (interactive "P") - (windmove-do-window-select 'down arg)) + (windmove-do-window-select 'down (and arg (prefix-numeric-value arg)))= ) =20 =20 ;;; set up keybindings From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 08 16:57:42 2018 Received: (at 32790) by debbugs.gnu.org; 8 Nov 2018 21:57:42 +0000 Received: from localhost ([127.0.0.1]:41943 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gKsJ4-0001Eh-9b for submit@debbugs.gnu.org; Thu, 08 Nov 2018 16:57:42 -0500 Received: from goldenrod.birch.relay.mailchannels.net ([23.83.209.74]:50585) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gKsJ2-0001EY-8q for 32790@debbugs.gnu.org; Thu, 08 Nov 2018 16:57:41 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id BEC52123F3B; Thu, 8 Nov 2018 21:57:38 +0000 (UTC) Received: from pdx1-sub0-mail-a66.g.dreamhost.com (unknown [100.96.19.74]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 633F21246CB; Thu, 8 Nov 2018 21:57:38 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a66.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, 08 Nov 2018 21:57:38 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Arithmetic-Left: 64edf9362d9d4f5d_1541714258512_2481456414 X-MC-Loop-Signature: 1541714258512:2030821698 X-MC-Ingress-Time: 1541714258512 Received: from pdx1-sub0-mail-a66.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a66.g.dreamhost.com (Postfix) with ESMTP id 25D3A806E1; Thu, 8 Nov 2018 13:57:38 -0800 (PST) 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:content-transfer-encoding; s=linkov.net; bh=2/LbjN St8kJwBpgu+hdqw4jAtfI=; b=oxKUjZa5217Tzhb+yOv9Po5+pJiPL85AnvH/qq 3PB19JS45s/b5vy1phew8nyBGMNz+/WGNPGQedUiXfBFc/PaPcq56J2/0HRctdib cf3N52vUq00cwsSJM/CU3kCVpcUPBWEpIZqcxtzGjhhLBGX21FOISgVO8cDbmNtV 5hxOA= Received: from mail.jurta.org (m91-129-107-244.cust.tele2.ee [91.129.107.244]) (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-a66.g.dreamhost.com (Postfix) with ESMTPSA id 8FDE8806DF; Thu, 8 Nov 2018 13:57:36 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a66 From: Juri Linkov To: martin rudalics Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Organization: LINKOV.NET References: <87efdnsp2k.fsf@mail.linkov.net> <87in1phhx2.fsf@mail.linkov.net> <5BD2C52E.2060607@gmx.at> <87ftwrgwp2.fsf@mail.linkov.net> <5BD57A8D.8080408@gmx.at> <875zxmx95h.fsf@mail.linkov.net> <5BD70F14.8080509@gmx.at> <87lg6g750v.fsf@mail.linkov.net> <5BD81D97.2000000@gmx.at> <87bm7bru1c.fsf@mail.linkov.net> <5BD963C8.9090905@gmx.at> <87h8h195ki.fsf@mail.linkov.net> <5BDAC159.1060008@gmx.at> <87muqsh11q.fsf@mail.linkov.net> <5BDC0E81.1050806@gmx.at> <87tvkwh4bp.fsf@mail.linkov.net> <5BE00F12.5000703@gmx.at> <87d0rjuq8c.fsf@mail.linkov.net> <5BE15552.4040507@gmx.at> <87y3a5rgm2.fsf@mail.linkov.net> <5BE2AF28.2020505@gmx.at> Date: Thu, 08 Nov 2018 23:53:23 +0200 In-Reply-To: <5BE2AF28.2020505@gmx.at> (martin rudalics's message of "Wed, 07 Nov 2018 10:23:52 +0100") Message-ID: <87bm6zme24.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedrkedugdduheejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgfgsehtkeertddtreejnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddtjedrvdeggeenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdejrddvgeegpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtoheprhhuuggrlhhitghssehgmhigrdgrthenucevlhhushhtvghrufhiiigvpedt Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) In bug#33258 I tried to use inhibit-select-window in display-buffer-overriding-action, but it's better just to use a prefix arg to determine whether the window should remain selected, e.g. =E2=80=98C-u S-M-up=E2=80=99 means no-select, or =E2=80=98M-- S-M-le= ft=E2=80=99 means no-select and use the bottom egde, etc. The only problem is that I can't decide what window to use for window-in-direction and split-window in display-buffer-overriding-action: an original window that was selected at the moment of =E2=80=98S-M-up=E2=80= =99 invocation, or a selected window that is current at the moment when display-buffer-overriding-action is applied? Please see the questions in the comments of this patch: diff --git a/lisp/windmove.el b/lisp/windmove.el index 598e495c7a..ea4506049b 100644 --- a/lisp/windmove.el +++ b/lisp/windmove.el @@ -1,4 +1,4 @@ -;;; windmove.el --- directional window-selection routines +;;; windmove.el --- directional window-selection routines -*- lexical-b= inding:t -*- ;; ;; Copyright (C) 1998-2018 Free Software Foundation, Inc. ;; @@ -571,6 +571,104 @@ windmove-default-keybindings (global-set-key (vector (append modifiers '(up))) 'windmove-up) (global-set-key (vector (append modifiers '(down))) 'windmove-down)) =20 +;;; Directional window display + +(defun windmove-display-in-direction (dir &optional arg) + "Display the next buffer in the window at direction DIR. +Create a new window if there is no window in that direction. +If prefix ARG is `C-u' or `M--', restore the previously selected window. +With no prefix ARG, or with prefix ARG equal to zero, a displayed window= is +relative to the position of point in the selected window; otherwise it i= s +relative to the first edge (for positive ARG or `C-u') or the last edge +(for negative ARG or `M--') of the selected window." + (interactive) + (let* ((command this-command) + (action display-buffer-overriding-action) + (minibuffer-depth (minibuffer-depth)) + (selected-window (selected-window)) + (restore-window (or (consp arg) (eq arg '-))) + (clearfun (make-symbol "clear-display-buffer-overriding-action"= )) + (exitfun + (lambda () + (setq display-buffer-overriding-action action) + (when (and restore-window (window-live-p selected-window)) + (select-window selected-window)) + (remove-hook 'post-command-hook clearfun)))) + (fset clearfun + (lambda () + (unless (or + ;; Remove the hook immediately + ;; after exiting the minibuffer. + (> (minibuffer-depth) minibuffer-depth) + ;; But don't remove immediately after + ;; adding the hook by the same command below. + (eq this-command command)) + (funcall exitfun)))) + (add-hook 'post-command-hook clearfun) + (push (lambda (buffer alist) + (unless (> (minibuffer-depth) minibuffer-depth) + (let ((window (if (eq dir 'same-window) + (selected-window) ;; or maybe `selected-window'? + (window-in-direction + dir selected-window nil ;; or `nil' inste= ad of `selected-window'? + (and arg (prefix-numeric-value arg)) + windmove-wrap-around))) + (type 'reuse)) + (unless window + ;; maybe use `selected-window' in WINDOW arg of split-window? + (setq window (split-window nil nil dir) type 'window)) + (window--display-buffer buffer window type alist)))) + display-buffer-overriding-action) + (message "[display-%s]" dir))) + +;;;###autoload +(defun windmove-display-left (&optional arg) + "Display the next buffer in window to the left of the current one. +With a prefix argument, restore the previously selected window." + (interactive "P") + (windmove-display-in-direction 'left arg)) + +;;;###autoload +(defun windmove-display-up (&optional arg) + "Display the next buffer in window above the current one. +With a prefix argument, restore the previously selected window." + (interactive "P") + (windmove-display-in-direction 'up arg)) + +;;;###autoload +(defun windmove-display-right (&optional arg) + "Display the next buffer in window to the right of the current one. +With a prefix argument, restore the previously selected window." + (interactive "P") + (windmove-display-in-direction 'right arg)) + +;;;###autoload +(defun windmove-display-down (&optional arg) + "Display the next buffer in window below the current one. +With a prefix argument, restore the previously selected window." + (interactive "P") + (windmove-display-in-direction 'down arg)) + +;;;###autoload +(defun windmove-display-same-window (&optional arg) + "Display the next buffer in the same window." + (interactive "P") + (windmove-display-in-direction 'same-window arg)) + +;;;###autoload +(defun windmove-display-default-keybindings (&optional modifiers) + "Set up keybindings for directional display. +Keybindings are of the form MODIFIERS-{left,right,up,down}, +where MODIFIERS is either a list of modifiers or a single modifier. +Default value of MODIFIERS is `shift-meta'." + (interactive) + (unless modifiers (setq modifiers '(shift meta))) + (unless (listp modifiers) (setq modifiers (list modifiers))) + (global-set-key (vector (append modifiers '(left))) 'windmove-display= -left) + (global-set-key (vector (append modifiers '(right))) 'windmove-display= -right) + (global-set-key (vector (append modifiers '(up))) 'windmove-display= -up) + (global-set-key (vector (append modifiers '(down))) 'windmove-display= -down) + (global-set-key (vector (append modifiers '(?0))) 'windmove-display= -same-window)) =20 (provide 'windmove) =20 From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 09 04:09:18 2018 Received: (at 32790) by debbugs.gnu.org; 9 Nov 2018 09:09:18 +0000 Received: from localhost ([127.0.0.1]:42198 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gL2n0-0002fT-5k for submit@debbugs.gnu.org; Fri, 09 Nov 2018 04:09:18 -0500 Received: from mout.gmx.net ([212.227.15.19]:48577) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gL2my-0002fG-Mh for 32790@debbugs.gnu.org; Fri, 09 Nov 2018 04:09:17 -0500 Received: from [192.168.1.101] ([46.125.249.124]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MHXXo-1gM8Bb1PB6-003NTS; Fri, 09 Nov 2018 10:09:07 +0100 Message-ID: <5BE54EAB.4050501@gmx.at> Date: Fri, 09 Nov 2018 10:08:59 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <87ftwrgwp2.fsf@mail.linkov.net> <5BD57A8D.8080408@gmx.at> <875zxmx95h.fsf@mail.linkov.net> <5BD70F14.8080509@gmx.at> <87lg6g750v.fsf@mail.linkov.net> <5BD81D97.2000000@gmx.at> <87bm7bru1c.fsf@mail.linkov.net> <5BD963C8.9090905@gmx.at> <87h8h195ki.fsf@mail.linkov.net> <5BDAC159.1060008@gmx.at> <87muqsh11q.fsf@mail.linkov.net> <5BDC0E81.1050806@gmx.at> <87tvkwh4bp.fsf@mail.linkov.net> <5BE00F12.5000703@gmx.at> <87d0rjuq8c.fsf@mail.linkov.net> <5BE15552.4040507@gmx.at> <87y3a5rgm2.fsf@mail.linkov.net> <5BE2AF28.2020505@gmx.at> <877ehowp0c.fsf@mail.linkov.net> <5BE3F967.8080809@gmx.at> <87lg63ntbz.fsf@mail.linkov.net> In-Reply-To: <87lg63ntbz.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:6EaIROk34bR6CzijpTG7/rUUf9J31tHm3JIx0OXNi4us6X6ezLi JFFsO7w73hy/9Cdo9u1So4Z/vEo8gKkRfap4XMIpEpWVgald7XnCyDT/Rz5tq/pS4JhnfS3 WEQynrA2NWag9eZygTp9+2M3CiYxHI/aSQUqQ8g3+lpfeVur6AcEUcj0u2Ak4QrGo7u17gG Imq8k+QuDjW7PXPEKwOyA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:+mR5gcsdJ1E=:Igs91YMHYRUQHsKwwcdi/w 6u3GyqMqWaL14GONnmfhLGkQViCeDPuiLCX6b1TyXsTHJdDEONMS+IHfphrw6zy0Wo/jC3Xx1 Yn02BVtRqMswlw0fJhRCAfNRKEK52P6pF8m5e9cd0i/5yvH98V1tfHnXnO+6agGoJGue1iUBK 9mZOwePZOqoFJIq2x0tUJHuWiDrDv1NTIct2EMkOXDwaUJ/FbgTNnbRuf2F3v/jHOTpILq7cm StJGWQj02DgifpO1GnZaeagS07eNmctWV1iSgAYUujWyJr51SyBBe6nrmzFFTWdI23g2HKaXF 6rbcZpraKq1rbYgRYoHr8ATHX0MczZFTG5pCeiD98G7BuqmadbA5FCKLul5KSB9EHMgMvpWgF qv4ytbDwwSt2HLQ6N4ANkgXoZnK0VCK9lKjZ496d+my/nvqq9VuQLXjxsb+ZeWrZ6AT561by0 V7BYASaSMlWCObJAsOG3xuv76EMDaHiH4UX19iCn9i7ft0T59dQfGhbDn5mzmUGaGTdzEp84c 9sM1JhrHIQH3lEe3PIOUWpl7mmFrDzPgBff7VjdCKhUQ6MokBS++J0/QydRdy7cAfPPt0w8KH K2+QgSq9ox93JVDkcgsB06j0fMDZ0pk1sbkT+5FwpZkKL50REQEFuQYFYYnLsuakjs0JjN6RG rhSW6dZxz9nxt70pLWUKNCJcoquYEiHjc7hAmmJU2rda59BAm2QSfF74mMgCOmsBkbzkaOu2K T2LdKO/qXx81x+M9U25YsLS6x+MJRCr0zV4XA/rvpSv1RWQlDfIWclcJI3o5m5n7siAnL/ZnM BKVh23OWsT64igSf2GVlRd5d9GoSOUIN4+tlv9FVyh0Cx757CDApMN16DmHspr7sAdxXoFheL tpzRF9RbpmFiaMhoauMLmUqxn2rmQzw7Tk4xJz1y4OsdTDpOYen3eD9pS2UCXiUK/pRnRfvSD sG+QBLrSg6g== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org, Dmitry Gutov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > If no window is at the desired location, an error is signaled > unless `windmove-create-window' is non-nil that creates a new window." Maybe we should write "unless `windmove-create-window' is non-nil and a new window is created." here. Also, in 'windmove-do-window-select' I'd write "If `windmove-create-window' is non-nil, try to create a new window in direction DIR instead." in the doc-string. martin From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 09 04:13:24 2018 Received: (at 32790) by debbugs.gnu.org; 9 Nov 2018 09:13:24 +0000 Received: from localhost ([127.0.0.1]:42205 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gL2qx-0002lR-Rr for submit@debbugs.gnu.org; Fri, 09 Nov 2018 04:13:24 -0500 Received: from mout.gmx.net ([212.227.15.15]:52027) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gL2qw-0002lB-36 for 32790@debbugs.gnu.org; Fri, 09 Nov 2018 04:13:22 -0500 Received: from [192.168.1.101] ([46.125.249.124]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MKHMk-1gKUM232Gs-001iiV; Fri, 09 Nov 2018 10:13:12 +0100 Message-ID: <5BE54FA1.2030004@gmx.at> Date: Fri, 09 Nov 2018 10:13:05 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <87in1phhx2.fsf@mail.linkov.net> <5BD2C52E.2060607@gmx.at> <87ftwrgwp2.fsf@mail.linkov.net> <5BD57A8D.8080408@gmx.at> <875zxmx95h.fsf@mail.linkov.net> <5BD70F14.8080509@gmx.at> <87lg6g750v.fsf@mail.linkov.net> <5BD81D97.2000000@gmx.at> <87bm7bru1c.fsf@mail.linkov.net> <5BD963C8.9090905@gmx.at> <87h8h195ki.fsf@mail.linkov.net> <5BDAC159.1060008@gmx.at> <87muqsh11q.fsf@mail.linkov.net> <5BDC0E81.1050806@gmx.at> <87tvkwh4bp.fsf@mail.linkov.net> <5BE00F12.5000703@gmx.at> <87d0rjuq8c.fsf@mail.linkov.net> <5BE15552.4040507@gmx.at> <87y3a5rgm2.fsf@mail.linkov.net> <5BE2AF28.2020505@gmx.at> <87bm6zme24.fsf@mail.linkov.net> In-Reply-To: <87bm6zme24.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:0XxVJ93RHu/kbf7bVbhH637UEMGiZDoxjXgwAIHi+WF44Vtrbmp Ve9MaEVqRRuzUWJotD7Mt4/WHgz6dq8k6SyTYCcF2ho3jzsJkCvzdSL48zJWJhtwIMiNBC0 afpqUJp9WisJXwsYW5Nh4F7HI8UYIWWRBnxlfVfy2NkL+d7k+di7P4pYnRpFboZqoVqUIs5 r8wK7jNKQsqPVM1KqqN0w== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:oCGBgGWXPRM=:Eoe1nT00HaNOHmeYBBMoPj RuyO8Fnegpbo2qHiPyYP5UBi2kIZckCsWlxJUmZSKzaIbRyrMDNvZV8ImrktI2U2CmXMt9Viu iiYoh18QxSsPVqAMtMALaTnTyiVzDpKmQWHWZV2JsFT37eDULxCUhYLc9nxD6pedhHn6MNVfq 7HUicGwdLEKF5p7dPPfzTDwxWlHIQ7XLXTMOmz03M/KO0OsMQ7tcQFxIe2nehR/jqb8qLoKXX ZSkXyUwhmwSy6sfQbGIYcbildXvdNYKVUxopf81TfET26Ct64/v3w2Pvht3Pai0t0Hjjzwka5 61ewNckzI0uMO6XSTDtSi2RKs+mFWWb7mGMkDD65kL9b8T0rf2bUVuJddx8XS+Bwicq0cwG9a twdC3itGGKB7092OHVK7cXrmatunIC47QZdzGNZBGOaeH1CAtjGcvvMHDDtCFNuUfUO6M+dbk RTLiUf127UyClFVnOBqfNy7BAyxWMg5Tmy/WK1PLGpymCDE8pdti827Pu/vEbn/6TkIem/iUJ L67Ag95rltKR+kuWQRI7B8beJNIAz3LuzQf6vG/8mp/SaDYmMufK42c0DhcZhgtZqej9diwRJ d8IxUKJQGHhhvrqH9gWETHPOTH33cYuZSsroT3ZYMVAq+oTCaZWcQj99fNYEmXcuBbLouH3ZE hxTtlzA89OrvVmtX1IipJ1HbnqUADqW4LkIbStUUALTCSz+Q7VjwzXyzGZmkiT3y/jDDUcQxo OWpubGn3LVOf+QUS6l4uZP57IxAJaFxsf6ZMP6gAyGULBxU35ItAXbd9Lo/s0ja6bNJJmfBlL s32c0gfz6VvEIvd4MIF3T1IZUJE8XYJqc/j8+tIxY7SkDTfjzpsI8FUZ4X7YIVlxVk3XIy5um lcR6N8n0dK3YGSjKe1wblQl9uLuFN4V8VNvAQIfS+ApGWJbfMoeM2GUPYx1HuoXrnhQZTvgwN ZBVg9RfBf1Q== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > The only problem is that I can't decide what window to use for > window-in-direction and split-window in display-buffer-overriding-acti= on: > an original window that was selected at the moment of =E2=80=98S-M-up=E2= =80=99 invocation, > or a selected window that is current at the moment when > display-buffer-overriding-action is applied? Please see > the questions in the comments of this patch: Shouldn't (selected-window) be actually (minibuffer-selected-window) in these cases anyway? Otherwise, we probably should invent two scenarios where either of the above would be preferable so we can make a decision. > + "Display the next buffer in the window at direction DIR. > +Create a new window if there is no window in that direction. > +If prefix ARG is `C-u' or `M--', restore the previously selected wind= ow. > +With no prefix ARG, or with prefix ARG equal to zero, a displayed win= dow is > +relative to the position of point in the selected window; otherwise i= t is > +relative to the first edge (for positive ARG or `C-u') or the last ed= ge > +(for negative ARG or `M--') of the selected window." What does "otherwise" stand for here? (I'm afraid your prefix arguments are slowly getting over my head.) martin From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 10 16:59:12 2018 Received: (at 32790) by debbugs.gnu.org; 10 Nov 2018 21:59:12 +0000 Received: from localhost ([127.0.0.1]:45105 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gLbHc-0004r4-4d for submit@debbugs.gnu.org; Sat, 10 Nov 2018 16:59:12 -0500 Received: from lavender.maple.relay.mailchannels.net ([23.83.214.99]:24465) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gLbHZ-0004qv-Rs for 32790@debbugs.gnu.org; Sat, 10 Nov 2018 16:59:10 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 3F68B682820; Sat, 10 Nov 2018 21:59:08 +0000 (UTC) Received: from pdx1-sub0-mail-a77.g.dreamhost.com (unknown [100.96.19.78]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 08E776828F1; Sat, 10 Nov 2018 21:59:08 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a77.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); Sat, 10 Nov 2018 21:59:08 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Battle-Vacuous: 6fbcac9e713d2030_1541887148125_4125735986 X-MC-Loop-Signature: 1541887148125:2557946557 X-MC-Ingress-Time: 1541887148125 Received: from pdx1-sub0-mail-a77.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a77.g.dreamhost.com (Postfix) with ESMTP id C46047F44E; Sat, 10 Nov 2018 13:59:07 -0800 (PST) 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:content-transfer-encoding; s=linkov.net; bh=rhIcCs iTXmog5ati7PB+fKYnQs8=; b=PUgfBx4BK6Adz1D/aAoCHhtt2aUbtFN216FwNf J3Rm162TGIzfTGIuxS9NXLgxlUzCczBAf08GiVoRqOgnjpR2B7unIgVuj+ZLUHtl cPL8ny/tEloEGAdI5/MvdGKz7Uj5/FKFGqMKJTYME0486cdj5qBJJ/xmRfRG6Qm5 Pe4Os= Received: from mail.jurta.org (m91-129-107-244.cust.tele2.ee [91.129.107.244]) (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-a77.g.dreamhost.com (Postfix) with ESMTPSA id A6E3F8091E; Sat, 10 Nov 2018 13:59:05 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a77 From: Juri Linkov To: martin rudalics Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Organization: LINKOV.NET References: <87efdnsp2k.fsf@mail.linkov.net> <875zxmx95h.fsf@mail.linkov.net> <5BD70F14.8080509@gmx.at> <87lg6g750v.fsf@mail.linkov.net> <5BD81D97.2000000@gmx.at> <87bm7bru1c.fsf@mail.linkov.net> <5BD963C8.9090905@gmx.at> <87h8h195ki.fsf@mail.linkov.net> <5BDAC159.1060008@gmx.at> <87muqsh11q.fsf@mail.linkov.net> <5BDC0E81.1050806@gmx.at> <87tvkwh4bp.fsf@mail.linkov.net> <5BE00F12.5000703@gmx.at> <87d0rjuq8c.fsf@mail.linkov.net> <5BE15552.4040507@gmx.at> <87y3a5rgm2.fsf@mail.linkov.net> <5BE2AF28.2020505@gmx.at> <877ehowp0c.fsf@mail.linkov.net> <5BE3F967.8080809@gmx.at> <87lg63ntbz.fsf@mail.linkov.net> <5BE54EAB.4050501@gmx.at> Date: Sat, 10 Nov 2018 23:25:22 +0200 In-Reply-To: <5BE54EAB.4050501@gmx.at> (martin rudalics's message of "Fri, 09 Nov 2018 10:08:59 +0100") Message-ID: <87bm6wpv11.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedrkeehgdduheeiucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgfgsehtkeertddtreejnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddtjedrvdeggeenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdejrddvgeegpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtoheprhhuuggrlhhitghssehgmhigrdgrthenucevlhhushhtvghrufhiiigvpedt Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org, Dmitry Gutov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> If no window is at the desired location, an error is signaled >> unless `windmove-create-window' is non-nil that creates a new window= ." > > Maybe we should write "unless `windmove-create-window' is non-nil and > a new window is created." here. Also, in 'windmove-do-window-select' > I'd write "If `windmove-create-window' is non-nil, try to create a new > window in direction DIR instead." in the doc-string. OK, I'll fix this in the next commit. BTW, please note a nice feature that when `windmove-create-window' is non-nil, then the Meta-modifier is not necessary, i.e. these key sequences should provide the equivalent result: M-S-right M-. S-right M-. because S-right will create a new window in that direction before M-. is invoked in that manually created window (when S-right is bound to windmove-right, and M-S-right to windmove-display-right). From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 10 16:59:17 2018 Received: (at 32790) by debbugs.gnu.org; 10 Nov 2018 21:59:17 +0000 Received: from localhost ([127.0.0.1]:45108 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gLbHg-0004rM-CL for submit@debbugs.gnu.org; Sat, 10 Nov 2018 16:59:17 -0500 Received: from palegreen.birch.relay.mailchannels.net ([23.83.209.140]:14818) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gLbHe-0004rD-Az for 32790@debbugs.gnu.org; Sat, 10 Nov 2018 16:59:14 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 670B6282C15; Sat, 10 Nov 2018 21:59:13 +0000 (UTC) Received: from pdx1-sub0-mail-a77.g.dreamhost.com (unknown [100.96.29.126]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 31D79282BE5; Sat, 10 Nov 2018 21:59:13 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a77.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); Sat, 10 Nov 2018 21:59:13 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Cure-Tart: 3f807bc81a75b178_1541887153290_2854339760 X-MC-Loop-Signature: 1541887153290:3776824686 X-MC-Ingress-Time: 1541887153290 Received: from pdx1-sub0-mail-a77.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a77.g.dreamhost.com (Postfix) with ESMTP id 0043C8091E; Sat, 10 Nov 2018 13:59:13 -0800 (PST) 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:content-transfer-encoding; s=linkov.net; bh=9zwJVm kH6dBlLbx6G/sTrDlfZb4=; b=Rm3i1kgeb5ZCKGsFkV/h5tojYvhw8ONA/hQS89 JXKFoKPDAz6AWthvKOLrKaUloIpZ1Cl+LdpZfvJVZTCJx639hkIY/KX2NBAAvGLy hgLM6zQLdc53yYibkyef8zlkHlGQLLJbgR7LKP8QNEb8KWnkzuhBlXztXLM/J+HY FgQ6c= Received: from mail.jurta.org (m91-129-107-244.cust.tele2.ee [91.129.107.244]) (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-a77.g.dreamhost.com (Postfix) with ESMTPSA id 9D43E7F44E; Sat, 10 Nov 2018 13:59:11 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a77 From: Juri Linkov To: martin rudalics Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Organization: LINKOV.NET References: <87efdnsp2k.fsf@mail.linkov.net> <87ftwrgwp2.fsf@mail.linkov.net> <5BD57A8D.8080408@gmx.at> <875zxmx95h.fsf@mail.linkov.net> <5BD70F14.8080509@gmx.at> <87lg6g750v.fsf@mail.linkov.net> <5BD81D97.2000000@gmx.at> <87bm7bru1c.fsf@mail.linkov.net> <5BD963C8.9090905@gmx.at> <87h8h195ki.fsf@mail.linkov.net> <5BDAC159.1060008@gmx.at> <87muqsh11q.fsf@mail.linkov.net> <5BDC0E81.1050806@gmx.at> <87tvkwh4bp.fsf@mail.linkov.net> <5BE00F12.5000703@gmx.at> <87d0rjuq8c.fsf@mail.linkov.net> <5BE15552.4040507@gmx.at> <87y3a5rgm2.fsf@mail.linkov.net> <5BE2AF28.2020505@gmx.at> <87bm6zme24.fsf@mail.linkov.net> <5BE54FA1.2030004@gmx.at> Date: Sat, 10 Nov 2018 23:37:22 +0200 In-Reply-To: <5BE54FA1.2030004@gmx.at> (martin rudalics's message of "Fri, 09 Nov 2018 10:13:05 +0100") Message-ID: <87k1lkllud.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedrkeehgdduheeiucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgfgsehtkeertddtreejnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddtjedrvdeggeenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdejrddvgeegpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtoheprhhuuggrlhhitghssehgmhigrdgrthenucevlhhushhtvghrufhiiigvpedu Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > Shouldn't (selected-window) be actually (minibuffer-selected-window) > in these cases anyway? Otherwise, we probably should invent two > scenarios where either of the above would be preferable so we can make > a decision. Probably you meant (or (minibuffer-selected-window) (selected-window)) >> + "Display the next buffer in the window at direction DIR. >> +Create a new window if there is no window in that direction. >> +If prefix ARG is `C-u' or `M--', restore the previously selected wind= ow. >> +With no prefix ARG, or with prefix ARG equal to zero, a displayed win= dow is >> +relative to the position of point in the selected window; otherwise i= t is >> +relative to the first edge (for positive ARG or `C-u') or the last ed= ge >> +(for negative ARG or `M--') of the selected window." > > What does "otherwise" stand for here? (I'm afraid your prefix > arguments are slowly getting over my head.) This summarizes the prefix keys where 'default' is the default window selection behavior, and 'window-noselect' restores a previously selected window: default window-noselect relative to the position of point no prefix M-0 relative to the first edge M-1 C-u relative to the last edge M-- 1 M-- But maybe also another choice 'window-select' should be added to force window selection? I mean that some commands don't select the displayed window by default, e.g. help commands like 'C-h e', 'C-h f', 'C-h v', 'C-h k' after their invocation don't select the window with the *Help* buffer. Or maybe a prefix key should invert the default behavior, e.g. 'S-M-right C-x v =3D' by default selects the displayed window, so =E2=80=98C-u S-M-right C-x v =3D=E2=80=99 will not select the window. 'S-M-right C-h e' by default doesn't select the window, so =E2=80=98C-u S-M-right C-h e=E2=80=99 will select the window. From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 11 03:52:12 2018 Received: (at 32790) by debbugs.gnu.org; 11 Nov 2018 08:52:12 +0000 Received: from localhost ([127.0.0.1]:45273 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gLlTY-0005iO-Ix for submit@debbugs.gnu.org; Sun, 11 Nov 2018 03:52:12 -0500 Received: from mout.gmx.net ([212.227.17.21]:50625) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gLlTW-0005iA-Ae for 32790@debbugs.gnu.org; Sun, 11 Nov 2018 03:52:10 -0500 Received: from [192.168.1.101] ([212.95.5.227]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LzYY2-1fPnSE3tD8-014htA; Sun, 11 Nov 2018 09:52:01 +0100 Message-ID: <5BE7EDAD.9040808@gmx.at> Date: Sun, 11 Nov 2018 09:51:57 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <87ftwrgwp2.fsf@mail.linkov.net> <5BD57A8D.8080408@gmx.at> <875zxmx95h.fsf@mail.linkov.net> <5BD70F14.8080509@gmx.at> <87lg6g750v.fsf@mail.linkov.net> <5BD81D97.2000000@gmx.at> <87bm7bru1c.fsf@mail.linkov.net> <5BD963C8.9090905@gmx.at> <87h8h195ki.fsf@mail.linkov.net> <5BDAC159.1060008@gmx.at> <87muqsh11q.fsf@mail.linkov.net> <5BDC0E81.1050806@gmx.at> <87tvkwh4bp.fsf@mail.linkov.net> <5BE00F12.5000703@gmx.at> <87d0rjuq8c.fsf@mail.linkov.net> <5BE15552.4040507@gmx.at> <87y3a5rgm2.fsf@mail.linkov.net> <5BE2AF28.2020505@gmx.at> <87bm6zme24.fsf@mail.linkov.net> <5BE54FA1.2030004@gmx.at> <87k1lkllud.fsf@mail.linkov.net> In-Reply-To: <87k1lkllud.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:OD5ggDZBt1bv9fxoP924QQDvp8RxYdxae7ERJJESJYHMQYT2M+1 TMZZj0yvyMIwem64QsB+Bw2GcBnaxD0tHU4nodWYuW07yzblpBZNuiyergeLF26BsQA4nW3 DhEyzzC/NKmQ6ifds0JIijRgWvN+gHeYdomqZszy8bi/eiD+2WeYd2xp1PxKfhgd5o8CO2L Ne6nyLMsgBA5RIQozzWCg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:JjLE7u+lbZU=:Nc7QIs5SVTmtr7zsxFmRAb lluPnseB45B2UT50u8sGuBm8PUqcupWXzxFPdjiRZu94NbY8hYfATicIddbdDItaQlS0HHmk5 t2ESAeAEzY7O6Ktr8P802BcOLcgjnOl/Ye5xQFzlMFOJrMIooKpR2NioaP9bKMjLkUNaopKUB fpMgHdI9buumkPYXC0atTpB4uRI74oszf4Nl0NMCWnSD5CiCQN2Pur1bu/0y0ObbGS/MGPHXL KQWMRxJ8WmKv+NUoHrw8Bz0sa0Uy+6vJOWScItEDkL0Gka4mfXc/2Ulml6ETIvHqvl69AEuqK 5oRe+ER5elErW+oZ4M6EmatPuRME8jRYN2Z7/j6fK2L9JmvMyi5BwDnIFEQIgCT54KKEAHNtg q/OrE/kCqbogf8UndRV80BWFG8TQRfn+FcakDDEmHbhL7W2XWnneExS4ExM6pPTwcYE0LquNI c0LPAGRzdfkBXM76Afm6dZb4aM8j0SuCctbAyz9Y949frKMiPXMYdiHyOk32KHJ8vHHRApP0E e6lSAEq4F/Gp8rcsnb4asgScK19DRu3q5HaQKLU6JuWkhJ/dmUyGGSLgpCVRpOPkxnY9gA1zi PW18oikApn+FV89Tt5ZsjGnqE2B5gly0kB82zhLGICW4Gm5/mx8Ry2eO6CuyWWd/MC8k++k+H VW04JjEO6J4QfI2CpJXOuzLpmwjlN9M2RwIsviIjODjYgfAyDtq68zkyup0sE39BNeW5CS17Y TaG1ugSqjcpE5wNpRVmbxW2SEjgfJuwhjtVA3AvE6jOX5VdnDx8Jce3zObIUtCLihTWUjZYwv VTehrhceU6hD/YN+3ZKsPmHT7NM2EehJKoaVUsyCO0T570rHLoJFZ/IOv95mTG+hsEb9OWM4K xZZiGghEDQ54a4T+yHZbeGMpegcIcHbUkXA4aGm81ma+XvDhIbLxeOgaPElbCu X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> Shouldn't (selected-window) be actually (minibuffer-selected-window) >> in these cases anyway? Otherwise, we probably should invent two >> scenarios where either of the above would be preferable so we can mak= e >> a decision. > > Probably you meant (or (minibuffer-selected-window) (selected-window))= Something like that, yes. > This summarizes the prefix keys where 'default' is the default > window selection behavior, and 'window-noselect' restores a previously= > selected window: > > default window-noselect > relative to the position of point no prefix M-0 > relative to the first edge M-1 C-u > relative to the last edge M-- 1 M-- I would drop that edge thingy, interactively. I'm quite convinced that nobody would ever use it. IMHO this "relative" code is there for historical reasons - the author wrote the simpler edges versions first, wrote the point version later and didn't want to drop the edges versions then (maybe also because he wasn't sure whether the point version would always work). What I doubt is that a user would ever make the relativity choice interactively. Rather people would be used to one or the other. > But maybe also another choice 'window-select' should be added to > force window selection? I mean that some commands don't select > the displayed window by default, e.g. help commands like > 'C-h e', 'C-h f', 'C-h v', 'C-h k' after their invocation > don't select the window with the *Help* buffer. With 'help-window-select' non-nil they should always select the help window. > Or maybe a prefix key should invert the default behavior, > e.g. 'S-M-right C-x v =3D' by default selects the displayed window, > so =E2=80=98C-u S-M-right C-x v =3D=E2=80=99 will not select the windo= w. > 'S-M-right C-h e' by default doesn't select the window, > so =E2=80=98C-u S-M-right C-h e=E2=80=99 will select the window. That would confuse the hell out of me. I'm not sure how you or others feel, but personally I would prefer a fixed two layer choice like: (1) The select/no-select choice always bound to one and the same prefix key _regardless_ of the default behavior of the function (for the buffer at hand), and (2) in addition to a window relative to the selected window (above, on the right, ... a new one always made by splitting the selected window) optionally allow a window relative to the selected frame (on the top full-width, on the right full-height, ... a new one always made by splitting the frame's root window) bound to another prefix key. Then (2) could be generalized via a global option to use/make a new (child) frame in the indicated direction or whatever people want. martin From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 12 19:01:24 2018 Received: (at 32790) by debbugs.gnu.org; 13 Nov 2018 00:01:24 +0000 Received: from localhost ([127.0.0.1]:48430 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gMM8x-0006IF-UG for submit@debbugs.gnu.org; Mon, 12 Nov 2018 19:01:24 -0500 Received: from bird.maple.relay.mailchannels.net ([23.83.214.17]:51349) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gMM8w-0006I5-At for 32790@debbugs.gnu.org; Mon, 12 Nov 2018 19:01:23 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 51D7F43A49; Tue, 13 Nov 2018 00:01:20 +0000 (UTC) Received: from pdx1-sub0-mail-a77.g.dreamhost.com (unknown [100.96.29.126]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 133A7439E9; Tue, 13 Nov 2018 00:01:20 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a77.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); Tue, 13 Nov 2018 00:01:20 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Towering-Abaft: 2e6b0bab3ad254c0_1542067280199_1920007088 X-MC-Loop-Signature: 1542067280198:3830652595 X-MC-Ingress-Time: 1542067280198 Received: from pdx1-sub0-mail-a77.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a77.g.dreamhost.com (Postfix) with ESMTP id C64087FF38; Mon, 12 Nov 2018 16:01:19 -0800 (PST) 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:content-transfer-encoding; s=linkov.net; bh=S+uVWp cs3GyJYKlZP8HSbeA3+40=; b=tbJQMOxVqMpRJK/0pdcSxMQvnbtp3rafPRMe4y QMO6LSf+6BqTcUIx1HC45CXxjClyRFR+wF9JJwuhr4kvE1GOuArJoTgTKTBvyifq 3l6dCaU8zVsp+ez4F6c02/VwblfJ5jUt2C5FLHCTs9ruxlH/rw99dyW1+LdNG9tR jPtZo= Received: from mail.jurta.org (m91-129-107-244.cust.tele2.ee [91.129.107.244]) (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-a77.g.dreamhost.com (Postfix) with ESMTPSA id E61007FF2D; Mon, 12 Nov 2018 16:01:17 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a77 From: Juri Linkov To: martin rudalics Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Organization: LINKOV.NET References: <87efdnsp2k.fsf@mail.linkov.net> <875zxmx95h.fsf@mail.linkov.net> <5BD70F14.8080509@gmx.at> <87lg6g750v.fsf@mail.linkov.net> <5BD81D97.2000000@gmx.at> <87bm7bru1c.fsf@mail.linkov.net> <5BD963C8.9090905@gmx.at> <87h8h195ki.fsf@mail.linkov.net> <5BDAC159.1060008@gmx.at> <87muqsh11q.fsf@mail.linkov.net> <5BDC0E81.1050806@gmx.at> <87tvkwh4bp.fsf@mail.linkov.net> <5BE00F12.5000703@gmx.at> <87d0rjuq8c.fsf@mail.linkov.net> <5BE15552.4040507@gmx.at> <87y3a5rgm2.fsf@mail.linkov.net> <5BE2AF28.2020505@gmx.at> <87bm6zme24.fsf@mail.linkov.net> <5BE54FA1.2030004@gmx.at> <87k1lkllud.fsf@mail.linkov.net> <5BE7EDAD.9040808@gmx.at> Date: Tue, 13 Nov 2018 01:24:53 +0200 In-Reply-To: <5BE7EDAD.9040808@gmx.at> (martin rudalics's message of "Sun, 11 Nov 2018 09:51:57 +0100") Message-ID: <87tvklx4je.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedrledtgdduiecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtgfesthekredttderjeenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdejrddvgeegnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtjedrvdeggedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgeptd Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> This summarizes the prefix keys where 'default' is the default >> window selection behavior, and 'window-noselect' restores a previously >> selected window: >> >> default window-noselect >> relative to the position of point no prefix M-0 >> relative to the first edge M-1 C-u >> relative to the last edge M-- 1 M-- > > I would drop that edge thingy, interactively. I'm quite convinced > that nobody would ever use it. > > IMHO this "relative" code is there for historical reasons - the author > wrote the simpler edges versions first, wrote the point version later > and didn't want to drop the edges versions then (maybe also because he > wasn't sure whether the point version would always work). What I > doubt is that a user would ever make the relativity choice > interactively. Rather people would be used to one or the other. I agree, it's too complicated, I never used edges in windmove-do-window-s= elect. >> But maybe also another choice 'window-select' should be added to >> force window selection? I mean that some commands don't select >> the displayed window by default, e.g. help commands like >> 'C-h e', 'C-h f', 'C-h v', 'C-h k' after their invocation >> don't select the window with the *Help* buffer. > > With 'help-window-select' non-nil they should always select the help > window. This means that every package should provide own customization for the select/no-select choice for its windows, instead of a general solution like inhibit-window-select that I tried to do. >> Or maybe a prefix key should invert the default behavior, >> e.g. 'S-M-right C-x v =3D' by default selects the displayed window, >> so =E2=80=98C-u S-M-right C-x v =3D=E2=80=99 will not select the windo= w. >> 'S-M-right C-h e' by default doesn't select the window, >> so =E2=80=98C-u S-M-right C-h e=E2=80=99 will select the window. > > That would confuse the hell out of me. I'm not sure how you or others > feel, but personally I would prefer a fixed two layer choice like: > > (1) The select/no-select choice always bound to one and the same > prefix key _regardless_ of the default behavior of the function (for > the buffer at hand), and This is implemented in a new version: (defun windmove-display-in-direction (dir &optional arg) "Display the next buffer in the window at direction DIR. Create a new window if there is no window in that direction. Without a prefix arg, select the window with a displayed buffer. If prefix ARG is `C-u', reselect a previously selected window." (interactive) (let* ((no-select (consp arg)) (old-window (or (minibuffer-selected-window) (selected-window))) (new-window) (minibuffer-depth (minibuffer-depth)) (action display-buffer-overriding-action) (command this-command) (clearfun (make-symbol "clear-display-buffer-overriding-action")= ) (exitfun (lambda () (setq display-buffer-overriding-action action) (when (window-live-p (if no-select old-window new-window)) (select-window (if no-select old-window new-window))) (remove-hook 'post-command-hook clearfun)))) (fset clearfun (lambda () (unless (or ;; Remove the hook immediately ;; after exiting the minibuffer. (> (minibuffer-depth) minibuffer-depth) ;; But don't remove immediately after ;; adding the hook by the same command below. (eq this-command command)) (funcall exitfun)))) (add-hook 'post-command-hook clearfun) (push (lambda (buffer alist) (unless (> (minibuffer-depth) minibuffer-depth) (let ((window (if (eq dir 'same-window) (selected-window) (window-in-direction dir nil nil (and arg (prefix-numeric-value arg)) windmove-wrap-around))) (type 'reuse)) (unless window (setq window (split-window nil nil dir) type 'window)) (setq new-window (window--display-buffer buffer window type alist))))) display-buffer-overriding-action) (message "[display-%s]" dir))) > (2) in addition to a window relative to the selected window (above, on > the right, ... a new one always made by splitting the selected window) > optionally allow a window relative to the selected frame (on the top > full-width, on the right full-height, ... a new one always made by > splitting the frame's root window) bound to another prefix key. > > Then (2) could be generalized via a global option to use/make a new > (child) frame in the indicated direction or whatever people want. But does windmove support frames in the first place? Can you use e.g. S-left to select a frame on the left? Does window-in-direction currently return frames? From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 13 04:09:11 2018 Received: (at 32790) by debbugs.gnu.org; 13 Nov 2018 09:09:11 +0000 Received: from localhost ([127.0.0.1]:48580 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gMUh5-0002fj-Ir for submit@debbugs.gnu.org; Tue, 13 Nov 2018 04:09:11 -0500 Received: from mout.gmx.net ([212.227.15.19]:56581) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gMUh4-0002fU-9i for 32790@debbugs.gnu.org; Tue, 13 Nov 2018 04:09:10 -0500 Received: from [192.168.1.101] ([213.162.73.32]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0M9aX9-1gCMT40cIx-00D2RK; Tue, 13 Nov 2018 10:09:01 +0100 Message-ID: <5BEA94A7.20809@gmx.at> Date: Tue, 13 Nov 2018 10:08:55 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <875zxmx95h.fsf@mail.linkov.net> <5BD70F14.8080509@gmx.at> <87lg6g750v.fsf@mail.linkov.net> <5BD81D97.2000000@gmx.at> <87bm7bru1c.fsf@mail.linkov.net> <5BD963C8.9090905@gmx.at> <87h8h195ki.fsf@mail.linkov.net> <5BDAC159.1060008@gmx.at> <87muqsh11q.fsf@mail.linkov.net> <5BDC0E81.1050806@gmx.at> <87tvkwh4bp.fsf@mail.linkov.net> <5BE00F12.5000703@gmx.at> <87d0rjuq8c.fsf@mail.linkov.net> <5BE15552.4040507@gmx.at> <87y3a5rgm2.fsf@mail.linkov.net> <5BE2AF28.2020505@gmx.at> <87bm6zme24.fsf@mail.linkov.net> <5BE54FA1.2030004@gmx.at> <87k1lkllud.fsf@mail.linkov.net> <5BE7EDAD.9040808@gmx.at> <87tvklx4je.fsf@mail.linkov.net> In-Reply-To: <87tvklx4je.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:zAzaZ1DhLtk4RcQNkalRfPYQ5n0BMerQxhajP/5icWpH3s3m5iU 0SPXYvHwzan+rTWIflBh+OfZ5y/3fEeH2PMrWLtfNQIKgSVyGHd+f9HyJgUrAnjQIaP+dGl l5tACW5YMU3/FfjHqn2t7PHewf+bGzl8mhM7DnO8TfCE8RE8WivWKrY+My8GUNoCYJZBO3y EEfPBAB4BvctoL6Ol47+g== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:yEZRMhU9xPw=:tuwXvGW3rUplwE5dFCN3gy EBt+sovViMqr+8GcsGf9SXIomqLPTjM3o4fkilYPFhf1Uj7yNFqMNmKpcVa51oKH7ubPDsfqZ IhR5x6iTluKv9bpKX86rCLINUefoa9qdCcABOul7S8frfo6xit4Qp0kSr3TSH2BuTWpayMHU4 N8D7hHl+yeDWDmXUeaH2Ba/r3hSxW8S9+/xSRFkKz8gEefOwLUu5/9QoSbOnpyzQ/zz2tXUE5 yklF6Wu2QfGhZh+WdAKGwLn2OVmWuQVcuGfrQWOOvHZ9amlUJ88Go5VC3X9/ZNKaVUgJJL7kI zUlU77UJWJvBFEElbOsNMtfx7pRfC5qxrcOESCgtWpni+S/i5tZar8XPyxMm4suNhN9UfS3/9 wT7l4L4iI3qf8PtiWdNkOrLdrNs3htesiKsLVJPGzOqjYUbA+rPrAet9Z7Sc7G4RTm1aYK9az OkRiYWolFqJ/gQop6Wl58aebAQZ+7+FxGHQcNPKwMOMLhFyNuNN8SYy1tqXg+02Bk7lhkVvW1 qfagOZTJnQHQW8UUXuDKQhOesi2RlT8O0SFoBX7azPjuAqHuQJ2Dj7DhUSbInV+TZn/zy3MO0 Shz3Ch0bs3/gDNYIL4KQ7/Cw+F5pBag3ZiapHzx4UqvRVshX6RyPg8s/sVifoYURZJEuXojom gKNGwTRkXIB6MjEvYwMiv/Ena1GAup226UGhOFEyMAGyoNtHZb58cs9/KVgpR0rrpnRXzHd/p vxxb5HPRneGsByviTKRmW9AIzbhUsFB0C3bjscaukMFkurd/WNXqEkrXrRbNo15gQfhjzElxg Wg/qh4qhGdemF+c4r7dgviopvfKb/ur/8NQ5LJrnGzsbxIu9kmgwbzL7jQ9qpVB6bATqBtjAG En+n8ILOKn+l+Rfs+ajofIrufZLXosv32xVB5Gy6uHlBlSIesj3zGOMeIEO0et X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> With 'help-window-select' non-nil they should always select the help >> window. > > This means that every package should provide own customization > for the select/no-select choice for its windows, instead of > a general solution like inhibit-window-select that I tried to do. With help windows it was easy to do that because they never get selected by default. >> (1) The select/no-select choice always bound to one and the same >> prefix key _regardless_ of the default behavior of the function (for >> the buffer at hand), and > > This is implemented in a new version: > > (defun windmove-display-in-direction (dir &optional arg) > "Display the next buffer in the window at direction DIR. > Create a new window if there is no window in that direction. > Without a prefix arg, select the window with a displayed buffer. > If prefix ARG is `C-u', reselect a previously selected window." I'd invert these: The "-display-" infix implies that the buffer is displayed and not popped to. So with a prefix argumet I would select the window in that direction and without it I'd leave the old window selected. >> Then (2) could be generalized via a global option to use/make a new >> (child) frame in the indicated direction or whatever people want. > > But does windmove support frames in the first place? No. > Can you use e.g. S-left to select a frame on the left? > Does window-in-direction currently return frames? No, and it's a bit tricky to do that. A window that is not on the right of a frame has always exactly one window directly at its right regardless of the position of its buffer's (window-)point. The same doesn't hold for a window that has a frame on the right. If there are two or more overlapping frames, we'd probably choose a visible one with the highest z-order value. If there is no frame directly on the right of point, we'd have to choose the one geometrically nearest to that position. martin From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 13 18:49:42 2018 Received: (at 32790) by debbugs.gnu.org; 13 Nov 2018 23:49:42 +0000 Received: from localhost ([127.0.0.1]:50742 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gMiRB-0005JG-3r for submit@debbugs.gnu.org; Tue, 13 Nov 2018 18:49:42 -0500 Received: from bird.maple.relay.mailchannels.net ([23.83.214.17]:38273) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gMiR8-0005J7-V9 for 32790@debbugs.gnu.org; Tue, 13 Nov 2018 18:49:39 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 589263E4C01; Tue, 13 Nov 2018 23:49:37 +0000 (UTC) Received: from pdx1-sub0-mail-a77.g.dreamhost.com (unknown [100.96.33.121]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 018903E4F18; Tue, 13 Nov 2018 23:49:36 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a77.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); Tue, 13 Nov 2018 23:49:37 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Illegal-Thoughtful: 379c252303dd28ad_1542152977149_669830192 X-MC-Loop-Signature: 1542152977149:1517343593 X-MC-Ingress-Time: 1542152977148 Received: from pdx1-sub0-mail-a77.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a77.g.dreamhost.com (Postfix) with ESMTP id A36218004F; Tue, 13 Nov 2018 15:49:36 -0800 (PST) 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:content-transfer-encoding; s=linkov.net; bh=KKLREQ bYqboTGY0z39aTHc+3jQo=; b=GwcaPYtP++0h/aP4fMrpESzvlws0GJqWguMUxI Dm1x2hSwsfvKxo+ipTd63MWiGapKNzDyaLV7GfOKUeJQ4UZBIIU1S2979l+zTyKY BU7EhaycwAcY9bEq5XHOljDvD3QTvC75IIeokkNLOYJD9B6IlZhNZrC/yys1N0fH rfOwo= Received: from mail.jurta.org (m91-129-107-244.cust.tele2.ee [91.129.107.244]) (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-a77.g.dreamhost.com (Postfix) with ESMTPSA id B330A8004C; Tue, 13 Nov 2018 15:49:34 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a77 From: Juri Linkov To: martin rudalics Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Organization: LINKOV.NET References: <87efdnsp2k.fsf@mail.linkov.net> <87lg6g750v.fsf@mail.linkov.net> <5BD81D97.2000000@gmx.at> <87bm7bru1c.fsf@mail.linkov.net> <5BD963C8.9090905@gmx.at> <87h8h195ki.fsf@mail.linkov.net> <5BDAC159.1060008@gmx.at> <87muqsh11q.fsf@mail.linkov.net> <5BDC0E81.1050806@gmx.at> <87tvkwh4bp.fsf@mail.linkov.net> <5BE00F12.5000703@gmx.at> <87d0rjuq8c.fsf@mail.linkov.net> <5BE15552.4040507@gmx.at> <87y3a5rgm2.fsf@mail.linkov.net> <5BE2AF28.2020505@gmx.at> <87bm6zme24.fsf@mail.linkov.net> <5BE54FA1.2030004@gmx.at> <87k1lkllud.fsf@mail.linkov.net> <5BE7EDAD.9040808@gmx.at> <87tvklx4je.fsf@mail.linkov.net> <5BEA94A7.20809@gmx.at> Date: Wed, 14 Nov 2018 01:20:53 +0200 In-Reply-To: <5BEA94A7.20809@gmx.at> (martin rudalics's message of "Tue, 13 Nov 2018 10:08:55 +0100") Message-ID: <87r2foa8gq.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedrledvgddufecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtgfesthekredttderjeenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdejrddvgeegnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtjedrvdeggedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgeptd Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>> (1) The select/no-select choice always bound to one and the same >>> prefix key _regardless_ of the default behavior of the function (for >>> the buffer at hand), and >> >> This is implemented in a new version: >> >> (defun windmove-display-in-direction (dir &optional arg) >> "Display the next buffer in the window at direction DIR. >> Create a new window if there is no window in that direction. >> Without a prefix arg, select the window with a displayed buffer. >> If prefix ARG is `C-u', reselect a previously selected window." > > I'd invert these: The "-display-" infix implies that the buffer is > displayed and not popped to. Then easier just to rename it to windmove-pop-in-direction because most commands use pop-to-buffer, so this should be the default. > So with a prefix argumet I would select the window in that direction > and without it I'd leave the old window selected. If you prefer the inverse, then a new option could be added with a name windmove-display-pop-up. And =E2=80=98C-u C-u=E2=80=99 will invert its v= alue like for =E2=80=98diff-jump-to-old-file=E2=80=99. >> Can you use e.g. S-left to select a frame on the left? >> Does window-in-direction currently return frames? > > No, and it's a bit tricky to do that. A window that is not on the > right of a frame has always exactly one window directly at its right > regardless of the position of its buffer's (window-)point. The same > doesn't hold for a window that has a frame on the right. If there are > two or more overlapping frames, we'd probably choose a visible one > with the highest z-order value. If there is no frame directly on the > right of point, we'd have to choose the one geometrically nearest to > that position. Expect more fun with wrapping head around frame-based windmove-wrap-aroun= d :) But currently I'm more concerned about inability to use switch-to-buffer, i.e. trying to display a buffer in another window with =E2=80=98S-M-down = C-x b RET=E2=80=99 doesn't work. I tried to temporarily set dedicated-p to an old window, but switch-to-buffer removes its dedicatedness. From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 14 03:33:37 2018 Received: (at 32790) by debbugs.gnu.org; 14 Nov 2018 08:33:37 +0000 Received: from localhost ([127.0.0.1]:50920 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gMqcC-00012g-UF for submit@debbugs.gnu.org; Wed, 14 Nov 2018 03:33:37 -0500 Received: from mout.gmx.net ([212.227.15.18]:39005) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gMqc8-00012R-Gl for 32790@debbugs.gnu.org; Wed, 14 Nov 2018 03:33:32 -0500 Received: from [192.168.1.101] ([212.95.5.83]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LhwLy-1fia7F0Poo-00nDBE; Wed, 14 Nov 2018 09:33:23 +0100 Message-ID: <5BEBDDCB.6090608@gmx.at> Date: Wed, 14 Nov 2018 09:33:15 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <87lg6g750v.fsf@mail.linkov.net> <5BD81D97.2000000@gmx.at> <87bm7bru1c.fsf@mail.linkov.net> <5BD963C8.9090905@gmx.at> <87h8h195ki.fsf@mail.linkov.net> <5BDAC159.1060008@gmx.at> <87muqsh11q.fsf@mail.linkov.net> <5BDC0E81.1050806@gmx.at> <87tvkwh4bp.fsf@mail.linkov.net> <5BE00F12.5000703@gmx.at> <87d0rjuq8c.fsf@mail.linkov.net> <5BE15552.4040507@gmx.at> <87y3a5rgm2.fsf@mail.linkov.net> <5BE2AF28.2020505@gmx.at> <87bm6zme24.fsf@mail.linkov.net> <5BE54FA1.2030004@gmx.at> <87k1lkllud.fsf@mail.linkov.net> <5BE7EDAD.9040808@gmx.at> <87tvklx4je.fsf@mail.linkov.net> <5BEA94A7.20809@gmx.at> <87r2foa8gq.fsf@mail.linkov.net> In-Reply-To: <87r2foa8gq.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:fvjRYGAUe9vF7BZ67G8Cuwu1shnAXfOQc+v+vL8MEQlVIWQdd4u E7DkkgXs2fZjkbpXFP18bkTvxs+ht3I8CqFXi/BNObCeyar37shLF5YDGFwFauVjzbOxQwH YI6KN3xaaFi9wokFgkgSnPzbM2MMcdlYVMvv5EQZN9RyBGD0/3nPzX+GGW/xYQBWUlDomVy C6KGcnkHsnZH5yw3XWVyQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:Y2LdgAENJGg=:DuTZGtXiCCfvGO6bhXZNP4 75/O+BiRmoSY1iZzLU3QBStbFYqFXpLnLI9pmf77JcXyeRmTP2SmTgXMIrNzy3DLKL4ihLtJg q/pxtiB4ro/6AcshMqu3WM7aMhWStvs2DAl5nCi2BkuOUMqlh3sB8ynxQUqPNVVe4HtUOjqjp VBvssjfQ+aLkATn2c/2rMc/q7HglEmZ5Q2rhDm50ZChqwgx/IF83/MfCgNWUjOepUjz6GcgpK w0A9J20cH0KuFuWfC+WPq+azPCceGmtl8i2JmPU1Gxr0p5i4MQ/SccM2z2zqEblftF3q/nwK8 fg50KiKLAyoiVQ5qurWeugs7wCVyDzS9jzCLHH1LIZFIuVOkq3WGA7xc2yDnTLCPZKftKIYcR FIBStBvWGtDDJ9MjLYa47YcGAwXLUEooJ0V5R1CK1P2Qk2eScPrjz+x1/Q08U0JKSbtbKiHsg dp2EQiFpvEn6D0zCVyyJQG1817pnkL9vFYQAaCCcjRt2ICLCFwCR3phJMk7xegH/s1uyeNb9j XvNnUYVm69BNeiDBP0SubWvnp6RxdZWOtii40qQoc5vN2sVk9LhCS4oqIEqOnwlKrFT/AI7bT 1p0PIqlgnTM6lkQ7OElAZOOSByJ8/rwprXYkDbzuILTVDTA60LTKTltgCjQ2zhVBP7F6BqSWS YWRBV+wpbP8DDhpFYBubm28+RmEd7tZvLOSfi3mdBR9Doos4CATaUl2DPhQnR0C/Dv4Vs8bwX 2UyuW97hDgkRoxqSqoS0R8I/SmNOfWW7r3zouSmqCTg5YDOOYfviaPmik+Zg3fnrg597u0jOc ACDXe8qN5HqxDmAOzwlWbl80n4e6ZXWy51U6FTjrANK6aiaU2dFdz319OApK/H4HBs9jsG1TH vsjaqc7/HdbHyfMVj4KeFrLIaZ9qIOKmVKDMpIS6w/ZTc3raeFkmL68eN3v6ny X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> I'd invert these: The "-display-" infix implies that the buffer is >> displayed and not popped to. > > Then easier just to rename it to windmove-pop-in-direction > because most commands use pop-to-buffer, so this should be > the default. That would be much better. > But currently I'm more concerned about inability to use switch-to-buff= er, > i.e. trying to display a buffer in another window with =E2=80=98S-M-do= wn C-x b RET=E2=80=99 > doesn't work. You mean wherever we can't use 'pop-to-buffer-same-window' instead? 'switch-to-buffer' is different. Reconciling 'force-same-window' and 'switch-to-buffer-in-dedicated-window' looks rather painful to me. > I tried to temporarily set dedicated-p to an old window, > but switch-to-buffer removes its dedicatedness. What did you try exactly? Naively spoken, I suppose you would have bound the dedicated flag of the selected window to 't' to make sure it can't get used and 'switch-to-buffer-in-dedicated-window' to 'pop' to avoid a user error. martin From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 14 19:31:57 2018 Received: (at 32790) by debbugs.gnu.org; 15 Nov 2018 00:31:57 +0000 Received: from localhost ([127.0.0.1]:52737 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gN5Zc-0001PH-Uz for submit@debbugs.gnu.org; Wed, 14 Nov 2018 19:31:57 -0500 Received: from quail.birch.relay.mailchannels.net ([23.83.209.151]:7406) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gN5ZY-0001Ot-JU for 32790@debbugs.gnu.org; Wed, 14 Nov 2018 19:31:53 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 150E95E1B55; Thu, 15 Nov 2018 00:31:51 +0000 (UTC) Received: from pdx1-sub0-mail-a77.g.dreamhost.com (unknown [100.96.26.166]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id AFC095E1AE9; Thu, 15 Nov 2018 00:31:50 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a77.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, 15 Nov 2018 00:31:51 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Harmony-Arithmetic: 48fcd3693d8f128c_1542241910879_3692128092 X-MC-Loop-Signature: 1542241910878:2182501512 X-MC-Ingress-Time: 1542241910878 Received: from pdx1-sub0-mail-a77.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a77.g.dreamhost.com (Postfix) with ESMTP id 67BAD815FF; Wed, 14 Nov 2018 16:31:50 -0800 (PST) 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:content-transfer-encoding; s=linkov.net; bh=kU+SWE Xd1H4sNXDATgJd6jW5k+I=; b=0UoWmKxoPnsYKnDG2n96rXFJ+WMpgB4cp+8r7i motsTriGgLSAtQxYUveC2GAv3hAZzkkMOKUgn9OjL2E8z9T65HWb3LaRBzDr5RUN rWTuczWN3j6qj/6vQ+n/LSG+TBY9wiKadU/0kHvrDF6qutZamLHxk5JVLzcoiF7Y OUEmg= Received: from mail.jurta.org (m91-129-107-244.cust.tele2.ee [91.129.107.244]) (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-a77.g.dreamhost.com (Postfix) with ESMTPSA id B8CED815FB; Wed, 14 Nov 2018 16:31:48 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a77 From: Juri Linkov To: martin rudalics Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Organization: LINKOV.NET References: <87efdnsp2k.fsf@mail.linkov.net> <87bm7bru1c.fsf@mail.linkov.net> <5BD963C8.9090905@gmx.at> <87h8h195ki.fsf@mail.linkov.net> <5BDAC159.1060008@gmx.at> <87muqsh11q.fsf@mail.linkov.net> <5BDC0E81.1050806@gmx.at> <87tvkwh4bp.fsf@mail.linkov.net> <5BE00F12.5000703@gmx.at> <87d0rjuq8c.fsf@mail.linkov.net> <5BE15552.4040507@gmx.at> <87y3a5rgm2.fsf@mail.linkov.net> <5BE2AF28.2020505@gmx.at> <87bm6zme24.fsf@mail.linkov.net> <5BE54FA1.2030004@gmx.at> <87k1lkllud.fsf@mail.linkov.net> <5BE7EDAD.9040808@gmx.at> <87tvklx4je.fsf@mail.linkov.net> <5BEA94A7.20809@gmx.at> <87r2foa8gq.fsf@mail.linkov.net> <5BEBDDCB.6090608@gmx.at> Date: Thu, 15 Nov 2018 02:15:37 +0200 In-Reply-To: <5BEBDDCB.6090608@gmx.at> (martin rudalics's message of "Wed, 14 Nov 2018 09:33:15 +0100") Message-ID: <87va4zfapq.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedrleeggddvhecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtgfesthekredttderjeenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdejrddvgeegnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtjedrvdeggedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgeptd Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>> I'd invert these: The "-display-" infix implies that the buffer is >>> displayed and not popped to. >> >> Then easier just to rename it to windmove-pop-in-direction >> because most commands use pop-to-buffer, so this should be >> the default. > > That would be much better. The name 'windmove-display-in-direction' is more intuitive and still correct because it displays. Select/no-select is a minor detail that depends on the prefix arg and a variable that I propose to name windmove-display-select. >> But currently I'm more concerned about inability to use switch-to-buff= er, >> i.e. trying to display a buffer in another window with =E2=80=98S-M-do= wn C-x b RET=E2=80=99 >> doesn't work. > > You mean wherever we can't use 'pop-to-buffer-same-window' instead? Yes, and 'switch-to-buffer' should not use 'pop-to-buffer-same-window'. > 'switch-to-buffer' is different. Reconciling 'force-same-window' and > 'switch-to-buffer-in-dedicated-window' looks rather painful to me. > >> I tried to temporarily set dedicated-p to an old window, >> but switch-to-buffer removes its dedicatedness. > > What did you try exactly? Naively spoken, I suppose you would have > bound the dedicated flag of the selected window to 't' to make > sure it can't get used and 'switch-to-buffer-in-dedicated-window' to > 'pop' to avoid a user error. I tried to set switch-to-buffer-in-dedicated-window to t instead of 'pop'= . But I see now it's not worth the trouble to handle dedicatedness in 'windmove-display-in-direction' because it's not a general solution. Maybe simpler to rebind 'C-x b' from 'switch-to-buffer' to the command 'pop-to-buffer'? Is 'pop-to-buffer' equivalent to 'switch-to-buffer' as a command with only difference in select/no-select behavior? From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 15 04:13:27 2018 Received: (at 32790) by debbugs.gnu.org; 15 Nov 2018 09:13:27 +0000 Received: from localhost ([127.0.0.1]:52991 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gNDiJ-0007vs-B7 for submit@debbugs.gnu.org; Thu, 15 Nov 2018 04:13:27 -0500 Received: from mout.gmx.net ([212.227.15.18]:51145) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gNDiI-0007vf-0S for 32790@debbugs.gnu.org; Thu, 15 Nov 2018 04:13:26 -0500 Received: from [192.168.1.101] ([212.95.5.247]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LqALY-1fsXfC0hvM-00dp2W; Thu, 15 Nov 2018 10:13:18 +0100 Message-ID: <5BED38A6.6020206@gmx.at> Date: Thu, 15 Nov 2018 10:13:10 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <87bm7bru1c.fsf@mail.linkov.net> <5BD963C8.9090905@gmx.at> <87h8h195ki.fsf@mail.linkov.net> <5BDAC159.1060008@gmx.at> <87muqsh11q.fsf@mail.linkov.net> <5BDC0E81.1050806@gmx.at> <87tvkwh4bp.fsf@mail.linkov.net> <5BE00F12.5000703@gmx.at> <87d0rjuq8c.fsf@mail.linkov.net> <5BE15552.4040507@gmx.at> <87y3a5rgm2.fsf@mail.linkov.net> <5BE2AF28.2020505@gmx.at> <87bm6zme24.fsf@mail.linkov.net> <5BE54FA1.2030004@gmx.at> <87k1lkllud.fsf@mail.linkov.net> <5BE7EDAD.9040808@gmx.at> <87tvklx4je.fsf@mail.linkov.net> <5BEA94A7.20809@gmx.at> <87r2foa8gq.fsf@mail.linkov.net> <5BEBDDCB.6090608@gmx.at> <87va4zfapq.fsf@mail.linkov.net> In-Reply-To: <87va4zfapq.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:iGV5yfX1FO6HuYuiPNXNaDK0/dQPpwcSOc9X37EpPqXup+fxT9m 5t90VZHxsQJfqagjaN78AXR310NMLDDhU8m3XwHu8whkY3jv27ycwv7pCazyAF9nTlchfIg SRDqUFC8UdDNwv65q4Z94nleNInBu41HX4j5h/7JkZrI4Lmfg3LGsmkQLNjLY1EhPeEnz4w oKm/eLQy1kjqxe6a4s7Gw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:0Fb/wTLw1SU=:ArmR4yZ3lownfOZc9LA/XI yDEjndiOTqYJTc2C8gzsW74359iNjpCqruC/YK7uTfrep6sTJSWlNFz58FIegMDxXhplHlA7p 088NwGmSMgAmMl1sZxLB2NXiSgW7vXXlt5VJ+Q+wLR0QDy+dwZPVKEY3UJjPKRIa4nGI93NDg HY7H8SGEuHTd2mHr/57mRLSIFEgkVI6E8nirJYxuEGgp5doyTblBeHWowuVcSEU+/Jf6kmT7M OzCONM0rQTa8lDTQB9Ekb8sTqGaEfCYOYKhvhbFLk+lhEWDvXhOFBA1vrb76lYrCq6woyaZTv L6HUVV6HBg0Sx90NPDovornLmbkslb01bBgh4yAuwbAyTgqrnPw1ifnsG1VgFZl/Ey1KSGHTs KbsLtWrA4qbFIZuzPI+cGdDD9xtjeEAaCsGq4DJOye0sfZLsKrciVsuqz7oPF2pXnM2ynPxyH m77UKzcDWpgPSErkD8pTXJyA6zW9b/Y8zG9i2zwPs2Icvtm80mBXp2JPA6/YnFP2lIf0e1rc1 bPLjju5yak4QQiTfwFzGKyhbgOvmfeRjud2kRXv8WC6Z7IBfjUykcEwAr3U92xCh16v1Ult8Q RLXsxy+RWsQwV+30f8qFXkXa/TIN38LwMs2odyHeIv2RtVXFOzrUDwGhOl8lpzVrHhLvnLQFT ZCKXkB0H5rHiUx6kEnOOHeIeAxnV5Xyd2Mk/6O2/v0ZEo3JZ+UDLco+9dm59CqhJdaUDFn90U KP9hzjA6o9jFN+r40RZn2LcRGUrapZY8zttVn2pHyvYYV88ufxddO6XbHWUVRkTUhZdUIFvwY dRfMp06oWWH8fw8VlmuFxI8ZJLFA4+Ivq/9b9biE/D+4sgn3kv47UM/zGDuHuf6urMU7iLMm4 PG5+bZkoP0gL8GZ41VZgzd3E9/gH7QEfJYFJSNu4nrWWmpjhcj0hO+2Skl4KTMdNoYVxD8Zfs ZGbQ2mpNPvQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >>>> I'd invert these: The "-display-" infix implies that the buffer is >>>> displayed and not popped to. >>> >>> Then easier just to rename it to windmove-pop-in-direction >>> because most commands use pop-to-buffer, so this should be >>> the default. >> >> That would be much better. > > The name 'windmove-display-in-direction' is more intuitive and still > correct because it displays. Select/no-select is a minor detail > that depends on the prefix arg and a variable that I propose to name > windmove-display-select. OK. We can easily add the "other" one later if there's a need. >>> But currently I'm more concerned about inability to use switch-to-bu= ffer, >>> i.e. trying to display a buffer in another window with =E2=80=98S-M-= down C-x b RET=E2=80=99 >>> doesn't work. >> >> You mean wherever we can't use 'pop-to-buffer-same-window' instead? > > Yes, and 'switch-to-buffer' should not use 'pop-to-buffer-same-window'= =2E You mean uses of 'switch-to-buffer' in code that we cannot (or are too lazy to) replace with 'pop-to-buffer-same-window'. Right? Because ideally code should not use 'switch-to-buffer' - we had quite a number of reports that the point restoring mechanism conflicted with the purpose to show a preselected buffer position in the selected window. > I tried to set switch-to-buffer-in-dedicated-window to t instead of 'p= op'. I miss you here: Above you say that you want to display the buffer in another window. But setting 'switch-to-buffer-in-dedicated-window' to t is useful only when you insisit on using the selected window. > But I see now it's not worth the trouble to handle dedicatedness in > 'windmove-display-in-direction' because it's not a general solution. Windows have been often made dedicated so they get auto-deleted as soon as their buffer gets buried or killed. This use-case should now be handled by the 'quit-restore' parameter. I have no idea whether windows are made dedicated for any other reason. Do you? In either case we can easily add an action alist entry telling 'display-buffer' whether to reuse an arbitrary dedicated window. > Maybe simpler to rebind 'C-x b' from 'switch-to-buffer' to the command= > 'pop-to-buffer'? Is 'pop-to-buffer' equivalent to 'switch-to-buffer' > as a command with only difference in select/no-select behavior? 'pop-to-buffer' does not try to restore the previous position of point in the chosen window. martin From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 15 18:07:46 2018 Received: (at 32790) by debbugs.gnu.org; 15 Nov 2018 23:07:46 +0000 Received: from localhost ([127.0.0.1]:54559 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gNQji-0000fy-2m for submit@debbugs.gnu.org; Thu, 15 Nov 2018 18:07:46 -0500 Received: from palegreen.birch.relay.mailchannels.net ([23.83.209.140]:19692) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gNQjg-0000fo-7B for 32790@debbugs.gnu.org; Thu, 15 Nov 2018 18:07:45 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 9C7A868233A; Thu, 15 Nov 2018 23:07:42 +0000 (UTC) Received: from pdx1-sub0-mail-a77.g.dreamhost.com (unknown [100.96.20.98]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 5AAE868214E; Thu, 15 Nov 2018 23:07:42 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a77.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, 15 Nov 2018 23:07:42 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Bitter-Inform: 7c048c950d05982f_1542323262504_4062568092 X-MC-Loop-Signature: 1542323262504:664765032 X-MC-Ingress-Time: 1542323262503 Received: from pdx1-sub0-mail-a77.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a77.g.dreamhost.com (Postfix) with ESMTP id 17DC080294; Thu, 15 Nov 2018 15:07:42 -0800 (PST) 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:content-transfer-encoding; s=linkov.net; bh=sdF0YX Diak8A5u9iqsxJ63bGPnk=; b=sd7VW6SPSNScj5ufr6VY4amHjjWbIZ7wjrfO7C Fboe3SLBfCVv7h3MnODATSIQyQN4s4sW1xZPUP7KxA1v5gyFogCj2P0t+2M6deOJ LQGWH9ILJz5Wqluomo+s6qybSfHFCu8hJWE8k+hz6VbwUap/VYnTM8dvUdRryh51 zwiYY= Received: from mail.jurta.org (m91-129-107-244.cust.tele2.ee [91.129.107.244]) (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-a77.g.dreamhost.com (Postfix) with ESMTPSA id DED9080290; Thu, 15 Nov 2018 15:07:39 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a77 From: Juri Linkov To: martin rudalics Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Organization: LINKOV.NET References: <87efdnsp2k.fsf@mail.linkov.net> <87h8h195ki.fsf@mail.linkov.net> <5BDAC159.1060008@gmx.at> <87muqsh11q.fsf@mail.linkov.net> <5BDC0E81.1050806@gmx.at> <87tvkwh4bp.fsf@mail.linkov.net> <5BE00F12.5000703@gmx.at> <87d0rjuq8c.fsf@mail.linkov.net> <5BE15552.4040507@gmx.at> <87y3a5rgm2.fsf@mail.linkov.net> <5BE2AF28.2020505@gmx.at> <87bm6zme24.fsf@mail.linkov.net> <5BE54FA1.2030004@gmx.at> <87k1lkllud.fsf@mail.linkov.net> <5BE7EDAD.9040808@gmx.at> <87tvklx4je.fsf@mail.linkov.net> <5BEA94A7.20809@gmx.at> <87r2foa8gq.fsf@mail.linkov.net> <5BEBDDCB.6090608@gmx.at> <87va4zfapq.fsf@mail.linkov.net> <5BED38A6.6020206@gmx.at> Date: Fri, 16 Nov 2018 00:59:59 +0200 In-Reply-To: <5BED38A6.6020206@gmx.at> (martin rudalics's message of "Thu, 15 Nov 2018 10:13:10 +0100") Message-ID: <87ftw2q74g.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedrleeigddtjecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtgfesthekredttderjeenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdejrddvgeegnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtjedrvdeggedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgeptd Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>>> But currently I'm more concerned about inability to use switch-to-bu= ffer, >>>> i.e. trying to display a buffer in another window with =E2=80=98S-M-= down C-x b RET=E2=80=99 >>>> doesn't work. >>> >>> You mean wherever we can't use 'pop-to-buffer-same-window' instead? >> >> Yes, and 'switch-to-buffer' should not use 'pop-to-buffer-same-window'= . > > You mean uses of 'switch-to-buffer' in code that we cannot (or are too > lazy to) replace with 'pop-to-buffer-same-window'. Right? Because > ideally code should not use 'switch-to-buffer' - we had quite a number > of reports that the point restoring mechanism conflicted with the > purpose to show a preselected buffer position in the selected window. Whereas I meant mostly switch-to-buffer as a command bound to 'C-x b', non-interactive calls of 'switch-to-buffer' have the same problem, and maybe some of them could be replaced with 'pop-to-buffer-same-window' without side effects. One example is 'C-h C-n' (view-emacs-news) that uses switch-to-buffer, and can't be forced into another window. I solved this general problem for myself with such advice: (advice-add 'switch-to-buffer :around (lambda (orig-fun &rest args) (let ((buffer (apply orig-fun args)) (window (selected-window))) (switch-to-prev-buffer window) (pop-to-buffer-same-window buffer)))) Then 'S-M-right C-h C-n' shows it in the right window. Do you think it's possible to add a corresponding customizable option that would provide the same behavior? >> I tried to set switch-to-buffer-in-dedicated-window to t instead of 'p= op'. > > I miss you here: Above you say that you want to display the buffer in > another window. But setting 'switch-to-buffer-in-dedicated-window' to > t is useful only when you insisit on using the selected window. I tried t mistakenly. I intended to try 'pop' that works ok. >> But I see now it's not worth the trouble to handle dedicatedness in >> 'windmove-display-in-direction' because it's not a general solution. > > Windows have been often made dedicated so they get auto-deleted as > soon as their buffer gets buried or killed. This use-case should now > be handled by the 'quit-restore' parameter. I have no idea whether > windows are made dedicated for any other reason. Do you? Another reason would be to force pop-up from switch-buffer, but it's not the right thing to do. From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 16 03:54:16 2018 Received: (at 32790) by debbugs.gnu.org; 16 Nov 2018 08:54:16 +0000 Received: from localhost ([127.0.0.1]:54722 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gNZtH-0008Le-Td for submit@debbugs.gnu.org; Fri, 16 Nov 2018 03:54:16 -0500 Received: from mout.gmx.net ([212.227.15.15]:59847) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gNZtH-0008L9-37 for 32790@debbugs.gnu.org; Fri, 16 Nov 2018 03:54:15 -0500 Received: from [192.168.1.101] ([212.95.5.219]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0ML6qP-1gNqs33HJx-000Lfk; Fri, 16 Nov 2018 09:54:06 +0100 Message-ID: <5BEE85A5.2070309@gmx.at> Date: Fri, 16 Nov 2018 09:53:57 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <87h8h195ki.fsf@mail.linkov.net> <5BDAC159.1060008@gmx.at> <87muqsh11q.fsf@mail.linkov.net> <5BDC0E81.1050806@gmx.at> <87tvkwh4bp.fsf@mail.linkov.net> <5BE00F12.5000703@gmx.at> <87d0rjuq8c.fsf@mail.linkov.net> <5BE15552.4040507@gmx.at> <87y3a5rgm2.fsf@mail.linkov.net> <5BE2AF28.2020505@gmx.at> <87bm6zme24.fsf@mail.linkov.net> <5BE54FA1.2030004@gmx.at> <87k1lkllud.fsf@mail.linkov.net> <5BE7EDAD.9040808@gmx.at> <87tvklx4je.fsf@mail.linkov.net> <5BEA94A7.20809@gmx.at> <87r2foa8gq.fsf@mail.linkov.net> <5BEBDDCB.6090608@gmx.at> <87va4zfapq.fsf@mail.linkov.net> <5BED38A6.6020206@gmx.at> <87ftw2q74g.fsf@mail.linkov.net> In-Reply-To: <87ftw2q74g.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:uWFB8AxZwHsukHWBvAajEMvvDnuftRk0oyCfwSduqqopYMZLeVE uFKxk/XX4C/XI3Fz+jnUal1BuLbqnZc/mzo/y0+ieRDuA2XGTHMIyQ8PCJC8G34s7LJ2G36 BOJZ0w5KVFcguqWb/VZoOnMN80xr9P6lLoHFv0AbKyXzSBLG8GcAWEQrRdS4gt2M0DaGbQF L4y6uYscDA/vWHKHwuRFg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:IKWKXxQmymw=:mcOKp36AFdjp2ABziSu9k+ V3hvYBs3L4qbiXrgAjXjNI0g8YApbmf+l6g1rT4MJWIq/vl5Exg49R808mNYQhubn9nhdFhdu ndVb/tA9y8fQt4iJY6F97hz8wUy9SQrJSFIWIeygGzm5FqLlZIwOJKTCjCNen116RInWqw7Vy jJvIKYqNIfPVYe9sh3CrBcArUzXWnUA+RbsTbRfQyy2eBIM15mEqrEj9vcSgfybcqeNHGOHMx F92Uc5z0KWA0v8D8LQpLQyyzNHwpbvvF5RNhxZVwHRCuWrL5zumOPNGdSkYEcWdR2oFOyUaQN QW8wBgb99mMiYPofm/FiSR1LsjrmH6KBaYOxLxGt0lbz20bg6bX4kpgJgwpR4tF+Ih50w8zXH zi3auRQ0jNipt7+Vc1rW0fE/F5I9AZGvVQA3ncw1aem41kbmvOQwTkvG+fh4U2WRX5EARbY3C wSUR0mTScqyRdu/yz1Zx2VPOIJeloKjRgE2HV+4ze+jLtZXv0+tQfKd4O87GsSoKnehv3iCOR qCMrxnBzErsHEs7F/CW6fRmE5LT5BSJeUaCg+RlHJVAnfNTMfVbPQOPZb6ynHiUxd/4giiRYz XBCjNTkjuB4PerSJ4w/cLwj/b8jcgp9omZN8QghVxB6VdvqNsM9SLkXgFPRbj4jAxfKnhKeLv gqRu0iFw0LxttFCwJwSVIImNXmrvSGpguEHxf/t7Gqfq+fQQ8Gi1OrCXIX40+iEVwPEdRcyv4 QBUaVQs9AY3b5dH6ELh9lJzu5ludbmk0tn8ND7GrJFBq0w5FIh0fegtYgc/8hpjmnm196qev8 EfmKfYxLWqnYBdVng5SdyXwyUhivVOiSnTVqzwUorVCuQpdyj8yc4XhU7KWuZtHorprUHkqju OLLBc8jGeRBtpz3zEbzj3azkLNDsn8kYCc+qx4QwAEduQJ7ncnzPTJrnswczo/wxueYaCwddM h7ToWmqok+A== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > Whereas I meant mostly switch-to-buffer as a command bound to 'C-x b', > non-interactive calls of 'switch-to-buffer' have the same problem, and > maybe some of them could be replaced with 'pop-to-buffer-same-window' > without side effects. One example is 'C-h C-n' (view-emacs-news) that > uses switch-to-buffer, and can't be forced into another window. > > I solved this general problem for myself with such advice: > > (advice-add 'switch-to-buffer :around > (lambda (orig-fun &rest args) > (let ((buffer (apply orig-fun args)) > (window (selected-window))) > (switch-to-prev-buffer window) > (pop-to-buffer-same-window buffer)))) > > Then 'S-M-right C-h C-n' shows it in the right window. I don't grok it yet. What's the 'switch-to-prev-buffer' call for? > Do you think it's possible to add a corresponding customizable option > that would provide the same behavior? I would have to understand the "behavior" first. One approach would be to move the user-error and 'switch-to-buffer-preserve-window-point' handling into the interactive specification handling and for the rest do what 'pop-to-buffer-same-window' does. >> Windows have been often made dedicated so they get auto-deleted as >> soon as their buffer gets buried or killed. This use-case should now >> be handled by the 'quit-restore' parameter. I have no idea whether >> windows are made dedicated for any other reason. Do you? > > Another reason would be to force pop-up from switch-buffer, but > it's not the right thing to do. Something like "I never want to show another buffer in this window, please remind me if I accidentally try to do that". martin From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 17 17:35:22 2018 Received: (at 32790) by debbugs.gnu.org; 17 Nov 2018 22:35:22 +0000 Received: from localhost ([127.0.0.1]:58211 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gO9BS-0008Mb-DJ for submit@debbugs.gnu.org; Sat, 17 Nov 2018 17:35:22 -0500 Received: from indri.birch.relay.mailchannels.net ([23.83.209.92]:27181) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gO9BR-0008MT-1I for 32790@debbugs.gnu.org; Sat, 17 Nov 2018 17:35:21 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id C7001502201; Sat, 17 Nov 2018 22:35:19 +0000 (UTC) Received: from pdx1-sub0-mail-a77.g.dreamhost.com (unknown [100.96.26.166]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 93D5C50231C; Sat, 17 Nov 2018 22:35:19 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a77.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); Sat, 17 Nov 2018 22:35:19 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Decisive-Befitting: 34f32cb50845f40c_1542494119689_1536428301 X-MC-Loop-Signature: 1542494119688:1433220042 X-MC-Ingress-Time: 1542494119688 Received: from pdx1-sub0-mail-a77.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a77.g.dreamhost.com (Postfix) with ESMTP id 5C214804CD; Sat, 17 Nov 2018 14:35:19 -0800 (PST) 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=MbR0dYHJHvAJ1JyleSRZOSVF604=; b= CrqjW159k6RywZ2XCPYgnXfz760bzWoMtTCaHsquaV2GbohHqRBrDEdnLVR5TMAd nAsUWKbdPcahrC9YLgJa5o1IAZjSp8j7rTBRFaqbDCj1fEqfWplTu31B3DKH/oq/ 6CyGT8JzUYzUGpVd8SdxbEfS+Lxq8xJ+wKV6HoD5Svs= Received: from mail.jurta.org (m91-129-107-244.cust.tele2.ee [91.129.107.244]) (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-a77.g.dreamhost.com (Postfix) with ESMTPSA id 4AC07804C8; Sat, 17 Nov 2018 14:35:16 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a77 From: Juri Linkov To: martin rudalics Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Organization: LINKOV.NET References: <87efdnsp2k.fsf@mail.linkov.net> <87muqsh11q.fsf@mail.linkov.net> <5BDC0E81.1050806@gmx.at> <87tvkwh4bp.fsf@mail.linkov.net> <5BE00F12.5000703@gmx.at> <87d0rjuq8c.fsf@mail.linkov.net> <5BE15552.4040507@gmx.at> <87y3a5rgm2.fsf@mail.linkov.net> <5BE2AF28.2020505@gmx.at> <87bm6zme24.fsf@mail.linkov.net> <5BE54FA1.2030004@gmx.at> <87k1lkllud.fsf@mail.linkov.net> <5BE7EDAD.9040808@gmx.at> <87tvklx4je.fsf@mail.linkov.net> <5BEA94A7.20809@gmx.at> <87r2foa8gq.fsf@mail.linkov.net> <5BEBDDCB.6090608@gmx.at> <87va4zfapq.fsf@mail.linkov.net> <5BED38A6.6020206@gmx.at> <87ftw2q74g.fsf@mail.linkov.net> <5BEE85A5.2070309@gmx.at> Date: Sun, 18 Nov 2018 00:18:17 +0200 In-Reply-To: <5BEE85A5.2070309@gmx.at> (martin rudalics's message of "Fri, 16 Nov 2018 09:53:57 +0100") Message-ID: <878t1ruz4m.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedrleelgdduieeiucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdejrddvgeegnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtjedrvdeggedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgeptd X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> Whereas I meant mostly switch-to-buffer as a command bound to 'C-x b', >> non-interactive calls of 'switch-to-buffer' have the same problem, and >> maybe some of them could be replaced with 'pop-to-buffer-same-window' >> without side effects. One example is 'C-h C-n' (view-emacs-news) that >> uses switch-to-buffer, and can't be forced into another window. >> >> I solved this general problem for myself with such advice: >> >> (advice-add 'switch-to-buffer :around >> (lambda (orig-fun &rest args) >> (let ((buffer (apply orig-fun args)) >> (window (selected-window))) >> (switch-to-prev-buffer window) >> (pop-to-buffer-same-window buffer)))) >> >> Then 'S-M-right C-h C-n' shows it in the right window. > > I don't grok it yet. What's the 'switch-to-prev-buffer' call for? switch-to-buffer switches the buffer in the selected window. switch-to-prev-buffer undoes this, and displays the same buffer in another window instead. >> Do you think it's possible to add a corresponding customizable option >> that would provide the same behavior? > > I would have to understand the "behavior" first. One approach would > be to move the user-error and 'switch-to-buffer-preserve-window-point' > handling into the interactive specification handling and for the rest > do what 'pop-to-buffer-same-window' does. Or maybe to add a new option that will allow switch-to-buffer to use pop-to-buffer-same-window. From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 18 04:24:19 2018 Received: (at 32790) by debbugs.gnu.org; 18 Nov 2018 09:24:19 +0000 Received: from localhost ([127.0.0.1]:58329 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gOJJT-0007Me-0u for submit@debbugs.gnu.org; Sun, 18 Nov 2018 04:24:19 -0500 Received: from mout.gmx.net ([212.227.15.15]:47799) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gOJJR-0007MN-5D for 32790@debbugs.gnu.org; Sun, 18 Nov 2018 04:24:17 -0500 Received: from [192.168.1.101] ([212.95.5.128]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MarNa-1g9WHT14oc-00KMfI; Sun, 18 Nov 2018 10:24:09 +0100 Message-ID: <5BF12FB6.20203@gmx.at> Date: Sun, 18 Nov 2018 10:24:06 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <87muqsh11q.fsf@mail.linkov.net> <5BDC0E81.1050806@gmx.at> <87tvkwh4bp.fsf@mail.linkov.net> <5BE00F12.5000703@gmx.at> <87d0rjuq8c.fsf@mail.linkov.net> <5BE15552.4040507@gmx.at> <87y3a5rgm2.fsf@mail.linkov.net> <5BE2AF28.2020505@gmx.at> <87bm6zme24.fsf@mail.linkov.net> <5BE54FA1.2030004@gmx.at> <87k1lkllud.fsf@mail.linkov.net> <5BE7EDAD.9040808@gmx.at> <87tvklx4je.fsf@mail.linkov.net> <5BEA94A7.20809@gmx.at> <87r2foa8gq.fsf@mail.linkov.net> <5BEBDDCB.6090608@gmx.at> <87va4zfapq.fsf@mail.linkov.net> <5BED38A6.6020206@gmx.at> <87ftw2q74g.fsf@mail.linkov.net> <5BEE85A5.2070309@gmx.at> <878t1ruz4m.fsf@mail.linkov.net> In-Reply-To: <878t1ruz4m.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:pP47GRDNNU6dOm4ON8wpISbZemU+b4L+D/KyBrRhM6A20C4yMwQ V29+gHWnrn/Sa2ZfeQaHqWv4wOXQu01L9htuFcWYg8F41PSn+d0aE0utPgLQyqlvQtWCxIA DWcKLeCBfmBj0iKERsHd+Z+DpeoNQ3+X5NB4CHAKFZxpVFKkq8AvCXS/yoWVj693DuwKCO8 nW9h8umdeX7ReKT5/+Kow== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:P911ryzaHPM=:iKly54hCaObwmy6O2zgymx 6l1GA14tfLhtzEHqaiOo9h6XrahqJgMAcmgEpr7WeINFVL1R5O17YoC1dSunbtRnbAh2RYG4O 0x96TxWR98zEKjIR4j7MtIt6N32syLczCkP44HHzNAhLdF7GUWDvHzlusrvUQ69/LdKTFZ0qO +ygdruhjs31kZo/2Jdns85WFCZF2O1ZoowZNokfeHn6eOXPCX1btpB7ueRoaFjJqJQ2AL1xHu uXcKbJrKT4belMXaEO7NnYre8VnKraeS3VRZn3/M+ANSPJeypjG1SpjZsJ84BF0ov8DL0hw5v NqDZiGIDji24BHGmYf8JiJNn2Ri3fsrz9fZXooYhO1pdwKpm6w5HhmlCghotA4GM+bJMrQ/mo CJaKhmmhicBIT2eY6Aa2mPLH7FY3JfK5t/buV0BiF5Rf5XqOut0BFu8OaVbMWuBphJupWnb1e pompRMBQJ/AljSZFAAfr2Nw1+rY3XfAXR5KHBTKBb25MvJs9KCJN8wZ6Qa/prTSHiwfqMmsw5 yyJaoLV0/8O7wSMLutxFrM6+vDpa5EBGCV3YJAP6+DhZAjyRlFCoJ/2gsq5ul9rDt1jxUh4DW EmNqv+Oaw1esLt6kCXYPEzuujovWHWuuGHoywuO3QnA+BGB4qUE0AUQgETdtO6fS4uVma2Zs/ PeLtuyT9h+by5EgbYvWfSgB4UnbEPbupKrzTYDWO8GWO4c6z2tIKN6rt24YFVdTGPz+RJDwet XedkiQ13k4f5tG6msJFaKwvSJQXgu/+/kbrqOFzOpQZzc7gfw9OjBy14V34O+OyauF9XbX3Nw iULQnrfDhsdPEX4aJBcUKxmZUBmEqf4RfoCxkFzVWpJYAncdmSEnyfmQ+fCNDomVOhqmU+lDs Mp04sSAUAghY8t4n4NuFRJahVsMRqLa5xWW8aaVkkfqwSzlztkvNGKSrFcyElF X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >>> I solved this general problem for myself with such advice: >>> >>> (advice-add 'switch-to-buffer :around >>> (lambda (orig-fun &rest args) >>> (let ((buffer (apply orig-fun args)) >>> (window (selected-window))) >>> (switch-to-prev-buffer window) >>> (pop-to-buffer-same-window buffer)))) >>> >>> Then 'S-M-right C-h C-n' shows it in the right window. >> >> I don't grok it yet. What's the 'switch-to-prev-buffer' call for? > > switch-to-buffer switches the buffer in the selected window. > switch-to-prev-buffer undoes this, and displays the same buffer > in another window instead. OK. This is a very gross hack that relies on 'switch-to-prev-buffer' switching back to the "right" buffer. I can imagine now that you're not very fond of having it skip certain buffers in the course of action. >> I would have to understand the "behavior" first. One approach would >> be to move the user-error and 'switch-to-buffer-preserve-window-point' >> handling into the interactive specification handling and for the rest >> do what 'pop-to-buffer-same-window' does. > > Or maybe to add a new option that will allow switch-to-buffer > to use pop-to-buffer-same-window. Allow or mandate? Always? martin From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 18 18:07:23 2018 Received: (at 32790) by debbugs.gnu.org; 18 Nov 2018 23:07:23 +0000 Received: from localhost ([127.0.0.1]:59473 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gOW9z-0008AO-Dq for submit@debbugs.gnu.org; Sun, 18 Nov 2018 18:07:23 -0500 Received: from lavender.maple.relay.mailchannels.net ([23.83.214.99]:61701) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gOW9x-0008AG-Ah for 32790@debbugs.gnu.org; Sun, 18 Nov 2018 18:07:21 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 0E3A542618; Sun, 18 Nov 2018 23:07:20 +0000 (UTC) Received: from pdx1-sub0-mail-a77.g.dreamhost.com (unknown [100.96.29.126]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id C62C042599; Sun, 18 Nov 2018 23:07:19 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a77.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); Sun, 18 Nov 2018 23:07:20 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Callous-Callous: 2cfd2f3270d25c14_1542582439939_1001766390 X-MC-Loop-Signature: 1542582439939:278630002 X-MC-Ingress-Time: 1542582439938 Received: from pdx1-sub0-mail-a77.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a77.g.dreamhost.com (Postfix) with ESMTP id 89030805E9; Sun, 18 Nov 2018 15:07:19 -0800 (PST) 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=VW/khf7me59LbCmbo1S1o5CVYV8=; b= 0GqkWwJ8ffrcV7qAIoWyROCE+39IoAksQpqCmYmUwvr52CS/rDdZbdICMqI/3o9v PpaXJBkWgnGuVE7Eaoell1r5siaXIJ1x0HsFfy/7LojFIR9FkOpWP7bZ95o/AiVx ivWCH7nOTFy1X6f+9E8uhlHViIr+jSjX5AEVd0Z9EFA= Received: from mail.jurta.org (m91-129-107-244.cust.tele2.ee [91.129.107.244]) (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-a77.g.dreamhost.com (Postfix) with ESMTPSA id 972A3805E2; Sun, 18 Nov 2018 15:07:16 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a77 From: Juri Linkov To: martin rudalics Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Organization: LINKOV.NET References: <87efdnsp2k.fsf@mail.linkov.net> <87tvkwh4bp.fsf@mail.linkov.net> <5BE00F12.5000703@gmx.at> <87d0rjuq8c.fsf@mail.linkov.net> <5BE15552.4040507@gmx.at> <87y3a5rgm2.fsf@mail.linkov.net> <5BE2AF28.2020505@gmx.at> <87bm6zme24.fsf@mail.linkov.net> <5BE54FA1.2030004@gmx.at> <87k1lkllud.fsf@mail.linkov.net> <5BE7EDAD.9040808@gmx.at> <87tvklx4je.fsf@mail.linkov.net> <5BEA94A7.20809@gmx.at> <87r2foa8gq.fsf@mail.linkov.net> <5BEBDDCB.6090608@gmx.at> <87va4zfapq.fsf@mail.linkov.net> <5BED38A6.6020206@gmx.at> <87ftw2q74g.fsf@mail.linkov.net> <5BEE85A5.2070309@gmx.at> <878t1ruz4m.fsf@mail.linkov.net> <5BF12FB6.20203@gmx.at> Date: Mon, 19 Nov 2018 00:52:52 +0200 In-Reply-To: <5BF12FB6.20203@gmx.at> (martin rudalics's message of "Sun, 18 Nov 2018 10:24:06 +0100") Message-ID: <87o9am3smz.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedruddtvddgtdehucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdejrddvgeegnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtjedrvdeggedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgeptd X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>> I would have to understand the "behavior" first. One approach would >>> be to move the user-error and 'switch-to-buffer-preserve-window-point' >>> handling into the interactive specification handling and for the rest >>> do what 'pop-to-buffer-same-window' does. >> >> Or maybe to add a new option that will allow switch-to-buffer >> to use pop-to-buffer-same-window. > > Allow or mandate? Always? Like `switch-to-buffer-in-dedicated-window' has the option `pop', another customizable variable could provide a similar non-default option that will call pop-to-buffer-same-window from switch-to-buffer. Or maybe simpler to create a new command e.g. switch-to-buffer-same-window based on switch-to-buffer-other-window? From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 19 04:42:50 2018 Received: (at 32790) by debbugs.gnu.org; 19 Nov 2018 09:42:50 +0000 Received: from localhost ([127.0.0.1]:59669 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gOg4w-0006cU-JV for submit@debbugs.gnu.org; Mon, 19 Nov 2018 04:42:50 -0500 Received: from mout.gmx.net ([212.227.15.19]:40849) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gOg4u-0006cG-Jp for 32790@debbugs.gnu.org; Mon, 19 Nov 2018 04:42:48 -0500 Received: from [192.168.1.101] ([46.125.249.53]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0M9JYE-1gIfXF3xQE-00ClTu; Mon, 19 Nov 2018 10:42:40 +0100 Message-ID: <5BF2858C.40207@gmx.at> Date: Mon, 19 Nov 2018 10:42:36 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <87tvkwh4bp.fsf@mail.linkov.net> <5BE00F12.5000703@gmx.at> <87d0rjuq8c.fsf@mail.linkov.net> <5BE15552.4040507@gmx.at> <87y3a5rgm2.fsf@mail.linkov.net> <5BE2AF28.2020505@gmx.at> <87bm6zme24.fsf@mail.linkov.net> <5BE54FA1.2030004@gmx.at> <87k1lkllud.fsf@mail.linkov.net> <5BE7EDAD.9040808@gmx.at> <87tvklx4je.fsf@mail.linkov.net> <5BEA94A7.20809@gmx.at> <87r2foa8gq.fsf@mail.linkov.net> <5BEBDDCB.6090608@gmx.at> <87va4zfapq.fsf@mail.linkov.net> <5BED38A6.6020206@gmx.at> <87ftw2q74g.fsf@mail.linkov.net> <5BEE85A5.2070309@gmx.at> <878t1ruz4m.fsf@mail.linkov.net> <5BF12FB6.20203@gmx.at> <87o9am3smz.fsf@mail.linkov.net> In-Reply-To: <87o9am3smz.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:hfxEsqpsiZB3eHX14YByjco8P38MyzBWWhop5ntA3dYWZV+0RhW rgWxbex+vH5TcGSmyLUFyI+1lbwTRl42M4UCvrWTjgmeczzXTWsPN9mmxTi4NqvVXPvyYj7 neisdrHeJFap9lt36I0GnqevStrb//eeH2anOb8yWUNWyInus7iTxTRc1MjEAu0X6y343ul c0NmCzbYULzGhg90NG4AA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:x8y2zbJIXRw=:VrWAprZSm6TtAuj5Nkoe6L u4L2i8JKDRY43R7SSLqAXGOHeZu+mKn8xhxqdQUEDiZDWFHGSQ6t8mnftSyYXTRyYu46n4vBr vqAhAavApc39FwaFAG2nfUVbaPaldhGuu0KAcPNeJ5LvneBAYZiyePkNC7aPHSzhTqJRlwMZa gn/ja6SdWpSVbMskSewfWeMC2pKrcdsPS12G3C1m9x9gRab3M+6ipQcxjume/hhrIcKWRJhYX g9KCyI6sioxKUEwlbQtYcyD5P4lKAtGNNpeh1CbW4XH6AB87R/7YjAy8bbyEaTwBf6sjhhTz+ Kw6MAxQNME1ZOo2ipzY26FFtq0/ZTHZi66w6I59UphBjG2Fy8kAX9NZtmLRjLybpxKq5DQPtA wJlWKqcixJ0QRWH+goKK9sjnbUsMmGRrKhaieV+nzfwmMYEFdAW6HV1hfhMM9U01qCbrQE6U2 cSqhYgfGR8y18qNINuoiD6nH6GT5qtYhLBxtk9pLwQ87N18Z9W5qCIYfdDN4VvEiyAdrgn3IJ WTtCO6jSglV8br+F5Q1MKhvpobSvxPYQ9fXDDWw6MZfSAUJgdNnhQuBqWQ1PlwF8fIy2gvOk0 JEbOPZ9iD5qe4/JtMsVLFtLfGRARrofb2U3Vyl81gaNB0a6FtMh4Pw8MELtAb0GoFRfC2Jpfe DwKJ7ZlX4+y5WgR3YTYb4rNo8T3tBj+G9XLB3/a+YjAUiVW3kunMBKs7DAtSNg/PNN+ZNtCma 60vJqkZqIqAr7NRJamBhyG+hC/3O4tDB5rDn4DBgpFPQuAHAKt8Z0DeYXVBlrPzbLUWR0wobJ uN1zjBiC/1H0CMh11JHPsWnChpZvHm0JfmuZh8VCMo82JGOYubsj1Zy+nUk1Vvmjbtwga2edC hHTYfO6ZyNMKpC1ZGovfUAonYpzeg4hq4uw89WXbvfmI7eE2LzU3DpqRawAzRA X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.2 (/) > Like `switch-to-buffer-in-dedicated-window' has the option `pop', > another customizable variable could provide a similar non-default > option that will call pop-to-buffer-same-window from switch-to-buffer.= OK. But would that option's value apply to C-x b as well? > Or maybe simpler to create a new command e.g. switch-to-buffer-same-wi= ndow > based on switch-to-buffer-other-window? You mean C-h k C-x b would tell me that C-x b runs the command switch-to-buffer-same-window (found in global-map), which is an interactive compiled Lisp function in =E2=80=98window.el=E2=80=99. martin From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 19 17:52:51 2018 Received: (at 32790) by debbugs.gnu.org; 19 Nov 2018 22:52:51 +0000 Received: from localhost ([127.0.0.1]:33213 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gOsPS-0000Vd-Sp for submit@debbugs.gnu.org; Mon, 19 Nov 2018 17:52:51 -0500 Received: from cichlid.maple.relay.mailchannels.net ([23.83.214.36]:33715) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gOsPR-0000VV-0O for 32790@debbugs.gnu.org; Mon, 19 Nov 2018 17:52:49 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 4D143501E63; Mon, 19 Nov 2018 22:52:47 +0000 (UTC) Received: from pdx1-sub0-mail-a37.g.dreamhost.com (unknown [100.96.29.126]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 1023B501E48; Mon, 19 Nov 2018 22:52:47 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a37.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); Mon, 19 Nov 2018 22:52:47 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Bitter-Lonely: 73a188f56f1d0f06_1542667967178_3828878216 X-MC-Loop-Signature: 1542667967178:555719435 X-MC-Ingress-Time: 1542667967178 Received: from pdx1-sub0-mail-a37.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a37.g.dreamhost.com (Postfix) with ESMTP id C6C6680761; Mon, 19 Nov 2018 14:52:46 -0800 (PST) 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:content-transfer-encoding; s=linkov.net; bh=2PlBTN 2dPVCygjQRqvnz04SGY/E=; b=vdeMl+ITIqMSbkoTmRum6/G2X78UpDUJwCUzVU nS16mzLFYyVnEPGkcvUrR8cWEGHw6axpGMxYoGarv17fJPTMiN4FHslEROqXYb8i dtiVarFME8KsYAoWLlSO4uZpwqvfSegLFztqWrG0C1S8fxEibTbhavgvK5+Vd89A OUg+M= Received: from mail.jurta.org (m91-129-105-252.cust.tele2.ee [91.129.105.252]) (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-a37.g.dreamhost.com (Postfix) with ESMTPSA id AB61180763; Mon, 19 Nov 2018 14:52:45 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a37 From: Juri Linkov To: martin rudalics Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Organization: LINKOV.NET References: <87efdnsp2k.fsf@mail.linkov.net> <87d0rjuq8c.fsf@mail.linkov.net> <5BE15552.4040507@gmx.at> <87y3a5rgm2.fsf@mail.linkov.net> <5BE2AF28.2020505@gmx.at> <87bm6zme24.fsf@mail.linkov.net> <5BE54FA1.2030004@gmx.at> <87k1lkllud.fsf@mail.linkov.net> <5BE7EDAD.9040808@gmx.at> <87tvklx4je.fsf@mail.linkov.net> <5BEA94A7.20809@gmx.at> <87r2foa8gq.fsf@mail.linkov.net> <5BEBDDCB.6090608@gmx.at> <87va4zfapq.fsf@mail.linkov.net> <5BED38A6.6020206@gmx.at> <87ftw2q74g.fsf@mail.linkov.net> <5BEE85A5.2070309@gmx.at> <878t1ruz4m.fsf@mail.linkov.net> <5BF12FB6.20203@gmx.at> <87o9am3smz.fsf@mail.linkov.net> <5BF2858C.40207@gmx.at> Date: Tue, 20 Nov 2018 00:39:04 +0200 In-Reply-To: <5BF2858C.40207@gmx.at> (martin rudalics's message of "Mon, 19 Nov 2018 10:42:36 +0100") Message-ID: <87va4szo8n.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedruddtgedgtdegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgfgsehtkeertddtreejnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddthedrvdehvdenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdehrddvhedvpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtoheprhhuuggrlhhitghssehgmhigrdgrthenucevlhhushhtvghrufhiiigvpedt Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> Like `switch-to-buffer-in-dedicated-window' has the option `pop', >> another customizable variable could provide a similar non-default >> option that will call pop-to-buffer-same-window from switch-to-buffer. > > OK. But would that option's value apply to C-x b as well? This option is needed mostly for 'C-x b' to be able to switch to the buff= er in another window. And also for other commands that non-interactively ca= ll 'switch-to-buffer', like 'C-h C-n'. >> Or maybe simpler to create a new command e.g. switch-to-buffer-same-wi= ndow >> based on switch-to-buffer-other-window? > > You mean C-h k C-x b would tell me that > > C-x b runs the command switch-to-buffer-same-window (found in > global-map), which is an interactive compiled Lisp function in > =E2=80=98window.el=E2=80=99. I see now that this solution doesn't help for commands that non-interactively call 'switch-to-buffer', like 'C-h C-t'. From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 20 04:29:10 2018 Received: (at 32790) by debbugs.gnu.org; 20 Nov 2018 09:29:10 +0000 Received: from localhost ([127.0.0.1]:33383 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gP2LF-0007Hv-PY for submit@debbugs.gnu.org; Tue, 20 Nov 2018 04:29:09 -0500 Received: from mout.gmx.net ([212.227.15.18]:51013) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gP2LC-0007HK-MM for 32790@debbugs.gnu.org; Tue, 20 Nov 2018 04:29:07 -0500 Received: from [192.168.1.101] ([46.125.250.103]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MQzIE-1g1Meq2tyQ-00ULVL; Tue, 20 Nov 2018 10:28:58 +0100 Message-ID: <5BF3D3D4.1080106@gmx.at> Date: Tue, 20 Nov 2018 10:28:52 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <87d0rjuq8c.fsf@mail.linkov.net> <5BE15552.4040507@gmx.at> <87y3a5rgm2.fsf@mail.linkov.net> <5BE2AF28.2020505@gmx.at> <87bm6zme24.fsf@mail.linkov.net> <5BE54FA1.2030004@gmx.at> <87k1lkllud.fsf@mail.linkov.net> <5BE7EDAD.9040808@gmx.at> <87tvklx4je.fsf@mail.linkov.net> <5BEA94A7.20809@gmx.at> <87r2foa8gq.fsf@mail.linkov.net> <5BEBDDCB.6090608@gmx.at> <87va4zfapq.fsf@mail.linkov.net> <5BED38A6.6020206@gmx.at> <87ftw2q74g.fsf@mail.linkov.net> <5BEE85A5.2070309@gmx.at> <878t1ruz4m.fsf@mail.linkov.net> <5BF12FB6.20203@gmx.at> <87o9am3smz.fsf@mail.linkov.net> <5BF2858C.40207@gmx.at> <87va4szo8n.fsf@mail.linkov.net> In-Reply-To: <87va4szo8n.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:GoBGbOTLmwq/ZiNR5KuGdGonsRAfGqAGNGW3D5W3AnUJvqvhBdw C7bJn/zeBuP00SF23HJ4exfsyFBt72g8Y3lSgvPKEP2c300gsbll0QlEsUAW2MsyXxUPN/6 ThuzyJFBL1MSHYt0NBnKotCBmHyUwTBN88HdZe8ng/ffAwBT5geRs75M8qZWDStkzBod9LP 30GJ39ZEP71J9hgVGx8dQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:2PuGfrmY2gM=:BOYl50bGwo0UZ8HnJOY5zL NPCqBWbmv3vxkvurNNPS2LDQTzMN+uwyb+u8x63ksTdd8HMTcplqVc8E5LmTKMZcP+8cAMp35 i+i/CTCtCDdK49MR06v8DJl+pRsJ3zRGvl3KLGytTFjcAEV1hJtnofjXNhwJiS97meo+6d88I 7dWqRTK4r+RC6ulrF2vmTpkxstFM725JjfiM8rt5d8eEulKW7UTLhYtS6GB/NMYCxuKl9yvdo ZtW42n5ZCz5/Hm2XKxbRRyDEJetbNV1RDPZBv0DHqzGSyDHocAkoOBYkwMbTKSQz2aJqttMPx nCotb/NlwbMvf1/kFqKbE9HQcjagp1LDE8aEYqvIOHCBU5e0RbpAdCf4dj1wFzLuJQ2vsJUY1 z4gO31my1PJOTqxmjs5RjBaoUAOHs3oJ4+TJvsaMHbsHtZXfXikfnwl3bYGNAZAhDOhsIgctd LYdSzRC7bB8pna5WeHHQfBNv6anusgDFQvsx8PRXuB/0qL1/Vbp49Ara/R0qSpq3Nol2HrKot TJBQFrmAvHc2QXyjXoQ/B3HUUjOX0c9wtEYVrDeGfoQs1NXky80c7HUlHr4eBbGbdmIDNAXjd XVV55Q21B4zspJvxZmDUYNjX99a9fUvWaBdM61DYwmCuiw/7OmqM5q9xES2rgBxp7nIGddEtz FOUfEN3bQl6LT4Esfsim/W+BHRMxNypin5uuqERUFnaCVEgYKd+ON3gJLyOG9MWl3IzDFqryD GRGVsThs7GKpunIuUQFzoyXLvZMnPYCANVS6eKIzkMNMSEIHYADV0CallXAxRNm6CbbuYH8nN C9sX5dLrb4gwIrr52WFnbPFXYufjeVfWhwruIEiFqRfKLGaYOoWJPYxcbVhDZxAGn74Gxf2O0 CYBDbUBkbPxpKzD3hK17H9GrQhRiX6EZv/CZKMg8QsqQx+H9Vl81TBoLtya0NF X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >>> Like `switch-to-buffer-in-dedicated-window' has the option `pop', >>> another customizable variable could provide a similar non-default >>> option that will call pop-to-buffer-same-window from switch-to-buffe= r. >> >> OK. But would that option's value apply to C-x b as well? > > This option is needed mostly for 'C-x b' to be able to switch to the b= uffer > in another window. And also for other commands that non-interactively= call > 'switch-to-buffer', like 'C-h C-n'. But 'pop-to-buffer-same-window' doesn't have the 'switch-to-buffer-preserve-window-point' semantics. How would you want to integrate them? >>> Or maybe simpler to create a new command e.g. switch-to-buffer-same-= window >>> based on switch-to-buffer-other-window? >> >> You mean C-h k C-x b would tell me that >> >> C-x b runs the command switch-to-buffer-same-window (found in >> global-map), which is an interactive compiled Lisp function in >> =E2=80=98window.el=E2=80=99. > > I see now that this solution doesn't help for commands that > non-interactively call 'switch-to-buffer', like 'C-h C-t'. So please propose a name for the option like say 'switch-to-buffer-pop-to-buffer' and tell me whether and how what we execute then obeys 'switch-to-buffer-preserve-window-point'. martin From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 20 19:50:24 2018 Received: (at 32790) by debbugs.gnu.org; 21 Nov 2018 00:50:24 +0000 Received: from localhost ([127.0.0.1]:37596 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gPGim-00064A-7i for submit@debbugs.gnu.org; Tue, 20 Nov 2018 19:50:24 -0500 Received: from lavender.maple.relay.mailchannels.net ([23.83.214.99]:12550) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gPGii-00063q-5g for 32790@debbugs.gnu.org; Tue, 20 Nov 2018 19:50:21 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 837E1683793; Wed, 21 Nov 2018 00:50:18 +0000 (UTC) Received: from pdx1-sub0-mail-a37.g.dreamhost.com (unknown [100.96.30.62]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 4DC426833D9; Wed, 21 Nov 2018 00:50:18 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a37.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); Wed, 21 Nov 2018 00:50:18 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Spot-Quick: 1ac041924ce09ca5_1542761418393_3463518069 X-MC-Loop-Signature: 1542761418393:439904292 X-MC-Ingress-Time: 1542761418393 Received: from pdx1-sub0-mail-a37.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a37.g.dreamhost.com (Postfix) with ESMTP id 13B30808D7; Tue, 20 Nov 2018 16:50:18 -0800 (PST) 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=UWhgrHOAPHLawejY9McjZlAj75k=; b= ggXcc4AykuSwCZRePBEJ82EvtXBaUDAXw1/okr/67/HP2pDGg83TqBDlfzYnqbzZ HN4hgr/kNq9DgnrPo8o8Xv6bT+RWTWqE4INasJbqMvv/mIpvyGwJqf8h7AppGqGf cQg3S9l18z58BBSzgPSBurLQ7jocESyDKkORZFsYZH0= Received: from mail.jurta.org (m91-129-105-252.cust.tele2.ee [91.129.105.252]) (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-a37.g.dreamhost.com (Postfix) with ESMTPSA id 08D29808D2; Tue, 20 Nov 2018 16:50:15 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a37 From: Juri Linkov To: martin rudalics Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Organization: LINKOV.NET References: <87efdnsp2k.fsf@mail.linkov.net> <87y3a5rgm2.fsf@mail.linkov.net> <5BE2AF28.2020505@gmx.at> <87bm6zme24.fsf@mail.linkov.net> <5BE54FA1.2030004@gmx.at> <87k1lkllud.fsf@mail.linkov.net> <5BE7EDAD.9040808@gmx.at> <87tvklx4je.fsf@mail.linkov.net> <5BEA94A7.20809@gmx.at> <87r2foa8gq.fsf@mail.linkov.net> <5BEBDDCB.6090608@gmx.at> <87va4zfapq.fsf@mail.linkov.net> <5BED38A6.6020206@gmx.at> <87ftw2q74g.fsf@mail.linkov.net> <5BEE85A5.2070309@gmx.at> <878t1ruz4m.fsf@mail.linkov.net> <5BF12FB6.20203@gmx.at> <87o9am3smz.fsf@mail.linkov.net> <5BF2858C.40207@gmx.at> <87va4szo8n.fsf@mail.linkov.net> <5BF3D3D4.1080106@gmx.at> Date: Wed, 21 Nov 2018 02:12:52 +0200 In-Reply-To: <5BF3D3D4.1080106@gmx.at> (martin rudalics's message of "Tue, 20 Nov 2018 10:28:52 +0100") Message-ID: <87pnuzz2vf.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedruddtiedgvdekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdehrddvhedvnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddthedrvdehvddprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgeptd X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > So please propose a name for the option like say > 'switch-to-buffer-pop-to-buffer' and tell me whether and how what we > execute then obeys 'switch-to-buffer-preserve-window-point'. Maybe a shorter name 'switch-to-buffer-pop'? > But 'pop-to-buffer-same-window' doesn't have the > 'switch-to-buffer-preserve-window-point' semantics. How would you > want to integrate them? Maybe just call 'pop-to-buffer-same-window' at the end of 'switch-to-buffer' when a new option 'switch-to-buffer-pop' is non-nil? From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 21 03:20:00 2018 Received: (at 32790) by debbugs.gnu.org; 21 Nov 2018 08:20:00 +0000 Received: from localhost ([127.0.0.1]:37755 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gPNjs-0003zo-L1 for submit@debbugs.gnu.org; Wed, 21 Nov 2018 03:20:00 -0500 Received: from mout.gmx.net ([212.227.17.21]:44555) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gPNjq-0003zZ-3F for 32790@debbugs.gnu.org; Wed, 21 Nov 2018 03:19:58 -0500 Received: from [192.168.1.101] ([213.162.73.56]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0M0smx-1faAlH3Vct-00v6lw; Wed, 21 Nov 2018 09:19:48 +0100 Message-ID: <5BF5151B.5000201@gmx.at> Date: Wed, 21 Nov 2018 09:19:39 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <87y3a5rgm2.fsf@mail.linkov.net> <5BE2AF28.2020505@gmx.at> <87bm6zme24.fsf@mail.linkov.net> <5BE54FA1.2030004@gmx.at> <87k1lkllud.fsf@mail.linkov.net> <5BE7EDAD.9040808@gmx.at> <87tvklx4je.fsf@mail.linkov.net> <5BEA94A7.20809@gmx.at> <87r2foa8gq.fsf@mail.linkov.net> <5BEBDDCB.6090608@gmx.at> <87va4zfapq.fsf@mail.linkov.net> <5BED38A6.6020206@gmx.at> <87ftw2q74g.fsf@mail.linkov.net> <5BEE85A5.2070309@gmx.at> <878t1ruz4m.fsf@mail.linkov.net> <5BF12FB6.20203@gmx.at> <87o9am3smz.fsf@mail.linkov.net> <5BF2858C.40207@gmx.at> <87va4szo8n.fsf@mail.linkov.net> <5BF3D3D4.1080106@gmx.at> <87pnuzz2vf.fsf@mail.linkov.net> In-Reply-To: <87pnuzz2vf.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:HP38TzJD5O9ZxP62CUbYGcTVBbF7aEUZgItqYxg+eFB4NrGG8rk OCax0Bphv50rlJgeicbcJE9n0NaUH9wi4HgpdC6aAMJ6QH2Hhu6Yq3g/OAiQ+Pl439cMyZp Q5lUB1k2UozHGFmpxexyCkhj9/60renbwXhiGyEyUjVxN0ewaSPUT1/N3rxqPzX8LYYf2/K 5VlLBSKaKKoic5PmtAizw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:EHKzqp/uGCs=:lpm71cJYwwQTpbir7VGSIr UWFMgJr2cS+XzG9R9ogOiSSbdRQ25anP5bfNzhI3wIlAloUqdP5jYvQ+sOERbUJYZ5lKZ5Tt2 0Lu8G10IQWg8fz0toejkMUGoR861fF5IfvZdAoppSkobs+piB8ymYD7VZqQqFbLM3SPhuH2es 9h+LLtEfdLqjFIWgvaL9O0x52Mwb41KOsiiJZCcuF4bxBmYUqYP+xu5cvSp92T9uuaDiPWv96 vU52KjVNbrE0yKFsGifgLi0hJqB+MqbxeGjA2d5UIER9d14q4L34vTFjktt+RH3FeHMel1Ke0 bGcNoKzpGVGZMOFAIIp2WG3YxAFI0bNA2pWyLotCK/GYmS3zyzoubPYDOHjrEA/eRU+XKl6Ax KmDqxQ8R5OB0jq4RGuLmeIIPF6mCNbkUSCou0H75gSW5B2uLm6b6bp/YO5Vw2NlarK40i0DoP kZ7HUDrHe/pifZ94euHpFXegGLzeY5QbdVy5zlwki3hHINxUPPA3oyjjf2eqIuozEv1ZNUXcP J0EEVvfxK9bXi+5P1Ac7ZmGMF21d/7b9R3Za4sMaokUTk//YPPrgijTBC2LO8NlBICtgDSlvZ tYTL4fDQPIYcrl8f+Od37IJwHLQ0bRZnX3GUIrmQcEFhiUQsplTwcYRmKMe5Q8dyfwtOOBLlW u7QqBdxOTWk1rfsRwvzcAzhFplNE8RDhPq6cnwW5r94teRTNauNL2uIc30mtHHfS4gqtmsTi6 IXGovrPDAj+fJCGZ5zzBljQ4Q/B8Yq75XxuK8nz0Co76AO+TSZKWQZSqxERMaIRUlAULQX+N/ +v43ulm8qFqvXpWh2o7cxejnZHzc1/ym0vTqXt0cTLIL6OFrU3JlYtk5pxjGRNAHLZKFOu/qy CPF9/o5Mt3H73OEHyrCI8VAXvjvaBK4XF1S4wJih7s7EmkIkAlfjZkgmnMEUBd+sfdEu8J85a uMbac2cjefw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > Maybe just call 'pop-to-buffer-same-window' at the end of 'switch-to-buffer' > when a new option 'switch-to-buffer-pop' is non-nil? Then 'switch-to-buffer' will show the buffer in the selected window and 'pop-to-buffer-same-window' will find it there. Or what am I missing? martin From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 21 18:57:36 2018 Received: (at 32790) by debbugs.gnu.org; 21 Nov 2018 23:57:36 +0000 Received: from localhost ([127.0.0.1]:40352 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gPcNE-0006iR-DX for submit@debbugs.gnu.org; Wed, 21 Nov 2018 18:57:36 -0500 Received: from ladybird.maple.relay.mailchannels.net ([23.83.214.98]:22332) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gPcNB-0006iG-CW for 32790@debbugs.gnu.org; Wed, 21 Nov 2018 18:57:34 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 20FF4502098; Wed, 21 Nov 2018 23:57:32 +0000 (UTC) Received: from pdx1-sub0-mail-a37.g.dreamhost.com (unknown [100.96.19.78]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id D1606501F60; Wed, 21 Nov 2018 23:57:31 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a37.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); Wed, 21 Nov 2018 23:57:32 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Glossy-Irritate: 418d3eac41471835_1542844651957_2731758436 X-MC-Loop-Signature: 1542844651957:3897279288 X-MC-Ingress-Time: 1542844651956 Received: from pdx1-sub0-mail-a37.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a37.g.dreamhost.com (Postfix) with ESMTP id 9086C80940; Wed, 21 Nov 2018 15:57:31 -0800 (PST) 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=2MkKSF6zWsZB1cOaweio1Ry3eyo=; b= nugXozDVut1iXGxPVTHXr85u8y8Q7thBGK8eTM7hKAQEc69ZJgDVn/9gi6ZllQq1 dm4BT4dLe3FNpdY4cYvznPaDdS2nw4tq0nJImBcQajHW5QSTkCwcZ4Injz2hUnW4 PDlWCGWeMVtcb9N6UkmfLe/m15AMkqZG3XY2Es+Bb38= Received: from mail.jurta.org (m91-129-105-252.cust.tele2.ee [91.129.105.252]) (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-a37.g.dreamhost.com (Postfix) with ESMTPSA id A66CE80931; Wed, 21 Nov 2018 15:57:28 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a37 From: Juri Linkov To: martin rudalics Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Organization: LINKOV.NET References: <87efdnsp2k.fsf@mail.linkov.net> <5BA490EA.4000502@gmx.at> Date: Thu, 22 Nov 2018 01:35:00 +0200 In-Reply-To: <5BA490EA.4000502@gmx.at> (martin rudalics's message of "Fri, 21 Sep 2018 08:34:18 +0200") Message-ID: <87y39m9f8b.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedruddtkedgudejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdehrddvhedvnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddthedrvdehvddprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgeptd X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> 0. emacs -Q >> >> 1. C-h e >> >> 2. C-x o >> >> 3. C-x 2 >> >> 4. C-x 0 >> >> It's expected that point will remain where it was visually on the screen, >> just will relocate to the window that takes place of the deleted window, >> but point jumps to an unexpected place in the opposite part of the frame. > > What should Emacs do instead? One possible solution is to implement directional window deletion. The following patch allows using the prefix argument that will delete the selected window and select the window at the given direction. This makes possible this workflow: 0. emacs -Q -mm 1. eval: (windmove-delete-default-keybindings) 2. C-h e 3. C-x o 4. C-x 2 5. C-h i 6. C-u C-x S-down and after deleting of the selected window, the cursor stays in the same place, and doesn't jump to the opposite part of the frame. diff --git a/lisp/windmove.el b/lisp/windmove.el index 898f87e2db..9a7a2b80f2 100644 --- a/lisp/windmove.el +++ b/lisp/windmove.el @@ -678,6 +678,74 @@ windmove-display-default-keybindings (global-set-key (vector (append modifiers '(down))) 'windmove-display-down) (global-set-key (vector (append modifiers '(?0))) 'windmove-display-same-window)) +;;; Directional window deletion + +(defun windmove-delete-in-direction (dir &optional arg) + "Delete the window at direction DIR. +If prefix ARG is `C-u', delete the selected window and +select the window at direction DIR." + (let ((other-window (window-in-direction dir nil nil arg + windmove-wrap-around t))) + (cond ((null other-window) + (user-error "No window %s from selected window" dir)) + ((and (window-minibuffer-p other-window) + (not (minibuffer-window-active-p other-window))) + (user-error "Minibuffer is inactive")) + (t + (if (not (consp arg)) + (delete-window other-window) + (delete-window (selected-window)) + (select-window other-window)))))) + +;;;###autoload +(defun windmove-delete-left (&optional arg) + "Delete the window to the left of the current one. +If prefix ARG is `C-u', delete the selected window and +select the window that was to the left of the current one." + (interactive "P") + (windmove-delete-in-direction 'left arg)) + +;;;###autoload +(defun windmove-delete-up (&optional arg) + "Delete the window above the current one. +If prefix ARG is `C-u', delete the selected window and +select the window that was above the current one." + (interactive "P") + (windmove-delete-in-direction 'up arg)) + +;;;###autoload +(defun windmove-delete-right (&optional arg) + "Delete the window to the right of the current one. +If prefix ARG is `C-u', delete the selected window and +select the window that was to the right of the current one." + (interactive "P") + (windmove-delete-in-direction 'right arg)) + +;;;###autoload +(defun windmove-delete-down (&optional arg) + "Delete the window below the current one. +If prefix ARG is `C-u', delete the selected window and +select the window that was below the current one." + (interactive "P") + (windmove-delete-in-direction 'down arg)) + +;;;###autoload +(defun windmove-delete-default-keybindings (&optional prefix modifiers) + "Set up keybindings for directional window deletion. +Keys are bound to commands that delete windows in the specified +direction. Keybindings are of the form PREFIX MODIFIERS-{left,right,up,down}, +where PREFIX is a prefix key and MODIFIERS is either a list of modifiers or +a single modifier. Default value of PREFIX is `C-x' and MODIFIERS is `shift'." + (interactive) + (unless prefix (setq prefix '(?\C-x))) + (unless (listp prefix) (setq prefix (list prefix))) + (unless modifiers (setq modifiers '(shift))) + (unless (listp modifiers) (setq modifiers (list modifiers))) + (global-set-key (vector prefix (append modifiers '(left))) 'windmove-delete-left) + (global-set-key (vector prefix (append modifiers '(right))) 'windmove-delete-right) + (global-set-key (vector prefix (append modifiers '(up))) 'windmove-delete-up) + (global-set-key (vector prefix (append modifiers '(down))) 'windmove-delete-down)) + (provide 'windmove) ;;; windmove.el ends here From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 21 18:57:41 2018 Received: (at 32790) by debbugs.gnu.org; 21 Nov 2018 23:57:41 +0000 Received: from localhost ([127.0.0.1]:40355 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gPcNI-0006ih-Pk for submit@debbugs.gnu.org; Wed, 21 Nov 2018 18:57:41 -0500 Received: from goldenrod.birch.relay.mailchannels.net ([23.83.209.74]:46167) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gPcNG-0006iZ-Ue for 32790@debbugs.gnu.org; Wed, 21 Nov 2018 18:57:39 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 95B8F5E2E64; Wed, 21 Nov 2018 23:57:37 +0000 (UTC) Received: from pdx1-sub0-mail-a37.g.dreamhost.com (unknown [100.96.19.78]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 637C65E2E5E; Wed, 21 Nov 2018 23:57:37 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a37.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); Wed, 21 Nov 2018 23:57:37 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Hook-Inform: 17cb24627ea6e875_1542844657482_1399265676 X-MC-Loop-Signature: 1542844657482:1673427320 X-MC-Ingress-Time: 1542844657482 Received: from pdx1-sub0-mail-a37.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a37.g.dreamhost.com (Postfix) with ESMTP id 24A6680940; Wed, 21 Nov 2018 15:57:37 -0800 (PST) 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=V5z+GNYgIHoSVca6x0U2BzHAZ2U=; b= PkeLZbTZ7g/KhdsVJLAiI2HoldPE+JtGiVwQp+gA7CG8/VAI79a+mKngPKS3nHQw WHH+/6lQw631yD1xebpPzw5NJ4VfsnyT6I8yT0kKy1Mvaq6/oA4rZH9mfuhChE8t z2lvPDzqH6XFUANQFOBfQoET3guXoaqub/h4ZexMbbk= Received: from mail.jurta.org (m91-129-105-252.cust.tele2.ee [91.129.105.252]) (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-a37.g.dreamhost.com (Postfix) with ESMTPSA id 33FCC80920; Wed, 21 Nov 2018 15:57:34 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a37 From: Juri Linkov To: martin rudalics Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Organization: LINKOV.NET References: <87efdnsp2k.fsf@mail.linkov.net> <87bm6zme24.fsf@mail.linkov.net> <5BE54FA1.2030004@gmx.at> <87k1lkllud.fsf@mail.linkov.net> <5BE7EDAD.9040808@gmx.at> <87tvklx4je.fsf@mail.linkov.net> <5BEA94A7.20809@gmx.at> <87r2foa8gq.fsf@mail.linkov.net> <5BEBDDCB.6090608@gmx.at> <87va4zfapq.fsf@mail.linkov.net> <5BED38A6.6020206@gmx.at> <87ftw2q74g.fsf@mail.linkov.net> <5BEE85A5.2070309@gmx.at> <878t1ruz4m.fsf@mail.linkov.net> <5BF12FB6.20203@gmx.at> <87o9am3smz.fsf@mail.linkov.net> <5BF2858C.40207@gmx.at> <87va4szo8n.fsf@mail.linkov.net> <5BF3D3D4.1080106@gmx.at> <87pnuzz2vf.fsf@mail.linkov.net> <5BF5151B.5000201@gmx.at> Date: Thu, 22 Nov 2018 01:38:47 +0200 In-Reply-To: <5BF5151B.5000201@gmx.at> (martin rudalics's message of "Wed, 21 Nov 2018 09:19:39 +0100") Message-ID: <87ftvu9f20.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedruddtkedgudejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdehrddvhedvnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddthedrvdehvddprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgepud X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > Then 'switch-to-buffer' will show the buffer in the selected window > and 'pop-to-buffer-same-window' will find it there. Or what am I > missing? If a new option is non-nil, switch-to-buffer could call pop-to-buffer-same-window, and if the selected window remains the same, then continue doing what it normally does: set-window-buffer, set-window-start, set-window-point, etc. From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 22 02:40:27 2018 Received: (at 32790) by debbugs.gnu.org; 22 Nov 2018 07:40:27 +0000 Received: from localhost ([127.0.0.1]:40448 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gPjb9-0001PZ-8N for submit@debbugs.gnu.org; Thu, 22 Nov 2018 02:40:27 -0500 Received: from mout.gmx.net ([212.227.17.20]:35639) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gPjb7-0001PM-I5 for 32790@debbugs.gnu.org; Thu, 22 Nov 2018 02:40:26 -0500 Received: from [192.168.1.101] ([212.95.5.41]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MBWIM-1gFJjC0PaA-00AVlL; Thu, 22 Nov 2018 08:40:16 +0100 Message-ID: <5BF65D56.9020806@gmx.at> Date: Thu, 22 Nov 2018 08:40:06 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <87bm6zme24.fsf@mail.linkov.net> <5BE54FA1.2030004@gmx.at> <87k1lkllud.fsf@mail.linkov.net> <5BE7EDAD.9040808@gmx.at> <87tvklx4je.fsf@mail.linkov.net> <5BEA94A7.20809@gmx.at> <87r2foa8gq.fsf@mail.linkov.net> <5BEBDDCB.6090608@gmx.at> <87va4zfapq.fsf@mail.linkov.net> <5BED38A6.6020206@gmx.at> <87ftw2q74g.fsf@mail.linkov.net> <5BEE85A5.2070309@gmx.at> <878t1ruz4m.fsf@mail.linkov.net> <5BF12FB6.20203@gmx.at> <87o9am3smz.fsf@mail.linkov.net> <5BF2858C.40207@gmx.at> <87va4szo8n.fsf@mail.linkov.net> <5BF3D3D4.1080106@gmx.at> <87pnuzz2vf.fsf@mail.linkov.net> <5BF5151B.5000201@gmx.at> <87ftvu9f20.fsf@mail.linkov.net> In-Reply-To: <87ftvu9f20.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:NbKumAGthGIS/kA/sLoYId9H7hUIV+nqd/AXge7i7As2Gx2kmlW 53cu9HXBJ4xXE1WZ6Y7mxUhFfDSVSH4/88BYZjaWIeEefHUMSofhoNsXrBL39+YlFaWOcyj VynrDTqp7eRbifpXFMFuiW7PLiHY6E+0IlOjGB+K/uy8RmsbjVJt5YtNcw8QniiNoR5kAlY Oj1OKRWWK6nFuCpAiX70A== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:F3AtFa2547Y=:ie3+GJXGv874V1CP0qCNYs z1oh0xqSdkm932qiB+5C1vaHQATheRZj3ldwIcsqwEXl/Z5dKAZUUVOQxifYZ3/gkK8WkHJJz RWN67DVgNOZMvchfkGG1TLGDatR58EJw77VvUOYHwDFygbvNPNAR5mSx5tgdYkB9MaPZG2sVF 42G8w6lldHUuti4dGM/9wkNcq5gRkQdbRnPzuy4PS9kCYQDvFKmKk6WXNOv6+lfGbAnp9SohL /Ba4/m2GLwsyEPISEtFKplAhREmxvEwQNMnhj0gkMaRB5Z8PdUxpfigjthCQZRwBWkxy/X7R4 3awHXzCVH73uM2szsFLUPlCgOOFkNzdZQuIldBBq7mYgOKe9MQ5wN5U0zyBDJzwz/AlzKoa1V R3NILwuKn729Z73si5EBJdME+VpgRfUMKdddFfEJLOCxKE7QkzT34lufoXHT5oqfjOQwiU+Vi 7rAKPYjyUddiEUJs/gQijhqA4Xar+oBD1bTnhR88EI+zUVmE4hUhCsPFCNp44xtLMuvh4rAuH 25u7+1RvXQic5gjt/bfyw2gWVity9Ej1sK/MggG+COhdcRisy4fF6g6VbYeR8ZUwJNgXljHwP nSQjNQ2LRw9rdmS0GgfSYY1nlcP4JhuzGZOkvNGiyIKWfVvypdexg0Vexua7LbxCfTWRVYw9h lOvAWervDdBwZHpnhq9cnDMGOWCBzTmxJYXSIJ3TO4G3IXtk4Je13FOAOhT03Yqygp+4zvERc AHo0lw2Y0njLBMJFc1T/fssd6XdKDUXOGBjNItovMX+Q3kMw9MpCpNBsSwv5pUjxm71JBDxG5 MckviBhL8yBRiZXJmbNL88l9JWv77GhsV9yCBpmxtXn6UHZURzaQ8k+P9Oktlytw+wqDz4/tZ Pj4aJ+LJ3tZU9vzKN0PgLxHZ52Uu3ksjcsi800ZVURKGrC57cXOSJKNDy/NUb0 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> Then 'switch-to-buffer' will show the buffer in the selected window >> and 'pop-to-buffer-same-window' will find it there. Or what am I >> missing? > > If a new option is non-nil, switch-to-buffer could call > pop-to-buffer-same-window, and if the selected window > remains the same, then continue doing what it normally does: > set-window-buffer, set-window-start, set-window-point, etc. Then instead of what you said earlier ... Maybe just call 'pop-to-buffer-same-window' at the end of 'switch-to-buffer' when a new option 'switch-to-buffer-pop' is non-nil? ... 'switch-to-buffer' would call 'pop-to-buffer-same-window' at the beginning when 'switch-to-buffer-pop' is non-nil. Right? This means, however, that it would skip the 'switch-to-buffer-in-dedicated-window' rigmarole. It wouldn't make sense because 'pop-to-buffer-same-window' would probably use a completely different window anyway. Right? martin From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 22 02:41:07 2018 Received: (at 32790) by debbugs.gnu.org; 22 Nov 2018 07:41:07 +0000 Received: from localhost ([127.0.0.1]:40452 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gPjbn-0001Qy-In for submit@debbugs.gnu.org; Thu, 22 Nov 2018 02:41:07 -0500 Received: from mout.gmx.net ([212.227.17.22]:45131) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gPjbk-0001QE-DA for 32790@debbugs.gnu.org; Thu, 22 Nov 2018 02:41:06 -0500 Received: from [192.168.1.101] ([212.95.5.41]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MbOrg-1g6xlb1kEm-00InFT; Thu, 22 Nov 2018 08:40:55 +0100 Message-ID: <5BF65D7F.2090805@gmx.at> Date: Thu, 22 Nov 2018 08:40:47 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <5BA490EA.4000502@gmx.at> <87y39m9f8b.fsf@mail.linkov.net> In-Reply-To: <87y39m9f8b.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:i1ZOw5V42Fl2s4rIJ4jZm6HRcqgIOUeNwiQcUDvVZXxuK7nWCl4 SvYA2piV5BwNgY9q1niTLsEPHCwYMb0bo/dTnaZ2wkukd4zx1hx2rgqQDnFEvGPKY3v1VTk AVWXIUWqHJEcp9TIxXhFQE9syFXqn5RUq0Z/wYLrFvus937Hww9yN/0v1s9bmC41tfycd0T r0nuiZsNtUblhf6HwzZvQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:a25L9TxkIBc=:A0EcVeAdMiyAnk/vlIQ3rY IDXwcWCWXuzbkGaR745Hy6ATmIKCNB5CWEtoMIhUdWhXAhQtHQKSB8bW+9cTJ8NKwhqYzpYB6 7OzbnJpQTVGJ1u6e55Z4z+dqWi0YUPF1MvQ4jp2MdkyoLdJv+OhBf/7YOwrHxDh38RDgvGXON dihRnW2uil5PgEhBCpa3/GC7gfOu7nNDb9JsFcv3U91rBMaXWZO8Ea6KbQizqWJ6CzinehqOz lCSY5RedZXhpcYfahGw5WaQmzkNDwknPLbMrsdxToRNPhGq3YHpteT4S7nGB3SKjUp4zoZikp U12ivVlq4xt6dEFwDhTAuTUodQrKxY8Gb1flc9G3LDKDWqnFf8X1+ia7iDNWTZfbJZpmrOgDL BjRoOp7GT75iBPTgFSSICp0bL9x7qEspIa4ZCvBP7nScCRGcugBY0K95k4JoInVANtv6bc8T2 d7uuHwtg0GJXk3URFB0d07EW80jUQZ+12aynqvIJsU//97SBPv1Dppyg27WC9Pj1jMu4kDYo/ H99AT2owXaF0amlPtH3wMd0B3ztMCbnkKs0GkrGM0LZIOI4z/8yWZ/RJFIMH+lOuA5Hi3SXoC yYKZjWxvFnuc8NmhyBRTaSOnR1GzIxkU4BuNt0+PrVcINiyvUO8+VmnRR93YXfza9D2mBKG27 2v7f6ckb2z80s3r1kTzcwm+7hbsS6kXAha2adyh6guf0mStLvhxZ/B4o5bZ7OEl8Fhw25Zyi1 PzlTWrRkocSmZLF+sv0jGblixHoHZnpnszF6dvrvZuLHr0UA2IFECp8oGACbQETdkGevlnW/s SNNY7FgGLj+FHtV0JcODgM/wo+wOodTMPVuPJmZSfw+CrG1OQ8iy4xn1Fkmb4hxcXwby3yWMM rru2dZFINOjgX9sQm110KYuxdBdXF512+6HeHY7swkVVxtuE3xEJtYLfEmpPLv X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > One possible solution is to implement directional window deletion. > The following patch allows using the prefix argument that will delete > the selected window and select the window at the given direction. Delete and select - smart idea. > +;;; Directional window deletion > + > +(defun windmove-delete-in-direction (dir &optional arg) > + "Delete the window at direction DIR. > +If prefix ARG is `C-u', delete the selected window and > +select the window at direction DIR." > + (let ((other-window (window-in-direction dir nil nil arg > + windmove-wrap-around t))) So 'windmove-wrap-around' non-nil means that the other window could be the selected one and we try to delete ourselves. Right? > + ((and (window-minibuffer-p other-window) > + (not (minibuffer-window-active-p other-window))) > + (user-error "Minibuffer is inactive")) Should we try to delete the active minibuffer window? > +;;;###autoload > +(defun windmove-delete-default-keybindings (&optional prefix modifiers) > + "Set up keybindings for directional window deletion. > +Keys are bound to commands that delete windows in the specified > +direction. Keybindings are of the form PREFIX MODIFIERS-{left,right,up,down}, > +where PREFIX is a prefix key and MODIFIERS is either a list of modifiers or > +a single modifier. Default value of PREFIX is `C-x' and MODIFIERS is `shift'." > + (interactive) > + (unless prefix (setq prefix '(?\C-x))) > + (unless (listp prefix) (setq prefix (list prefix))) > + (unless modifiers (setq modifiers '(shift))) > + (unless (listp modifiers) (setq modifiers (list modifiers))) > + (global-set-key (vector prefix (append modifiers '(left))) 'windmove-delete-left) > + (global-set-key (vector prefix (append modifiers '(right))) 'windmove-delete-right) > + (global-set-key (vector prefix (append modifiers '(up))) 'windmove-delete-up) > + (global-set-key (vector prefix (append modifiers '(down))) 'windmove-delete-down)) Feel free to install. But note that eventually we should document the keybinding stuff with a few, good examples. Thanks, martin From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 22 17:51:55 2018 Received: (at 32790) by debbugs.gnu.org; 22 Nov 2018 22:51:56 +0000 Received: from localhost ([127.0.0.1]:42792 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gPxpC-0006T7-3i for submit@debbugs.gnu.org; Thu, 22 Nov 2018 17:51:55 -0500 Received: from palegreen.birch.relay.mailchannels.net ([23.83.209.140]:32396) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gPxp7-0006Ry-HN for 32790@debbugs.gnu.org; Thu, 22 Nov 2018 17:51:51 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 0E96843430; Thu, 22 Nov 2018 22:51:48 +0000 (UTC) Received: from pdx1-sub0-mail-a37.g.dreamhost.com (unknown [100.96.20.98]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id C837241F0F; Thu, 22 Nov 2018 22:51:47 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a37.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, 22 Nov 2018 22:51:48 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Bottle-Grain: 5a142678183a5574_1542927107912_2419178463 X-MC-Loop-Signature: 1542927107912:3883580106 X-MC-Ingress-Time: 1542927107911 Received: from pdx1-sub0-mail-a37.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a37.g.dreamhost.com (Postfix) with ESMTP id 81A9D7FE7C; Thu, 22 Nov 2018 14:51:47 -0800 (PST) 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=IGf1QGNu6RN5FgTBgjNffyY9jxQ=; b= GRXaHL9YAz1JCUdEAaPEByACWYr5FchJIXQLbuswo0M5jmLLvBx3D9In33QUqZ6e n03FAjaCx2+CiTIXzjNcYIvbKe9w0yZYopNjlByZzOAJFdY4TvYRivHBkzBqhe1+ nJremOvdyFmBEfAB1XCyjlLqr+o4xG4d9Kv8Zr3AZKU= Received: from mail.jurta.org (m91-129-105-252.cust.tele2.ee [91.129.105.252]) (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-a37.g.dreamhost.com (Postfix) with ESMTPSA id 12BC67FE77; Thu, 22 Nov 2018 14:51:45 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a37 From: Juri Linkov To: martin rudalics Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Organization: LINKOV.NET References: <87efdnsp2k.fsf@mail.linkov.net> <5BA490EA.4000502@gmx.at> <87y39m9f8b.fsf@mail.linkov.net> <5BF65D7F.2090805@gmx.at> Date: Fri, 23 Nov 2018 00:39:50 +0200 In-Reply-To: <5BF65D7F.2090805@gmx.at> (martin rudalics's message of "Thu, 22 Nov 2018 08:40:47 +0100") Message-ID: <874lc8g2ix.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedruddutddgtdegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdehrddvhedvnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddthedrvdehvddprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgeptd X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> +;;; Directional window deletion >> + >> +(defun windmove-delete-in-direction (dir &optional arg) >> + "Delete the window at direction DIR. >> +If prefix ARG is `C-u', delete the selected window and >> +select the window at direction DIR." >> + (let ((other-window (window-in-direction dir nil nil arg >> + windmove-wrap-around t))) > > So 'windmove-wrap-around' non-nil means that the other window could be > the selected one and we try to delete ourselves. Right? Fortunately, 'windmove-wrap-around' doesn't wrap to the same window when there is only one window in that direction. >> + ((and (window-minibuffer-p other-window) >> + (not (minibuffer-window-active-p other-window))) >> + (user-error "Minibuffer is inactive")) > > Should we try to delete the active minibuffer window? Interesting question. Do you think it's worth the trouble to implement special handling of the minibuffer: 1. when a window in the below direction is requested to be deleted from the bottom window, and the minibuffer is active, then call (abort-recursive-edit) 2. when the selected bottom window is requested to be deleted and selection is requested to be moved in the below direction, then the minibuffer's window should be selected. From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 22 17:52:11 2018 Received: (at 32790) by debbugs.gnu.org; 22 Nov 2018 22:52:11 +0000 Received: from localhost ([127.0.0.1]:42797 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gPxpT-0006W8-Ex for submit@debbugs.gnu.org; Thu, 22 Nov 2018 17:52:11 -0500 Received: from palegreen.birch.relay.mailchannels.net ([23.83.209.140]:26973) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gPxpG-0006Ts-7n for 32790@debbugs.gnu.org; Thu, 22 Nov 2018 17:51:59 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id EB527682A08; Thu, 22 Nov 2018 22:51:52 +0000 (UTC) Received: from pdx1-sub0-mail-a37.g.dreamhost.com (unknown [100.96.26.166]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id A5507682876; Thu, 22 Nov 2018 22:51:52 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a37.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, 22 Nov 2018 22:51:52 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Army-Whistle: 18c1057622e165cd_1542927112784_3489037178 X-MC-Loop-Signature: 1542927112784:1153815460 X-MC-Ingress-Time: 1542927112784 Received: from pdx1-sub0-mail-a37.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a37.g.dreamhost.com (Postfix) with ESMTP id 6BC7F7FE7B; Thu, 22 Nov 2018 14:51:52 -0800 (PST) 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=KhoVZOatkMN5URCbXErVJK57wcE=; b= TMi8fyPMwX6mbpdkRfoMyUqiDmb7Y6vJjRcxwsGUdgDdkUQ9wUpk71p+rz7D7/yo W/JZdPjz4z2mXpJYngAvJI203mmUlfI1Dyj6VAaLRHv4mHcbnwnysnDNaGMsmmhn 455u+Q9BfmoPPg65w5yNLK5SQAjSGW7XevrdV/diZGg= Received: from mail.jurta.org (m91-129-105-252.cust.tele2.ee [91.129.105.252]) (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-a37.g.dreamhost.com (Postfix) with ESMTPSA id 182017FE79; Thu, 22 Nov 2018 14:51:50 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a37 From: Juri Linkov To: martin rudalics Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Organization: LINKOV.NET References: <87efdnsp2k.fsf@mail.linkov.net> <87k1lkllud.fsf@mail.linkov.net> <5BE7EDAD.9040808@gmx.at> <87tvklx4je.fsf@mail.linkov.net> <5BEA94A7.20809@gmx.at> <87r2foa8gq.fsf@mail.linkov.net> <5BEBDDCB.6090608@gmx.at> <87va4zfapq.fsf@mail.linkov.net> <5BED38A6.6020206@gmx.at> <87ftw2q74g.fsf@mail.linkov.net> <5BEE85A5.2070309@gmx.at> <878t1ruz4m.fsf@mail.linkov.net> <5BF12FB6.20203@gmx.at> <87o9am3smz.fsf@mail.linkov.net> <5BF2858C.40207@gmx.at> <87va4szo8n.fsf@mail.linkov.net> <5BF3D3D4.1080106@gmx.at> <87pnuzz2vf.fsf@mail.linkov.net> <5BF5151B.5000201@gmx.at> <87ftvu9f20.fsf@mail.linkov.net> <5BF65D56.9020806@gmx.at> Date: Fri, 23 Nov 2018 00:45:11 +0200 In-Reply-To: <5BF65D56.9020806@gmx.at> (martin rudalics's message of "Thu, 22 Nov 2018 08:40:06 +0100") Message-ID: <87pnuwenpk.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedruddutddgtdegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdehrddvhedvnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddthedrvdehvddprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgepud X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > ... 'switch-to-buffer' would call 'pop-to-buffer-same-window' at the > beginning when 'switch-to-buffer-pop' is non-nil. Right? Yes, I think now it's better to call it at the beginning. > This means, however, that it would skip the > 'switch-to-buffer-in-dedicated-window' rigmarole. It wouldn't make > sense because 'pop-to-buffer-same-window' would probably use > a completely different window anyway. Right? 'switch-to-buffer-in-dedicated-window' is only used in the interactive spec. But anyway 'display-buffer' called from 'pop-to-buffer-same-window' will handle dedicatedness in any case. From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 23 02:40:11 2018 Received: (at 32790) by debbugs.gnu.org; 23 Nov 2018 07:40:11 +0000 Received: from localhost ([127.0.0.1]:42954 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gQ64R-00023S-H0 for submit@debbugs.gnu.org; Fri, 23 Nov 2018 02:40:11 -0500 Received: from mout.gmx.net ([212.227.17.21]:33687) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gQ64Q-00023E-A1 for 32790@debbugs.gnu.org; Fri, 23 Nov 2018 02:40:10 -0500 Received: from [192.168.1.101] ([213.162.73.4]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0Lubnw-1fQOg41wfI-00zjfI; Fri, 23 Nov 2018 08:40:00 +0100 Message-ID: <5BF7AEC5.60808@gmx.at> Date: Fri, 23 Nov 2018 08:39:49 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <87k1lkllud.fsf@mail.linkov.net> <5BE7EDAD.9040808@gmx.at> <87tvklx4je.fsf@mail.linkov.net> <5BEA94A7.20809@gmx.at> <87r2foa8gq.fsf@mail.linkov.net> <5BEBDDCB.6090608@gmx.at> <87va4zfapq.fsf@mail.linkov.net> <5BED38A6.6020206@gmx.at> <87ftw2q74g.fsf@mail.linkov.net> <5BEE85A5.2070309@gmx.at> <878t1ruz4m.fsf@mail.linkov.net> <5BF12FB6.20203@gmx.at> <87o9am3smz.fsf@mail.linkov.net> <5BF2858C.40207@gmx.at> <87va4szo8n.fsf@mail.linkov.net> <5BF3D3D4.1080106@gmx.at> <87pnuzz2vf.fsf@mail.linkov.net> <5BF5151B.5000201@gmx.at> <87ftvu9f20.fsf@mail.linkov.net> <5BF65D56.9020806@gmx.at> <87pnuwenpk.fsf@mail.linkov.net> In-Reply-To: <87pnuwenpk.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:WFWYFs5FoaIMQTZpex7cNeN8z2bHLm1/duI/J7WA47MzJMdbA/q fWsjfV6Ps6qEEEpOWRP3rz4EixBOZ2pCao7JjjKPHtPB6FHjiz/juIFmKSaZmU7n3832AT6 mKeESXkHe8tIcUcAheic7j3owUOPHoukxdoVb8ShBmU9mleN35neUylQHTphGmRx8ptT34k PAizbzg/fQsvQyUbEhhGQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:nRwM0oLG/cg=:vYouBh1iD5DyGV/UNZz/Zx J86KQRgtHpnlF5e+mW5gH/IU3/s2wB9uaGDZg5POdKi+9NYAtxA4Ma4rQTsM4jUUTSofZgruE kdrRvuF38DiTiAbl1LDy1ptO7PtbIX9H/r9ylwLnDQACoFGBW4G/DARihX3LGKHpWmfEfliJj 2ITPzxkTGoSlC3QpbXQhwUsFHPAtMtBkDrNAY5rGLxP20Nw6OYSI6apVg0rku5M1Gax/rXxHL wsjNo8B63msh8EqZKaYURQfV1ctTaYdflD2cascoZaS5yZEblJN6emuIUiR29yoyZEmW57Yw3 vnFt/zFz2ZORbzv4qFUxV4esMC8R0m22RZCiAi4BkH/WxbDH+tg2mqrkbEvnTKAGcGNhI9iK3 S30GuhC8efUvWPpFTWLcw/sF4/0ndFcCIGtvPAppT1+MBjmvcaovhrFk9omUxWOrvmfXTrehh 2HhyMJYY0f4f0caeEJ2s1Pui0Tn+qpD1O1AmDpV71OwMKYMlLgMAofUq+p1Ur1vXw9TEuRqK8 oEoNZoAbQFUlHDo7BT1cHM1NkHDmZTs0CpTfgyaFRTh16/Ga0wYEhM0nEf7JUInxcKKguajmW pMVgm8wC/RSAZaoX79hBpwfglJq2OvCNJPgOxT+63MHvhl4+mfeR3nmvU7StwUIX6mEOwLgfM 9mKkn9lN/T6z7LEugZmej0+5Q+dTnrzqYUXvOzQu6kSQlVtY+mMczXEgE+QYSwyI3+aIoYGRa kHKLHzGP+9x9QU0lbGX7QqFIsYUwWIj9KoJbPcQdKp9wzHs7mlffU5FRS2m3ctCYcgOQpAe2g fg5ort9QIdzQ0UZ507vfNWPLnHFUP978EacxyM/8y5/ZuSAEOJuThicXdmkDQjjqpQVW0Xt4Q 25UpzHr8OUX3obrAjIf63sSFDBNWn2AWZFlnFFm5rTed936ZrZPIWdLCUDqN9K X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> This means, however, that it would skip the >> 'switch-to-buffer-in-dedicated-window' rigmarole. It wouldn't make >> sense because 'pop-to-buffer-same-window' would probably use >> a completely different window anyway. Right? > > 'switch-to-buffer-in-dedicated-window' is only used in the > interactive spec. Would we avoid that 'switch-to-buffer-pop-to' affects C-x b? > But anyway 'display-buffer' called from > 'pop-to-buffer-same-window' will handle dedicatedness in any case. Not the way 'switch-to-buffer' does it. Anyway, if you know what you want, please write the code. We can iron out any differences in the doc-strings, if needed. martin From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 23 02:40:57 2018 Received: (at 32790) by debbugs.gnu.org; 23 Nov 2018 07:40:57 +0000 Received: from localhost ([127.0.0.1]:42958 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gQ65A-00024P-Re for submit@debbugs.gnu.org; Fri, 23 Nov 2018 02:40:57 -0500 Received: from mout.gmx.net ([212.227.17.21]:55919) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gQ659-00024D-Ew for 32790@debbugs.gnu.org; Fri, 23 Nov 2018 02:40:55 -0500 Received: from [192.168.1.101] ([213.162.73.4]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MH5Sw-1gCKQG1cyQ-00Dopy; Fri, 23 Nov 2018 08:40:46 +0100 Message-ID: <5BF7AEF3.9060003@gmx.at> Date: Fri, 23 Nov 2018 08:40:35 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <5BA490EA.4000502@gmx.at> <87y39m9f8b.fsf@mail.linkov.net> <5BF65D7F.2090805@gmx.at> <874lc8g2ix.fsf@mail.linkov.net> In-Reply-To: <874lc8g2ix.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:8DwFozD0+jcUqq4K7PTmmRJYBiN7SxPR+si8o9jLNPO4n4Yn4hO l1kJQKu7Z9n/4cS4oYHUODyfyombSv/bJb7seLGnDVBSi/e9Zs9G2TMXk/7c1oWu32vm9Xj yioWP3TQc60AExT1IRGv/FuJlTX/DfjjKM0h0opecmg06FovZWdSBIhOxZSfOlU1Jfr97RZ BBYGppz4UFWBWtmIPhjxQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:JGF3VLPhjaw=:7GBP406YBimM+ReWo+jWa9 O8zXUPD1mcWvhhcPBXftOmEkcjXZuiLJmPmMyufHHAqNxZ9A8yYyXHlm4Wh/ZvT9OUiGab/aP DBdMK4XKZGArRwo+hgGk6x+XLQI9cdoIIzSaiSBIWFNiPgut6Qk/Rd5WODblPBujzcLA3EDxA 5YzFWdmJ2wWYrjnemXQHsJGLMwgwaIT59w/jY11sk61HLi0C4Mn8+Of2hBfCYMat83jLdw8BL egRuat+DFTebG+wgZbNPnr6t2VFaJ5Ow4UEuc74Pgm8hxlRE7BW8NctyBK9JtszGLYz/gv/Xa Qz81Y+hNGQzjdOD9tw86EEosgJy0JlxlsCrL6Qmq14+DEjT9TLjnkHu8yJNqpbFXuBsbfT25K OSSpfS9IGDQVpXbbV0BoaX5jXpZhBGB4RCBeSk91uy1t5jCUC0y83Mlqki4+BSdxF2NN3XXVD 9wX7d38E9AqbWCWTkBhCY2HFU+1RuS1NQLAqaeTJOntPsnP8B9d694jq/t/lApu2vh2IcXMf/ E0JFV1l1UNDAfyxBiR07ex88yXGCFsruly6eRxU3qjOwVtuZ3oHWSryIUEi60zJQGtog5Ln30 2Yc6j5KDMjuM+SUkIl0a3jeTlTKsxZhw6nYRI+kTKdQOf/qZj8P/oaWaPPZOkwtPwjyRtTfTQ LDBrZbnkEdXSnU1zUAWydxDJmKqJOTjIL+0FILH4olqyI2QZ3Yh2VMKxhAwS4hboLYuTCcMi6 T9W6gyLXDFbixnIBfc05amFBn73NSiZ6+++c1opPDHQ5xIJWgvdUZnmGkfJdlrlJvbFK6Daog P6QXJMGQr3PZ57eKlMSrGeuluv+gGFjpGHqxB4jLsNMnfNFFDOggArJmGfdtibvXPRLgX1HZN EX2hvEVpeU/egEg7fmtODl+jZXiX3ed3ZCNqbFzl67JuRqRnxtjrEkf26pYycz X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >>> + ((and (window-minibuffer-p other-window) >>> + (not (minibuffer-window-active-p other-window))) >>> + (user-error "Minibuffer is inactive")) >> >> Should we try to delete the active minibuffer window? > > Interesting question. Do you think it's worth the trouble > to implement special handling of the minibuffer: > > 1. when a window in the below direction is requested to be deleted > from the bottom window, and the minibuffer is active, > then call (abort-recursive-edit) This looks counter-intuitive unless we are also able to delete the minibuffer window. > 2. when the selected bottom window is requested to be deleted > and selection is requested to be moved in the below direction, > then the minibuffer's window should be selected. If it's active, presumably. I'm not sure, but I wouldn't do that in a first version. BTW, if you delete the window on the right frame border and want selection to move to the right, does it wrap around to the window on the left? martin From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 24 18:44:59 2018 Received: (at 32790) by debbugs.gnu.org; 24 Nov 2018 23:44:59 +0000 Received: from localhost ([127.0.0.1]:45942 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gQhbf-0007K3-HJ for submit@debbugs.gnu.org; Sat, 24 Nov 2018 18:44:59 -0500 Received: from catfish.maple.relay.mailchannels.net ([23.83.214.32]:45206) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gQhbd-0007Jv-HE for 32790@debbugs.gnu.org; Sat, 24 Nov 2018 18:44:58 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id EC12B282917; Sat, 24 Nov 2018 23:44:55 +0000 (UTC) Received: from pdx1-sub0-mail-a3.g.dreamhost.com (unknown [100.96.26.166]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id B396A2823CA; Sat, 24 Nov 2018 23:44:55 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a3.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); Sat, 24 Nov 2018 23:44:55 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Whistle-Glossy: 1b5fd49d082c035d_1543103095824_2064423283 X-MC-Loop-Signature: 1543103095823:1010291835 X-MC-Ingress-Time: 1543103095823 Received: from pdx1-sub0-mail-a3.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a3.g.dreamhost.com (Postfix) with ESMTP id 7D19A8057F; Sat, 24 Nov 2018 15:44:55 -0800 (PST) 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=Nx5njoaVXSFfDz1rrzoOl96/DOA=; b= YD7jooh7OXlxQgNeTEPqjGDhU4+uQZk66NfYqOttj0SyYbJcLJIXaGNtyvxDqwT1 K/01G7oQWb4DomJeJFQzEuibFKhnWvA3kfgMNB/4ygA2x0wSG18c9hKZ7iOSgv4t 9tnVJJ4KJDIobTE3jAQmXercntNzJLk+PA+FSUGidy0= Received: from mail.jurta.org (m91-129-107-242.cust.tele2.ee [91.129.107.242]) (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-a3.g.dreamhost.com (Postfix) with ESMTPSA id 3E7A180575; Sat, 24 Nov 2018 15:44:52 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a3 From: Juri Linkov To: martin rudalics Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Organization: LINKOV.NET References: <87efdnsp2k.fsf@mail.linkov.net> <5BA490EA.4000502@gmx.at> <87y39m9f8b.fsf@mail.linkov.net> <5BF65D7F.2090805@gmx.at> <874lc8g2ix.fsf@mail.linkov.net> <5BF7AEF3.9060003@gmx.at> Date: Sun, 25 Nov 2018 01:20:57 +0200 In-Reply-To: <5BF7AEF3.9060003@gmx.at> (martin rudalics's message of "Fri, 23 Nov 2018 08:40:35 +0100") Message-ID: <87d0quf4fa.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedruddufedgudejjecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddtjedrvdegvdenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdejrddvgedvpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtoheprhhuuggrlhhitghssehgmhigrdgrthenucevlhhushhtvghrufhiiigvpedt X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>>> + ((and (window-minibuffer-p other-window) >>>> + (not (minibuffer-window-active-p other-window))) >>>> + (user-error "Minibuffer is inactive")) >>> >>> Should we try to delete the active minibuffer window? >> >> Interesting question. Do you think it's worth the trouble >> to implement special handling of the minibuffer: >> >> 1. when a window in the below direction is requested to be deleted >> from the bottom window, and the minibuffer is active, >> then call (abort-recursive-edit) > > This looks counter-intuitive unless we are also able to delete the > minibuffer window. But the minibuffer window can't be deleted: 0. emacs -Q 1. M-: 2. C-x o 3. Type and eval in *scratch*: (delete-window (window-in-direction 'below)) This error is signaled: "Attempt to delete minibuffer or sole ordinary window" >> 2. when the selected bottom window is requested to be deleted >> and selection is requested to be moved in the below direction, >> then the minibuffer's window should be selected. > > If it's active, presumably. I'm not sure, but I wouldn't do that in a > first version. BTW, if you delete the window on the right frame > border and want selection to move to the right, does it wrap around to > the window on the left? Yes, it respects windmove-wrap-around. From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 24 18:45:07 2018 Received: (at 32790) by debbugs.gnu.org; 24 Nov 2018 23:45:07 +0000 Received: from localhost ([127.0.0.1]:45948 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gQhbm-0007LX-QR for submit@debbugs.gnu.org; Sat, 24 Nov 2018 18:45:07 -0500 Received: from common.maple.relay.mailchannels.net ([23.83.214.38]:65098) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gQhbk-0007Kt-2w for 32790@debbugs.gnu.org; Sat, 24 Nov 2018 18:45:04 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id F209C2829F1; Sat, 24 Nov 2018 23:45:02 +0000 (UTC) Received: from pdx1-sub0-mail-a3.g.dreamhost.com (unknown [100.96.30.62]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id AC18E282983; Sat, 24 Nov 2018 23:45:02 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a3.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); Sat, 24 Nov 2018 23:45:02 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Descriptive-Lyrical: 10758ee679f64708_1543103102851_532490117 X-MC-Loop-Signature: 1543103102851:1514703525 X-MC-Ingress-Time: 1543103102850 Received: from pdx1-sub0-mail-a3.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a3.g.dreamhost.com (Postfix) with ESMTP id 6E7BF80575; Sat, 24 Nov 2018 15:45:02 -0800 (PST) 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=1qny1f4Wq0HJESJKV8Y+s/sLR/c=; b= 3UK+V4Fi+0V6b0WjZ8AqkXsAUXRM4J6UDtTuEicRWmtLoPBA6+yd/+eT+HSxmUYA 0QTPXXwSd6VX7uOj4YJv1AMZR95YS02cmDLvGezpqb490BvTTyF4ca6c6MDHSL9Z E/Hv/sOvkzNtmv6qMpavXprPRp83bhBr8UZ0AMYuuzM= Received: from mail.jurta.org (m91-129-107-242.cust.tele2.ee [91.129.107.242]) (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-a3.g.dreamhost.com (Postfix) with ESMTPSA id 9FC3F80574; Sat, 24 Nov 2018 15:45:00 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a3 From: Juri Linkov To: martin rudalics Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Organization: LINKOV.NET References: <87efdnsp2k.fsf@mail.linkov.net> <87tvklx4je.fsf@mail.linkov.net> <5BEA94A7.20809@gmx.at> <87r2foa8gq.fsf@mail.linkov.net> <5BEBDDCB.6090608@gmx.at> <87va4zfapq.fsf@mail.linkov.net> <5BED38A6.6020206@gmx.at> <87ftw2q74g.fsf@mail.linkov.net> <5BEE85A5.2070309@gmx.at> <878t1ruz4m.fsf@mail.linkov.net> <5BF12FB6.20203@gmx.at> <87o9am3smz.fsf@mail.linkov.net> <5BF2858C.40207@gmx.at> <87va4szo8n.fsf@mail.linkov.net> <5BF3D3D4.1080106@gmx.at> <87pnuzz2vf.fsf@mail.linkov.net> <5BF5151B.5000201@gmx.at> <87ftvu9f20.fsf@mail.linkov.net> <5BF65D56.9020806@gmx.at> <87pnuwenpk.fsf@mail.linkov.net> <5BF7AEC5.60808@gmx.at> Date: Sun, 25 Nov 2018 01:40:29 +0200 In-Reply-To: <5BF7AEC5.60808@gmx.at> (martin rudalics's message of "Fri, 23 Nov 2018 08:39:49 +0100") Message-ID: <87va4mdoya.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedruddufedgudejjecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehmtderredtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddtjedrvdegvdenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdejrddvgedvpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtoheprhhuuggrlhhitghssehgmhigrdgrthenucevlhhushhtvghrufhiiigvpedt X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain > Would we avoid that 'switch-to-buffer-pop-to' affects C-x b? 'C-x b' is one of main beneficiaries of this feature. > Anyway, if you know what you want, please write the code. > We can iron out any differences in the doc-strings, if needed. Do you see a problem with this implementation? --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=switch-to-buffer-pop-to.1.patch diff --git a/lisp/window.el b/lisp/window.el index 43a742b2d8..b76729e752 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -7779,6 +7787,13 @@ switch-to-buffer-in-dedicated-window :group 'windows :version "25.1") +(defcustom switch-to-buffer-pop-to nil + "If non-nil, use `pop-to-buffer-same-window' in the selected window. +This allows custmization of conditional actions for `display-buffer'." + :type 'boolean + :group 'windows + :version "27.1") + (defun switch-to-buffer (buffer-or-name &optional norecord force-same-window) "Display buffer BUFFER-OR-NAME in the selected window. @@ -7838,11 +7853,13 @@ switch-to-buffer (`pop nil) (_ (set-window-dedicated-p nil nil) 'force-same-window)))))) (list (read-buffer-to-switch "Switch to buffer: ") nil force-same-window))) - (let ((buffer (window-normalize-buffer-to-switch-to buffer-or-name))) + (let ((buffer (window-normalize-buffer-to-switch-to buffer-or-name)) + (set-window-data-p t)) (cond ;; Don't call set-window-buffer if it's not needed since it ;; might signal an error (e.g. if the window is dedicated). - ((eq buffer (window-buffer))) + ((and (eq buffer (window-buffer)) + (not switch-to-buffer-pop-to))) ((window-minibuffer-p) (if force-same-window (user-error "Cannot switch buffers in minibuffer window") @@ -7852,6 +7869,13 @@ switch-to-buffer (user-error "Cannot switch buffers in a dedicated window") (pop-to-buffer buffer norecord))) (t + (when switch-to-buffer-pop-to + (let ((selected-window (selected-window))) + (pop-to-buffer-same-window buffer norecord) + (unless (eq (selected-window) selected-window) + (setq set-window-data-p nil)))) + + (when set-window-data-p (let* ((entry (assq buffer (window-prev-buffers))) (displayed (and (eq switch-to-buffer-preserve-window-point 'already-displayed) @@ -7863,7 +7887,7 @@ switch-to-buffer ;; Try to restore start and point of buffer in the selected ;; window (Bug#4041). (set-window-start (selected-window) (nth 1 entry) t) - (set-window-point nil (nth 2 entry)))))) + (set-window-point nil (nth 2 entry))))))) (unless norecord (select-window (selected-window))) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 25 03:23:30 2018 Received: (at 32790) by debbugs.gnu.org; 25 Nov 2018 08:23:30 +0000 Received: from localhost ([127.0.0.1]:46033 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gQphS-0002lw-0m for submit@debbugs.gnu.org; Sun, 25 Nov 2018 03:23:30 -0500 Received: from mout.gmx.net ([212.227.15.19]:40861) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gQphP-0002ld-I3 for 32790@debbugs.gnu.org; Sun, 25 Nov 2018 03:23:28 -0500 Received: from [192.168.1.101] ([46.125.250.102]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Lu8Ri-1fRtJ20T5y-011Um8; Sun, 25 Nov 2018 09:23:18 +0100 Message-ID: <5BFA5BF3.50505@gmx.at> Date: Sun, 25 Nov 2018 09:23:15 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <87tvklx4je.fsf@mail.linkov.net> <5BEA94A7.20809@gmx.at> <87r2foa8gq.fsf@mail.linkov.net> <5BEBDDCB.6090608@gmx.at> <87va4zfapq.fsf@mail.linkov.net> <5BED38A6.6020206@gmx.at> <87ftw2q74g.fsf@mail.linkov.net> <5BEE85A5.2070309@gmx.at> <878t1ruz4m.fsf@mail.linkov.net> <5BF12FB6.20203@gmx.at> <87o9am3smz.fsf@mail.linkov.net> <5BF2858C.40207@gmx.at> <87va4szo8n.fsf@mail.linkov.net> <5BF3D3D4.1080106@gmx.at> <87pnuzz2vf.fsf@mail.linkov.net> <5BF5151B.5000201@gmx.at> <87ftvu9f20.fsf@mail.linkov.net> <5BF65D56.9020806@gmx.at> <87pnuwenpk.fsf@mail.linkov.net> <5BF7AEC5.60808@gmx.at> <87va4mdoya.fsf@mail.linkov.net> In-Reply-To: <87va4mdoya.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:K7Y2QO3ARJWtgYSrzoCZqsNpgir9UxRYfpqvwb0S2S3dwH6dDi3 PUsZsuHmaRt0bhGE3FflvvINeJs1DxdyNc9wewyC9/Z/9YlttSb+ErZ+9EoNvzTRJlSolP6 clf3iPEtTWAjRpTpQFkQi98TOOhYJW4PGpsiUjvwkUhtSXSb0ie+1RNilFzY3FpleSMnMDB nBDeb1EoQQ5sql37UymYw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:S400sn6ElYk=:4UW/ZBgL7nsRA3deJg6lrr QeuoC50KV8VWOovOCBC+wtywS9p+AuiGGbXvOlSOQNrkpWCYG8ZniSoDweTksABvMpIkygk6X XU7TyqO6mkTNohffbq0v0UAzTxky+PuKTZRNVUoxc+aPSRii2hHZH7v1na63sb9hgjMc+swxi 5XnItRPRAXI9Tqse8XLqzM1w87/jZ6Oz46RBmuKAf1WndeJxnBVaf0g5qPrlj5TOuxE2fbXkT VKZEQ+U9pY3SA/5dA3XhKEL9srdxfHB/UG4XuLVifZtf4eMiI6Inq9YPzQR9LBRaWlJNyPPyG ZgokWygGoHpLVHj2hafp4BAk+uIaFBEXrAg1qByzAT+ynqI4Yu72xPanDmSxNtYVM5xifvAek LTZpN8HqR6xVvi3Ly/UwonnS75VP57IF1FmCLgJYUYLiaDoHhwMlZmVL8XF3ubWgfTAEbTaZr eGM/zFgpdLOGTFSZwUOlkXxhYT9AujJa/LrTJeAmG7a6UWs2Xfrkm6vBTi/AQGG7kmr1/MBkj I9l6Lh+nd21xlmNzApyJL0x0VEPeblgOpFwErpt3FEgtTvgf21EIAY//BgIdd771PVdjaoacW 8Cf5nYqSpkzmzodKiuOw/A9CljX+iQ28um0tGteSXt9DldIWJ+g8Sz/Fl21DFYozWIUBcCKgK BYGddNlXfXzow6CagwifJZLQ4qnvilj4lW1cSdKI5QbdDWomJrMZd7gNv2eBVqE550NbjKP2Q +xh7Ju5nRdB69X/XtlmRG40kjswprqZxWra+niif0MpJfmWGuehhgjpgU+BJk1b7dpuzB9u5b o/pDOV42qBjmymSy4+wpVgvnCdlsMwEaQogVYMlq1FlWYe6IkJcuXGr4FsmoekgtL7XChqdss EUTmn7OTJXpAaBFZ0H5hygtTmifb9O2wWDZri9BUIMaw9e1IKLY68DGewC3Muq X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > Do you see a problem with this implementation? If 'switch-to-buffer-pop-to' is non-nil, you nevertheless run the 'force-same-window' rigmarole although 'pop-to-buffer-same-window' might want to select a completely different window. Please explain this discrepancy unless I'm missing something completely obvious. +(defcustom switch-to-buffer-pop-to nil + "If non-nil, use `pop-to-buffer-same-window' in the selected window. Something like "If non-nil, have `switch-to-buffer' run `pop-to-buffer-same-window'." seems better. BTW, I'm already thinking of calling this option 'switch-to-buffer-pop' because '-to' somehow requires an object where to pop to and I doubt that a user will supply one. Unless we do want to allow a window here. +This allows custmization of conditional actions for `display-buffer'." ^ This option's doc would need more text, maybe a small example. + (set-window-data-p t)) Here I would write (set-window-start-and-point (not switch-to-buffer-pop-to)) (recall also that we use a trailing -p only for functions). - ((eq buffer (window-buffer))) + ((and (eq buffer (window-buffer)) + (not switch-to-buffer-pop-to))) This would show the buffer twice even when it already appears in the same window, right? Are you sure that this is TRT? Unconditionally? + (unless (eq (selected-window) selected-window) + (setq set-window-data-p nil)))) Here I would then write (when (eq (selected-window) selected-window) (setq set-window-start-and-point t)))) and here instead of + (when set-window-data-p I would use (when set-window-start-and-point BTW your patch does not apply here well due to some whitespace mismatches. Thanks, martin From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 25 03:24:24 2018 Received: (at 32790) by debbugs.gnu.org; 25 Nov 2018 08:24:24 +0000 Received: from localhost ([127.0.0.1]:46037 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gQpiK-0002nb-AR for submit@debbugs.gnu.org; Sun, 25 Nov 2018 03:24:24 -0500 Received: from mout.gmx.net ([212.227.15.19]:45207) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gQpiI-0002nN-Qt for 32790@debbugs.gnu.org; Sun, 25 Nov 2018 03:24:23 -0500 Received: from [192.168.1.101] ([46.125.250.102]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MUoma-1fus3H00Qm-00YDOy; Sun, 25 Nov 2018 09:24:15 +0100 Message-ID: <5BFA5C2D.1060301@gmx.at> Date: Sun, 25 Nov 2018 09:24:13 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <5BA490EA.4000502@gmx.at> <87y39m9f8b.fsf@mail.linkov.net> <5BF65D7F.2090805@gmx.at> <874lc8g2ix.fsf@mail.linkov.net> <5BF7AEF3.9060003@gmx.at> <87d0quf4fa.fsf@mail.linkov.net> In-Reply-To: <87d0quf4fa.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:5eyy/1CuQbovXzYppNOmI0305hHgDrWBvI3BXqRpJQrd9glnQUK YONGxxH3NoV1JaPzAQDQBkrft6Lz0c3H1/rffvtg3LWryAVelKAD52KLgsT2XTzXCVqRXDO Db/HqDZKyQgyBDCkIthWyHS7opVrBFSShqQzzI3oJ0ELUdo8eSTWiYwZWSr8TaZv8WBLsW3 Fo4fJ5ElV+OR4n+eblcYQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:Dp72n2+C52U=:Gp4lXFBomGhLhglh5tKQ+j wn43dxo7xbTrBB+KeqH8fu0SVQsL5cB9owkyyqqqn4CUEFFOxfjhaE9kCeQscCTb3SdBrVsO7 QDOUbXLr1q717sggHPQNp405IQF2ZCPsrbKA+SRRAKZ8dw1+g4oXAu7otCs4YEjgIbwZ5gR6V OqkHTpfco4NLL1n0r2BY0IbAV1X+0FGc92CqaAA/i6i/yZ8etgVd3WEBlDIetoXpO2mvqMi/5 6l5CExSWV3EFp7vaTev4MU6fNMAdPGodBfSAjPqp3RdN4j+6elAQ66DAQd3c3QoIL1jKzZjH2 NEpiqVHf4YAxFBDSGaM0PP8k2desSNr0dR/HR3UhnYN+gNjVoCudoWBosgcwsJZcuPR86MN2Y RuVfCxCELHxzIAzt2IruGQ5EHRz9pEHuM8I9O3j8MD0iEU3XWPzyEu6lo1A/6ttJHSQ1/sefV R7Z+08pRq3N/GBXKaRJoV17atEYJh6YZPdYGEq+0pbXYS1KfhqYCv+ItIt623PC6r8ubC1Cgu YSX9M0++WrrV8KMKiCEFSbHZOJYucOYbG4ziEJE/pArZuZX7FiDOBhfYBskYBvNv4ozxszeuq UHu+S+PYnlhwbfQv+BtlB1/VoRt96K+M7uZPni09QChGlHQPesSbmx7aHcvhbn0qjEI40OSCU 5IER4pNX0yxsoZDCDhpZJ0Gm02SFg7J7XvT9OidLyplta7VKQppBtWi5qG1eWrt47U4Y7nAE0 wTwbYNCXc7ACfD9fuKzuUZKc3WBT6TBm7TXWaLerhsnlTRYv5AOs3umPd68s2FMKtCSMNI624 4dprfYidd6LkNM34ydtZH8Ulj4MPD39ImrJ3VOLFHR6AyEZPRY1PTzOBFX/v2eZBkf/Qu8Qhs tDR17hJJI6AK2Uw3LbKihUlBHwhzNHvkppLwDVm1DVHMkGsOCjgGUdT3KUJko0 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> This looks counter-intuitive unless we are also able to delete the >> minibuffer window. > > But the minibuffer window can't be deleted: Yours ;-) > 0. emacs -Q > 1. M-: > 2. C-x o > 3. Type and eval in *scratch*: (delete-window (window-in-direction 'below)) > > This error is signaled: "Attempt to delete minibuffer or sole ordinary window" That's what the text you quoted above meant to say. Recall that we talk about a function called 'windmove-delete-in-direction'. If that function doesn't delete the window but aborts a recursive edit instead then it misses its purpose OT1H and overkills OTOH. >> If it's active, presumably. I'm not sure, but I wouldn't do that in a >> first version. BTW, if you delete the window on the right frame >> border and want selection to move to the right, does it wrap around to >> the window on the left? > > Yes, it respects windmove-wrap-around. OK. The doc of 'windmove-wrap-around' should say that somewhere. martin From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 25 16:10:27 2018 Received: (at 32790) by debbugs.gnu.org; 25 Nov 2018 21:10:27 +0000 Received: from localhost ([127.0.0.1]:47662 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gR1ff-0008SF-61 for submit@debbugs.gnu.org; Sun, 25 Nov 2018 16:10:27 -0500 Received: from goldenrod.birch.relay.mailchannels.net ([23.83.209.74]:31761) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gR1fd-0008S6-Mb for 32790@debbugs.gnu.org; Sun, 25 Nov 2018 16:10:26 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 85E0B5C492C; Sun, 25 Nov 2018 21:10:24 +0000 (UTC) Received: from pdx1-sub0-mail-a3.g.dreamhost.com (unknown [100.96.35.77]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 368D25C4926; Sun, 25 Nov 2018 21:10:24 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a3.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); Sun, 25 Nov 2018 21:10:24 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Reaction-Supply: 10dcb61b3f2f51f0_1543180224347_4044298686 X-MC-Loop-Signature: 1543180224347:4036069892 X-MC-Ingress-Time: 1543180224346 Received: from pdx1-sub0-mail-a3.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a3.g.dreamhost.com (Postfix) with ESMTP id F120681053; Sun, 25 Nov 2018 13:10:23 -0800 (PST) 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=trIQYmO8MxZabJVngiXGWuAMm0I=; b= IZJ+KIbjH9mfCzQ3NpZkaUo4H6IkxNg2oSfKuSrbx21+nFHgANdlfrHJsaIccxVV OyjKVoywRZc3R5t6TgjL5Irugoi6MrUTbHlaODCUCjmzAjCStEscKa39SfSRwN6m ztfVvs57ClnLWZ4PRqQ1V5ATCX6+Mg8Nd4qC/II0OXE= Received: from mail.jurta.org (m91-129-107-242.cust.tele2.ee [91.129.107.242]) (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-a3.g.dreamhost.com (Postfix) with ESMTPSA id D892981054; Sun, 25 Nov 2018 13:10:21 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a3 From: Juri Linkov To: martin rudalics Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Organization: LINKOV.NET References: <87efdnsp2k.fsf@mail.linkov.net> <87r2foa8gq.fsf@mail.linkov.net> <5BEBDDCB.6090608@gmx.at> <87va4zfapq.fsf@mail.linkov.net> <5BED38A6.6020206@gmx.at> <87ftw2q74g.fsf@mail.linkov.net> <5BEE85A5.2070309@gmx.at> <878t1ruz4m.fsf@mail.linkov.net> <5BF12FB6.20203@gmx.at> <87o9am3smz.fsf@mail.linkov.net> <5BF2858C.40207@gmx.at> <87va4szo8n.fsf@mail.linkov.net> <5BF3D3D4.1080106@gmx.at> <87pnuzz2vf.fsf@mail.linkov.net> <5BF5151B.5000201@gmx.at> <87ftvu9f20.fsf@mail.linkov.net> <5BF65D56.9020806@gmx.at> <87pnuwenpk.fsf@mail.linkov.net> <5BF7AEC5.60808@gmx.at> <87va4mdoya.fsf@mail.linkov.net> <5BFA5BF3.50505@gmx.at> Date: Sun, 25 Nov 2018 23:01:34 +0200 In-Reply-To: <5BFA5BF3.50505@gmx.at> (martin rudalics's message of "Sun, 25 Nov 2018 09:23:15 +0100") Message-ID: <87bm6can2p.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedrudduhedgudehtdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehmtderredtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddtjedrvdegvdenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdejrddvgedvpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtoheprhhuuggrlhhitghssehgmhigrdgrthenucevlhhushhtvghrufhiiigvpedt X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain > - ((eq buffer (window-buffer))) > + ((and (eq buffer (window-buffer)) > + (not switch-to-buffer-pop-to))) > > This would show the buffer twice even when it already appears in the > same window, right? Are you sure that this is TRT? Unconditionally? This change is intentional. If the user requests to display the same buffer in another window, we have to follow user's request - it's a normal wish to display the same buffer in two different windows. > BTW your patch does not apply here well due to some whitespace > mismatches. Sorry, I created the previous patch ignoring whitespace changes, so it would be easier for you to see differences. But now it should apply properly with this new patch that takes into account all your comments: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=switch-to-buffer-pop.2.patch diff --git a/lisp/window.el b/lisp/window.el index 43a742b2d8..60daa9f070 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -7779,6 +7779,13 @@ switch-to-buffer-in-dedicated-window :group 'windows :version "25.1") +(defcustom switch-to-buffer-pop nil + "If non-nil, have `switch-to-buffer' run `pop-to-buffer-same-window'. +This allows customization of actions for `display-buffer'." + :type 'boolean + :group 'windows + :version "27.1") + (defun switch-to-buffer (buffer-or-name &optional norecord force-same-window) "Display buffer BUFFER-OR-NAME in the selected window. @@ -7820,29 +7827,32 @@ switch-to-buffer Return the buffer switched to." (interactive (let ((force-same-window - (cond - ((window-minibuffer-p) nil) - ((not (eq (window-dedicated-p) t)) 'force-same-window) - ((pcase switch-to-buffer-in-dedicated-window - (`nil (user-error - "Cannot switch buffers in a dedicated window")) - (`prompt - (if (y-or-n-p - (format "Window is dedicated to %s; undedicate it" - (window-buffer))) - (progn - (set-window-dedicated-p nil nil) - 'force-same-window) - (user-error - "Cannot switch buffers in a dedicated window"))) - (`pop nil) - (_ (set-window-dedicated-p nil nil) 'force-same-window)))))) + (unless switch-to-buffer-pop + (cond + ((window-minibuffer-p) nil) + ((not (eq (window-dedicated-p) t)) 'force-same-window) + ((pcase switch-to-buffer-in-dedicated-window + (`nil (user-error + "Cannot switch buffers in a dedicated window")) + (`prompt + (if (y-or-n-p + (format "Window is dedicated to %s; undedicate it" + (window-buffer))) + (progn + (set-window-dedicated-p nil nil) + 'force-same-window) + (user-error + "Cannot switch buffers in a dedicated window"))) + (`pop nil) + (_ (set-window-dedicated-p nil nil) 'force-same-window))))))) (list (read-buffer-to-switch "Switch to buffer: ") nil force-same-window))) - (let ((buffer (window-normalize-buffer-to-switch-to buffer-or-name))) + (let ((buffer (window-normalize-buffer-to-switch-to buffer-or-name)) + (set-window-start-and-point (not switch-to-buffer-pop))) (cond ;; Don't call set-window-buffer if it's not needed since it ;; might signal an error (e.g. if the window is dedicated). - ((eq buffer (window-buffer))) + ((and (eq buffer (window-buffer)) + (not switch-to-buffer-pop))) ((window-minibuffer-p) (if force-same-window (user-error "Cannot switch buffers in minibuffer window") @@ -7852,18 +7862,25 @@ switch-to-buffer (user-error "Cannot switch buffers in a dedicated window") (pop-to-buffer buffer norecord))) (t - (let* ((entry (assq buffer (window-prev-buffers))) - (displayed (and (eq switch-to-buffer-preserve-window-point - 'already-displayed) - (get-buffer-window buffer 0)))) - (set-window-buffer nil buffer) - (when (and entry - (or (eq switch-to-buffer-preserve-window-point t) - displayed)) - ;; Try to restore start and point of buffer in the selected - ;; window (Bug#4041). - (set-window-start (selected-window) (nth 1 entry) t) - (set-window-point nil (nth 2 entry)))))) + (when switch-to-buffer-pop + (let ((selected-window (selected-window))) + (pop-to-buffer-same-window buffer norecord) + (when (eq (selected-window) selected-window) + (setq set-window-start-and-point t)))) + + (when set-window-start-and-point + (let* ((entry (assq buffer (window-prev-buffers))) + (displayed (and (eq switch-to-buffer-preserve-window-point + 'already-displayed) + (get-buffer-window buffer 0)))) + (set-window-buffer nil buffer) + (when (and entry + (or (eq switch-to-buffer-preserve-window-point t) + displayed)) + ;; Try to restore start and point of buffer in the selected + ;; window (Bug#4041). + (set-window-start (selected-window) (nth 1 entry) t) + (set-window-point nil (nth 2 entry))))))) (unless norecord (select-window (selected-window))) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 26 04:33:22 2018 Received: (at 32790) by debbugs.gnu.org; 26 Nov 2018 09:33:22 +0000 Received: from localhost ([127.0.0.1]:47812 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gRDGc-0001Vv-AI for submit@debbugs.gnu.org; Mon, 26 Nov 2018 04:33:22 -0500 Received: from mout.gmx.net ([212.227.17.20]:43543) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gRDGa-0001Vh-A6 for 32790@debbugs.gnu.org; Mon, 26 Nov 2018 04:33:20 -0500 Received: from [192.168.1.101] ([46.125.249.31]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0M5q45-1fTRfV0Kpl-00xry2; Mon, 26 Nov 2018 10:33:12 +0100 Message-ID: <5BFBBDD4.7050100@gmx.at> Date: Mon, 26 Nov 2018 10:33:08 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <87r2foa8gq.fsf@mail.linkov.net> <5BEBDDCB.6090608@gmx.at> <87va4zfapq.fsf@mail.linkov.net> <5BED38A6.6020206@gmx.at> <87ftw2q74g.fsf@mail.linkov.net> <5BEE85A5.2070309@gmx.at> <878t1ruz4m.fsf@mail.linkov.net> <5BF12FB6.20203@gmx.at> <87o9am3smz.fsf@mail.linkov.net> <5BF2858C.40207@gmx.at> <87va4szo8n.fsf@mail.linkov.net> <5BF3D3D4.1080106@gmx.at> <87pnuzz2vf.fsf@mail.linkov.net> <5BF5151B.5000201@gmx.at> <87ftvu9f20.fsf@mail.linkov.net> <5BF65D56.9020806@gmx.at> <87pnuwenpk.fsf@mail.linkov.net> <5BF7AEC5.60808@gmx.at> <87va4mdoya.fsf@mail.linkov.net> <5BFA5BF3.50505@gmx.at> <87bm6can2p.fsf@mail.linkov.net> In-Reply-To: <87bm6can2p.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:LG5cZJQK+DR+6FekXUZkVac70mDxO1d9E0ZOLkUoiaMxQ363ynK fLRBFVLQtRxBzi03kNF1kz8UDbOeAlWb/MFchqYo+FZWDP5n/ebBpuh7hQ28ZvIMQFXAJgM 5E0/BVBGzORx80z2ZhrRO5SisU2aLkCflYbT6/UFQZb+RrqzxkW/xKqBMCVokMK6ut3nJd7 9FddYG66fShxGgFMHIwQw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:bl6chOhvWbA=:pzGBPTQrsojQ5lppgqVQ5S QMqH2tbr1uohf+sISkrbfLtUSStaQ/b9C08Df9S4DagwBfW2No+JXmJ7NNY2VLnUY50qzKMRk BwiCyPPD4rqvQenCC8gpkaUQBBwGcbWL5NDtYUqMpigt/m61dpF3HxE3D5aa7dUNkDXKhmhWn cNCTp88deo1YcfM3mirxf8D9XzlkBUlOjLZOewDXCmXe+3uKgoU0IuD3Mjamq4riDV30e6yi0 +HhMBPwTPnqJy60hAw2/kNrEXOXlqQGuL0Xnd/QcoXMjf0Yr0H7OiwJ7N+TV/4CbFwDkebDdr Jkftm3ChNEpQnReJWm17D62OXuH01Rr/kdR/FhI7iAl4dMra2m31he5SAbHhHtAN9GE50QyC0 pzx/fOv5e6L+JDGgrF3mAa5a0EnKHTJyV0Vnkn/bas8ERyDIdniTXtylWD3t8wm/zCm32CRkA sb0uMLjYJZkoOG43aQ6MQnvKaEyT0ljekIR8VjfZyDNcZJ2/yWUPZ3z2a4JZVTY/wj35TwyOc 50mu7xaG6JZw0+4KDJpIdTykxRFQ4CAMCpvmIpwQHFraKphb5GzzKNMhbf+SAuOPelmM3QgIQ sFwFAPxLU80ykWV4e5/yThs0NpBWRxKxB5Dq3VtVzo2gnnLrb3mdit3+MhzOrRL3mS6BNZcdI 63UMdydgg1Dgp9AzfEq5iM27JL9oWZTchLZcq2IYPY5PA6njTP8f+UeZG/fk2NKzGRHYZ7Bed P+S1laT2YGsam9aGOJ4smaqxF7e2p4L/ZBIV5+u/kFQtcCy725nlXNKKE0Xq05Nlmw7y+rlBe 8lSYTytJ6L1LykAYUZ9mQDRYIm+1fu+CFaoJBdaxQGbLKBTLcjECBOA38AIkVPEiXrovnTZZm /QdI8odPK76rsuZgPSyI3qhX0ORkIRpQcgKkZGpZROCUIcIqXB2AYZF498ezQJ X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> - ((eq buffer (window-buffer))) >> + ((and (eq buffer (window-buffer)) >> + (not switch-to-buffer-pop-to))) >> >> This would show the buffer twice even when it already appears in the >> same window, right? Are you sure that this is TRT? Unconditionally? > > This change is intentional. If the user requests to display the same > buffer in another window, we have to follow user's request - it's > a normal wish to display the same buffer in two different windows. OK. The user can still reuse the window via the buffer display options. > Sorry, I created the previous patch ignoring whitespace changes, so it > would be easier for you to see differences. But now it should apply > properly with this new patch that takes into account all your comments: I see no more problems so feel free to install. A doc-string update and proper documentation in the manual are strictly needed, though. Thanks, martin From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 26 19:38:49 2018 Received: (at 32790) by debbugs.gnu.org; 27 Nov 2018 00:38:49 +0000 Received: from localhost ([127.0.0.1]:50245 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gRROr-0000NX-Db for submit@debbugs.gnu.org; Mon, 26 Nov 2018 19:38:49 -0500 Received: from firebrick.maple.relay.mailchannels.net ([23.83.214.59]:49167) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gRROo-0000NO-TO for 32790@debbugs.gnu.org; Mon, 26 Nov 2018 19:38:47 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 840455C3162; Tue, 27 Nov 2018 00:38:45 +0000 (UTC) Received: from pdx1-sub0-mail-a3.g.dreamhost.com (unknown [100.96.35.77]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 4871E5C3528; Tue, 27 Nov 2018 00:38:45 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a3.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); Tue, 27 Nov 2018 00:38:45 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Plucky-Bitter: 488e9b4079612695_1543279125372_1791012051 X-MC-Loop-Signature: 1543279125372:854068858 X-MC-Ingress-Time: 1543279125372 Received: from pdx1-sub0-mail-a3.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a3.g.dreamhost.com (Postfix) with ESMTP id 1137780801; Mon, 26 Nov 2018 16:38:45 -0800 (PST) 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=CYqLGoDC4DJ1ToI4HLrvZycovag=; b= fnvnxVdLX15m0LtijjJuawQiHEXapz4bSWwL9ZYWheHZgnv+6i1v+6d4auqajdc6 LxgR2EQtRUuSovFi0tYY74m7vd187Q1IQXBKPD2xNNOkCQQIaffwR9b/od82E3kN bfYPAZzWtF/JCdNIP5m7tV3KnXqSyX6wuXA4oZYRwZk= Received: from mail.jurta.org (m91-129-107-242.cust.tele2.ee [91.129.107.242]) (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-a3.g.dreamhost.com (Postfix) with ESMTPSA id D9D0080804; Mon, 26 Nov 2018 16:38:42 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a3 From: Juri Linkov To: martin rudalics Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Organization: LINKOV.NET References: <87efdnsp2k.fsf@mail.linkov.net> <87va4zfapq.fsf@mail.linkov.net> <5BED38A6.6020206@gmx.at> <87ftw2q74g.fsf@mail.linkov.net> <5BEE85A5.2070309@gmx.at> <878t1ruz4m.fsf@mail.linkov.net> <5BF12FB6.20203@gmx.at> <87o9am3smz.fsf@mail.linkov.net> <5BF2858C.40207@gmx.at> <87va4szo8n.fsf@mail.linkov.net> <5BF3D3D4.1080106@gmx.at> <87pnuzz2vf.fsf@mail.linkov.net> <5BF5151B.5000201@gmx.at> <87ftvu9f20.fsf@mail.linkov.net> <5BF65D56.9020806@gmx.at> <87pnuwenpk.fsf@mail.linkov.net> <5BF7AEC5.60808@gmx.at> <87va4mdoya.fsf@mail.linkov.net> <5BFA5BF3.50505@gmx.at> <87bm6can2p.fsf@mail.linkov.net> <5BFBBDD4.7050100@gmx.at> Date: Tue, 27 Nov 2018 01:47:53 +0200 In-Reply-To: <5BFBBDD4.7050100@gmx.at> (martin rudalics's message of "Mon, 26 Nov 2018 10:33:08 +0100") Message-ID: <87pnurjt92.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedruddukedgvdegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdejrddvgedvnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtjedrvdegvddprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgepfe X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > I see no more problems so feel free to install. A doc-string update > and proper documentation in the manual are strictly needed, though. But wait, maybe still 'switch-to-buffer-pop-to' would be a better name? I think now that maybe in future it might require an object like you already noted recently. It could accept a list of buffer names that are allowed to be displayed with 'pop-to-buffer-same-window' like is accepted in the customizable variable 'same-window-buffer-names', or a list of regexps like in 'same-window-regexps'. From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 26 19:38:56 2018 Received: (at 32790) by debbugs.gnu.org; 27 Nov 2018 00:38:57 +0000 Received: from localhost ([127.0.0.1]:50248 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gRROy-0000Nr-LU for submit@debbugs.gnu.org; Mon, 26 Nov 2018 19:38:56 -0500 Received: from purple.birch.relay.mailchannels.net ([23.83.209.150]:1493) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gRROw-0000Ni-7v for 32790@debbugs.gnu.org; Mon, 26 Nov 2018 19:38:54 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id D0E70124082; Tue, 27 Nov 2018 00:38:52 +0000 (UTC) Received: from pdx1-sub0-mail-a3.g.dreamhost.com (unknown [100.96.36.160]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 94C5F124040; Tue, 27 Nov 2018 00:38:52 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a3.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); Tue, 27 Nov 2018 00:38:52 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Battle-Obese: 1761c50941871864_1543279132681_3744178891 X-MC-Loop-Signature: 1543279132681:1011699724 X-MC-Ingress-Time: 1543279132681 Received: from pdx1-sub0-mail-a3.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a3.g.dreamhost.com (Postfix) with ESMTP id 5601380805; Mon, 26 Nov 2018 16:38:52 -0800 (PST) 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=yPaqrZqn1XPJlR7+5GjLj0mjg9s=; b= nbtVOSnmZOJMEFTaD5ej8ikCz+UDwenZYyleTEXUpOlwS262HIl4wblw7WazwDEO buJ07p4LWDoloLp0Bn38L1IiwNxleH2raIjud7M61dkU8eSQeVb/rXFzwFpv7XDA hyos+B+zoebwvTnxFvzLDQ3v4+C7K3r/3xBNKTtLiTA= Received: from mail.jurta.org (m91-129-107-242.cust.tele2.ee [91.129.107.242]) (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-a3.g.dreamhost.com (Postfix) with ESMTPSA id 6E87380801; Mon, 26 Nov 2018 16:38:49 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a3 From: Juri Linkov To: martin rudalics Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Organization: LINKOV.NET References: <87efdnsp2k.fsf@mail.linkov.net> <5BA490EA.4000502@gmx.at> <87y39m9f8b.fsf@mail.linkov.net> <5BF65D7F.2090805@gmx.at> Date: Tue, 27 Nov 2018 01:53:42 +0200 In-Reply-To: <5BF65D7F.2090805@gmx.at> (martin rudalics's message of "Thu, 22 Nov 2018 08:40:47 +0100") Message-ID: <87h8g3ieex.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedruddukedgvdegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdejrddvgedvnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtjedrvdegvddprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgepge X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > Feel free to install. I realized now that maybe a new prefix arg could be useful to also kill the buffer that was displayed in the deleted window. Not sure, if better to do this using the arg KILL of quit-window, or call kill-buffer explicitly after deleting the window in the given direction. The prefix arg could be 'C-u C-u', e.g. 'C-u C-u C-x S-down' to delete the window below and kill the buffer that it displayed. From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 27 01:00:19 2018 Received: (at 32790) by debbugs.gnu.org; 27 Nov 2018 06:00:19 +0000 Received: from localhost ([127.0.0.1]:50365 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gRWPy-0003qk-P4 for submit@debbugs.gnu.org; Tue, 27 Nov 2018 01:00:18 -0500 Received: from eggs.gnu.org ([208.118.235.92]:47871) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gRWPx-0003qW-UX for 32790@debbugs.gnu.org; Tue, 27 Nov 2018 01:00:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gRWPn-0000bg-W3 for 32790@debbugs.gnu.org; Tue, 27 Nov 2018 01:00:12 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:37223) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRWPn-0000ba-Sw; Tue, 27 Nov 2018 01:00:07 -0500 Received: from [176.228.60.248] (port=4837 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gRWPn-0001a1-Fg; Tue, 27 Nov 2018 01:00:07 -0500 Date: Tue, 27 Nov 2018 08:00:15 +0200 Message-Id: <83lg5fgivk.fsf@gnu.org> From: Eli Zaretskii To: Juri Linkov In-reply-to: <87pnurjt92.fsf@mail.linkov.net> (message from Juri Linkov on Tue, 27 Nov 2018 01:47:53 +0200) Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <87va4zfapq.fsf@mail.linkov.net> <5BED38A6.6020206@gmx.at> <87ftw2q74g.fsf@mail.linkov.net> <5BEE85A5.2070309@gmx.at> <878t1ruz4m.fsf@mail.linkov.net> <5BF12FB6.20203@gmx.at> <87o9am3smz.fsf@mail.linkov.net> <5BF2858C.40207@gmx.at> <87va4szo8n.fsf@mail.linkov.net> <5BF3D3D4.1080106@gmx.at> <87pnuzz2vf.fsf@mail.linkov.net> <5BF5151B.5000201@gmx.at> <87ftvu9f20.fsf@mail.linkov.net> <5BF65D56.9020806@gmx.at> <87pnuwenpk.fsf@mail.linkov.net> <5BF7AEC5.60808@gmx.at> <87va4mdoya.fsf@mail.linkov.net> <5BFA5BF3.50505@gmx.at> <87bm6can2p.fsf@mail.linkov.net> <5BFBBDD4.7050100@gmx.at> <87pnurjt92.fsf@mail.linkov.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 32790 Cc: rudalics@gmx.at, 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > From: Juri Linkov > Date: Tue, 27 Nov 2018 01:47:53 +0200 > Cc: 32790@debbugs.gnu.org > > But wait, maybe still 'switch-to-buffer-pop-to' would be a better name? I find this name sub-optimal, as it doesn't make sense as an English phrase, and doesn't describe well enough what it means. How about switch-to-buffer-use-pop-to or maybe switch-to-buffer-obey-display-actions? From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 27 03:08:36 2018 Received: (at 32790) by debbugs.gnu.org; 27 Nov 2018 08:08:36 +0000 Received: from localhost ([127.0.0.1]:50393 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gRYQ8-0007H2-0y for submit@debbugs.gnu.org; Tue, 27 Nov 2018 03:08:36 -0500 Received: from mout.gmx.net ([212.227.15.15]:53781) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gRYQ6-0007Gm-Lw for 32790@debbugs.gnu.org; Tue, 27 Nov 2018 03:08:35 -0500 Received: from [192.168.1.101] ([46.125.249.61]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Mey7N-1g3XDE42IL-00OVel; Tue, 27 Nov 2018 09:08:26 +0100 Message-ID: <5BFCFB74.1040106@gmx.at> Date: Tue, 27 Nov 2018 09:08:20 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <87va4zfapq.fsf@mail.linkov.net> <5BED38A6.6020206@gmx.at> <87ftw2q74g.fsf@mail.linkov.net> <5BEE85A5.2070309@gmx.at> <878t1ruz4m.fsf@mail.linkov.net> <5BF12FB6.20203@gmx.at> <87o9am3smz.fsf@mail.linkov.net> <5BF2858C.40207@gmx.at> <87va4szo8n.fsf@mail.linkov.net> <5BF3D3D4.1080106@gmx.at> <87pnuzz2vf.fsf@mail.linkov.net> <5BF5151B.5000201@gmx.at> <87ftvu9f20.fsf@mail.linkov.net> <5BF65D56.9020806@gmx.at> <87pnuwenpk.fsf@mail.linkov.net> <5BF7AEC5.60808@gmx.at> <87va4mdoya.fsf@mail.linkov.net> <5BFA5BF3.50505@gmx.at> <87bm6can2p.fsf@mail.linkov.net> <5BFBBDD4.7050100@gmx.at> <87pnurjt92.fsf@mail.linkov.net> In-Reply-To: <87pnurjt92.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:uoBDNcLKpi+GTln8v/+AL2TmXT0yqFZG9n5KlRhq8oo1Q0NqeV9 dtozW6QXsW+8pF2AJaO1wjohP4vtbRsR3DAZu2+fbSr5fa4aFeDWuS2M47xrCss8cvhHs7r RA44Etn5HBZIFcsZhAt1lbVCVELZ/vDGvPkIsV4dBigwV0h8wqiYgHS9kpTC1yGEXX+qz7L sq0tq9qaErtPr6uYBkD/Q== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:LVD7cXYzDfQ=:9gn5GBEDC3YzY23m+YDIZy D9nIabug9hGIuv3Amxw87FgcrySJHAqohyMN6GoAox/oGYgnfqO3cJY9efSsT16R74W4JHSHy GQ2Xbk3UyRt0Ww97fBplrlXu6Iy7gZFum+0hMPdu8JqEFbLNDpAwEvcWdTV+lw1xB+vjtL3cF bCuS2q8JSfoLy7/2E+0bbZ2+ZfnYvqyyPqBNplD6M2/zSK8x4ir7XwjrzfJkrGWePTouzCVhG uN53ZNSEfvc6CW2IhqtB7BzvQEsFeXtbmQ2/CalklmzqJxXYE2qwUSJT6dBcY9bAfKP322JX3 4DNftzstC0rGf0+ofX0XgLVAlryhWfcJI16hLaZxFDHZYr/BeWij5Un1eoKc0xLXwpT0jvTDT ckfqyGMSfEsW4fntV43g78QdTPU1kE7rxKd/l111nFCuyKHkhxgw9XfngS18kl/EuxE43uNEw xr+4MSEmN+PBzaWeXgGW72pa+Xg1AcxBll0b0zytFMsSEiqxn9i8FGVqMmU2MLyEWVP5QkgkC wUD3fvbYpTDJ6uCeg1zkrySDGwDLibXM5HTQBBWt2UKWbFE/i6aAIvaxdKT8te56mfHzwi2Zi JNhuvM8GUMCDezmTjJvsk0eUqZNXNlkvVEG00XPLupTHfbMI96oBea5xBxxX2h/Aj4zRT/9vT mgMC/HmsERyXUsgXF9p/6lkhmv29dAgrRX9oFcr2+74i7RgW31QRene6nGOpRELZzdRnD90m/ iVPeE+Q/ZZe+euGyMU7XH3dvPxMuNuH/ya0p+UmNL9qB2+KuwSEKnZK+fiwVhWldy+Lsi5ALZ mdTZege2cyz2h73+6EcI399eOU0oCF1ueBNfIn4VQHfWvUkqJBFAwWe94QPaySeAzj+MS1PyU EHCdIMWNY81JmM2+D7l3NLL2nlmDu2JvgsNgH0RlyR9h+rCUVZ6dTnpGvdPzGz X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.2 (/) > But wait, maybe still 'switch-to-buffer-pop-to' would be a better name? > I think now that maybe in future it might require an object like you > already noted recently. I think what Eli says is right - it should have a proper name. > It could accept a list of buffer names that are allowed to be displayed > with 'pop-to-buffer-same-window' like is accepted in the customizable > variable 'same-window-buffer-names', or a list of regexps like in > 'same-window-regexps'. Those variables were a continuous annoyance because applications (and Emacs core) added their buffers to those lists at will. I'd rather avoid such mischief. martin From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 27 03:08:43 2018 Received: (at 32790) by debbugs.gnu.org; 27 Nov 2018 08:08:43 +0000 Received: from localhost ([127.0.0.1]:50396 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gRYQF-0007HM-8H for submit@debbugs.gnu.org; Tue, 27 Nov 2018 03:08:43 -0500 Received: from mout.gmx.net ([212.227.15.19]:36495) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gRYQD-0007H1-6D for 32790@debbugs.gnu.org; Tue, 27 Nov 2018 03:08:41 -0500 Received: from [192.168.1.101] ([46.125.249.61]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MbfnB-1g94680z9Z-00J2CV; Tue, 27 Nov 2018 09:08:33 +0100 Message-ID: <5BFCFB7C.4030304@gmx.at> Date: Tue, 27 Nov 2018 09:08:28 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <5BA490EA.4000502@gmx.at> <87y39m9f8b.fsf@mail.linkov.net> <5BF65D7F.2090805@gmx.at> <87h8g3ieex.fsf@mail.linkov.net> In-Reply-To: <87h8g3ieex.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:V7KI8R4mg+rhuweHnLy9LmXupQUXml1RRjbXVKnp3yIzRYyM/2h Ej7dMVH+bF1oou/ChOnVJi/UX06zErQKqMkGM1sLuCzbgY+J3m+7Gael0Ka8kc0PXQthgEh TUy90TOq6CgqqwS13F6JWGZ+YjJ48AXKlhDejwjjlVMfE95Cz8yJe70InyQJlhoE52xF3tM T7dl9Qp+2Pto0jFnr97Mg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:WXyWPwP2Y/o=:HS50gheJka/9oW4tFYSyRC ZZeyo3o9vy5Y/7ekpckBzs7Nc89r9OoYWabmppCyPLx9Q6ctxtU1+lCKRrtTHRs3ZgHds1Ati 9i2JLPIAqbs7WtgOGzTkyENLryzeTr6j3vkIIPRXSQTzEzeLWeipKXm/8m3RvncgZ4oA+cdp6 n6PlDpRfdMYvxFcwKxMku2A6DGSa7mQKTJfwrNBkpgxC8f1xzlxHSqtt1C0YpTvkAJikP3T+P kMlPR/LwI+9aL2A+PO+znXlc3pZiBQ/FMoUU3p1Pa4nDvzbJBQaWgfbg2D9XBUOipmeG63gNm Xi+oUhei4k7pQbi/FfhgUtHu5K2+h39DdCZw4G9/tO/dw+EbtcTiTJBuab6WNPwCMB2VZ7At0 Es0vkdfw4J0sVwwaD3PXnTsLKkcbuykLqR8cxHWuMUYRKgdaAT2W8FhfMbiDNxUQHV+JOqA70 vBfL5x+0gSp8l/4mchvJ+PIbeA8UDO06Z70dyDpWsSPw37T4cXuanPUSys3IeObB9nyTMdag4 uaZt4bB0CefGy4rqPJhUD4YWZEuFHI4d2mZJjDCG+NsLLxJH9Nz8NNUcqBmxy71NUGsjsd9U3 Ubzn88rQBIsxhZjnT1xfusy1Iba9u9qCgtEfRPSQMhOdGRfBktsCDznDQl+BKxo7S9vFgXCDV l43ZHxr52dYxC3i8cO6s9px3FuFkas0J1NUhtnXl2+r6KoiZ7C7eJoGIhyEmjhKiWRx+3PKzx gNUNyS+uG/voxcbQvCun48XKxkvVkNlKx66g0DovYpaiIRIKd289DEzclMEHCcB6Aln9MEy7s GBNjRHsSXjXARJ8GgQNUwROAUiPHl7OUHJJ4Qhz4wxT0h7eS62I8Fa90LYgs7K/yqpWRzhygI F1hnkpqbRWdhyikA5mV3NUy0CHmUREEG6FYLMqaRIL3KRtX+BedCdFplw1q2Zk X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.2 (/) > I realized now that maybe a new prefix arg could be useful to also > kill the buffer that was displayed in the deleted window. Not sure, > if better to do this using the arg KILL of quit-window, or call > kill-buffer explicitly after deleting the window in the given direction. > > The prefix arg could be 'C-u C-u', e.g. 'C-u C-u C-x S-down' to delete > the window below and kill the buffer that it displayed. I can't give you any suggestions here because I can't memorize such combinations in the first place. martin From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 27 19:45:29 2018 Received: (at 32790) by debbugs.gnu.org; 28 Nov 2018 00:45:29 +0000 Received: from localhost ([127.0.0.1]:52632 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gRnyr-0002ly-2z for submit@debbugs.gnu.org; Tue, 27 Nov 2018 19:45:29 -0500 Received: from palegreen.birch.relay.mailchannels.net ([23.83.209.140]:47684) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gRnyn-0002ln-If for 32790@debbugs.gnu.org; Tue, 27 Nov 2018 19:45:26 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 074D21243A7; Wed, 28 Nov 2018 00:45:24 +0000 (UTC) Received: from pdx1-sub0-mail-a3.g.dreamhost.com (unknown [100.96.36.160]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 64BD11248CF; Wed, 28 Nov 2018 00:45:21 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a3.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); Wed, 28 Nov 2018 00:45:23 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Print-Shoe: 4d6998aa790e4503_1543365921650_1762652990 X-MC-Loop-Signature: 1543365921650:4245145104 X-MC-Ingress-Time: 1543365921649 Received: from pdx1-sub0-mail-a3.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a3.g.dreamhost.com (Postfix) with ESMTP id 6009380924; Tue, 27 Nov 2018 16:45:19 -0800 (PST) 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=3WhhrFbl8lCkyjr1gZaQ83KV3dY=; b= FEghoxoWBeLEflHihkTo3bZHghi8ejA6Tg6voxsjb5/A7iO/0h5SHeVVrKhiXdfY NurE7tWaIfMAnyNtNr+awiIgHuW3055sLB8VmXPJh4uZfFCokfYo9gxiRwlHYXbC gmjiyn8bW3OPV1eQ/W/VcuV2wcD2YHos4nJIuyoFMPo= Received: from mail.jurta.org (m91-129-107-242.cust.tele2.ee [91.129.107.242]) (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-a3.g.dreamhost.com (Postfix) with ESMTPSA id 2FCF080925; Tue, 27 Nov 2018 16:45:16 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a3 From: Juri Linkov To: Eli Zaretskii Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Organization: LINKOV.NET References: <87efdnsp2k.fsf@mail.linkov.net> <87ftw2q74g.fsf@mail.linkov.net> <5BEE85A5.2070309@gmx.at> <878t1ruz4m.fsf@mail.linkov.net> <5BF12FB6.20203@gmx.at> <87o9am3smz.fsf@mail.linkov.net> <5BF2858C.40207@gmx.at> <87va4szo8n.fsf@mail.linkov.net> <5BF3D3D4.1080106@gmx.at> <87pnuzz2vf.fsf@mail.linkov.net> <5BF5151B.5000201@gmx.at> <87ftvu9f20.fsf@mail.linkov.net> <5BF65D56.9020806@gmx.at> <87pnuwenpk.fsf@mail.linkov.net> <5BF7AEC5.60808@gmx.at> <87va4mdoya.fsf@mail.linkov.net> <5BFA5BF3.50505@gmx.at> <87bm6can2p.fsf@mail.linkov.net> <5BFBBDD4.7050100@gmx.at> <87pnurjt92.fsf@mail.linkov.net> <83lg5fgivk.fsf@gnu.org> Date: Wed, 28 Nov 2018 01:18:13 +0200 In-Reply-To: <83lg5fgivk.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 27 Nov 2018 08:00:15 +0200") Message-ID: <87h8g2m9ii.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedruddvtddgvdejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdejrddvgedvnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtjedrvdegvddprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopegvlhhiiiesghhnuhdrohhrghenucevlhhushhtvghrufhiiigvpedt X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32790 Cc: rudalics@gmx.at, 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> But wait, maybe still 'switch-to-buffer-pop-to' would be a better name? > > I find this name sub-optimal, as it doesn't make sense as an English > phrase, and doesn't describe well enough what it means. > > How about switch-to-buffer-use-pop-to or maybe > switch-to-buffer-obey-display-actions? Yes, this is a much better name because it reflects the purpose of the option instead of the implementation details. I also updated the docstring: diff --git a/lisp/window.el b/lisp/window.el index 2634955a75..4a1637ad0f 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -7779,6 +7779,16 @@ switch-to-buffer-in-dedicated-window :group 'windows :version "25.1") +(defcustom switch-to-buffer-obey-display-actions nil + "If non-nil, have `switch-to-buffer' run `pop-to-buffer-same-window'. +This means that when switching the buffer it respects display actions +specified for `display-buffer'. So `switch-to-buffer' will display the +buffer in the window specified by the ACTION argument of `display-buffer', +or by the rules in `display-buffer-alist' and other related variables." + :type 'boolean + :group 'windows + :version "27.1") + (defun switch-to-buffer (buffer-or-name &optional norecord force-same-window) "Display buffer BUFFER-OR-NAME in the selected window. @@ -7820,6 +7830,7 @@ switch-to-buffer Return the buffer switched to." (interactive (let ((force-same-window + (unless switch-to-buffer-obey-display-actions (cond ((window-minibuffer-p) nil) ((not (eq (window-dedicated-p) t)) 'force-same-window) @@ -7836,13 +7847,15 @@ switch-to-buffer (user-error "Cannot switch buffers in a dedicated window"))) ('pop nil) - (_ (set-window-dedicated-p nil nil) 'force-same-window)))))) + (_ (set-window-dedicated-p nil nil) 'force-same-window))))))) (list (read-buffer-to-switch "Switch to buffer: ") nil force-same-window))) - (let ((buffer (window-normalize-buffer-to-switch-to buffer-or-name))) + (let ((buffer (window-normalize-buffer-to-switch-to buffer-or-name)) + (set-window-start-and-point (not switch-to-buffer-obey-display-actions))) (cond ;; Don't call set-window-buffer if it's not needed since it ;; might signal an error (e.g. if the window is dedicated). - ((eq buffer (window-buffer))) + ((and (eq buffer (window-buffer)) + (not switch-to-buffer-obey-display-actions))) ((window-minibuffer-p) (if force-same-window (user-error "Cannot switch buffers in minibuffer window") @@ -7852,6 +7865,13 @@ switch-to-buffer (user-error "Cannot switch buffers in a dedicated window") (pop-to-buffer buffer norecord))) (t + (when switch-to-buffer-obey-display-actions + (let ((selected-window (selected-window))) + (pop-to-buffer-same-window buffer norecord) + (when (eq (selected-window) selected-window) + (setq set-window-start-and-point t)))) + + (when set-window-start-and-point (let* ((entry (assq buffer (window-prev-buffers))) (displayed (and (eq switch-to-buffer-preserve-window-point 'already-displayed) @@ -7863,7 +7883,7 @@ switch-to-buffer ;; Try to restore start and point of buffer in the selected ;; window (Bug#4041). (set-window-start (selected-window) (nth 1 entry) t) - (set-window-point nil (nth 2 entry)))))) + (set-window-point nil (nth 2 entry))))))) (unless norecord (select-window (selected-window))) From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 27 19:45:33 2018 Received: (at 32790) by debbugs.gnu.org; 28 Nov 2018 00:45:33 +0000 Received: from localhost ([127.0.0.1]:52636 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gRnyv-0002mO-DS for submit@debbugs.gnu.org; Tue, 27 Nov 2018 19:45:33 -0500 Received: from ladybird.maple.relay.mailchannels.net ([23.83.214.98]:56879) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gRnyr-0002lx-Su for 32790@debbugs.gnu.org; Tue, 27 Nov 2018 19:45:30 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 54FE0123F87; Wed, 28 Nov 2018 00:45:25 +0000 (UTC) Received: from pdx1-sub0-mail-a3.g.dreamhost.com (unknown [100.96.36.160]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 9B7C3123CD7; Wed, 28 Nov 2018 00:45:24 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a3.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); Wed, 28 Nov 2018 00:45:25 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Befitting-Wiry: 062b5166528625a0_1543365925029_663092923 X-MC-Loop-Signature: 1543365925009:1531646877 X-MC-Ingress-Time: 1543365925009 Received: from pdx1-sub0-mail-a3.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a3.g.dreamhost.com (Postfix) with ESMTP id 32E9780921; Tue, 27 Nov 2018 16:45:24 -0800 (PST) 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=IWta9+y2weIoDsGNGDGGqLTlSUY=; b= XdbHBnSXu5B6J8+uD14TOfrEUkNTOauk/zYEq/pcazXNzY0omOWTlgeeFb6CT4oZ ov93qG6dVzmuhakkCXfrVcSP/lPak27O3I9vkj6UNSCkU2CvGIx4I7JQobS6b+A9 92Vz5yYuXhWOhq6EWoX4E81UmDt8v57i4J/nh0c8VbE= Received: from mail.jurta.org (m91-129-107-242.cust.tele2.ee [91.129.107.242]) (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-a3.g.dreamhost.com (Postfix) with ESMTPSA id B88318091F; Tue, 27 Nov 2018 16:45:22 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a3 From: Juri Linkov To: martin rudalics Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Organization: LINKOV.NET References: <87efdnsp2k.fsf@mail.linkov.net> <5BA490EA.4000502@gmx.at> <87y39m9f8b.fsf@mail.linkov.net> <5BF65D7F.2090805@gmx.at> <87h8g3ieex.fsf@mail.linkov.net> <5BFCFB7C.4030304@gmx.at> Date: Wed, 28 Nov 2018 01:28:40 +0200 In-Reply-To: <5BFCFB7C.4030304@gmx.at> (martin rudalics's message of "Tue, 27 Nov 2018 09:08:28 +0100") Message-ID: <87efb6ktzz.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedruddvtddgvdejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdejrddvgedvnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtjedrvdegvddprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgepud X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> I realized now that maybe a new prefix arg could be useful to also >> kill the buffer that was displayed in the deleted window. Not sure, >> if better to do this using the arg KILL of quit-window, or call >> kill-buffer explicitly after deleting the window in the given direction. >> >> The prefix arg could be 'C-u C-u', e.g. 'C-u C-u C-x S-down' to delete >> the window below and kill the buffer that it displayed. > > I can't give you any suggestions here because I can't memorize such > combinations in the first place. There are commands that use triple C-u, so this sequence is not too long. I can't find a function that deletes the window together with killing its buffer ('quit-window' with the arg KILL kills the buffer, but doesn't always delete the window): diff --git a/lisp/windmove.el b/lisp/windmove.el index 6d61806a83..de3507d2d6 100644 --- a/lisp/windmove.el +++ b/lisp/windmove.el @@ -588,7 +588,9 @@ windmove-display-in-direction If prefix ARG is `C-u', reselect a previously selected window. If `windmove-display-no-select' is non-nil, this command doesn't select the window with a displayed buffer, and the meaning of -the prefix argument is reversed." +the prefix argument is reversed. +When `switch-to-buffer-obey-display-actions' is non-nil, +`switch-to-buffer' commands are also supported." (let* ((no-select (not (eq (consp arg) windmove-display-no-select))) ; xor (old-window (or (minibuffer-selected-window) (selected-window))) (new-window) @@ -684,6 +686,7 @@ windmove-delete-in-direction "Delete the window at direction DIR. If prefix ARG is `C-u', delete the selected window and select the window at direction DIR. +With two \\[universal-argument] prefixes, also kill the buffer in that window. When `windmove-wrap-around' is non-nil, takes the window from the opposite side of the frame." (let ((other-window (window-in-direction dir nil nil arg @@ -691,7 +694,9 @@ windmove-delete-in-direction (cond ((null other-window) (user-error "No window %s from selected window" dir)) (t - (if (not (consp arg)) + (when (equal arg '(16)) + (kill-buffer (window-buffer other-window))) + (if (not (equal arg '(4))) (delete-window other-window) (delete-window (selected-window)) (select-window other-window)))))) From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 28 03:33:37 2018 Received: (at 32790) by debbugs.gnu.org; 28 Nov 2018 08:33:37 +0000 Received: from localhost ([127.0.0.1]:52811 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gRvHt-0001Ma-9v for submit@debbugs.gnu.org; Wed, 28 Nov 2018 03:33:37 -0500 Received: from mout.gmx.net ([212.227.17.20]:48487) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gRvHr-0001MM-AM for 32790@debbugs.gnu.org; Wed, 28 Nov 2018 03:33:35 -0500 Received: from [192.168.1.101] ([212.95.5.26]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LwrS8-1fLoyK2X28-016RFT; Wed, 28 Nov 2018 09:33:24 +0100 Message-ID: <5BFE52CC.4000600@gmx.at> Date: Wed, 28 Nov 2018 09:33:16 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov , Eli Zaretskii Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <87ftw2q74g.fsf@mail.linkov.net> <5BEE85A5.2070309@gmx.at> <878t1ruz4m.fsf@mail.linkov.net> <5BF12FB6.20203@gmx.at> <87o9am3smz.fsf@mail.linkov.net> <5BF2858C.40207@gmx.at> <87va4szo8n.fsf@mail.linkov.net> <5BF3D3D4.1080106@gmx.at> <87pnuzz2vf.fsf@mail.linkov.net> <5BF5151B.5000201@gmx.at> <87ftvu9f20.fsf@mail.linkov.net> <5BF65D56.9020806@gmx.at> <87pnuwenpk.fsf@mail.linkov.net> <5BF7AEC5.60808@gmx.at> <87va4mdoya.fsf@mail.linkov.net> <5BFA5BF3.50505@gmx.at> <87bm6can2p.fsf@mail.linkov.net> <5BFBBDD4.7050100@gmx.at> <87pnurjt92.fsf@mail.linkov.net> <83lg5fgivk.fsf@gnu.org> <87h8g2m9ii.fsf@mail.linkov.net> In-Reply-To: <87h8g2m9ii.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:PA1zDlJFESGkJ6xHW99Ge6tB/6okK7KGyOVSDnaPVk3M3pvzhtH 2etUOA9h4kD7rZyXhydHfkcOennGx3Yj+5zc72sRwg+rLNLMXUunfhVmYAcOrUWWk5l/GPk 64bM+qTFdxRC9MP2lhcO8RvLWcFohhsIEwmv6E3bFyu8g2VNgpxbG8zgQn3fG0fx2ElLMMT P8i1eX4gvAjrn8h8MncVg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:/JM4VqQ45UE=:Ri52eh2zEUNsf1lHvjCwuh 1L4sb2jHcw7Crw2b27bVn0rucf9Xeb/NPGLszz/h5n+SgWCDgr/7f85nQeBRmQ9Pl0zEqNAnr VmcGNFxonBxB+Zyl7fy4JUlKuspaflsEWJZOzvztlji5vDM6QaePMTYtWx5aL6HzSjUN92KxY uc9rQ/B4qNlbGZvQ8QqpJnkBDzmoGCIRv3/m7arliH6ciB9y2H9ihREFKurXP8wYB874w5tdL 7zg3zmKvyO6YbaHNHbJpTt/WCM9hlfZdIlc1yOMyfugAynwTQVaTQ7/NklR0/MGTqv8eOnLpd ECBHajTJPV4pZnR2iprJ+1FvgQZLrBP0SQGDrTqlmkaHzuKiooSxwy1KkTpLlL7zLaRL364LK TKwi38BHQ6Vb+zoZ6KwiaRsqWatsiA636UO/VfFsFSo9uEUx1tiKqGB2fptfmoedX9SflxTSG aoDl1d7URIXT2DyEaXsPIHJnPcMPG8IAklCrr6rg4Ny7nJN0PFycH4jGBbvZ+UsfImvubiiC8 Ii7QZ5cKJWnQebicZ3c5yfevvzOkUUKEqPokutBXirIJCzqo1oGLPEAlmFoqrJ/NM4dUcWRfR QhB27Tt/LVjMF7k3L4ZKDFrarXCuN6N9O0zyhor62io7G1ciqfgoFlN4flM7C/EJoz5XUwNte 34JahT1MCV6W0EFWqjNOOh5H90V+tFZ7tovA3I3pwhg7KyhBG0k/lJUIXuoquJufYuZFPIk6G jWxgiR0j1AT/giuVajKBu1yneHzKh+MQe7Goe91N/t+Gy0je0zkWTMD+IZ2TtzPnvbOVk1LGb VDxg15luf4iQSq0QOiErQCl9l77YdL26vP5weMAq20Q7wjNIuLyakthmsGPbxUuu3jbt7UFbT ZhJZCiXmr17hgShPWItZc5YsS0MRi+OeC/eNU9JjYnfjgC9hrmvZbq0lNogqVFr6RoxhDekYz +Y+C8GJNK3A== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > + "If non-nil, have `switch-to-buffer' run `pop-to-buffer-same-window'. > +This means that when switching the buffer it respects display actions > +specified for `display-buffer'. So `switch-to-buffer' will display the > +buffer in the window specified by the ACTION argument of `display-buffer', > +or by the rules in `display-buffer-alist' and other related variables." I don't think this is right because 'switch-to-buffer' does not have a display action it can pass to 'display-buffer'. The behavior is subject to 'display-buffer-overriding-action', 'display-buffer-alist' and other related variables alone IIUC. Furthermore, the doc-string of 'switch-to-buffer' should be amended like: If the option 'switch-to-buffer-obey-display-actions' is non-nil, run the function 'pop-to-buffer-same-window' instead. This may display the buffer in an arbitrary window as specified by 'display-buffer-overriding-action', 'display-buffer-alist' and other display related variables. If this results in displaying the buffer in the selected window, window start and point are adjusted as prescribed by the option `switch-to-buffer-preserve-window-point'. Otherwise, these are left alone. And the following part of the doc-string If optional argument FORCE-SAME-WINDOW is non-nil, the buffer must be displayed in the selected window when called non-interactively; if that is impossible, signal an error rather than calling `pop-to-buffer'. is presumably invalid when 'switch-to-buffer-obey-display-actions' is non-nil. Right? martin From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 28 03:34:09 2018 Received: (at 32790) by debbugs.gnu.org; 28 Nov 2018 08:34:09 +0000 Received: from localhost ([127.0.0.1]:52815 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gRvIN-0001Nf-Io for submit@debbugs.gnu.org; Wed, 28 Nov 2018 03:34:09 -0500 Received: from mout.gmx.net ([212.227.17.22]:49435) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gRvIL-0001N3-Ph for 32790@debbugs.gnu.org; Wed, 28 Nov 2018 03:34:06 -0500 Received: from [192.168.1.101] ([212.95.5.26]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0Lmwpk-1fl9sv1AAG-00h9Uy; Wed, 28 Nov 2018 09:33:57 +0100 Message-ID: <5BFE52EE.1080503@gmx.at> Date: Wed, 28 Nov 2018 09:33:50 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <5BA490EA.4000502@gmx.at> <87y39m9f8b.fsf@mail.linkov.net> <5BF65D7F.2090805@gmx.at> <87h8g3ieex.fsf@mail.linkov.net> <5BFCFB7C.4030304@gmx.at> <87efb6ktzz.fsf@mail.linkov.net> In-Reply-To: <87efb6ktzz.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:mEFjlAEMeeRR+u0rE+S4U5W/BGPj+Dk3IinUB53v6myDj2Pa54K VBpwJb523UTEqiuRBvw0Vm9VVF4oFCiGrcumr0yhAClCIoWfn5yirGWOQcylWxpGcUgC5Ma 63KF+ma2jJKhzzlgXzHQHlUjMZ4DHrwrUduFRcyFHbZWDhyUZIRRPXlV+fFiEtsb7f7GnXH iOsQ2Cj3EM+vrZAv5I92g== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:sajLPG8ejoI=:6kGSS5jxApRNcNHxTMzTFJ G1fwPhDrxWIAJSi3qhpSqJpHf3znM82j7zryhwKzRLHz74H3pqqoF0XGfpb//M20uro97L/8u 8MmFJyX747xMhNBEmBdVh0GzZOjYOSqRBnBVhXbX4BtrBYEHJ8tgrsM4tVX8F1AgAH0e6Las6 AXYn0RL89K6BK2vEB2cMdQJFAZxnWnT1tRJKx+hb1+dcWbWFjvIXbpe23sSkG5gYhwxivw3v2 Pcu7LjIK0fDiykqLUXLiYXPXDxVzvtRKozHII6caWHr7xIj9PZziikrotwKBxoOMXJ/Pkfr6G V0TytuJKGyVraJBO0cyrOjMlkLv2vWYSHCWzCZHMzshm/lhXWfZ3God042EARyDNEjhk6jq/r EMr4yWUytcOLo2M+BE0XB9eQuaIWdpLi8OrUuky9YFuZEA/ivSxswtB/kFdA3241ReUnCo9jt y026hkZYePLaG+zoGGr5qaXoLmT0jCaqlgxPTnw8E8xTiM6+41Q/rW92vLO3HZozrm8x1fDJ3 fsVzjDxNzWa1/Y1sdYheBwBNM8jcwE5KsmA+sOY1Dmt6STHhHHRuYoascaTOoAGOAqbtfBrkx J0N38ux2eWyxiKhc/cGhDqrvcORypbDtFQzLO1RlBvkgrVHpK4l8GQf3kQzbkMfVKQQvjs944 VOISV7n7xpVdbfTFqY96N1aj0FJD5Z/N2Zs3SBcDQd96093gZt9TWEp6x4nbWClo2VWqWJqBW 3EcfyTJ3Eg0CuokTskrw6Y2EHjzABZMuGMdYq5P3o/ncdPjxUJNhiX3KI8jKH5cwcyVyh5os6 rS4qYVfFy7h70GSsK5NGJIMXOw9gwREE6+jtmfFQC2RNB+NvwAoasVGoWV2QEawSu3Sqv/aKT vdkHN5KPyD6uCKWzhncNxu+A7adCZ7I+4FMmyktc8ksiOFMBVAiTOQjd4Gg/1q X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > There are commands that use triple C-u, so this sequence is not too long. > I can't find a function that deletes the window together with killing its > buffer Not even in abysses like 'kill-buffer-and-window'? ('quit-window' with the arg KILL kills the buffer, but doesn't > always delete the window): Because 'quit-window' tries to restore an earlier state. martin From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 28 18:54:02 2018 Received: (at 32790) by debbugs.gnu.org; 28 Nov 2018 23:54:02 +0000 Received: from localhost ([127.0.0.1]:53913 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gS9eb-0003zJ-Kt for submit@debbugs.gnu.org; Wed, 28 Nov 2018 18:54:02 -0500 Received: from quail.birch.relay.mailchannels.net ([23.83.209.151]:7657) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gS9eX-0003yw-Sq for 32790@debbugs.gnu.org; Wed, 28 Nov 2018 18:53:58 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id B2C14283073; Wed, 28 Nov 2018 23:53:56 +0000 (UTC) Received: from pdx1-sub0-mail-a3.g.dreamhost.com (unknown [100.96.30.62]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 71639282FF6; Wed, 28 Nov 2018 23:53:56 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a3.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); Wed, 28 Nov 2018 23:53:56 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Soft-White: 084166db52749ebf_1543449236596_430480849 X-MC-Loop-Signature: 1543449236596:144749023 X-MC-Ingress-Time: 1543449236596 Received: from pdx1-sub0-mail-a3.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a3.g.dreamhost.com (Postfix) with ESMTP id 3F3F680A2D; Wed, 28 Nov 2018 15:53:56 -0800 (PST) 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=Z6nIUC4fQKZsfs1gxDYOx2W/uKU=; b= qzbRBhbSS4nb5OpLsNtC2GprOeka9w6iQKF4TazQCgs+cAghRs6LVKLvsItSG4rT HHa1WafOW4wl2mRsdw3/28tc7P1VZ1ySl8dn0d0eCd+ajUPO7O5L+fcgxZXO2N+Z 2nkjNhjyZ5QJjqxmcSOuYGAPVRjjcsNA/AGQImYHdIs= Received: from mail.jurta.org (m91-129-107-242.cust.tele2.ee [91.129.107.242]) (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-a3.g.dreamhost.com (Postfix) with ESMTPSA id 6216980A2C; Wed, 28 Nov 2018 15:53:52 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a3 From: Juri Linkov To: martin rudalics Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Organization: LINKOV.NET References: <87efdnsp2k.fsf@mail.linkov.net> <878t1ruz4m.fsf@mail.linkov.net> <5BF12FB6.20203@gmx.at> <87o9am3smz.fsf@mail.linkov.net> <5BF2858C.40207@gmx.at> <87va4szo8n.fsf@mail.linkov.net> <5BF3D3D4.1080106@gmx.at> <87pnuzz2vf.fsf@mail.linkov.net> <5BF5151B.5000201@gmx.at> <87ftvu9f20.fsf@mail.linkov.net> <5BF65D56.9020806@gmx.at> <87pnuwenpk.fsf@mail.linkov.net> <5BF7AEC5.60808@gmx.at> <87va4mdoya.fsf@mail.linkov.net> <5BFA5BF3.50505@gmx.at> <87bm6can2p.fsf@mail.linkov.net> <5BFBBDD4.7050100@gmx.at> <87pnurjt92.fsf@mail.linkov.net> <83lg5fgivk.fsf@gnu.org> <87h8g2m9ii.fsf@mail.linkov.net> <5BFE52CC.4000600@gmx.at> Date: Thu, 29 Nov 2018 01:25:18 +0200 In-Reply-To: <5BFE52CC.4000600@gmx.at> (martin rudalics's message of "Wed, 28 Nov 2018 09:33:16 +0100") Message-ID: <87woowrdi9.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedruddvvddgudejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdejrddvgedvnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtjedrvdegvddprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgepud X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32790 Cc: Eli Zaretskii , 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > I don't think this is right because 'switch-to-buffer' does not have a > display action it can pass to 'display-buffer'. The behavior is > subject to 'display-buffer-overriding-action', 'display-buffer-alist' > and other related variables alone IIUC. > > Furthermore, the doc-string of 'switch-to-buffer' should be amended > like: > > If the option 'switch-to-buffer-obey-display-actions' is non-nil, run > the function 'pop-to-buffer-same-window' instead. This may display > the buffer in an arbitrary window as specified by > 'display-buffer-overriding-action', 'display-buffer-alist' and other > display related variables. If this results in displaying the buffer > in the selected window, window start and point are adjusted as > prescribed by the option `switch-to-buffer-preserve-window-point'. > Otherwise, these are left alone. > > And the following part of the doc-string > > If optional argument FORCE-SAME-WINDOW is non-nil, the buffer > must be displayed in the selected window when called > non-interactively; if that is impossible, signal an error rather > than calling `pop-to-buffer'. > > is presumably invalid when 'switch-to-buffer-obey-display-actions' is > non-nil. Right? Is this better? diff --git a/lisp/window.el b/lisp/window.el index 2634955a75..bc07300f0c 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -7779,6 +7779,16 @@ switch-to-buffer-in-dedicated-window :group 'windows :version "25.1") +(defcustom switch-to-buffer-obey-display-actions nil + "If non-nil, have `switch-to-buffer' run `pop-to-buffer-same-window'. +This means that when switching the buffer it respects display actions +specified by `display-buffer-overriding-action', `display-buffer-alist' +and other display related variables. So `switch-to-buffer' will display +the buffer in the window specified by the rules from these variables." + :type 'boolean + :group 'windows + :version "27.1") + (defun switch-to-buffer (buffer-or-name &optional norecord force-same-window) "Display buffer BUFFER-OR-NAME in the selected window. @@ -7811,15 +7821,26 @@ switch-to-buffer If optional argument FORCE-SAME-WINDOW is non-nil, the buffer must be displayed in the selected window when called non-interactively; if that is impossible, signal an error rather -than calling `pop-to-buffer'. +than calling `pop-to-buffer'. It has no effect when the option +`switch-to-buffer-obey-display-actions' is non-nil. The option `switch-to-buffer-preserve-window-point' can be used to make the buffer appear at its last position in the selected window. +If the option `switch-to-buffer-obey-display-actions' is non-nil, +run the function `pop-to-buffer-same-window' instead. +This may display the buffer in another window as specified by +`display-buffer-overriding-action', `display-buffer-alist' and +other display related variables. If this results in displaying +the buffer in the selected window, window start and point are adjusted +as prescribed by the option `switch-to-buffer-preserve-window-point'. +Otherwise, these are left alone. + Return the buffer switched to." (interactive (let ((force-same-window + (unless switch-to-buffer-obey-display-actions (cond ((window-minibuffer-p) nil) ((not (eq (window-dedicated-p) t)) 'force-same-window) @@ -7836,13 +7857,17 @@ switch-to-buffer (user-error "Cannot switch buffers in a dedicated window"))) ('pop nil) - (_ (set-window-dedicated-p nil nil) 'force-same-window)))))) + (_ (set-window-dedicated-p nil nil) 'force-same-window))))))) (list (read-buffer-to-switch "Switch to buffer: ") nil force-same-window))) - (let ((buffer (window-normalize-buffer-to-switch-to buffer-or-name))) + (let ((buffer (window-normalize-buffer-to-switch-to buffer-or-name)) + (set-window-start-and-point (not switch-to-buffer-obey-display-actions))) (cond ;; Don't call set-window-buffer if it's not needed since it ;; might signal an error (e.g. if the window is dedicated). - ((eq buffer (window-buffer))) + ((and (eq buffer (window-buffer)) + ;; pop-to-buffer-same-window might decide to display + ;; the same buffer in another window + (not switch-to-buffer-obey-display-actions))) ((window-minibuffer-p) (if force-same-window (user-error "Cannot switch buffers in minibuffer window") @@ -7852,6 +7877,13 @@ switch-to-buffer (user-error "Cannot switch buffers in a dedicated window") (pop-to-buffer buffer norecord))) (t + (when switch-to-buffer-obey-display-actions + (let ((selected-window (selected-window))) + (pop-to-buffer-same-window buffer norecord) + (when (eq (selected-window) selected-window) + (setq set-window-start-and-point t)))) + + (when set-window-start-and-point (let* ((entry (assq buffer (window-prev-buffers))) (displayed (and (eq switch-to-buffer-preserve-window-point 'already-displayed) @@ -7863,7 +7895,7 @@ switch-to-buffer ;; Try to restore start and point of buffer in the selected ;; window (Bug#4041). (set-window-start (selected-window) (nth 1 entry) t) - (set-window-point nil (nth 2 entry)))))) + (set-window-point nil (nth 2 entry))))))) (unless norecord (select-window (selected-window))) From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 29 03:31:19 2018 Received: (at 32790) by debbugs.gnu.org; 29 Nov 2018 08:31:19 +0000 Received: from localhost ([127.0.0.1]:54053 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gSHjD-00083g-F8 for submit@debbugs.gnu.org; Thu, 29 Nov 2018 03:31:19 -0500 Received: from mout.gmx.net ([212.227.15.19]:50663) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gSHj9-00083O-B2 for 32790@debbugs.gnu.org; Thu, 29 Nov 2018 03:31:16 -0500 Received: from [192.168.1.101] ([213.162.73.80]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0M6jMS-1fVwNh14eS-00wYCy; Thu, 29 Nov 2018 09:31:05 +0100 Message-ID: <5BFFA3C0.9070102@gmx.at> Date: Thu, 29 Nov 2018 09:30:56 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <878t1ruz4m.fsf@mail.linkov.net> <5BF12FB6.20203@gmx.at> <87o9am3smz.fsf@mail.linkov.net> <5BF2858C.40207@gmx.at> <87va4szo8n.fsf@mail.linkov.net> <5BF3D3D4.1080106@gmx.at> <87pnuzz2vf.fsf@mail.linkov.net> <5BF5151B.5000201@gmx.at> <87ftvu9f20.fsf@mail.linkov.net> <5BF65D56.9020806@gmx.at> <87pnuwenpk.fsf@mail.linkov.net> <5BF7AEC5.60808@gmx.at> <87va4mdoya.fsf@mail.linkov.net> <5BFA5BF3.50505@gmx.at> <87bm6can2p.fsf@mail.linkov.net> <5BFBBDD4.7050100@gmx.at> <87pnurjt92.fsf@mail.linkov.net> <83lg5fgivk.fsf@gnu.org> <87h8g2m9ii.fsf@mail.linkov.net> <5BFE52CC.4000600@gmx.at> <87woowrdi9.fsf@mail.linkov.net> In-Reply-To: <87woowrdi9.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:6zw5rdlWAFDWssWeFLQBNDycnBti8sx6WA0b6i5R++GtoYggtH8 kOHl43JSNpEmqZWI6ZKg/CONXO5X+DTACs77/EYPCdLg34SQ1xRda6qxQneTx5o7A1xENne GjTRK/pfwMJz10MbrEr3Zsl9qzfc0hnBCEnW/wNpBdiu1M4y6LMMS971AaTyLaCUWYnQIzt NS7iyJwdVb8TvEwjvTDIw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:xrSCKHV480w=:XaKt38xJ+C9wkd/yojce2d Q7xM4SdwZ8aXRTCtsfgQiJE+YmSjkPYoCac4we4lWU1fu8Ql/dILstOZb3qF0XPZ0rLM5yYbt puZXxLdwYeNoIwIt+ZkiKveAYeNDXJ6gaGjQSTT5ymrVN1gporDRClvjuD8rEoD/S5AvRMSz/ Yr9GR6FoRwuYsb6ajAID1B0BtBolxHgyKfgRZmQtuFIhCcC1up5nvYxvPD3AvJhvb6q5+Ryxc Zvp9vF/ttqwBp4Ni+RR3nx8MzxqKnzLYpMg0/+hJc0BWC3uAbLIrAq/HjnkWaOVB5wNxe7kJo E3e8Rj2Nvlm2/Rb9lx9M8Yi9czRCOO1A2liN7z11t4NGIclZyEVyOvk57z0gE+7r03zGg6R8Q b4QvyWYSwYqeRUeOegQEbcLVbxl22fF+vYNRvphqgl05V3NNgaQclNyS++ox4x+8yI8jK8BD6 riGZLywwdvdfBbPdeyYMfMKgn76wdci0qSax7o7e5bZr5w1CT/0jVXZ8W4FgmY7bPcjqN+luv kdROxr7mTLmZ8KyP0LAyk+byc/nz7RIcDM75SagfGBQzgXBC4FH+RqsTRCsQm+21sQhfheBBL JoGfm+sTqIKbLG4Yl6MYFK1jRxssGeuFqv4G2Fo2zVrYO/cLeu7gvGddtSpKSUR7TBFwgoVwl CIppKdcNJEtzjofTzdEbMGFUyQatS067uRoKtWF/vBpdO/qpE6gOsOlvk+Kk3NWT+JqgbDNdF AIpO4TWEoJ0L113vp88edgy8S9LQiaQlVp/AmKm23WLyWPoMEovyFQJuk1JMaeo9IxM+kY4gw wkDxW7WiDSmJeHd5CTik7fhIuAj6wUp4BMKBfDqRbL4ZSXbFlJpIrFSfcPCkzKxoJRra4zOfG 599gsPlL1Ns59njaA0xYynY+xW3RdISdMQHUFxTVkDUc3fNvv3UP6Qb6z71iGv X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32790 Cc: Eli Zaretskii , 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > Is this better? I think so but the patch again doesn't apply for some reason. Can you resend it as attachment, please? Thanks, martin From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 29 17:55:52 2018 Received: (at 32790) by debbugs.gnu.org; 29 Nov 2018 22:55:52 +0000 Received: from localhost ([127.0.0.1]:55273 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gSVDs-0008GP-9t for submit@debbugs.gnu.org; Thu, 29 Nov 2018 17:55:52 -0500 Received: from cichlid.maple.relay.mailchannels.net ([23.83.214.36]:13164) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gSVDo-0008GF-50 for 32790@debbugs.gnu.org; Thu, 29 Nov 2018 17:55:49 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 25C9A3E473F; Thu, 29 Nov 2018 22:55:47 +0000 (UTC) Received: from pdx1-sub0-mail-a3.g.dreamhost.com (unknown [100.96.35.77]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id D4A2C3E401B; Thu, 29 Nov 2018 22:55:46 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a3.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, 29 Nov 2018 22:55:47 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Stop-Thread: 5a055cf726374c01_1543532146971_674961800 X-MC-Loop-Signature: 1543532146971:333558470 X-MC-Ingress-Time: 1543532146970 Received: from pdx1-sub0-mail-a3.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a3.g.dreamhost.com (Postfix) with ESMTP id 9A75D7F6D0; Thu, 29 Nov 2018 14:55:46 -0800 (PST) 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=gq5AYmcHr6MDbnx75B77u8cnhGI=; b= ab3W4WnRdEUNRHvt8CziF4L598D9gGmnztdLuv4hvK+3gaVERi+a9W4DmHTFiY7A D3/e4JMrNUKNN7cLcjVpvdHauuG258ejcHgx4jUeZo22UaDkMj3vSAETb2WD/2GT ScfemOahNOq3YqFkMgx8YndFa+30jqM2487Ef9I35IE= Received: from mail.jurta.org (m91-129-107-242.cust.tele2.ee [91.129.107.242]) (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-a3.g.dreamhost.com (Postfix) with ESMTPSA id 261257F6CD; Thu, 29 Nov 2018 14:55:43 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a3 From: Juri Linkov To: martin rudalics Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Organization: LINKOV.NET References: <87efdnsp2k.fsf@mail.linkov.net> <87o9am3smz.fsf@mail.linkov.net> <5BF2858C.40207@gmx.at> <87va4szo8n.fsf@mail.linkov.net> <5BF3D3D4.1080106@gmx.at> <87pnuzz2vf.fsf@mail.linkov.net> <5BF5151B.5000201@gmx.at> <87ftvu9f20.fsf@mail.linkov.net> <5BF65D56.9020806@gmx.at> <87pnuwenpk.fsf@mail.linkov.net> <5BF7AEC5.60808@gmx.at> <87va4mdoya.fsf@mail.linkov.net> <5BFA5BF3.50505@gmx.at> <87bm6can2p.fsf@mail.linkov.net> <5BFBBDD4.7050100@gmx.at> <87pnurjt92.fsf@mail.linkov.net> <83lg5fgivk.fsf@gnu.org> <87h8g2m9ii.fsf@mail.linkov.net> <5BFE52CC.4000600@gmx.at> <87woowrdi9.fsf@mail.linkov.net> <5BFFA3C0.9070102@gmx.at> Date: Fri, 30 Nov 2018 00:50:34 +0200 In-Reply-To: <5BFFA3C0.9070102@gmx.at> (martin rudalics's message of "Thu, 29 Nov 2018 09:30:56 +0100") Message-ID: <87tvjz8pmt.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedruddvgedgtdelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesmhdtreertdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdejrddvgedvnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtjedrvdegvddprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgepud X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32790 Cc: Eli Zaretskii , 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain >> Is this better? > > I think so but the patch again doesn't apply for some reason. Can you > resend it as attachment, please? Sorry, no code changes were performed, so I thought it would be better to see just documentation changes ignoring whitespace differences. But here it's a complete patch: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=switch-to-buffer-obey-display-actions.patch diff --git a/lisp/window.el b/lisp/window.el index 2634955a75..bc07300f0c 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -7779,6 +7779,16 @@ switch-to-buffer-in-dedicated-window :group 'windows :version "25.1") +(defcustom switch-to-buffer-obey-display-actions nil + "If non-nil, have `switch-to-buffer' run `pop-to-buffer-same-window'. +This means that when switching the buffer it respects display actions +specified by `display-buffer-overriding-action', `display-buffer-alist' +and other display related variables. So `switch-to-buffer' will display +the buffer in the window specified by the rules from these variables." + :type 'boolean + :group 'windows + :version "27.1") + (defun switch-to-buffer (buffer-or-name &optional norecord force-same-window) "Display buffer BUFFER-OR-NAME in the selected window. @@ -7811,38 +7821,53 @@ switch-to-buffer If optional argument FORCE-SAME-WINDOW is non-nil, the buffer must be displayed in the selected window when called non-interactively; if that is impossible, signal an error rather -than calling `pop-to-buffer'. +than calling `pop-to-buffer'. It has no effect when the option +`switch-to-buffer-obey-display-actions' is non-nil. The option `switch-to-buffer-preserve-window-point' can be used to make the buffer appear at its last position in the selected window. +If the option `switch-to-buffer-obey-display-actions' is non-nil, +run the function `pop-to-buffer-same-window' instead. +This may display the buffer in another window as specified by +`display-buffer-overriding-action', `display-buffer-alist' and +other display related variables. If this results in displaying +the buffer in the selected window, window start and point are adjusted +as prescribed by the option `switch-to-buffer-preserve-window-point'. +Otherwise, these are left alone. + Return the buffer switched to." (interactive (let ((force-same-window - (cond - ((window-minibuffer-p) nil) - ((not (eq (window-dedicated-p) t)) 'force-same-window) - ((pcase switch-to-buffer-in-dedicated-window - ('nil (user-error - "Cannot switch buffers in a dedicated window")) - ('prompt - (if (y-or-n-p - (format "Window is dedicated to %s; undedicate it" - (window-buffer))) - (progn - (set-window-dedicated-p nil nil) - 'force-same-window) - (user-error - "Cannot switch buffers in a dedicated window"))) - ('pop nil) - (_ (set-window-dedicated-p nil nil) 'force-same-window)))))) + (unless switch-to-buffer-obey-display-actions + (cond + ((window-minibuffer-p) nil) + ((not (eq (window-dedicated-p) t)) 'force-same-window) + ((pcase switch-to-buffer-in-dedicated-window + ('nil (user-error + "Cannot switch buffers in a dedicated window")) + ('prompt + (if (y-or-n-p + (format "Window is dedicated to %s; undedicate it" + (window-buffer))) + (progn + (set-window-dedicated-p nil nil) + 'force-same-window) + (user-error + "Cannot switch buffers in a dedicated window"))) + ('pop nil) + (_ (set-window-dedicated-p nil nil) 'force-same-window))))))) (list (read-buffer-to-switch "Switch to buffer: ") nil force-same-window))) - (let ((buffer (window-normalize-buffer-to-switch-to buffer-or-name))) + (let ((buffer (window-normalize-buffer-to-switch-to buffer-or-name)) + (set-window-start-and-point (not switch-to-buffer-obey-display-actions))) (cond ;; Don't call set-window-buffer if it's not needed since it ;; might signal an error (e.g. if the window is dedicated). - ((eq buffer (window-buffer))) + ((and (eq buffer (window-buffer)) + ;; pop-to-buffer-same-window might decide to display + ;; the same buffer in another window + (not switch-to-buffer-obey-display-actions))) ((window-minibuffer-p) (if force-same-window (user-error "Cannot switch buffers in minibuffer window") @@ -7852,18 +7877,25 @@ switch-to-buffer (user-error "Cannot switch buffers in a dedicated window") (pop-to-buffer buffer norecord))) (t - (let* ((entry (assq buffer (window-prev-buffers))) - (displayed (and (eq switch-to-buffer-preserve-window-point - 'already-displayed) - (get-buffer-window buffer 0)))) - (set-window-buffer nil buffer) - (when (and entry - (or (eq switch-to-buffer-preserve-window-point t) - displayed)) - ;; Try to restore start and point of buffer in the selected - ;; window (Bug#4041). - (set-window-start (selected-window) (nth 1 entry) t) - (set-window-point nil (nth 2 entry)))))) + (when switch-to-buffer-obey-display-actions + (let ((selected-window (selected-window))) + (pop-to-buffer-same-window buffer norecord) + (when (eq (selected-window) selected-window) + (setq set-window-start-and-point t)))) + + (when set-window-start-and-point + (let* ((entry (assq buffer (window-prev-buffers))) + (displayed (and (eq switch-to-buffer-preserve-window-point + 'already-displayed) + (get-buffer-window buffer 0)))) + (set-window-buffer nil buffer) + (when (and entry + (or (eq switch-to-buffer-preserve-window-point t) + displayed)) + ;; Try to restore start and point of buffer in the selected + ;; window (Bug#4041). + (set-window-start (selected-window) (nth 1 entry) t) + (set-window-point nil (nth 2 entry))))))) (unless norecord (select-window (selected-window))) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 30 03:22:33 2018 Received: (at 32790) by debbugs.gnu.org; 30 Nov 2018 08:22:33 +0000 Received: from localhost ([127.0.0.1]:55485 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gSe4H-0008KU-Co for submit@debbugs.gnu.org; Fri, 30 Nov 2018 03:22:33 -0500 Received: from mout.gmx.net ([212.227.15.18]:58587) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gSe4G-0008KD-4l for 32790@debbugs.gnu.org; Fri, 30 Nov 2018 03:22:32 -0500 Received: from [192.168.1.101] ([46.125.249.98]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LvlTo-1hZhEw3q16-017UJw; Fri, 30 Nov 2018 09:22:23 +0100 Message-ID: <5C00F336.8010406@gmx.at> Date: Fri, 30 Nov 2018 09:22:14 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <87o9am3smz.fsf@mail.linkov.net> <5BF2858C.40207@gmx.at> <87va4szo8n.fsf@mail.linkov.net> <5BF3D3D4.1080106@gmx.at> <87pnuzz2vf.fsf@mail.linkov.net> <5BF5151B.5000201@gmx.at> <87ftvu9f20.fsf@mail.linkov.net> <5BF65D56.9020806@gmx.at> <87pnuwenpk.fsf@mail.linkov.net> <5BF7AEC5.60808@gmx.at> <87va4mdoya.fsf@mail.linkov.net> <5BFA5BF3.50505@gmx.at> <87bm6can2p.fsf@mail.linkov.net> <5BFBBDD4.7050100@gmx.at> <87pnurjt92.fsf@mail.linkov.net> <83lg5fgivk.fsf@gnu.org> <87h8g2m9ii.fsf@mail.linkov.net> <5BFE52CC.4000600@gmx.at> <87woowrdi9.fsf@mail.linkov.net> <5BFFA3C0.9070102@gmx.at> <87tvjz8pmt.fsf@mail.linkov.net> In-Reply-To: <87tvjz8pmt.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:wPTo0Qd+1DTmOQXlhRX1k23YXJ9ihceoz5Rcs8Gs6jzwNZYGNei 8LYomK4BDdrKSZ6KHziWhZu19nTm+kXuwSutL4Whd5t6bPGBE98vv/v0JeSPPnmfYSQ4RV6 HPVP2qtepgQ+rrpbRk2N02tk6KyE9NuZX90uTJu/bEHKA2qH/8y6ghUIe7YXZDvQYjfF/vf +IrlenkPq020Dd19Er0jw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:VmZl/jtEL3U=:8dQpMpBkJ19RpmZDm85os9 vbQLDtqtfPDiwECJq2rp8HWcP9u1TcZ7cCQurdZ3qWkZB3yG7IbDKjV1XMYT8cbf5jSQzqZ38 XzoyrecDWZqr1hcLr3DR4JJJCR8s+7+UHQTD3+r00HAWBdk+kNye+Og/sz6Y+LR5vHzG1wHPI dSEiNYPdI2crSr2wel4D58JruzrBL6MnzJU/Kft16FdD0jQXMTZQTeq26fkw889D1UzUuPtbc b2vcFXHS9YJawwT2WoMovOYKZzVSPFcn+5Pg8EIQTE66ZL9WH8VV5zW8s64lVCm7HWdrM1CRY OpbllS6b6z5J5f9CMDV1rGrFGclijFH48PPXIFNxrVDpATDd8PT8Yzba920b8ZUu25Yl1vToB LqbBF0G+b5VaqChvuOAcdbuAF+LEhHoJP9wkkJH32g8+H6C2/m06YZaZvNmHEktYc8JVn1pI1 PVfHodtpDLwxl++Hju+jeLjEN+jpDiFwNwniuMzg60L1Tjxlj/+ykWbd9fa/a/n30z8jxWQYq w9Iju7N7LWF1jPdVmyFll4dNF6IUl98mOtLW9NSvCt/cjdsq1dLtQiJKpyydfibW+wsZvDJV1 ziEXqks+eqJ9ibTpeUHy/9hejeCS+QGsScaEEoI9pK/1AwYFcD1pM9DCJQbddB7yqf4lYqg/T 3Lbw9+ct4+9hQ6+v3m4pE7qAbbL/mbC4iPPRRdQmHvmwkeSHnGfUfUNCyXLMZG2CJyw423wTu GNWrjSZRclwrR3gCxQCvnELqUmCX5jwo6SZ/6v8hf99QSLlxy7bhgr25wJddbXpRXkcuK4A+Q /483jZiIjVyyCdwYn9gab+JnCFs29ujK2wU4c7DcGjJXQeA6DROVMp9ObrBOCaHWdw7cfRvgQ hbUcz/jDdk5mI6PdO7XQJ1dUQqq2EiVqLFRYYp4e8eFsQQGE5bfxqdt0sQACbJ X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32790 Cc: Eli Zaretskii , 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > But here it's a complete patch: Thanks. > (defcustom switch-to-buffer-obey-display-actions nil > "If non-nil, have `switch-to-buffer' run `pop-to-buffer-same-window'. Maybe "If non-nil, `switch-to-buffer' runs `pop-to-buffer-same-window' instead. is better. > ((window-minibuffer-p) > (if force-same-window > (user-error "Cannot switch buffers in minibuffer window") > (pop-to-buffer buffer norecord))) > ((eq (window-dedicated-p) t) > (if force-same-window > (user-error "Cannot switch buffers in a dedicated window") > (pop-to-buffer buffer norecord))) These ones stupefied me when I tried to study your patch yesterday. When 'switch-to-buffer-obey-display-actions' is non-nil you do not reset 'force-same-window' so you can get an error when this is t and you're either in the minibuffer or the window is strongly dedicated. Right? martin From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 01 18:06:33 2018 Received: (at 32790) by debbugs.gnu.org; 1 Dec 2018 23:06:33 +0000 Received: from localhost ([127.0.0.1]:57367 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gTELJ-0002Dg-Bh for submit@debbugs.gnu.org; Sat, 01 Dec 2018 18:06:33 -0500 Received: from bird.maple.relay.mailchannels.net ([23.83.214.17]:21086) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gTELH-0002DX-Bc for 32790@debbugs.gnu.org; Sat, 01 Dec 2018 18:06:31 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 20AEF3E3161; Sat, 1 Dec 2018 23:06:30 +0000 (UTC) Received: from pdx1-sub0-mail-a3.g.dreamhost.com (unknown [100.96.33.121]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id B9D133E318B; Sat, 1 Dec 2018 23:06:29 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a3.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); Sat, 01 Dec 2018 23:06:30 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Obese-Trail: 654fddfa5a569b86_1543705589872_3824415252 X-MC-Loop-Signature: 1543705589872:4150590753 X-MC-Ingress-Time: 1543705589872 Received: from pdx1-sub0-mail-a3.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a3.g.dreamhost.com (Postfix) with ESMTP id 8688A80151; Sat, 1 Dec 2018 15:06:29 -0800 (PST) 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=WrRSI5y9yiqGDHu3fWm2lDXJWTY=; b= IFguE4RDDRe3dF2tXCp6tXMpttSOZ5Ue9UIynJroTpZRlC/kxC1vOsu8sfz+QMH9 SujsMfzIOU4nVLZKtqtoKMudpfyVnTL6YUVA5qDvPNyw7h4wBKburMxuX2HsLxRd WmRNDAg21ZPomwfgsbOf68AbMs9bWIpyhib9RV3oIrs= Received: from mail.jurta.org (m91-129-107-242.cust.tele2.ee [91.129.107.242]) (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-a3.g.dreamhost.com (Postfix) with ESMTPSA id 8FDF68004F; Sat, 1 Dec 2018 15:06:27 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a3 From: Juri Linkov To: martin rudalics Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Organization: LINKOV.NET References: <87efdnsp2k.fsf@mail.linkov.net> <87va4szo8n.fsf@mail.linkov.net> <5BF3D3D4.1080106@gmx.at> <87pnuzz2vf.fsf@mail.linkov.net> <5BF5151B.5000201@gmx.at> <87ftvu9f20.fsf@mail.linkov.net> <5BF65D56.9020806@gmx.at> <87pnuwenpk.fsf@mail.linkov.net> <5BF7AEC5.60808@gmx.at> <87va4mdoya.fsf@mail.linkov.net> <5BFA5BF3.50505@gmx.at> <87bm6can2p.fsf@mail.linkov.net> <5BFBBDD4.7050100@gmx.at> <87pnurjt92.fsf@mail.linkov.net> <83lg5fgivk.fsf@gnu.org> <87h8g2m9ii.fsf@mail.linkov.net> <5BFE52CC.4000600@gmx.at> <87woowrdi9.fsf@mail.linkov.net> <5BFFA3C0.9070102@gmx.at> <87tvjz8pmt.fsf@mail.linkov.net> <5C00F336.8010406@gmx.at> Date: Sun, 02 Dec 2018 00:43:01 +0200 In-Reply-To: <5C00F336.8010406@gmx.at> (martin rudalics's message of "Fri, 30 Nov 2018 09:22:14 +0100") Message-ID: <878t18eumi.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedruddvjedgudejvdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddtjedrvdegvdenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdejrddvgedvpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtoheprhhuuggrlhhitghssehgmhigrdgrthenucevlhhushhtvghrufhiiigvpedu X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32790 Cc: Eli Zaretskii , 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> ((window-minibuffer-p) >> (if force-same-window >> (user-error "Cannot switch buffers in minibuffer window") >> (pop-to-buffer buffer norecord))) >> ((eq (window-dedicated-p) t) >> (if force-same-window >> (user-error "Cannot switch buffers in a dedicated window") >> (pop-to-buffer buffer norecord))) > > These ones stupefied me when I tried to study your patch yesterday. > When 'switch-to-buffer-obey-display-actions' is non-nil you do not > reset 'force-same-window' so you can get an error when this is t and > you're either in the minibuffer or the window is strongly dedicated. > Right? I don't understand how 'force-same-window' can be non-nil if there is a condition "unless switch-to-buffer-obey-display-actions" in the interactive spec. But if some code calls 'switch-to-buffer' non-interactively with non-nil 'force-same-window', should it signal an error when 'pop-to-buffer-same-window' displays the buffer in another window? From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 02 03:34:32 2018 Received: (at 32790) by debbugs.gnu.org; 2 Dec 2018 08:34:32 +0000 Received: from localhost ([127.0.0.1]:57553 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gTNCx-0002SI-Rm for submit@debbugs.gnu.org; Sun, 02 Dec 2018 03:34:32 -0500 Received: from mout.gmx.net ([212.227.15.19]:44769) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gTNCv-0002S0-64 for 32790@debbugs.gnu.org; Sun, 02 Dec 2018 03:34:30 -0500 Received: from [192.168.1.101] ([46.125.250.94]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LxxKu-1hYQGt34Ka-015IVp; Sun, 02 Dec 2018 09:34:19 +0100 Message-ID: <5C039907.5030104@gmx.at> Date: Sun, 02 Dec 2018 09:34:15 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <87va4szo8n.fsf@mail.linkov.net> <5BF3D3D4.1080106@gmx.at> <87pnuzz2vf.fsf@mail.linkov.net> <5BF5151B.5000201@gmx.at> <87ftvu9f20.fsf@mail.linkov.net> <5BF65D56.9020806@gmx.at> <87pnuwenpk.fsf@mail.linkov.net> <5BF7AEC5.60808@gmx.at> <87va4mdoya.fsf@mail.linkov.net> <5BFA5BF3.50505@gmx.at> <87bm6can2p.fsf@mail.linkov.net> <5BFBBDD4.7050100@gmx.at> <87pnurjt92.fsf@mail.linkov.net> <83lg5fgivk.fsf@gnu.org> <87h8g2m9ii.fsf@mail.linkov.net> <5BFE52CC.4000600@gmx.at> <87woowrdi9.fsf@mail.linkov.net> <5BFFA3C0.9070102@gmx.at> <87tvjz8pmt.fsf@mail.linkov.net> <5C00F336.8010406@gmx.at> <878t18eumi.fsf@mail.linkov.net> In-Reply-To: <878t18eumi.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:spcZnNd+t3Id0/ukDlqKV0dqnxTb+Ucn/xQmriZ3YGI1oz0K3NB S3C3Xju7MU+ihVhARYl7gmKaFih2DjjQAry7sK+dAKTdWqgrl1zikUbXeLlxcCOxjF/5AYa 8XFAIVlIhRDfroLp9CL+lFqL1n0rjK0pcLILBpBu/xs4zRuL/wY8yaXWzXawcwwh9XPIFRo 39YXpdKW2y9bQLSJGmuWA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:dphNTMbgCqk=:do987Zw1G8rk/uvmmYRGcc zusnm21hUWWghUleWbvH+i+JhxezxQm6n8hapWnv1j8jPgyTIq9a4xgrV44DUtgfP+lpq2tDR 8Seme2OYgoJtuesewQa+sRVpt0VUZ9AdedneJzeHa5aGjszFa97YjpVwmXEIykCOMrOoXNUAg pli2TWY70FxchSumw0mE5RwG/mtpv2I2vYK1FxNm2WNdJeCO+OweITPZvwYQpO+1MdKrqqntW v4OEcFg6Hjv9YYYXcQJDkpzpzomLYw1oHAdeXzJ5KAw2+QX+jU/m1z5h/eGi6KW9jK9sNkqXy Rm/tgLok9S0oqvIgaQT1daixHS1YETftN/9SdOvD3Yw0X7FmA455tqC1qcqFs8lrR+kEXV8cK pO9oBF8QSfqxY7kvraOMBeT9rFUul5nRRZizd7PbBJiVuiFZSJb7DzEP7vg/uJ7rFqmiZQizI Bz5mUGEtH9iAO0knUSFRUgdEoA3pLjdO+YKaRStyPAQvGpLOiumE9bFtFqBCPKqijftpwtzat W2xX3FpGVDZa/JPdxGXhjL6dLZ1BymQO0sP1FxLaY01KwoDeTRiv9M0iAj26TsVh4EwEKOgQD jpwx8ulCNx1v1O+t/4NfuzMsTixDYnejlRcJEBwW6ZIjaBAjyDPnkXCLjkCzsZvw1APhc2fuE ZhHyYhFEo1VYG+KH8ynZ48ehvjptFzlyGOrCYubYif8DZdrvmag2AiV+hBfnD05/APIO2HYMl vu0FWm9Osw8NBKh/jZT+oCYFOkwdltWIT1IPh7Na9EM9t3r2p5INmucqZV+TxSTsHqFhguG+e W5GfBE5QIEg0ynsAHFO43e7CZyRoNq8nSWsI9i9S8wUwkM/fzij7nsjGpO8iDbyQeFdt0+wyo il1ZFjjftQ0o6qgLzGJ6sgMnaYhBhs/vDOn25bZvd5lg60vFjdFxWT+tkSvmqx X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32790 Cc: Eli Zaretskii , 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> These ones stupefied me when I tried to study your patch yesterday. >> When 'switch-to-buffer-obey-display-actions' is non-nil you do not >> reset 'force-same-window' so you can get an error when this is t and >> you're either in the minibuffer or the window is strongly dedicated. >> Right? > > I don't understand how 'force-same-window' can be non-nil if there is > a condition "unless switch-to-buffer-obey-display-actions" in the > interactive spec. But if some code calls 'switch-to-buffer' > non-interactively with non-nil 'force-same-window', should it > signal an error when 'pop-to-buffer-same-window' displays the buffer > in another window? The non-interactive case is the one I had in mind. I think we mean to say that FORCE-SAME-WINDOW has no impact in that case and 'switch-to-buffer' should not signal an error when the window is dedicated or the minibuffer window but try to automatically display the buffer in a window of its choice instead. martin From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 02 20:28:53 2018 Received: (at 32790) by debbugs.gnu.org; 3 Dec 2018 01:28:53 +0000 Received: from localhost ([127.0.0.1]:58548 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gTd2a-0005Az-Il for submit@debbugs.gnu.org; Sun, 02 Dec 2018 20:28:52 -0500 Received: from eastern.maple.relay.mailchannels.net ([23.83.214.55]:22481) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gTd2Z-0005Ap-Dv for 32790@debbugs.gnu.org; Sun, 02 Dec 2018 20:28:52 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 083EF40744; Mon, 3 Dec 2018 01:28:50 +0000 (UTC) Received: from pdx1-sub0-mail-a3.g.dreamhost.com (unknown [100.96.20.98]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id B643D409A6; Mon, 3 Dec 2018 01:28:49 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a3.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); Mon, 03 Dec 2018 01:28:49 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Occur-Trail: 7504a2a00f5864e8_1543800529895_1296626443 X-MC-Loop-Signature: 1543800529894:2040318408 X-MC-Ingress-Time: 1543800529894 Received: from pdx1-sub0-mail-a3.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a3.g.dreamhost.com (Postfix) with ESMTP id 7F98980247; Sun, 2 Dec 2018 17:28:49 -0800 (PST) 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=O68faCOJCPCg2tg605ow/wbfPB4=; b= jDphvZRsQLG7Kh4Adk7TdHDzQbIjfkXVcrX2r50/N1KUFyHl8qBKvcmbP6WVQ9gE pMflOB2eW11u0qpuYUwInshKuz6D6DM3visxbcW1mOt/h0QCACju3c3gWKT9wTzC 5F79JJts14NOGHt8jxigAhkEu+LfsryVySY66qMCDl0= Received: from mail.jurta.org (m91-129-107-242.cust.tele2.ee [91.129.107.242]) (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-a3.g.dreamhost.com (Postfix) with ESMTPSA id 0FF148023F; Sun, 2 Dec 2018 17:28:46 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a3 From: Juri Linkov To: martin rudalics Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Organization: LINKOV.NET References: <87efdnsp2k.fsf@mail.linkov.net> <87pnuzz2vf.fsf@mail.linkov.net> <5BF5151B.5000201@gmx.at> <87ftvu9f20.fsf@mail.linkov.net> <5BF65D56.9020806@gmx.at> <87pnuwenpk.fsf@mail.linkov.net> <5BF7AEC5.60808@gmx.at> <87va4mdoya.fsf@mail.linkov.net> <5BFA5BF3.50505@gmx.at> <87bm6can2p.fsf@mail.linkov.net> <5BFBBDD4.7050100@gmx.at> <87pnurjt92.fsf@mail.linkov.net> <83lg5fgivk.fsf@gnu.org> <87h8g2m9ii.fsf@mail.linkov.net> <5BFE52CC.4000600@gmx.at> <87woowrdi9.fsf@mail.linkov.net> <5BFFA3C0.9070102@gmx.at> <87tvjz8pmt.fsf@mail.linkov.net> <5C00F336.8010406@gmx.at> <878t18eumi.fsf@mail.linkov.net> <5C039907.5030104@gmx.at> Date: Mon, 03 Dec 2018 02:45:35 +0200 In-Reply-To: <5C039907.5030104@gmx.at> (martin rudalics's message of "Sun, 02 Dec 2018 09:34:15 +0100") Message-ID: <87sgzftohw.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedrudeftddgtdehucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesmhdtreertdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdejrddvgedvnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtjedrvdegvddprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgepud X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32790 Cc: Eli Zaretskii , 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain >>> These ones stupefied me when I tried to study your patch yesterday. >>> When 'switch-to-buffer-obey-display-actions' is non-nil you do not >>> reset 'force-same-window' so you can get an error when this is t and >>> you're either in the minibuffer or the window is strongly dedicated. >>> Right? >> >> I don't understand how 'force-same-window' can be non-nil if there is >> a condition "unless switch-to-buffer-obey-display-actions" in the >> interactive spec. But if some code calls 'switch-to-buffer' >> non-interactively with non-nil 'force-same-window', should it >> signal an error when 'pop-to-buffer-same-window' displays the buffer >> in another window? > > The non-interactive case is the one I had in mind. I think we mean to > say that FORCE-SAME-WINDOW has no impact in that case and We already added this to the docstring two patches ago. This was the part of that change: If optional argument FORCE-SAME-WINDOW is non-nil, the buffer must be displayed in the selected window when called non-interactively; if that is impossible, signal an error rather -than calling `pop-to-buffer'. +than calling `pop-to-buffer'. It has no effect when the option +`switch-to-buffer-obey-display-actions' is non-nil. > 'switch-to-buffer' should not signal an error when the window is > dedicated or the minibuffer window but try to automatically display > the buffer in a window of its choice instead. Do you think this is right? --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=switch-to-buffer-obey-display-actions.3.patch diff --git a/lisp/window.el b/lisp/window.el index 2634955a75..8313f71b54 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -7743,8 +7743,10 @@ switch-to-buffer-preserve-window-point position in the selected window. This variable is ignored if the buffer is already displayed in -the selected window or never appeared in it before, or if -`switch-to-buffer' calls `pop-to-buffer' to display the buffer." +the selected window, or never appeared in it before, or if +`switch-to-buffer' calls `pop-to-buffer' to display the buffer, +or non-nil `switch-to-buffer-obey-display-actions' displays it +in another window." :type '(choice (const :tag "Never" nil) (const :tag "If already displayed elsewhere" already-displayed) @@ -7779,6 +7781,16 @@ switch-to-buffer-in-dedicated-window :group 'windows :version "25.1") +(defcustom switch-to-buffer-obey-display-actions nil + "If non-nil, `switch-to-buffer' runs `pop-to-buffer-same-window' instead. +This means that when switching the buffer it respects display actions +specified by `display-buffer-overriding-action', `display-buffer-alist' +and other display related variables. So `switch-to-buffer' will display +the buffer in the window specified by the rules from these variables." + :type 'boolean + :group 'windows + :version "27.1") + (defun switch-to-buffer (buffer-or-name &optional norecord force-same-window) "Display buffer BUFFER-OR-NAME in the selected window. @@ -7811,59 +7823,83 @@ switch-to-buffer If optional argument FORCE-SAME-WINDOW is non-nil, the buffer must be displayed in the selected window when called non-interactively; if that is impossible, signal an error rather -than calling `pop-to-buffer'. +than calling `pop-to-buffer'. It has no effect when the option +`switch-to-buffer-obey-display-actions' is non-nil. The option `switch-to-buffer-preserve-window-point' can be used to make the buffer appear at its last position in the selected window. +If the option `switch-to-buffer-obey-display-actions' is non-nil, +run the function `pop-to-buffer-same-window' instead. +This may display the buffer in another window as specified by +`display-buffer-overriding-action', `display-buffer-alist' and +other display related variables. If this results in displaying +the buffer in the selected window, window start and point are adjusted +as prescribed by the option `switch-to-buffer-preserve-window-point'. +Otherwise, these are left alone. + Return the buffer switched to." (interactive (let ((force-same-window - (cond - ((window-minibuffer-p) nil) - ((not (eq (window-dedicated-p) t)) 'force-same-window) - ((pcase switch-to-buffer-in-dedicated-window - ('nil (user-error - "Cannot switch buffers in a dedicated window")) - ('prompt - (if (y-or-n-p - (format "Window is dedicated to %s; undedicate it" - (window-buffer))) - (progn - (set-window-dedicated-p nil nil) - 'force-same-window) - (user-error - "Cannot switch buffers in a dedicated window"))) - ('pop nil) - (_ (set-window-dedicated-p nil nil) 'force-same-window)))))) + (unless switch-to-buffer-obey-display-actions + (cond + ((window-minibuffer-p) nil) + ((not (eq (window-dedicated-p) t)) 'force-same-window) + ((pcase switch-to-buffer-in-dedicated-window + ('nil (user-error + "Cannot switch buffers in a dedicated window")) + ('prompt + (if (y-or-n-p + (format "Window is dedicated to %s; undedicate it" + (window-buffer))) + (progn + (set-window-dedicated-p nil nil) + 'force-same-window) + (user-error + "Cannot switch buffers in a dedicated window"))) + ('pop nil) + (_ (set-window-dedicated-p nil nil) 'force-same-window))))))) (list (read-buffer-to-switch "Switch to buffer: ") nil force-same-window))) - (let ((buffer (window-normalize-buffer-to-switch-to buffer-or-name))) + (let ((buffer (window-normalize-buffer-to-switch-to buffer-or-name)) + (set-window-start-and-point (not switch-to-buffer-obey-display-actions))) (cond ;; Don't call set-window-buffer if it's not needed since it ;; might signal an error (e.g. if the window is dedicated). - ((eq buffer (window-buffer))) - ((window-minibuffer-p) + ((and (eq buffer (window-buffer)) + ;; pop-to-buffer-same-window might decide to display + ;; the same buffer in another window + (not switch-to-buffer-obey-display-actions))) + ((and (window-minibuffer-p) + (not switch-to-buffer-obey-display-actions)) (if force-same-window (user-error "Cannot switch buffers in minibuffer window") (pop-to-buffer buffer norecord))) - ((eq (window-dedicated-p) t) + ((and (eq (window-dedicated-p) t) + (not switch-to-buffer-obey-display-actions)) (if force-same-window (user-error "Cannot switch buffers in a dedicated window") (pop-to-buffer buffer norecord))) (t - (let* ((entry (assq buffer (window-prev-buffers))) - (displayed (and (eq switch-to-buffer-preserve-window-point - 'already-displayed) - (get-buffer-window buffer 0)))) - (set-window-buffer nil buffer) - (when (and entry - (or (eq switch-to-buffer-preserve-window-point t) - displayed)) - ;; Try to restore start and point of buffer in the selected - ;; window (Bug#4041). - (set-window-start (selected-window) (nth 1 entry) t) - (set-window-point nil (nth 2 entry)))))) + (when switch-to-buffer-obey-display-actions + (let ((selected-window (selected-window))) + (pop-to-buffer-same-window buffer norecord) + (when (eq (selected-window) selected-window) + (setq set-window-start-and-point t)))) + + (when set-window-start-and-point + (let* ((entry (assq buffer (window-prev-buffers))) + (displayed (and (eq switch-to-buffer-preserve-window-point + 'already-displayed) + (get-buffer-window buffer 0)))) + (set-window-buffer nil buffer) + (when (and entry + (or (eq switch-to-buffer-preserve-window-point t) + displayed)) + ;; Try to restore start and point of buffer in the selected + ;; window (Bug#4041). + (set-window-start (selected-window) (nth 1 entry) t) + (set-window-point nil (nth 2 entry))))))) (unless norecord (select-window (selected-window))) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 03 02:45:42 2018 Received: (at 32790) by debbugs.gnu.org; 3 Dec 2018 07:45:42 +0000 Received: from localhost ([127.0.0.1]:58663 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gTivG-0007pa-CH for submit@debbugs.gnu.org; Mon, 03 Dec 2018 02:45:42 -0500 Received: from mout.gmx.net ([212.227.15.15]:33953) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gTivE-0007pI-Do for 32790@debbugs.gnu.org; Mon, 03 Dec 2018 02:45:40 -0500 Received: from [192.168.1.101] ([46.125.250.96]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Ltr89-1hSJnb0zC9-011Cbv; Mon, 03 Dec 2018 08:45:30 +0100 Message-ID: <5C04DF15.6050701@gmx.at> Date: Mon, 03 Dec 2018 08:45:25 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <87pnuzz2vf.fsf@mail.linkov.net> <5BF5151B.5000201@gmx.at> <87ftvu9f20.fsf@mail.linkov.net> <5BF65D56.9020806@gmx.at> <87pnuwenpk.fsf@mail.linkov.net> <5BF7AEC5.60808@gmx.at> <87va4mdoya.fsf@mail.linkov.net> <5BFA5BF3.50505@gmx.at> <87bm6can2p.fsf@mail.linkov.net> <5BFBBDD4.7050100@gmx.at> <87pnurjt92.fsf@mail.linkov.net> <83lg5fgivk.fsf@gnu.org> <87h8g2m9ii.fsf@mail.linkov.net> <5BFE52CC.4000600@gmx.at> <87woowrdi9.fsf@mail.linkov.net> <5BFFA3C0.9070102@gmx.at> <87tvjz8pmt.fsf@mail.linkov.net> <5C00F336.8010406@gmx.at> <878t18eumi.fsf@mail.linkov.net> <5C039907.5030104@gmx.at> <87sgzftohw.fsf@mail.linkov.net> In-Reply-To: <87sgzftohw.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:xqTtBlT36mU9DvWoWOhL/QwbJuuERIllVLOwSii2cKL8JRuVnwU Kpoe2sIA03FCq9L0fSuxwWXX03FJt1iVTZEbYx5WEAb1yd5ELXgy3NKAOXJ2TRXdTi78NJd 2hfPE285jXx3CZqLZgwRSSORAViHj9z4XgR18XxFhFvyzgz6gtEwa0Eyu0r4Q5KIx4nOnaB 6gq6V20laQvPGUkgyR4rQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:MLQSO88vr6I=:KdsH2TMBk8sgV0ByTZLYZI L/K4yokSRc7nxP1gCR3duzn7uf6IdEeEAOQtuhXF235JXN0i3kINzq46eXTvymOzI0ObiU3+0 /fqMsm/qgEK/bdQFwdPb+YqjTXAfGBFUuIlnqekkm+xOe+tjz5etsf61x92HNJY2VRp1+igNt 6jYiFGYJQC0eJBFHjoWqHvLhArDt8Rk3gfbH/08V2Q/9yd9s4WuAmOpw4LbW73IFW8RcLWyqZ T9dRXxmFKPeL3LuZWcn927Lni3U7lm2nKYjpZ3gmjyOILRS7fqOIUl8IYA1KqKDk3BvsvUOBB Co4ocfavyHiJc97TAJW7g/6NA5dj2GXCxmh2X0aqP+kDEck5Kxu1ZfuX28n6AGwfBpqjybxju PMK2p8sPv4EfSf/bT+LCssPln86r8LX+LKg+JPPXvaxMbYl5ZSoY/WnZMFLHEU2UW9+ZGHple rTwgrF5jCw4YE1YcmElAtsCudnjzGgngWUyegU3HYrLIaxavfKP7Bz/gsTjtEWXiX0mXgj86g D6xo/k4i13z/F8QL8iiAtnGbpDrgvDXGD3Oqc7K3jyOqeh5MpL6/DWTWRohUsTUWDWp57Uhin +AO0PWTa7WoXCkgY1ZXfuN1E9qcSZn73lmgUmlCAws7N3kDAVesYWd4utd0eVmDbHj4mFYReh +o1WHTz4N2pKzXf9OchMD+M3UZS9xXbw33dwean2BUF9uQunTt71oanbsoPxnOQSWY4G4jBSg emJDZ1g/luMD2dhLxpyMbvcQ8EtRoDKFNa4OJbY5oJVxpmHps27oT4nwgCGws8vnVKeA5Dcg8 AxY5v9Kdg96yJgDRx3J2MSxQhKeTZoxAJonWTIwc4Sf+ELaEvDdHNxhs479Q6DjpvUBEnKyBq 1Trx7VModd/S1JtoI16yqc5Hqe09ARV54RNUHC9Fu/6o2UaBiBkuPA+RNZ5NT+ X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32790 Cc: Eli Zaretskii , 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > We already added this to the docstring two patches ago. > This was the part of that change: > > If optional argument FORCE-SAME-WINDOW is non-nil, the buffer > must be displayed in the selected window when called > non-interactively; if that is impossible, signal an error rather > -than calling `pop-to-buffer'. > +than calling `pop-to-buffer'. It has no effect when the option > +`switch-to-buffer-obey-display-actions' is non-nil. And I told you to remove it? >> 'switch-to-buffer' should not signal an error when the window is >> dedicated or the minibuffer window but try to automatically display >> the buffer in a window of its choice instead. > > Do you think this is right? Yes. No more pretensions, please install. Thanks, martin From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 20 18:29:13 2018 Received: (at 32790) by debbugs.gnu.org; 20 Dec 2018 23:29:13 +0000 Received: from localhost ([127.0.0.1]:56903 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ga7kf-00086e-3w for submit@debbugs.gnu.org; Thu, 20 Dec 2018 18:29:13 -0500 Received: from ladybird.maple.relay.mailchannels.net ([23.83.214.98]:9030) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ga7kd-00086V-G8 for 32790@debbugs.gnu.org; Thu, 20 Dec 2018 18:29:11 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 24F3E283E97; Thu, 20 Dec 2018 23:29:10 +0000 (UTC) Received: from pdx1-sub0-mail-a6.g.dreamhost.com (unknown [100.96.26.166]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id B7AE72837F7; Thu, 20 Dec 2018 23:29:09 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a6.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, 20 Dec 2018 23:29:10 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Skirt-Befitting: 23a435221f523f01_1545348549964_1582529738 X-MC-Loop-Signature: 1545348549964:3729397669 X-MC-Ingress-Time: 1545348549964 Received: from pdx1-sub0-mail-a6.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a6.g.dreamhost.com (Postfix) with ESMTP id 657898083D; Thu, 20 Dec 2018 15:29:09 -0800 (PST) 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=dEOo0GEvdk3BsAWQvQOxwavecRM=; b= 1w+VjZcKg6FpDYKNk9Wl4i21BlDitHgq+02nDwlmZhcITJzZi6J1PPZT/8ZySPlQ C+nchv8034eClFL3htMJ6TykZ+229dIR9Hp+9T2ZAwNr3xdyRzsgKMhU/Qw4V75G I3mNBVnPWzFaVQvXWC0JJB5fMc40w0OGzvpsBHvub18= Received: from mail.jurta.org (m91-129-106-79.cust.tele2.ee [91.129.106.79]) (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-a6.g.dreamhost.com (Postfix) with ESMTPSA id 5D4D48085A; Thu, 20 Dec 2018 15:29:06 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a6 From: Juri Linkov To: martin rudalics Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Organization: LINKOV.NET References: <87efdnsp2k.fsf@mail.linkov.net> <87ftvu9f20.fsf@mail.linkov.net> <5BF65D56.9020806@gmx.at> <87pnuwenpk.fsf@mail.linkov.net> <5BF7AEC5.60808@gmx.at> <87va4mdoya.fsf@mail.linkov.net> <5BFA5BF3.50505@gmx.at> <87bm6can2p.fsf@mail.linkov.net> <5BFBBDD4.7050100@gmx.at> <87pnurjt92.fsf@mail.linkov.net> <83lg5fgivk.fsf@gnu.org> <87h8g2m9ii.fsf@mail.linkov.net> <5BFE52CC.4000600@gmx.at> <87woowrdi9.fsf@mail.linkov.net> <5BFFA3C0.9070102@gmx.at> <87tvjz8pmt.fsf@mail.linkov.net> <5C00F336.8010406@gmx.at> <878t18eumi.fsf@mail.linkov.net> <5C039907.5030104@gmx.at> <87sgzftohw.fsf@mail.linkov.net> <5C04DF15.6050701@gmx.at> Date: Fri, 21 Dec 2018 01:28:47 +0200 In-Reply-To: <5C04DF15.6050701@gmx.at> (martin rudalics's message of "Mon, 03 Dec 2018 08:45:25 +0100") Message-ID: <87sgyrdbgw.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedrudejgedgtdejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdeirdejleenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdeirdejledprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgeptd X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: >>> 'switch-to-buffer' should not signal an error when the window is >>> dedicated or the minibuffer window but try to automatically display >>> the buffer in a window of its choice instead. >> >> Do [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [23.83.214.98 listed in list.dnswl.org] 1.3 RCVD_IN_RP_RNBL RBL: Relay in RNBL, https://senderscore.org/blacklistlookup/ [23.83.214.98 listed in bl.score.senderscore.com] X-Debbugs-Envelope-To: 32790 Cc: Eli Zaretskii , 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) >>> 'switch-to-buffer' should not signal an error when the window is >>> dedicated or the minibuffer window but try to automatically display >>> the buffer in a window of its choice instead. >> >> Do you think this is right? > > Yes. No more pretensions, please install. Installed after more testing. From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 21 04:15:17 2018 Received: (at 32790) by debbugs.gnu.org; 21 Dec 2018 09:15:17 +0000 Received: from localhost ([127.0.0.1]:57088 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gaGtp-0007nt-Dy for submit@debbugs.gnu.org; Fri, 21 Dec 2018 04:15:17 -0500 Received: from mout.gmx.net ([212.227.15.15]:54985) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gaGtn-0007nb-44 for 32790@debbugs.gnu.org; Fri, 21 Dec 2018 04:15:16 -0500 Received: from [192.168.1.101] ([46.125.249.11]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MRGTX-1gyDJ91czP-00UZ3a; Fri, 21 Dec 2018 10:15:04 +0100 Message-ID: <5C1CAF0D.7090706@gmx.at> Date: Fri, 21 Dec 2018 10:14:53 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <87ftvu9f20.fsf@mail.linkov.net> <5BF65D56.9020806@gmx.at> <87pnuwenpk.fsf@mail.linkov.net> <5BF7AEC5.60808@gmx.at> <87va4mdoya.fsf@mail.linkov.net> <5BFA5BF3.50505@gmx.at> <87bm6can2p.fsf@mail.linkov.net> <5BFBBDD4.7050100@gmx.at> <87pnurjt92.fsf@mail.linkov.net> <83lg5fgivk.fsf@gnu.org> <87h8g2m9ii.fsf@mail.linkov.net> <5BFE52CC.4000600@gmx.at> <87woowrdi9.fsf@mail.linkov.net> <5BFFA3C0.9070102@gmx.at> <87tvjz8pmt.fsf@mail.linkov.net> <5C00F336.8010406@gmx.at> <878t18eumi.fsf@mail.linkov.net> <5C039907.5030104@gmx.at> <87sgzftohw.fsf@mail.linkov.net> <5C04DF15.6050701@gmx.at> <87sgyrdbgw.fsf@mail.linkov.net> In-Reply-To: <87sgyrdbgw.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:FaqoKJR7Fd88XbOllNPzSmGV2FsbV1SJLqKAEN04ByZz8Xx4d5u X6mxGdVQ2trejkXSC5MSO+9qbsb2dwK6y9OwMawfbWfmpY0tQA6eJv5a0umbha0U/CM3Sla ZLUfR0cGW+lupHk9DFUimEzS9KZ8Ci4zsgS/Rpzssv65EpQd4WIkK2/MWVyV0UE3478E6lv 5BO2RyD/dRKNuKvQYMeQQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:z81PldIBshA=:2Dxgt6Ph6DbuHylaNSCcKy m5h/hVNvpDK9TQKVjg2NVZj/yR1C0GVm6LRFXTHdF3lzYuDHk4aaeEXfbeznUpfzsLFyOjpoy vTWWrc34KKqmL/kyXuh6tdaqxUDRSx8Zl2lQ1W/QqKT1gs4O2MakpKcagTWzTPXsRclOPEr/L Vu3cSBk+9ItdDHneocr3gUzEpI6P52naKrwfaqE57EN8N3CK5Rd+mhWqDdzbE90jltjZoXac8 AiYJtK5R6LDx52Fjr1snNCZL9D1eYsY111Q1fLqWqv5TCCUyBwsRXhNdJMMp9XmsfNA8B//V0 WvMH0+3lZ35FMXClZ6f0eyE7V9wj91UFwXR+ED8Rrvpy9CVx3uyo79UfUhmYyfWG3StL+oHGL ShaL4AAy6BlizUZyPmOUa0HVcOnY1bmpGzi0MbAUALb+gAyNaFZge6/uikX14FEKw9vB1xKep +OqQHJnaGzbGEtHlfNEwd0qa7JkQZIZiag8QTP3lNbOypwal/lGPhOM+Us6c1iJOuV6HtYasc 56O63CEOyx11ThV7j09MXXhnvtlA6/CXH3TqOSmxAifLNjA3bRGVJRbYJGIPI0heF6oVkzMLZ bfQuSDiR1JIokmOI2Or/5ao8ZHc9mvnQrfEE1nUAH2gr3jN8FkGfpCfLnx0Cii1Sn2ZnD2wXC JZkCYUBirALmPfPZFab/w+D0yvfDMoGnPvra3rA/pR3HbIBVexHNN/1O5AipaPDnL7cEmX7rm 72HvK3xKl6XNwlEJA1b30z6EHqo2JmCtoYdLOE0qqUrpQN0BNwHjfjvkF+1GUZZOhsU1k5zQm Ai6cAbV8uXM9eah8oCo1vmXYp8rC0caTgltObTww/yllfhYS06haXzlPtvCTH+74KJN+kUtEp 6xIxFKI1UsxNL7YuSwFkjwQxtoV1NhKcKhDMOgb0k1oiW5Hae7FH7MIeGdrf8e X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 32790 Cc: Eli Zaretskii , 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.2 (/) > Installed after more testing. Thank you. In the manual, before -- User Option: switch-to-buffer-obey-display-actions I would add something like "Normally, the behavior of 'switch-to-buffer' cannot be customized. The following option allows to do that." And the subsequent If this variable is non-`nil', `switch-to-buffer' respects display actions specified by `display-buffer-overriding-action', `display-buffer-alist' and other display related variables. would profit from some sort of cross reference. martin From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 22 18:46:54 2018 Received: (at 32790) by debbugs.gnu.org; 22 Dec 2018 23:46:55 +0000 Received: from localhost ([127.0.0.1]:60318 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gaqys-0007le-MD for submit@debbugs.gnu.org; Sat, 22 Dec 2018 18:46:54 -0500 Received: from otter.birch.relay.mailchannels.net ([23.83.209.139]:40814) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gaqyq-0007lS-7Q for 32790@debbugs.gnu.org; Sat, 22 Dec 2018 18:46:53 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id E111B5E0B47; Sat, 22 Dec 2018 23:46:50 +0000 (UTC) Received: from pdx1-sub0-mail-a66.g.dreamhost.com (unknown [100.96.26.166]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 8E3BB5E17B0; Sat, 22 Dec 2018 23:46:50 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a66.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); Sat, 22 Dec 2018 23:46:50 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Attack-Tank: 69d344364c3b3f01_1545522410745_2661239698 X-MC-Loop-Signature: 1545522410745:3855764594 X-MC-Ingress-Time: 1545522410744 Received: from pdx1-sub0-mail-a66.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a66.g.dreamhost.com (Postfix) with ESMTP id 3552880708; Sat, 22 Dec 2018 15:46:50 -0800 (PST) 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=TWX1qQVS2fmdSvQTym5u00vWgfo=; b= sD11ugBA/5wLIHh6npZXFNwuQy0EqRvwo4P3Lsn/RQuuN2D9rVgWczp/bCEgOl+N 6IbtlogIZxPr3o5ohPKNhe8dCwRzIvPKHB12dX9y9lIe+s3tpYpntdJEXGBZMRQW QN2aMbdcLa0hVkeeqqGGkq9c8ZMuE4exhB+CzDIVd6c= Received: from mail.jurta.org (m91-129-106-79.cust.tele2.ee [91.129.106.79]) (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-a66.g.dreamhost.com (Postfix) with ESMTPSA id A601E80704; Sat, 22 Dec 2018 15:46:47 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a66 From: Juri Linkov To: martin rudalics Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Organization: LINKOV.NET References: <87efdnsp2k.fsf@mail.linkov.net> <87pnuwenpk.fsf@mail.linkov.net> <5BF7AEC5.60808@gmx.at> <87va4mdoya.fsf@mail.linkov.net> <5BFA5BF3.50505@gmx.at> <87bm6can2p.fsf@mail.linkov.net> <5BFBBDD4.7050100@gmx.at> <87pnurjt92.fsf@mail.linkov.net> <83lg5fgivk.fsf@gnu.org> <87h8g2m9ii.fsf@mail.linkov.net> <5BFE52CC.4000600@gmx.at> <87woowrdi9.fsf@mail.linkov.net> <5BFFA3C0.9070102@gmx.at> <87tvjz8pmt.fsf@mail.linkov.net> <5C00F336.8010406@gmx.at> <878t18eumi.fsf@mail.linkov.net> <5C039907.5030104@gmx.at> <87sgzftohw.fsf@mail.linkov.net> <5C04DF15.6050701@gmx.at> <87sgyrdbgw.fsf@mail.linkov.net> <5C1CAF0D.7090706@gmx.at> Date: Sun, 23 Dec 2018 01:34:12 +0200 In-Reply-To: <5C1CAF0D.7090706@gmx.at> (martin rudalics's message of "Fri, 21 Dec 2018 10:14:53 +0100") Message-ID: <87r2e96tob.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedrudejjedgudejkecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddtiedrjeelnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtiedrjeelpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtoheprhhuuggrlhhitghssehgmhigrdgrthenucevlhhushhtvghrufhiiigvpedt X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32790 Cc: Eli Zaretskii , 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > In the manual, before > > -- User Option: switch-to-buffer-obey-display-actions > > I would add something like "Normally, the behavior of > 'switch-to-buffer' cannot be customized. The following option allows > to do that." The text before describes the option `switch-to-buffer-preserve-window-point'. From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 23 04:40:47 2018 Received: (at 32790) by debbugs.gnu.org; 23 Dec 2018 09:40:47 +0000 Received: from localhost ([127.0.0.1]:60535 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gb0Fa-0000sK-Sn for submit@debbugs.gnu.org; Sun, 23 Dec 2018 04:40:47 -0500 Received: from mout.gmx.net ([212.227.15.18]:34113) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gb0FY-0000s0-39 for 32790@debbugs.gnu.org; Sun, 23 Dec 2018 04:40:44 -0500 Received: from [192.168.1.101] ([46.125.250.117]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MPDaC-1gWaOZ0TEu-004Una; Sun, 23 Dec 2018 10:40:35 +0100 Message-ID: <5C1F5811.4060107@gmx.at> Date: Sun, 23 Dec 2018 10:40:33 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window References: <87efdnsp2k.fsf@mail.linkov.net> <87pnuwenpk.fsf@mail.linkov.net> <5BF7AEC5.60808@gmx.at> <87va4mdoya.fsf@mail.linkov.net> <5BFA5BF3.50505@gmx.at> <87bm6can2p.fsf@mail.linkov.net> <5BFBBDD4.7050100@gmx.at> <87pnurjt92.fsf@mail.linkov.net> <83lg5fgivk.fsf@gnu.org> <87h8g2m9ii.fsf@mail.linkov.net> <5BFE52CC.4000600@gmx.at> <87woowrdi9.fsf@mail.linkov.net> <5BFFA3C0.9070102@gmx.at> <87tvjz8pmt.fsf@mail.linkov.net> <5C00F336.8010406@gmx.at> <878t18eumi.fsf@mail.linkov.net> <5C039907.5030104@gmx.at> <87sgzftohw.fsf@mail.linkov.net> <5C04DF15.6050701@gmx.at> <87sgyrdbgw.fsf@mail.linkov.net> <5C1CAF0D.7090706@gmx.at> <87r2e96tob.fsf@mail.linkov.net> In-Reply-To: <87r2e96tob.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:PS79YAMPkmd+dtXWayAY4S6WYvcogwa58DVBnOwkU/RlqZ02M6Y Tu/rmoFJk0RfztazMYo9eMeECKk3i25kGu8XrZbaLSi0sewKJJyuFFbZ17n429nQKhVIwYp dDBE3PHZXjrWF+BYPdMD3NoRoUfCo87/h9RGaZnqoalenqkX4/Z4+MXDL9ZCBdJgmbT/O0L WYv/fnMw9wvW8941KDy8A== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:r/u/jY7CkyU=:nwUHc1MEfnl11pHRcCb2Sk 796u9d+XKmeHbScuzj/DK6IK5PAfCHoLHQEZvJj5FzQi7u+ULPuO3XPWscZrw3Ib8Av9mcXbt xCUN49KqrpIeGITi6oG62/YxMdYIR/cWo7KBbJWEWBicnxTGzWZvK1VhOaMnw7UEJjsuxtpNj ocoWclnlUmXo0d29WTb0RWO2iKk8YuyLmpyHKmQsyVWKhmTt2/IaphyFYWtzSgxEHCoR0YLtP Y9V3ohgewaEvRtecujbbn6oLkTaDOpHX9auhOlXEcS0TDigPyC8ECER4sLXl1M2TuUE3SmQsr L522uVKcLDPsevXF3rU3jT1PK6awLib4ELb+l9v103D25ZIRQ2XKnQbZN6fXsFmJouM8nZMoG X32tELJsKkzpcEwcfv1hcEix06VceI/stqK6PUzn7zP143m5HfBZiE1IP4owsfgeocunIJst9 bP05Mj8IFIjc66iDkYes7nqf2UhYKAMRnCBoyIa5ddOrT+SJotUSYXjQG4CXAoTzUD5Q0po1N O0/5lMSafNeYTtCjUDmmiarJbAadsKBp4CKg3TD+cw/2LX9zO5HAJyjUPFg75ENB/DW2LHwZL FKSi60HEUG7jFpZDwFguHrwR3RDnG0A4ZWR0kcl449fyE2QnUmCUltH1nkVyZDJ0xHOX95XIq fW7zOssHkMWxZVpVhwY/QWw/gdMPZlPAyld2mZthWVt2WGPf1Zb+RPJBzQ66xh/wRVeBFRkLN iBVefCk67ypzGqdQx8ABFs9O0uHFWMhBTYFv4LV8pOUdSPobnM12F3KiwpRjWeY073ZoFWQ4o NMo1F0QBf6lHuHOK80C1VInyiHwYgqzFGfk7ci0L/e6iZluHXyf/9fU4Ys8glpu/hriQfbGxR 13dzgyBImLggANmElRMjHQ4FHpqVLQfnhoU01Rcd+eUr7SfrpYjEe4uh0i39Mm X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32790 Cc: Eli Zaretskii , 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> In the manual, before >> >> -- User Option: switch-to-buffer-obey-display-actions >> >> I would add something like "Normally, the behavior of >> 'switch-to-buffer' cannot be customized. The following option allows >> to do that." > > The text before describes the option `switch-to-buffer-preserve-window-point'. Right. But it's exactly the introductory remark of that option By default, `switch-to-buffer' tries to preserve `window-point'. This behavior can be tuned using the following option. that should not extend over to 'switch-to-buffer-obey-display-actions' IMO. Maybe something like "Normally, the behavior of 'switch-to-buffer' cannot be customized via display actions. The following option allows to do that." But it's not very important. martin From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 25 21:04:46 2018 Received: (at 32790) by debbugs.gnu.org; 26 Dec 2018 02:04:46 +0000 Received: from localhost ([127.0.0.1]:36527 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gbyYw-0002DM-I4 for submit@debbugs.gnu.org; Tue, 25 Dec 2018 21:04:46 -0500 Received: from mail-wr1-f53.google.com ([209.85.221.53]:37455) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gbyYu-0002D6-HW for 32790@debbugs.gnu.org; Tue, 25 Dec 2018 21:04:44 -0500 Received: by mail-wr1-f53.google.com with SMTP id s12so14578970wrt.4 for <32790@debbugs.gnu.org>; Tue, 25 Dec 2018 18:04:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=mUr/GTRVyT1VCS7ipclUaTZlIl70WzQewXHBfc0z/30=; b=hQDGJOcdY78SFkadV7qkoR1TvsjkuSxygA4RXtIUAv+Ahua1AIrdryKOxir3ptBapG VlYyA7RKUSIz4IpDfWfEC06komNR1vkpIpZz/LY4iYefAYHSKR3cNWLyCNdHkL5PtsS+ uZVmx0bZPFfCOmQ2RjNY4xPEReA69C6pe4nCkwT+I+pe1ISIF6cAWsu3RQ2C+j0x+Aun gjRWjWQcDRdO5TjHUmvKGvw4Mz3TfvU7xo8IsOgebcqqVOH8zS2PrgPcZ7RraryVVB15 96M38BY9J27X1rZbiPUAU0E/u15ap1KhFlXCarFQSWYVMydBFtoK+XsrdYU2tiBmNG4W tNQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=mUr/GTRVyT1VCS7ipclUaTZlIl70WzQewXHBfc0z/30=; b=Q5ZaCHttMZlwgBIHvxoeZcZd3qWeVljLtKr6+AVt+Ydnhe1WcwG84m2FUJAfQxKLr3 aJ731W7547cpATJ3j38wR+0ZF5qMUAeooshmNdw4vyOMxCQiH3w1IFuTXxQybC566VnK DArghkutynh6vSaAwnxy6QHroD7bEms7fZeIUiOZ/L3gwG6lN97nZv4rLBEZkyhZcOQb 07Kd5C7K8taLAq3bp8votSobY+ZBabEszFhVDxBZuFNWFd5Ef5sdwwgAod+Ukhj+5uyZ Tb1slZbG17NiFNG3wnqPoksxmXxRh3ZmtDgbk4v5Wj6sqiFS1E2z813rQOtzCnzyqnTs 5TbA== X-Gm-Message-State: AJcUukeTL4oc97iw5XHW1PpvQInBiI9felEfqKWnayAjhPZRV3dpcFzk 3vVhr9VV7cQC7JWGFptyNOrbW+z+ X-Google-Smtp-Source: ALg8bN49acrJgm5qKcjvzRig29CXCtVxTnz2Nb43+7g25JZbQzEpDRRsxquzMahpTGR9hQU3KyArTw== X-Received: by 2002:a5d:65ce:: with SMTP id e14mr16142876wrw.150.1545789878695; Tue, 25 Dec 2018 18:04:38 -0800 (PST) Received: from [192.168.1.3] ([185.105.174.23]) by smtp.googlemail.com with ESMTPSA id l37sm48693966wre.69.2018.12.25.18.04.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Dec 2018 18:04:37 -0800 (PST) Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window To: Juri Linkov , martin rudalics References: <87efdnsp2k.fsf@mail.linkov.net> <87ftwrgwp2.fsf@mail.linkov.net> <5BD57A8D.8080408@gmx.at> <875zxmx95h.fsf@mail.linkov.net> <5BD70F14.8080509@gmx.at> <87lg6g750v.fsf@mail.linkov.net> <5BD81D97.2000000@gmx.at> <87bm7bru1c.fsf@mail.linkov.net> <5BD963C8.9090905@gmx.at> <87h8h195ki.fsf@mail.linkov.net> <5BDAC159.1060008@gmx.at> <87muqsh11q.fsf@mail.linkov.net> <5BDC0E81.1050806@gmx.at> <87tvkwh4bp.fsf@mail.linkov.net> <5BE00F12.5000703@gmx.at> <87d0rjuq8c.fsf@mail.linkov.net> <5BE15552.4040507@gmx.at> <87y3a5rgm2.fsf@mail.linkov.net> <5BE2AF28.2020505@gmx.at> <877ehowp0c.fsf@mail.linkov.net> <5BE3F967.8080809@gmx.at> <87lg63ntbz.fsf@mail.linkov.net> From: Dmitry Gutov Message-ID: Date: Wed, 26 Dec 2018 04:04:36 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:64.0) Gecko/20100101 Thunderbird/64.0 MIME-Version: 1.0 In-Reply-To: <87lg63ntbz.fsf@mail.linkov.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32790 Cc: 32790@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 08.11.2018 23:38, Juri Linkov wrote: >>> Shouldn't xref support a shorter and easier to type key sequence >>> ‘S-M- M-.’ with the following patch: >>> >>> diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el >>> index 6b1421a6f7..6aab174bcf 100644 >>> --- a/lisp/progmodes/xref.el >>> +++ b/lisp/progmodes/xref.el >>> @@ -425,7 +425,7 @@ xref--pop-to-location >>> (xref-location-marker (xref-item-location item)))) >>> (buf (marker-buffer marker))) >>> (cl-ecase action >>> - ((nil) (switch-to-buffer buf)) >>> + ((nil) (pop-to-buffer-same-window buf)) >>> (window (pop-to-buffer buf t)) >>> (frame (let ((pop-up-frames t)) (pop-to-buffer buf t)))) >>> (xref--goto-char marker)) >> >> I think so. In particular because 'xref--goto-char' does not cohabit >> well with 'switch-to-buffer-preserve-window-point' in the first place. >> Dmitry should consent, though. > > Dmitry, do you agree this is a change for the better? It shouldn't hurt (but apparently you went with a different direction anyway already). Sorry I never responded, but originally this bug had nothing to do with xref, and I tuned out months ago. If somebody knows how to set up Thunderbird to somehow extra notify when somebody Cc's you directly, please send me a direct email. From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 26 17:31:53 2019 Received: (at 32790-done) by debbugs.gnu.org; 26 Nov 2019 22:31:53 +0000 Received: from localhost ([127.0.0.1]:53127 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iZjNA-000782-Oa for submit@debbugs.gnu.org; Tue, 26 Nov 2019 17:31:53 -0500 Received: from anteater.elm.relay.mailchannels.net ([23.83.212.3]:63634) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iZjN8-00077t-I7 for 32790-done@debbugs.gnu.org; Tue, 26 Nov 2019 17:31:51 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id D10028C20F2 for <32790-done@debbugs.gnu.org>; Tue, 26 Nov 2019 22:31:48 +0000 (UTC) Received: from pdx1-sub0-mail-a7.g.dreamhost.com (100-96-89-221.trex.outbound.svc.cluster.local [100.96.89.221]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 6D6F58C087C for <32790-done@debbugs.gnu.org>; Tue, 26 Nov 2019 22:31:48 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a7.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.18.5); Tue, 26 Nov 2019 22:31:48 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Minister-Thread: 15d5fd84634f1bb6_1574807508564_502767641 X-MC-Loop-Signature: 1574807508563:3471207385 X-MC-Ingress-Time: 1574807508563 Received: from pdx1-sub0-mail-a7.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a7.g.dreamhost.com (Postfix) with ESMTP id D0548847BA for <32790-done@debbugs.gnu.org>; Tue, 26 Nov 2019 14:31:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=wkf6UMjRW5+l4UwLT0N5K+bQkRQ=; b= FbRQ9Ygc085eEwGgVQ3p4jbIvwot0Uh2GSENbqt2fNCFsqeA5HlQRL+Slj/QeOTE Fq50RX64wuYEGoQmsMK9qQOJKZF5J8OiD6bmHasM1Nm4N9yVsA2T622l0W9daFaK uHnKFhiN6FPjphWFdm8IaG7Bn5a6BI++0tFry9+PNR8= Received: from mail.jurta.org (m91-129-96-42.cust.tele2.ee [91.129.96.42]) (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-a7.g.dreamhost.com (Postfix) with ESMTPSA id BED4F847C1 for <32790-done@debbugs.gnu.org>; Tue, 26 Nov 2019 14:31:46 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a7 From: Juri Linkov To: 32790-done@debbugs.gnu.org Subject: Re: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Organization: LINKOV.NET References: <87efdnsp2k.fsf@mail.linkov.net> Date: Mon, 25 Nov 2019 01:19:28 +0200 In-Reply-To: <87efdnsp2k.fsf@mail.linkov.net> (Juri Linkov's message of "Fri, 21 Sep 2018 02:33:55 +0300") Message-ID: <87v9r8x3pb.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 32790-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) > This is not a regression, but nevertheless very annoying behavior. I'm closing this report since now it's possible to delete windows in the specified direction. From unknown Fri Aug 15 17:54:54 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 25 Dec 2019 12:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator