From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 26 20:05:30 2018 Received: (at submit) by debbugs.gnu.org; 27 Sep 2018 00:05:30 +0000 Received: from localhost ([127.0.0.1]:55785 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g5Jo9-0005pK-Ql for submit@debbugs.gnu.org; Wed, 26 Sep 2018 20:05:30 -0400 Received: from eggs.gnu.org ([208.118.235.92]:43446) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g5Jo8-0005p3-CE for submit@debbugs.gnu.org; Wed, 26 Sep 2018 20:05:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g5Jo2-0004ZY-K3 for submit@debbugs.gnu.org; Wed, 26 Sep 2018 20:05:23 -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 lists.gnu.org ([2001:4830:134:3::11]:53333) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g5Jo2-0004ZB-Gh for submit@debbugs.gnu.org; Wed, 26 Sep 2018 20:05:22 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52995) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g5Jnz-0006Vd-MF for bug-gnu-emacs@gnu.org; Wed, 26 Sep 2018 20:05:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g5Jny-0004Ta-Be for bug-gnu-emacs@gnu.org; Wed, 26 Sep 2018 20:05:19 -0400 Received: from pop.dreamhost.com ([64.90.62.162]:56380 helo=pdx1-sub0-mail-a31.g.dreamhost.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g5Jny-0004QW-2N for bug-gnu-emacs@gnu.org; Wed, 26 Sep 2018 20:05:18 -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 4C2F57F97A for ; Wed, 26 Sep 2018 17:05:13 -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=Dzqs9IqceHxzKUz5PqelFZpHrGE=; b=icC5/P5aRaf827Ry0 MncCb+R2h+MtDF8W5kkPa5FsADIkzyXRn8mbxzchvLdsN23HhKtA/Gn+1FkUqP07 sbYUGZWW7MCi+3edTe2JuKK+tX4HmIkhdxErgfEa0kX5ZOkrhAmCLO5bkdW0ffmy rXQQYFKRCxgy6imAgghVgk2TcM= 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 350B57F96E for ; Wed, 26 Sep 2018 17:05:11 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a31 X-DH-BACKEND: pdx1-sub0-mail-a31 From: Juri Linkov To: bug-gnu-emacs@gnu.org Subject: 27.0.50; window-swap-states doesn't swap window prev/next-buffers Organization: LINKOV.NET Date: Thu, 27 Sep 2018 02:39:35 +0300 Message-ID: <875zyrrhk8.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 (------) For a long time I've been using my own implementation that swaps window states: (defun rotate-window-buffers (&optional n) "Exchange buffers in all windows N times. With positive N, it uses the window order of `window-list'. With negative N, does this in the reverse order." (interactive "p") (let* ((ws (window-list)) (ls (mapcar (lambda (w) (list (window-buffer w) (window-point w) (window-next-buffers w) (window-prev-buffers w))) ws)) (n (mod (or n 1) (length ws)))) (dolist (w (append (last ws n) (butlast ws n))) (let ((l (pop ls))) (set-window-buffer w (nth 0 l)) (set-window-point w (nth 1 l)) (set-window-next-buffers w (nth 2 l)) (set-window-prev-buffers w (nth 3 l)))))) Now I wanted to throw it away and to use window-swap-states from Emacs core that should do the same. But after trying I see that window-swap-states breaks the order of window buffers for 'C-x ' (previous-buffer) and 'C-x ' (next-buffer) because it doesn't swap window-prev-buffers and window-next-buffers. Shouldn't window-swap-states also swap prev/next buffers? From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 27 14:45:32 2018 Received: (at 32850) by debbugs.gnu.org; 27 Sep 2018 18:45:32 +0000 Received: from localhost ([127.0.0.1]:56906 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g5bI4-0008Rq-Fb for submit@debbugs.gnu.org; Thu, 27 Sep 2018 14:45:32 -0400 Received: from mout.gmx.net ([212.227.15.15]:37377) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g5bI3-0008Re-48 for 32850@debbugs.gnu.org; Thu, 27 Sep 2018 14:45:31 -0400 Received: from [192.168.1.100] ([46.125.249.105]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Lz3rc-1fjn7q2Ulc-0149qg; Thu, 27 Sep 2018 20:45:22 +0200 Received: from [192.168.1.100] ([46.125.249.105]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Lz3rc-1fjn7q2Ulc-0149qg; Thu, 27 Sep 2018 20:45:22 +0200 Message-ID: <5BAD2538.1060609@gmx.at> Date: Thu, 27 Sep 2018 20:45:12 +0200 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov , 32850@debbugs.gnu.org Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers References: <875zyrrhk8.fsf@mail.linkov.net> In-Reply-To: <875zyrrhk8.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:aypsiUZmG2ueqF/pJFgzRTSV5P5VpiVATHtJMCRWDYX2myEHxpt FklWj5GC4EzpwMdTjf8qXuYklovzC6So3IMWAbFPrb6KbSZZZteCR4DgqrLazQd9EKbyphf lyAzZoDzJDrFFms0NRUxmbddVywTmppehDfyWhM0X0VmvzzqsQRvAEBlu6NK5w7xDOygRWm 7CdUW0jQPFtdZkposBwhw== X-UI-Out-Filterresults: notjunk:1;V01:K0:CElvjUnWk0g=:/KSi4xGzN5CPsYxLe2Ucjo XWUm7K0HJNOVLzqXNNwaQ9Lj+fNyKwsnnWZIYifKAaHSr+w3pVPufRQlW4SStSp/JLz2X6vtc jQmUub9HnLTtA8S/mxnSoGNi9V9qXnrYwGuRrr3iDd2nAf2qcUX4BugqkN5rvFxWPaQbdxhNe BC21V9PwkgygkAdOM4bBSCbSTHRNR9nT/kdNQl+f1hZaEY+4qfY/MD8Q08Zr8zmm7FzxgfNDm Jjy9AQfcZ1r1vl2jcMiJfAQWz45fNcbAzOy31vBY0MYbUhB6v803WcqUAixs0QCvxof2oUwhX MHXxstGyONhoh5YVxk9ZJ5sE/6jZMF/2SwX9nXWnevDatVG23NzQ6UsVp3kI1lH0yIZk81yIm meqAmx3b3t61A5csDDqb00JNySNozGuNQyZ4Hi1hTDa521cqvICP1CMu0JsLwG1eKhHTLXRVj xDlIwW6PcDCt6wCUOzGSuXaruIbHSDbGLsnuRLeDKk5MCnQdBSRD+Bfnytkm3DnxQPjGBYupU zIelkjbWexf/UcawM2HfvRMMpqYaFFZV87dUAkqtroZpRGxOqkoQHb9OVhRZA0omqGUUW4aZV YFr6PV6eg59uDg0Sto8xPXh9tGKoAGYpKnLR+7PjySf/IeShjXVRKEACflOiIz6XXtrySg65u V16b/pk23ku5V7QuAhNMV3B5u/R6xJZztOi5Ohx3zqgxNiq3/EROL3icREiXwImpGCts0KfQy PtbEmcRMl5tKZOFb6zmw/eEM9Eu4Acp4yJ5sA2dYxZao4YhxhBabv42aEic3cvqdPR2OK2fxo PTI3VO5WAj2MXpigvSEH0/tfn8FchPSi398yX2ASzDNX4r8zsw= X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32850 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 that window-swap-states breaks the order of window buffers > for 'C-x ' (previous-buffer) and 'C-x ' (next-buffer) > because it doesn't swap window-prev-buffers and window-next-buffers. > > Shouldn't window-swap-states also swap prev/next buffers? So you want to change the course of history. Could you provide some rationale for such a change? martin From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 27 19:12:05 2018 Received: (at 32850) by debbugs.gnu.org; 27 Sep 2018 23:12:05 +0000 Received: from localhost ([127.0.0.1]:57061 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g5fS1-0006Wn-Ae for submit@debbugs.gnu.org; Thu, 27 Sep 2018 19:12:05 -0400 Received: from pop.dreamhost.com ([64.90.62.162]:38424 helo=pdx1-sub0-mail-a9.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g5fS0-0006We-1W for 32850@debbugs.gnu.org; Thu, 27 Sep 2018 19:12:04 -0400 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 7F46480B75; Thu, 27 Sep 2018 16:12: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=oe8iouSdgBJwAQ4+b3Z7kLQwovc=; b= wjVcY8iC+EVr3q36FPmMWzA5nWPbuCvxnUWh51P5AG+9Z3myTBadeR7k5nXTEd4B pkDD6Zc3yIaeK438Rh371Oc4xE2lVnJ20dCEeM/u7s3k0NJeOcqVDAdpyxQeIAcE FFHh+adPC/oFQI4hbiUt2YUelqiPo29+5Qq1ZTAOS58= Received: from localhost.linkov.net (m91-129-107-184.cust.tele2.ee [91.129.107.184]) (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 87E8B7E426; Thu, 27 Sep 2018 16:12:01 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a9 X-DH-BACKEND: pdx1-sub0-mail-a9 From: Juri Linkov To: martin rudalics Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers Organization: LINKOV.NET References: <875zyrrhk8.fsf@mail.linkov.net> <5BAD2538.1060609@gmx.at> Date: Fri, 28 Sep 2018 01:52:15 +0300 In-Reply-To: <5BAD2538.1060609@gmx.at> (martin rudalics's message of "Thu, 27 Sep 2018 20:45:12 +0200") Message-ID: <871s9e1syw.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: 32850 Cc: 32850@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 that window-swap-states breaks the order of window buffers >> for 'C-x ' (previous-buffer) and 'C-x ' (next-buffer) >> because it doesn't swap window-prev-buffers and window-next-buffers. >> >> Shouldn't window-swap-states also swap prev/next buffers? > > So you want to change the course of history. Could you provide some > rationale for such a change? Actually not to change the course of history, but keep it together with its window, or rather an imaginary window - when using window-swap-states, it looks like windows are swapped: since window's buffer is moved to a new location, the feeling is that the whole window is moved to a new place, because what defines a window is its state more than a location on the screen, so to not break the history of buffers in the window, prev/next buffers should be swapped as well, to keep the chain of buffers: prev-buffers - current buffer - next-buffer, so 'C-x ' (previous-buffer) and 'C-x ' (next-buffer) will navigate in the preserved history in the same order it navigated in the old window location. From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 30 04:00:48 2018 Received: (at 32850) by debbugs.gnu.org; 30 Sep 2018 08:00:48 +0000 Received: from localhost ([127.0.0.1]:59399 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g6Wem-0000zZ-1B for submit@debbugs.gnu.org; Sun, 30 Sep 2018 04:00:48 -0400 Received: from mout.gmx.net ([212.227.15.18]:51363) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g6Wek-0000zL-0X for 32850@debbugs.gnu.org; Sun, 30 Sep 2018 04:00:46 -0400 Received: from [192.168.1.101] ([213.162.73.174]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MXI5V-1gCQU706cf-00WDcP; Sun, 30 Sep 2018 10:00:38 +0200 Received: from [192.168.1.101] ([213.162.73.174]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MXI5V-1gCQU706cf-00WDcP; Sun, 30 Sep 2018 10:00:38 +0200 Message-ID: <5BB082A6.6040709@gmx.at> Date: Sun, 30 Sep 2018 10:00:38 +0200 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers References: <875zyrrhk8.fsf@mail.linkov.net> <5BAD2538.1060609@gmx.at> <871s9e1syw.fsf@mail.linkov.net> In-Reply-To: <871s9e1syw.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:2zu8B6a1fNvoLMvjkzyEBvoB49XS/PzeMCKfWz2IWHhazQxjkTf 6zFqed91G5JaD+WOml9ufNzB6vJF5VuRKq3gQV3wXIv3EOhsM6oZmOvaigElDJQHxZ8MdjY cT/MK4RAcDFnZidus1Qn4YiP6U+lmVksfuZlMSQuo3k8KGvRlJM2WHtGUkEhf5TSW1AlXBu XuTmYc+dq27OA1MLeSYgA== X-UI-Out-Filterresults: notjunk:1;V01:K0:jofSvdt66k4=:gnky/ZVOW1MSu8JQrD1Lat EhB2W/HI0t8byVy8xmF33ZScL53brQZk1TkO6SplZ3HpLYg+rpEzvQdoqNb4HfHMh6ZpFVqTi Un453vrhB6GkUek207Vph3edELle/RQSSdBPLVVZGDtpaqnvpbLwK+0iZRrU+KoY0fphP6/W5 /NJ1fx6C2L8y0YFMNv6TOjKvJqxSrIc/uaOWkHioG9bBIoxZqBiM1DypdO1G088UpeE+i0+9c Q/Jxd215PTyIXalxJU9hbys7KDBc6xA48yxUSAxsdUFJoOo/KT5q+jjEOe4gOwtjFR3UiMtCm x9pxk+rVplyFRxNyPrbXnGWMHytvwTQYo4Mi+IXkZY7zyM9Y6ftsslJd+O2h0bWQUlbnCF/yX 35LDJD9YtIHz2Fyn2yG0rbnE38ZZOi95lnv3c9hC2fyk4ivMV5lVAuu1tYt8A26MANnfJoZMQ QDXhU4cqKBPlfcxl3y/aNQBdkIHGiHuGbecFTJKfc5DRlLhQP3O0I87IJNbIe1W8W0bhtjjD0 P/0d84O1pE1YKCIhQOGl17X/EX9WldJrjh4/N9uoSdjO6RtYs1K7m8xZx9ow4WqNitwk+T1JD FruNAWfop57E96ST7CwdZQj+uEMgPeOlNrh1gqJ5D+KT9kRykxMhfOgnY9so/g1EVqDeRwm5q DhstkNKivL2kvA1I4r2bQVCVaEfytxUXFHIO+BnFDaaan89gvWjGnEM1uTiimU/bAlejNkA+M sMKeZC9ElU1hRRpdmyxkXnvNZwzsjBE67j5r2tNVcNUa6G/8mADzv5CJz44cak/5PsO9ORrxG pGL3WT5HBnw4Z09ICfujwGX93F1jqc+4DJRDvrYxTwSBTGDotE= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32850 Cc: 32850@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 not to change the course of history, but keep it together with > its window, or rather an imaginary window - when using window-swap-states, > it looks like windows are swapped: since window's buffer is moved > to a new location, the feeling is that the whole window is moved to > a new place, because what defines a window is its state more than > a location on the screen, so to not break the history of buffers > in the window, prev/next buffers should be swapped as well, to > keep the chain of buffers: prev-buffers - current buffer - next-buffer, > so 'C-x ' (previous-buffer) and 'C-x ' (next-buffer) > will navigate in the preserved history in the same order it navigated > in the old window location. Swapping the states of two windows does not swap their identities. That is, the windows themselves remain where they are, only their buffers change. If we changed their previous and next buffers, we would tell a lie. And we might introduce some slight inconsistency because the previous/next buffers of a window are no more elements of the 'buffer-list' of their respective frames when the windows are on different frames. I doubt that has any consequences, though ... So if you want this change, please provide an option say 'window-swap-states-swap-history' and, if that is non-nil, support the changes from your 'rotate-window-buffers'. Thanks, martin From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 30 16:04:39 2018 Received: (at 32850) by debbugs.gnu.org; 30 Sep 2018 20:04:39 +0000 Received: from localhost ([127.0.0.1]:60282 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g6hxH-00042Z-8X for submit@debbugs.gnu.org; Sun, 30 Sep 2018 16:04:39 -0400 Received: from pop.dreamhost.com ([64.90.62.162]:59734 helo=pdx1-sub0-mail-a9.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g6hxF-00042S-LD for 32850@debbugs.gnu.org; Sun, 30 Sep 2018 16:04:37 -0400 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 3E00980B4E; Sun, 30 Sep 2018 13:04:37 -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=BtzdjUSxJISgb+ayEwQx76xRQm4=; b= VMxuhDfdhVS+usZFtEPkQ4kvbpW53C7fCn+hctt1d+0+RiLDjjHwCUWMuY6Z+BiL LtrNEP66yu/G9siJtjJ3zgwNdeIYgYrRGrbE1I8eBHu344OuLHDcQ5jzhPvUEE3h vXaiTDWtsZFMgjmKijm0AMopWCR2D+gEZubJM1+lIDM= Received: from localhost.linkov.net (m91-129-107-184.cust.tele2.ee [91.129.107.184]) (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 E2FB37E426; Sun, 30 Sep 2018 13:04:35 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a9 X-DH-BACKEND: pdx1-sub0-mail-a9 From: Juri Linkov To: martin rudalics Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers Organization: LINKOV.NET References: <875zyrrhk8.fsf@mail.linkov.net> <5BAD2538.1060609@gmx.at> <871s9e1syw.fsf@mail.linkov.net> <5BB082A6.6040709@gmx.at> Date: Sun, 30 Sep 2018 23:00:52 +0300 In-Reply-To: <5BB082A6.6040709@gmx.at> (martin rudalics's message of "Sun, 30 Sep 2018 10:00:38 +0200") Message-ID: <87o9cepxfv.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: 32850 Cc: 32850@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 not to change the course of history, but keep it together with >> its window, or rather an imaginary window - when using window-swap-states, >> it looks like windows are swapped: since window's buffer is moved >> to a new location, the feeling is that the whole window is moved to >> a new place, because what defines a window is its state more than >> a location on the screen, so to not break the history of buffers >> in the window, prev/next buffers should be swapped as well, to >> keep the chain of buffers: prev-buffers - current buffer - next-buffer, >> so 'C-x ' (previous-buffer) and 'C-x ' (next-buffer) >> will navigate in the preserved history in the same order it navigated >> in the old window location. > > Swapping the states of two windows does not swap their identities. > That is, the windows themselves remain where they are, only their > buffers change. If we changed their previous and next buffers, we > would tell a lie. And we might introduce some slight inconsistency > because the previous/next buffers of a window are no more elements of > the 'buffer-list' of their respective frames when the windows are on > different frames. I doubt that has any consequences, though ... If a window buffer is part of the window state and not window identity, then prev/next-buffers should be swapped together with the window buffer as part of the window state, and not window identity. IOW, the window buffer is inseparable from the list of prev/next-buffers. For example, in such sequences of buffers: *info*<1> *info*<2> *info*<3> *info*<4> *info*<5> prev buffers current buffer next buffers and *grep*<1> *grep*<2> *grep*<3> *grep*<4> *grep*<5> prev buffers current buffer next buffers window-swap-states currently breaks the list of related buffers, e.g. after swapping only the window buffers, but not window prev/next-buffers: *info*<1> *info*<2> *grep*<3> *info*<4> *info*<5> prev buffers current buffer next buffers and *grep*<1> *grep*<2> *info*<3> *grep*<4> *grep*<5> prev buffers current buffer next buffers 'C-x ' and 'C-x ' become broken. > So if you want this change, please provide an option say > 'window-swap-states-swap-history' and, if that is non-nil, support the > changes from your 'rotate-window-buffers'. Forget 'rotate-window-buffers', it's a bad name and I want to throw it away. What I need is for Emacs to provide a consistent behavior by default. From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 01 04:35:54 2018 Received: (at 32850) by debbugs.gnu.org; 1 Oct 2018 08:35:54 +0000 Received: from localhost ([127.0.0.1]:60641 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g6tgI-0005ji-BQ for submit@debbugs.gnu.org; Mon, 01 Oct 2018 04:35:54 -0400 Received: from mout.gmx.net ([212.227.15.18]:59009) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g6tgG-0005jS-AI for 32850@debbugs.gnu.org; Mon, 01 Oct 2018 04:35:52 -0400 Received: from [192.168.1.101] ([46.125.250.27]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Lk8CY-1faJ0v1kWQ-00cAvr; Mon, 01 Oct 2018 10:35:43 +0200 Received: from [192.168.1.101] ([46.125.250.27]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Lk8CY-1faJ0v1kWQ-00cAvr; Mon, 01 Oct 2018 10:35:43 +0200 Message-ID: <5BB1DC5D.2070903@gmx.at> Date: Mon, 01 Oct 2018 10:35:41 +0200 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers References: <875zyrrhk8.fsf@mail.linkov.net> <5BAD2538.1060609@gmx.at> <871s9e1syw.fsf@mail.linkov.net> <5BB082A6.6040709@gmx.at> <87o9cepxfv.fsf@mail.linkov.net> In-Reply-To: <87o9cepxfv.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:5HhK2PTev8vA1BezKJTU1K8CYTbN75RFqq1DHG239ebJRiLy73J zmW/Tu6aD28BSA0hE+7GjBc0WHwQ/kq8Tl4YsLfKWbDmCIOO4fFGGIuKwtDu9l5HZbiR85Y r/yFJv2zRZxlEcwHiEgnxfmJZIHbReB7/mZXr2+ZyWpdkbgcSEl72wuw37K5zVdZm4cOQ7c 7aSkcuAGn72Nk16ZxpIPQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:s03C0gsorLk=:hDg5xytze39i8/bGrByQQe rpuWmeqgmPaC9FUNIicoBFdIktERrAzV3KO9QwFamEXR6Z+K+stFeGuMAJdGbyEAe7NtSaZqv a/cx9DL+h4o6hd07IZQqCYHWKw5XduuTI60Vtlk8xJT3cfSHY6ni80IgitigRWBhFBejbrjZt 1F4UHVzMfz+p74DMjTMbUpJtm3HbKrNSg4Tp2HV3e73h+En7QYkoEYU7pTk0EG0LSWndI9jYc DPIONyIcyUxCTL/w7CnCrhIqgNweWemSctb0Bh9RX2kjNjltw2IEynkisbHhOKplcLCkwIdwU QtRdUY68VAQ9/e75WoQzKPZBDGPUtVlBC/HmTuj2eoULsdwFK2jYp54k6m6vHe0kK+wKDQQxP yCfPFjC5CRJW20b5Grvhh6oxzKQaTlUcRMBfLAR0zSwgYXwA5jkg6ir0z/OKLUNVCkQpIM+VB KkJxl0brFHoa+1bECf6RCNG5rt0F/elby833HDWTfYDHO0c2ngJZ/oh7m4XktlzFEw5lUz3S9 BjJ4lKZ9NOIeogwMAJmzQ4DNOalRWD++iNLfKXKkvzBPaWvI1+DWy6ifjRixusWGplk3HsdCX I1PdwUNINz3UioMgaofWXIvshVbszNSxc7023FASie6Rswffeo9IzrDeJyZCt3hC63N5d4kEj iOMOuw1fO3CTPSLDTNX1hRjQ+UA3vTl7bTR32LHuAyBetlFymb3kwEh7bcj/mLxlrika/7ueE q2UCy9cT6FTq1eIVP6FKRhKXtDV/gAUMS9yWfskAMtusCkhtLXX31rNjTTj9FIA98yinenW/B IULNLLppjJZaSYskge/KmaHar6M/ZRh+RL8fQOcKq0O55R/9yI= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32850 Cc: 32850@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 example, in such sequences of buffers: > > *info*<1> *info*<2> *info*<3> *info*<4> *info*<5> > prev buffers current buffer next buffers > > and > > *grep*<1> *grep*<2> *grep*<3> *grep*<4> *grep*<5> > prev buffers current buffer next buffers > > window-swap-states currently breaks the list of related buffers, > e.g. after swapping only the window buffers, but not window > prev/next-buffers: > > *info*<1> *info*<2> *grep*<3> *info*<4> *info*<5> > prev buffers current buffer next buffers > > and > > *grep*<1> *grep*<2> *info*<3> *grep*<4> *grep*<5> > prev buffers current buffer next buffers This looks consistent to me. The respectively "current" buffers have been swapped and the previous and next buffers of each window remain the same. > 'C-x ' and 'C-x ' become broken. In which sense? > Forget 'rotate-window-buffers', it's a bad name and I want to throw it away. > What I need is for Emacs to provide a consistent behavior by default. So far I'm missing you. How would you define consistency in this context? martin From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 08 19:08:12 2018 Received: (at 32850) by debbugs.gnu.org; 8 Oct 2018 23:08:12 +0000 Received: from localhost ([127.0.0.1]:40911 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g9edH-00012U-2N for submit@debbugs.gnu.org; Mon, 08 Oct 2018 19:08:12 -0400 Received: from pop.dreamhost.com ([64.90.62.162]:59122 helo=pdx1-sub0-mail-a36.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g9edE-00012L-7n for 32850@debbugs.gnu.org; Mon, 08 Oct 2018 19:08:09 -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 8A30080365; Mon, 8 Oct 2018 16:08:07 -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=XS2XYQUbz+xkbi+005se5qXS+kM=; b= UACIuLhpfUFMQm6C9rSIgtXFx0T52LOJ0HvnkYxD6AhMEQmm9N4Mg34Sab4L6PFP jfhvoi8ouZZswjflVpgVkvr2WUmCLboHlYUDQjuy+fkHQZ+YNq8TLtJBh5rZanDC jt69wStIGcfcqAPbmbedoxdhCyPBxeeYiLSyQszYw3M= Received: from localhost.linkov.net (m91-129-107-184.cust.tele2.ee [91.129.107.184]) (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 937C48035F; Mon, 8 Oct 2018 16:08:04 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a36 From: Juri Linkov To: martin rudalics Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers Organization: LINKOV.NET References: <875zyrrhk8.fsf@mail.linkov.net> <5BAD2538.1060609@gmx.at> <871s9e1syw.fsf@mail.linkov.net> <5BB082A6.6040709@gmx.at> <87o9cepxfv.fsf@mail.linkov.net> <5BB1DC5D.2070903@gmx.at> Date: Tue, 09 Oct 2018 01:41:31 +0300 In-Reply-To: <5BB1DC5D.2070903@gmx.at> (martin rudalics's message of "Mon, 01 Oct 2018 10:35:41 +0200") Message-ID: <87ftxgqcx0.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: gggruggvucftvghtrhhoucdtuddrgedtkedrudefgddulecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddtjedrudekgeenucfrrghrrghmpehmohguvgepshhmthhppdhhvghloheplhhotggrlhhhohhsthdrlhhinhhkohhvrdhnvghtpdhinhgvthepledurdduvdelrddutdejrddukeegpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtoheprhhuuggrlhhitghssehgmhigrdgrthenucevlhhushhtvghrufhiiigvpedt X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32850 Cc: 32850@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 far I'm missing you. How would you define consistency in this > context? The root of the problem is not in window-swap-states, it's in window-state-get that it it relies upon. For a long time I have been using a package that keeps a list of window-configurations and switches between them in the same frame. But the problem is that we have no serialization for window-configurations, so no way to save in the desktop file and restore in another session. With the invention of window-state-get I tried to replace all calls of current-window-configuration with window-state-get (and set-window-configuration with window-state-put), and it worked perfectly (saved and restored serialized window-configurations in the desktop file), but still the problem that prevents its use is that it doesn't store prev/next-buffers that is a very important feature. From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 09 03:44:48 2018 Received: (at 32850) by debbugs.gnu.org; 9 Oct 2018 07:44:48 +0000 Received: from localhost ([127.0.0.1]:41139 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g9mhE-0000iG-1A for submit@debbugs.gnu.org; Tue, 09 Oct 2018 03:44:48 -0400 Received: from mout.gmx.net ([212.227.17.20]:46605) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g9mhC-0000i4-Sc for 32850@debbugs.gnu.org; Tue, 09 Oct 2018 03:44:47 -0400 Received: from [192.168.1.101] ([46.125.250.96]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LcmN9-1fRgQr3xSB-00k70n; Tue, 09 Oct 2018 09:44:39 +0200 Received: from [192.168.1.101] ([46.125.250.96]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LcmN9-1fRgQr3xSB-00k70n; Tue, 09 Oct 2018 09:44:39 +0200 Message-ID: <5BBC5C61.4090901@gmx.at> Date: Tue, 09 Oct 2018 09:44:33 +0200 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers References: <875zyrrhk8.fsf@mail.linkov.net> <5BAD2538.1060609@gmx.at> <871s9e1syw.fsf@mail.linkov.net> <5BB082A6.6040709@gmx.at> <87o9cepxfv.fsf@mail.linkov.net> <5BB1DC5D.2070903@gmx.at> <87ftxgqcx0.fsf@mail.linkov.net> In-Reply-To: <87ftxgqcx0.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:Ei7PD5l0fYOXRn8tYfu2KmDdqt7na8NJzNH+/+PSRU7udi6KuNM yZYhiWQaENUtQVG9pcHYx7I6baFg/fraxUB2SKU+bTVe+MHRpdzcMKSO8kORaj0cBJhj+l7 c99zc2o9MWLJSa7FdXRNKOoos0lTTvcA5UEQ/9efgoFeS8wJVIsD9g2Ch1aVbrzoFtfxtqp DYOqflbcDDCvq8zcqM6Uw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:Fu+wpK8Vrg0=:IYkmW6RSDaShyJgoQT9HxJ 9e4Yw292aPOAJm+sHUIYvVSLB0+YbbO3BA9zAeZ7Gha+EDLquNF9FA8YjJQRuQpghyNt5Azl7 rvHzv7eHsVOLzOEpvBed/OP8dxcvn/mryYdC90o0ZfpKU2/eH1cPJ9Y2Bv2LGqte2ooR1tQYl Zb6YVRHnL26uX395F+Cxw0bhbc4OFr8Ir8n4KgoDat352P972aRmS4ziDdd+HkshwxIaEDe3M gSkKR7MbBHO1GvG5ifs2vl1/fGKsvNGjIl9ZNngdxwWQXhSwdxKYxSpoPZQGj1P/wPf9YGys4 7JSPEmgKCvozaj8+6vFSPLNDUhyw/zqPnaH21aAtK1HPg3J3KnTUwQ/2LS2yOxa1hc9lDsi/1 RF7ke2UPxZgQfYFt+SY+aJ8UzG0Mz2FKgnenTaacf59VFzDn85LybYOdQxPT2LROp3In+CF/X tsIll/b/r/gi4J4DQkZHH7nvCoekAFnrB0uEpN1v6h0uaMbdqtiTuhOHDLFTBVuJUC60POmCG ilIXgHvPCILJfqHGvZ777Jgt/t+Xvrton8FctLD4JrdUx57Gd6uJ3XJ5C284zg+hBVzL51Bof 4HGqQSUKMDR87ahyEw9ILG0RBDa20B9t6NorjF5FfmJm2vBzJsM58FuneCWUmMkEHKdAhwRK6 DUwTJ3dPMuwl/i/o+xYmC1uv+LKMYbDh8zEoGvLoH4RVYhfPi/EjPg0mtTddvXNj5ufvwyW5/ lEkQFKOIUDq2f6UQtTZF1cxk0FizECxJucKakE3t1en0d9BxhU3JPfbo1xkqDdgAICxFovbbu PqkfjKI6LzcpGZWjt2ObP8jFy9yIeyAlY5BPhV6S3LrW3U7E5o= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32850 Cc: 32850@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 root of the problem is not in window-swap-states, it's in > window-state-get that it it relies upon. For a long time I have > been using a package that keeps a list of window-configurations > and switches between them in the same frame. But the problem > is that we have no serialization for window-configurations, so > no way to save in the desktop file and restore in another session. > > With the invention of window-state-get I tried to replace all calls > of current-window-configuration with window-state-get (and > set-window-configuration with window-state-put), and it worked > perfectly (saved and restored serialized window-configurations > in the desktop file), but still the problem that prevents its use > is that it doesn't store prev/next-buffers that is a very important > feature. Please provide a patch that makes the behavior you want optional. I could try to come up with a patch myself but since you already have coded such a thing why duplicate the efforts? IIUC we also have to decide whether and how to expand your code to desktop saving and how to handle buffers that got killed in between saving and restoring. Later we can decide whether to install it as default. Thanks, martin From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 15 17:30:51 2018 Received: (at 32850) by debbugs.gnu.org; 15 Oct 2018 21:30:51 +0000 Received: from localhost ([127.0.0.1]:51556 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gCARv-0005Dj-3E for submit@debbugs.gnu.org; Mon, 15 Oct 2018 17:30:51 -0400 Received: from pop.dreamhost.com ([64.90.62.162]:41298 helo=pdx1-sub0-mail-a75.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gCARt-0005Dc-7z for 32850@debbugs.gnu.org; Mon, 15 Oct 2018 17:30:49 -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 BE313805B6; Mon, 15 Oct 2018 14:30:48 -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=Xy5d80PO/HWqbI5+G4dttCcjLVw=; b= KLUh3SSn6X2EeiaY0ZMbMfyhVKymEPKsP80wm0VP8SR6AM5s/hQ21PwJpb6Jp5wf yERtVh1RW0QX3bEhRpXvg1Olb/nFgiV/5KUDbsQQ/o1JLf0epsDnk7xwF8Y00Dib Giok75KYXYcIgxPtvtJmpffTdAzF2C999Pz5VVzzrl4= 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 55ADE805BB; Mon, 15 Oct 2018 14:30:46 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a75 From: Juri Linkov To: martin rudalics Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers Organization: LINKOV.NET References: <875zyrrhk8.fsf@mail.linkov.net> <5BAD2538.1060609@gmx.at> <871s9e1syw.fsf@mail.linkov.net> <5BB082A6.6040709@gmx.at> <87o9cepxfv.fsf@mail.linkov.net> <5BB1DC5D.2070903@gmx.at> <87ftxgqcx0.fsf@mail.linkov.net> <5BBC5C61.4090901@gmx.at> Date: Mon, 15 Oct 2018 23:48:36 +0300 In-Reply-To: <5BBC5C61.4090901@gmx.at> (martin rudalics's message of "Tue, 09 Oct 2018 09:44:33 +0200") Message-ID: <87ftx79brv.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: gggruggvucftvghtrhhoucdtuddrgedtkedrvdelgdduvdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehmtderredtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddtgedrvddutdenucfrrghrrghmpehmohguvgepshhmthhppdhhvghloheplhhotggrlhhhohhsthdrlhhinhhkohhvrdhnvghtpdhinhgvthepledurdduvdelrddutdegrddvuddtpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtoheprhhuuggrlhhitghssehgmhigrdgrthenucevlhhushhtvghrufhiiigvpedt X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32850 Cc: 32850@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 >> The root of the problem is not in window-swap-states, it's in >> window-state-get that it it relies upon. For a long time I have >> been using a package that keeps a list of window-configurations >> and switches between them in the same frame. But the problem >> is that we have no serialization for window-configurations, so >> no way to save in the desktop file and restore in another session. >> >> With the invention of window-state-get I tried to replace all calls >> of current-window-configuration with window-state-get (and >> set-window-configuration with window-state-put), and it worked >> perfectly (saved and restored serialized window-configurations >> in the desktop file), but still the problem that prevents its use >> is that it doesn't store prev/next-buffers that is a very important >> feature. > > Please provide a patch that makes the behavior you want optional. Are there cases where this behavior is undesirable? > I could try to come up with a patch myself but since you already have > coded such a thing why duplicate the efforts? IIUC we also have to > decide whether and how to expand your code to desktop saving and how > to handle buffers that got killed in between saving and restoring. This patch handles killed buffers, so it works for desktop saving as well (because the desktop restores the frameset only after it reads all buffers): --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=window-state-prev-next-buffers.1.patch diff --git a/lisp/window.el b/lisp/window.el index 0a42dae6ca..a41d7a6f3c 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -5541,6 +5541,10 @@ window--state-get-1 (t 'leaf))) (buffer (window-buffer window)) (selected (eq window (selected-window))) + (next-buffers (when (window-live-p window) + (window-next-buffers window))) + (prev-buffers (when (window-live-p window) + (window-prev-buffers window))) (head `(,type ,@(unless (window-next-sibling window) `((last . t))) @@ -5593,7 +5597,22 @@ window--state-get-1 (start . ,(if writable start (with-current-buffer buffer - (copy-marker start)))))))))) + (copy-marker start)))))))) + ,@(when next-buffers + `((next-buffers . ,(mapcar (lambda (buffer) + (buffer-name buffer)) + next-buffers)))) + ,@(when prev-buffers + `((prev-buffers . + ,(mapcar (lambda (entry) + (list (buffer-name (nth 0 entry)) + (if writable + (marker-position (nth 1 entry)) + (nth 1 entry)) + (if writable + (marker-position (nth 2 entry)) + (nth 2 entry)))) + prev-buffers)))))) (tail (when (memq type '(vc hc)) (let (list) @@ -5736,7 +5755,9 @@ window--state-put-2 (let ((window (car item)) (combination-limit (cdr (assq 'combination-limit item))) (parameters (cdr (assq 'parameters item))) - (state (cdr (assq 'buffer item)))) + (state (cdr (assq 'buffer item))) + (next-buffers (cdr (assq 'next-buffers item))) + (prev-buffers (cdr (assq 'prev-buffers item)))) (when combination-limit (set-window-combination-limit window combination-limit)) ;; Reset window's parameters and assign saved ones (we might want @@ -5748,7 +5769,8 @@ window--state-put-2 (set-window-parameter window (car parameter) (cdr parameter)))) ;; Process buffer related state. (when state - (let ((buffer (get-buffer (car state)))) + (let ((buffer (get-buffer (car state))) + (state (cdr state))) (if buffer (with-current-buffer buffer (set-window-buffer window buffer) @@ -5817,7 +5839,26 @@ window--state-put-2 (set-window-point window (cdr (assq 'point state)))) ;; Select window if it's the selected one. (when (cdr (assq 'selected state)) - (select-window window))) + (select-window window)) + (when next-buffers + (set-window-next-buffers + window + (delq nil (mapcar (lambda (buffer) + (setq buffer (get-buffer buffer)) + (when (buffer-live-p buffer) buffer)) + next-buffers)))) + (when prev-buffers + (set-window-prev-buffers + window + (delq nil (mapcar (lambda (entry) + (let ((buffer (get-buffer (nth 0 entry)))) + (when (buffer-live-p buffer) + (list buffer + (set-marker (make-marker) + (nth 1 entry) buffer) + (set-marker (make-marker) + (nth 2 entry) buffer))))) + prev-buffers))))) ;; We don't want to raise an error in case the buffer does ;; not exist anymore, so we switch to a previous one and ;; save the window with the intention of deleting it later --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 16 04:46:00 2018 Received: (at 32850) by debbugs.gnu.org; 16 Oct 2018 08:46:00 +0000 Received: from localhost ([127.0.0.1]:51773 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gCKzI-0002A3-Hk for submit@debbugs.gnu.org; Tue, 16 Oct 2018 04:46:00 -0400 Received: from mout.gmx.net ([212.227.17.21]:33489) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gCKzG-00029p-V4 for 32850@debbugs.gnu.org; Tue, 16 Oct 2018 04:45:59 -0400 Received: from [192.168.1.101] ([212.95.5.116]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LbdiB-1foFhG1X0l-00lATT; Tue, 16 Oct 2018 10:45:49 +0200 Received: from [192.168.1.101] ([212.95.5.116]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LbdiB-1foFhG1X0l-00lATT; Tue, 16 Oct 2018 10:45:49 +0200 Message-ID: <5BC5A536.7020603@gmx.at> Date: Tue, 16 Oct 2018 10:45:42 +0200 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers References: <875zyrrhk8.fsf@mail.linkov.net> <5BAD2538.1060609@gmx.at> <871s9e1syw.fsf@mail.linkov.net> <5BB082A6.6040709@gmx.at> <87o9cepxfv.fsf@mail.linkov.net> <5BB1DC5D.2070903@gmx.at> <87ftxgqcx0.fsf@mail.linkov.net> <5BBC5C61.4090901@gmx.at> <87ftx79brv.fsf@mail.linkov.net> In-Reply-To: <87ftx79brv.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:7henrF4nbMQMKW+OpNK1tpY+zackMfhmTvznTLaowhHdI2cABQE FsMIX01NYW9cpVfl7JhK2KyMkbKzEUgNI8gR+XT5w5PI56uKm07pNurGblZlI/XpbAfEAko Z9pg4qjUPk+UvTnBD4Hih8b1Tchr2/I78B94ZzLJo5x5LXs13YDI0zAhZy8vGabeRA2DlQn 1ZkZy7YFfjLEGV7X8lyLw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:NJa+/oFFUUc=:vTpbZm5DfIhbu7kWxn7+eG 6COkeP3cqct4QdBJeOvPccCXoyFiebcaAr3yXr9uUtEXc/2Rug5TwUNeJkSEjnBpsw3lIHB69 E+nB+U49rhHeunbvk3P979wmExvnGmP+6WX1FYhCbuACQxk8fdneO5vJ4J/DP2Uw7w6PVSIOn UjyxINrDVf1cwA+4nVLuwH9kY1OddSEd+l1DGkHAltT4w2T6HY01eLVNwHlVy3W+EvNM1m6uL /IkRmh98xZzKrSEQOSRemHkjV2XOOdk2Ah0TN5lSv7ZPGj4EuU5QJ0vbxoorQItCLqw2o9Fyz rTrNDOxZTj8b8ZO2xPfEMxodJrU+/h6z5+oj502cJhKI8DDl8YKCYgf8DYuzfId/X2RIVL8d8 +NXjQfiz6vmvf6FJhydqnp+9hj2Qg74SIc8kVsbfH+xMpYrM8Qx3dv+Saxvnin7luwFIJ1asO 2Yf2RwpkXOeQytaNEW95D7wcq89VVqP+eHGZO2eDLDqxmTB4eKwfyj4kZ/xr0eAOmlmTnZFVO vgKUKmrjtVi3qiTO9kP9295AdH9RGnNUnlfIjbLaLyyRjdjqyGL+McuXjFwitz3RgLP/8M8rY msDihNOpVPWNn5tXH1oS/fb/6u/0kZlOOqrIdEn6gDbYVCbs0ct6q8d6xyd0NL9Q5DT43aHO2 TkB3JKG/rGKInYcNZuSNzixWa9vVQzHUGeMtCzbhIJpmN1y23PVR3AGIu9GIURtQWGSq3kxl3 QQOvMh7gn3EGhWQJB/vliNGOOsVMMaf7pBbW7+b5pi9I3IJXIvMapd7ymIuIfm7YR3uTG3wvl A+hA/GBP3jYMsh16bVTaDK3YaUw2s+H8vcSwgNxKX31ZpVk45U= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32850 Cc: 32850@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 provide a patch that makes the behavior you want optional. > > Are there cases where this behavior is undesirable? If in doubt make it customizable. With your bug reports I currently have the "return space to which window after deleting it", "which window to select after deleting the selected one", "which window 'display-buffer-pop-up-window' shall split" and "which window 'display-buffer-use-some-window' shall use" all as candidates for customization. Hence having 'window-swap-states-swap-buffer-lists' too would probably not bother anyone But if you are sure that it won't harm anyone to make it unconditional leave it well alone. We can always add a customization later if someone needs it. Personally, I don't care. > This patch handles killed buffers, so it works for desktop saving as well > (because the desktop restores the frameset only after it reads all buffers): Please install so we can see whether there are any problems (in particular with the desktop which I don't use). Thanks, martin From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 16 18:38:47 2018 Received: (at 32850-done) by debbugs.gnu.org; 16 Oct 2018 22:38:47 +0000 Received: from localhost ([127.0.0.1]:54084 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gCXzD-0006Iy-0j for submit@debbugs.gnu.org; Tue, 16 Oct 2018 18:38:47 -0400 Received: from pop.dreamhost.com ([64.90.62.162]:38694 helo=pdx1-sub0-mail-a7.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gCXzA-0006Io-Iu for 32850-done@debbugs.gnu.org; Tue, 16 Oct 2018 18:38:44 -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 14E567F687; Tue, 16 Oct 2018 15:38:44 -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=vBYnMc9xAbu7COHg6atC9fIHYsQ=; b= mrFhxyKxYTKVT3hJZggS/Xf1b8CFUsN0lF0ex5mh6ZwsHYWaBvVZFd9hQ2Z0obpO 3AbXeZvD6vbaAh6/33V3KQEu4HTzk8nRdrz2Ygs8U6/ITMKqmbg0cGEDn3bqe4YL 6nGKPxG+t8vJYNWOSsh8hqskkR1aRgXdhTlUHyNmfSs= 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 017177F688; Tue, 16 Oct 2018 15:38:42 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a7 From: Juri Linkov To: martin rudalics Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers Organization: LINKOV.NET References: <875zyrrhk8.fsf@mail.linkov.net> <5BAD2538.1060609@gmx.at> <871s9e1syw.fsf@mail.linkov.net> <5BB082A6.6040709@gmx.at> <87o9cepxfv.fsf@mail.linkov.net> <5BB1DC5D.2070903@gmx.at> <87ftxgqcx0.fsf@mail.linkov.net> <5BBC5C61.4090901@gmx.at> <87ftx79brv.fsf@mail.linkov.net> <5BC5A536.7020603@gmx.at> Date: Wed, 17 Oct 2018 01:37:03 +0300 In-Reply-To: <5BC5A536.7020603@gmx.at> (martin rudalics's message of "Tue, 16 Oct 2018 10:45:42 +0200") Message-ID: <8736t57jcs.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: 32850-done Cc: 32850-done@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 if you are sure that it won't harm anyone to make it unconditional > leave it well alone. We can always add a customization later if > someone needs it. Personally, I don't care. I'd like to make it customizable by using the existing customization in the arg WRITABLE of window-state-get and window-persistent-parameters, even though formally prev/next-buffers is not a window parameter (maybe it should be, I don't know). >> This patch handles killed buffers, so it works for desktop saving as well >> (because the desktop restores the frameset only after it reads all buffers): > > Please install so we can see whether there are any problems (in > particular with the desktop which I don't use). Done, with a small change: even though set-marker is idempotent in regard to its POSITION arg (i.e. if POSITION is a marker, it creates an identical marker), I added a check to not create a new one. OTOH, get-buffer is idempotent too, but it seems window-state-put never receives a structure with buffer objects, and I'm not sure why window-state-get should always use buffer-name regardless of the value WRITABLE, i.e. why should it return buffer names as strings instead of buffer objects even when WRITABLE is nil? From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 17 03:31:54 2018 Received: (at 32850-done) by debbugs.gnu.org; 17 Oct 2018 07:31:54 +0000 Received: from localhost ([127.0.0.1]:54332 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gCgJ7-0006Qf-Qk for submit@debbugs.gnu.org; Wed, 17 Oct 2018 03:31:54 -0400 Received: from mout.gmx.net ([212.227.17.22]:60761) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gCgJ6-0006QR-6s for 32850-done@debbugs.gnu.org; Wed, 17 Oct 2018 03:31:52 -0400 Received: from [192.168.1.101] ([212.95.5.87]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LzHZ7-1fZ8PB0ofx-014UMG; Wed, 17 Oct 2018 09:31:44 +0200 Received: from [192.168.1.101] ([212.95.5.87]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LzHZ7-1fZ8PB0ofx-014UMG; Wed, 17 Oct 2018 09:31:44 +0200 Message-ID: <5BC6E559.3090000@gmx.at> Date: Wed, 17 Oct 2018 09:31:37 +0200 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers References: <875zyrrhk8.fsf@mail.linkov.net> <5BAD2538.1060609@gmx.at> <871s9e1syw.fsf@mail.linkov.net> <5BB082A6.6040709@gmx.at> <87o9cepxfv.fsf@mail.linkov.net> <5BB1DC5D.2070903@gmx.at> <87ftxgqcx0.fsf@mail.linkov.net> <5BBC5C61.4090901@gmx.at> <87ftx79brv.fsf@mail.linkov.net> <5BC5A536.7020603@gmx.at> <8736t57jcs.fsf@mail.linkov.net> In-Reply-To: <8736t57jcs.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:Ye2G7DJe8OP69S3+w82H4Gq2zvEDONTw/wsWhEX49DTvAJDqNZU 0KAe/vx/T/Cw70l1JaB4s0QLyfYojrQiCFFkD34ADZU/YyxXAezEsyXI4AlbFCOg8mk+o0E w4tDHJh4e5u1rR94BFBR58qaL/xKprrF3wnsEUZLC/EACDwGUEnRD8KY34Xtnq0KSgxashf goxVqwqAJeQmCTaJJcKnw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:E4GtksW1Ljo=:9jDkXTuMD5Cvkk/mAuGimi gI94n6J9herA4BG0OI4mcYXw48H5xjMPQMl39oTqt7YKz+Sum/l8IeJAdUjThvCcAFYzhl8QZ yS2i7C64eX4L5mfnf52xiM14gR3wuM1GgQKzJSceKydQE2C8T6qXtX2zHXog5eBqpftqGK9bW ilZOO9gf+IKKPh4RQlLtnoYql6FLTft+y8+XFGc2HR72uCn65RcFpaGPXoImZKI+hgR7FkSZb 44q4bwii4XgGWmZ5yVll5wwjM4EDhH7IGphCibf037GqJV7pnq/rer721dc0RqPkRNCQmcdNE 2/NATduKPJ0alTweDk5KU1/rl5Vi5kUrjgDmibwzCB0UUP429dgSx4hrqco5gy/nC8Uz0kSWl 8G9WrJFulLF5JienI1MVQjCJPUQy0uKMe52QrHGAyMVuyzfgHB4uAnre+2vO1dfY2qt/rnIkf v9h5gKWADr+klBePevaZp9+RD8n4oHZjwOyG1TkoCSz4+XaRdlrycyXKqo5+iUsWs586K8wV4 A5qyqyjog3TZPJVWvrGBSziQ2SafJ5wc0EOAOjIsZrDo1Q2Y7nInDNo2lRBp1T7yJ5/QYBRrE dkZqiz6fhUCipN1pMZtzTXfd83kKO8PWumijb53qpj05JuSVrsr9p/ujSO2WOghCSbgxfsg2h 5i8iTGakCdLS+VHw+3KCILc3ZJMVZkRffWEDcAa+dHsCwalfCIS8IYiHQFcKe8DR9VBQGZFif WEGXNtlpntCIJ0O97ugwlM1mdoZGuAJcZBCfFEdJYjMsTazju4r/zGor26WD40viMEvVK6shL 9G2PvvoLU39PXJfBry6usIJ3oSwn29mAZe2IgwrVbgKCANmNTM= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32850-done Cc: 32850-done@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 like to make it customizable by using the existing customization in > the arg WRITABLE of window-state-get and window-persistent-parameters, > even though formally prev/next-buffers is not a window parameter (maybe > it should be, I don't know). Always keep in mind that prev_buffers and next_buffers need special treatment in mark_object to make sure that dead buffers from window configurations stored somewhere (for example in a register) get their entries deleted and can be eventually reclaimed. This is something I completely disregarded when writing the original code for navigating these buffer lists. Stefan then wrote the code to do that in mark_object. > Done, with a small change: even though set-marker is idempotent in regard > to its POSITION arg (i.e. if POSITION is a marker, it creates an identical > marker), I added a check to not create a new one. OTOH, get-buffer is > idempotent too, but it seems window-state-put never receives a structure > with buffer objects, and I'm not sure why window-state-get should always > use buffer-name regardless of the value WRITABLE, i.e. why should it return > buffer names as strings instead of buffer objects even when WRITABLE is nil? Maybe because I didn't care about non-writable states back then. But you're obviously right. Buffers can be renamed at will and in that case we might have a state with a non-existent buffer or even buffers with names switched and therefore invalid values of start or point. So yes: Please use a buffer object for non-writable states. martin From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 17 18:29:21 2018 Received: (at 32850) by debbugs.gnu.org; 17 Oct 2018 22:29:21 +0000 Received: from localhost ([127.0.0.1]:55929 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gCuJc-0003pV-Vv for submit@debbugs.gnu.org; Wed, 17 Oct 2018 18:29:21 -0400 Received: from pop.dreamhost.com ([64.90.62.162]:58060 helo=pdx1-sub0-mail-a75.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gCuJb-0003pM-Mb for 32850@debbugs.gnu.org; Wed, 17 Oct 2018 18:29:20 -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 36997807EE; Wed, 17 Oct 2018 15:29:19 -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=xJZzA4pjlc9bDWfdNQFX3NJAxAw=; b= xHpTYLnFoHHPHv/oYgJrP3KU2kVkkUUf1TmySIY/D7JWNO30PTTuuPTFsbtpm6Kn S9e6hXKMfltVcEQDjuJu+E9MkQMzIi/1VFHnUovlhXtMpV6igQ9adfKhRuFYUH9L Q37qQUNFKdcY/l4/B8ZEAp51OLgOBMDf5RjRwG7HaLQ= 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 41CFA807FE; Wed, 17 Oct 2018 15:29:16 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a75 From: Juri Linkov To: martin rudalics Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers Organization: LINKOV.NET References: <875zyrrhk8.fsf@mail.linkov.net> <5BAD2538.1060609@gmx.at> <871s9e1syw.fsf@mail.linkov.net> <5BB082A6.6040709@gmx.at> <87o9cepxfv.fsf@mail.linkov.net> <5BB1DC5D.2070903@gmx.at> <87ftxgqcx0.fsf@mail.linkov.net> <5BBC5C61.4090901@gmx.at> <87ftx79brv.fsf@mail.linkov.net> <5BC5A536.7020603@gmx.at> <8736t57jcs.fsf@mail.linkov.net> <5BC6E559.3090000@gmx.at> Date: Thu, 18 Oct 2018 00:58:29 +0300 In-Reply-To: <5BC6E559.3090000@gmx.at> (martin rudalics's message of "Wed, 17 Oct 2018 09:31:37 +0200") Message-ID: <87zhvcteuy.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: gggruggvucftvghtrhhoucdtuddrgedtkedrfeefgddtkecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehmtderredtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledrleeirddvgeelnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehlohgtrghlhhhoshhtrdhlihhnkhhovhdrnhgvthdpihhnvghtpeeluddruddvledrleeirddvgeelpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtoheprhhuuggrlhhitghssehgmhigrdgrthenucevlhhushhtvghrufhiiigvpedt X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32850 Cc: 32850@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 >> I'd like to make it customizable by using the existing customization in >> the arg WRITABLE of window-state-get and window-persistent-parameters, >> even though formally prev/next-buffers is not a window parameter (maybe >> it should be, I don't know). > > Always keep in mind that prev_buffers and next_buffers need special > treatment in mark_object to make sure that dead buffers from window > configurations stored somewhere (for example in a register) get their > entries deleted and can be eventually reclaimed. This is something I > completely disregarded when writing the original code for navigating > these buffer lists. Stefan then wrote the code to do that in > mark_object. When testing the previous patch, I noticed that killed buffers automatically disappear from prev/next-buffers lists, so there are no # remains. Is it handled by code in kill-buffer? >> Done, with a small change: even though set-marker is idempotent in regard >> to its POSITION arg (i.e. if POSITION is a marker, it creates an identical >> marker), I added a check to not create a new one. OTOH, get-buffer is >> idempotent too, but it seems window-state-put never receives a structure >> with buffer objects, and I'm not sure why window-state-get should always >> use buffer-name regardless of the value WRITABLE, i.e. why should it return >> buffer names as strings instead of buffer objects even when WRITABLE is nil? > > Maybe because I didn't care about non-writable states back then. But > you're obviously right. Buffers can be renamed at will and in that > case we might have a state with a non-existent buffer or even buffers > with names switched and therefore invalid values of start or point. What do you think about creating new functions to convert the existing states from non-writable to writable and back? Then in the same session it would be more optimal to use window states with buffer/mark objects, and states to save to the desktop could be serialized by such functions. > So yes: Please use a buffer object for non-writable states. Here is a new patch: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=window-state-prev-next-buffers.2.patch diff --git a/lisp/window.el b/lisp/window.el index a7318308ef..77b650fda9 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -5579,7 +5579,7 @@ window--state-get-1 (let ((point (window-point window)) (start (window-start window))) `((buffer - ,(buffer-name buffer) + ,(if writable (buffer-name buffer) buffer) (selected . ,selected) (hscroll . ,(window-hscroll window)) (fringes . ,(window-fringes window)) @@ -5599,20 +5599,20 @@ window--state-get-1 (with-current-buffer buffer (copy-marker start)))))))) ,@(when next-buffers - `((next-buffers . ,(mapcar (lambda (buffer) - (buffer-name buffer)) - next-buffers)))) + `((next-buffers + . ,(if writable + (mapcar (lambda (buffer) (buffer-name buffer)) + next-buffers) + next-buffers)))) ,@(when prev-buffers - `((prev-buffers . - ,(mapcar (lambda (entry) - (list (buffer-name (nth 0 entry)) - (if writable - (marker-position (nth 1 entry)) - (nth 1 entry)) - (if writable - (marker-position (nth 2 entry)) - (nth 2 entry)))) - prev-buffers)))))) + `((prev-buffers + . ,(if writable + (mapcar (lambda (entry) + (list (buffer-name (nth 0 entry)) + (marker-position (nth 1 entry)) + (marker-position (nth 2 entry)))) + prev-buffers) + prev-buffers)))))) (tail (when (memq type '(vc hc)) (let (list) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 18 04:06:15 2018 Received: (at 32850) by debbugs.gnu.org; 18 Oct 2018 08:06:15 +0000 Received: from localhost ([127.0.0.1]:56113 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gD3Jv-0008Kp-10 for submit@debbugs.gnu.org; Thu, 18 Oct 2018 04:06:15 -0400 Received: from mout.gmx.net ([212.227.17.21]:49351) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gD3Jt-0008Kc-Cm for 32850@debbugs.gnu.org; Thu, 18 Oct 2018 04:06:13 -0400 Received: from [192.168.1.101] ([213.162.73.189]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MfzEP-1g1HCL30MP-00NPMN; Thu, 18 Oct 2018 10:06:04 +0200 Received: from [192.168.1.101] ([213.162.73.189]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MfzEP-1g1HCL30MP-00NPMN; Thu, 18 Oct 2018 10:06:04 +0200 Message-ID: <5BC83EE4.8030607@gmx.at> Date: Thu, 18 Oct 2018 10:05:56 +0200 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers References: <875zyrrhk8.fsf@mail.linkov.net> <5BAD2538.1060609@gmx.at> <871s9e1syw.fsf@mail.linkov.net> <5BB082A6.6040709@gmx.at> <87o9cepxfv.fsf@mail.linkov.net> <5BB1DC5D.2070903@gmx.at> <87ftxgqcx0.fsf@mail.linkov.net> <5BBC5C61.4090901@gmx.at> <87ftx79brv.fsf@mail.linkov.net> <5BC5A536.7020603@gmx.at> <8736t57jcs.fsf@mail.linkov.net> <5BC6E559.3090000@gmx.at> <87zhvcteuy.fsf@mail.linkov.net> In-Reply-To: <87zhvcteuy.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:Gxwgn4uyFLjGlMgB2wYjSsw5bP0K6ln/wN7YZFFXLwgaDEbLt2u aSY3Yfg81eTrTAPNLW92/dIfHliWhIPTsNO5pay2FfFI2QdGyhJSyHhx1FubGU1HQJ4YF+B fqMGybLLZmuiA0a3vVlNhsuNr4PsySm1tC18DV7K9ziscqyYfIPizisvwUAo6a4znp6SNSB ghB6qxw5QhLize/0Q1F7A== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:cY43GJL+v8M=:Dwn9xI1vPME18S67jzJ/g+ jwTRCE+hsC+idOkwQBwxrqhWwFnfjxhg5pjRecDDaREeDdGEAppLCga2JNRm8Q2r123hJK0cI HUiWBw+ojsa6EPVbcet+v2HHJCNHI87lLzytMsXrRdg+3F7vpSj3mwBBwhF9pRSaCHWqsdCeE 6vCMJ3VUFP7NK0yz4W6bXtNA+A4dyc79LQ44glgU6AM8EWP97So4FX0zvW2CKZPltL3StZqtX GEE0z09zbmQwVcOc6sUqKIxN0NbWeTsenF1FyOb9IAbUe7qxMmKwFdAmRTwek6GRee8g+J3j9 3K7aN9wxFRc3bcQSVxQz8AxzoU70kv5XnPPB84MCrmK8CgrYTI10T8eO1eD5/yBhy8/IZnX5e R3RZQML6U5+xhzC8fIapIatdGzcpHkAo04ZskpjMLTTlPWbiMLyCDQm0f7o5Hsd8XbFzaPnLB kS/ukc0/8QuXEf5sT5Iu+4lmbkKEZlE3re8LJ/4HkE7+/pHuT7EDeGXgf2Xa36N/vQKWlcNIJ fcE6Om3YGW0z74bCNjAX7saCopo7YUFqji33RmGnhJbPc8Vosp2zIjw+wuqGoI/aq9JeptLlY yMnID1qQGRCJBZhWEidJau/XXNPLXBjI/zRxC1QL3Jmy9kDK7luISC9BKPoLtlnr41RuRknDc +vFAXJJg+kLNntkwnlE1fmtcGCfQtnHaypKuUy3tq72ZtVLOZe9SbbamiW0vGn2p/PlO7alt8 omS0mVeFf0MBuFGUTIGYMU/qhp/m4CG4Iy9QtD4OGCXQcd8dCj2t5mgrTK61V+8OLX3SVQ3m4 +IkIL9c5qmcVHuXP2XpRaorO9d93FfUeXbGmMot+R+flwbHm88= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32850 Cc: 32850@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 (-) > When testing the previous patch, I noticed that killed buffers automatically > disappear from prev/next-buffers lists, so there are no # remains. > Is it handled by code in kill-buffer? 'kill-buffer' calls 'replace-buffer-in-windows' which, if the window doesn't show the buffer, calls 'unrecord-window-buffer' which removes the buffer from the respective lists. But 'replace-buffer-in-windows' handles only live windows, it can't look into window configurations. > What do you think about creating new functions to convert the existing > states from non-writable to writable and back? Then in the same session > it would be more optimal to use window states with buffer/mark objects, > and states to save to the desktop could be serialized by such functions. It would be interesting to have such a thing. One could use it to handle conversion of non-writable objects to writable ones (I always wondered how desktop would handle non-writable values in say 'dedicated' or a window parameter) and back. But we don't yet have a sufficiently reliable mechanism for providing a serializable value for a number of our objects - in particular windows and frames. martin From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 18 18:41:02 2018 Received: (at 32850) by debbugs.gnu.org; 18 Oct 2018 22:41:02 +0000 Received: from localhost ([127.0.0.1]:57499 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gDGyU-00010k-GX for submit@debbugs.gnu.org; Thu, 18 Oct 2018 18:41:02 -0400 Received: from pop.dreamhost.com ([64.90.62.162]:50300 helo=pdx1-sub0-mail-a25.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gDGyQ-00010J-SU for 32850@debbugs.gnu.org; Thu, 18 Oct 2018 18:40:59 -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 562627FFE9; Thu, 18 Oct 2018 15:40:58 -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:content-transfer-encoding; s=linkov.net; bh=SERNoZ kXM5vIDVYiqNbiQ3zc8Dc=; b=XFoGDyDfjAE9dOTzBnZPf9PnfQhml+SRCSmYqU B+m2kmAEO9Iiktf1LRLy1mLB8jxvdEXYKoXVHlQC9hIsJXo37tssNG0hqQg3H3Yq Ab+ApzQRr1ei7o7g3xQYH5iSd/jP7HZmsGpJcKAm+4S3JgD+mXtTJCma+sLYE36j Uvv2c= 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 2197F7FFE7; Thu, 18 Oct 2018 15:40:54 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a25 From: Juri Linkov To: martin rudalics Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers Organization: LINKOV.NET References: <875zyrrhk8.fsf@mail.linkov.net> <5BAD2538.1060609@gmx.at> <871s9e1syw.fsf@mail.linkov.net> <5BB082A6.6040709@gmx.at> <87o9cepxfv.fsf@mail.linkov.net> <5BB1DC5D.2070903@gmx.at> <87ftxgqcx0.fsf@mail.linkov.net> <5BBC5C61.4090901@gmx.at> <87ftx79brv.fsf@mail.linkov.net> <5BC5A536.7020603@gmx.at> <8736t57jcs.fsf@mail.linkov.net> <5BC6E559.3090000@gmx.at> <87zhvcteuy.fsf@mail.linkov.net> <5BC83EE4.8030607@gmx.at> Date: Fri, 19 Oct 2018 01:37:11 +0300 In-Reply-To: <5BC83EE4.8030607@gmx.at> (martin rudalics's message of "Thu, 18 Oct 2018 10:05:56 +0200") Message-ID: <87h8hig9uw.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: gggruggvucftvghtrhhoucdtuddrgedtkedrfeehgdduhecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtgfesthekredttderjeenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrdeliedrvdegleenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrdeliedrvdegledprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgeptd Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32850 Cc: 32850@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 testing the previous patch, I noticed that killed buffers automat= ically >> disappear from prev/next-buffers lists, so there are no # remains. >> Is it handled by code in kill-buffer? > > 'kill-buffer' calls 'replace-buffer-in-windows' which, if the window > doesn't show the buffer, calls 'unrecord-window-buffer' which removes > the buffer from the respective lists. But 'replace-buffer-in-windows' > handles only live windows, it can't look into window configurations. If we had a function that can look into window states, then a user could put it on kill-buffer-hook to look into window states stored in user variables. It would be useful to have a function to check if a buffer exists in window state: often there is a need not to kill a buffer if it's stored in some window state variable (so restoring a saved window state will always show the same buffers as before). >> What do you think about creating new functions to convert the existing >> states from non-writable to writable and back? Then in the same sessi= on >> it would be more optimal to use window states with buffer/mark objects= , >> and states to save to the desktop could be serialized by such function= s. > > It would be interesting to have such a thing. One could use it to > handle conversion of non-writable objects to writable ones (I always > wondered how desktop would handle non-writable values in say > 'dedicated' or a window parameter) and back. But we don't yet have a > sufficiently reliable mechanism for providing a serializable value for > a number of our objects - in particular windows and frames. A serializable value of window objects are window states. By analogy wit= h the eq/equal dichotomy, window objects can be compared with =E2=80=98eq=E2= =80=99, and window states with =E2=80=98equal=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 18 19:20:01 2018 Received: (at 32850) by debbugs.gnu.org; 18 Oct 2018 23:20:01 +0000 Received: from localhost ([127.0.0.1]:57555 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gDHaC-0006Gs-Cb for submit@debbugs.gnu.org; Thu, 18 Oct 2018 19:20:01 -0400 Received: from pop.dreamhost.com ([64.90.62.162]:41292 helo=pdx1-sub0-mail-a25.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gDHaA-0006Gk-TH for 32850@debbugs.gnu.org; Thu, 18 Oct 2018 19:19:59 -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 1DAA97FFED; Thu, 18 Oct 2018 16:19:58 -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=xbwQNHIkS7v4hfhb1WdSaT1Kwp8=; b= oIv7MFgkzH4zGKf0RfsCPNWDSLnUaBwZbEQtKC+DnbrlrrO97/hDrkayJOUKgqae V+znjpZp8M/2iSz3kQ6wpp/K2Nmdw22pO91uGI4mOOrpJVquKSfXf32t9G10aULj bqeWUpGkS/c4ZyAqTKRV7NqiDFFmdgmgD6uQhaWNchM= 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 4E74C7FFE7; Thu, 18 Oct 2018 16:19:54 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a25 From: Juri Linkov To: martin rudalics Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers Organization: LINKOV.NET References: <875zyrrhk8.fsf@mail.linkov.net> <5BAD2538.1060609@gmx.at> <871s9e1syw.fsf@mail.linkov.net> <5BB082A6.6040709@gmx.at> <87o9cepxfv.fsf@mail.linkov.net> <5BB1DC5D.2070903@gmx.at> <87ftxgqcx0.fsf@mail.linkov.net> <5BBC5C61.4090901@gmx.at> <87ftx79brv.fsf@mail.linkov.net> <5BC5A536.7020603@gmx.at> Date: Fri, 19 Oct 2018 02:18:25 +0300 In-Reply-To: <5BC5A536.7020603@gmx.at> (martin rudalics's message of "Tue, 16 Oct 2018 10:45:42 +0200") Message-ID: <87o9bqlu7y.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: gggruggvucftvghtrhhoucdtuddrgedtkedrfeehgddvvdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledrleeirddvgeelnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledrleeirddvgeelpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtoheprhhuuggrlhhitghssehgmhigrdgrthenucevlhhushhtvghrufhiiigvpedt X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32850 Cc: 32850@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 patch handles killed buffers, so it works for desktop saving as well >> (because the desktop restores the frameset only after it reads all buffers): > > Please install so we can see whether there are any problems (in > particular with the desktop which I don't use). I found a problem, it occurs very rarely: Debugger entered--Lisp error: (wrong-type-argument stringp nil) get-buffer(nil) #f(compiled-function (entry) #)((nil nil nil)) mapcar(#f(compiled-function (entry) #) (("*Group*" 1 139) (nil nil nil) ("*sent reply to martin rudalics*" 1 1090))) window--state-put-2(safe 737) window-state-put(...) Do you have an idea how did (nil nil nil) find its way into the list of prev-buffers? (window-state-get was used with the non-nil WRITABLE arg) From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 19 03:40:38 2018 Received: (at 32850) by debbugs.gnu.org; 19 Oct 2018 07:40:38 +0000 Received: from localhost ([127.0.0.1]:58072 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gDPOf-0007VW-0T for submit@debbugs.gnu.org; Fri, 19 Oct 2018 03:40:38 -0400 Received: from mout.gmx.net ([212.227.15.19]:39029) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gDPOc-0007VH-R6 for 32850@debbugs.gnu.org; Fri, 19 Oct 2018 03:40:35 -0400 Received: from [192.168.1.101] ([212.95.5.57]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MKYsh-1gEmq50UMx-001zTx; Fri, 19 Oct 2018 09:40:26 +0200 Received: from [192.168.1.101] ([212.95.5.57]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MKYsh-1gEmq50UMx-001zTx; Fri, 19 Oct 2018 09:40:26 +0200 Message-ID: <5BC98A5F.5050807@gmx.at> Date: Fri, 19 Oct 2018 09:40:15 +0200 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers References: <875zyrrhk8.fsf@mail.linkov.net> <5BAD2538.1060609@gmx.at> <871s9e1syw.fsf@mail.linkov.net> <5BB082A6.6040709@gmx.at> <87o9cepxfv.fsf@mail.linkov.net> <5BB1DC5D.2070903@gmx.at> <87ftxgqcx0.fsf@mail.linkov.net> <5BBC5C61.4090901@gmx.at> <87ftx79brv.fsf@mail.linkov.net> <5BC5A536.7020603@gmx.at> <8736t57jcs.fsf@mail.linkov.net> <5BC6E559.3090000@gmx.at> <87zhvcteuy.fsf@mail.linkov.net> <5BC83EE4.8030607@gmx.at> <87h8hig9uw.fsf@mail.linkov.net> In-Reply-To: <87h8hig9uw.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:IxuJcnK7lYz8K+F0A4sFti5h7RBpBV27go/RGuek4ofq7cjsikx uGrazxGGzjq5ED/An17kYzx3ucqS9VDzVJjAuB13nMVq2cTI4ZuDJtF7yl/DMMWWkgR6ry9 7b9vL6J9F+jJQXrsX/pHlKiUEcAjLtIBqqxJJN9Xn5sbgXVwD6p/vIApwvSJoI70pqMIZGt rGSrcaiNoqjzhGBYz/Beg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:+Ypm34dkyUQ=:dHMrzreNhL3wO/2zLw3QUE ijLGyLNrgzrPxfmLWAM27RSatKKWn6FT1zpdjP7vyke7eThox95m+xFMszxoH2ehUMQumjlMp EvEI3YwjcvKGozwwEazDiKScF7zQjjcZP38VIY92YkhZ2pEbPVFdM7ySl0xbQOor7q4RRpTkf yXDRtUbu5w5InNUKkz8zn8C75Q1IxRSHTgT7CrOe8AjEZJUaK3ahJTUt135IbciTdULEX0RN4 zzH6E0cvgwSbiPCRFXe5yVDOxuLF9evX2qpjlDQJl5odyeXEzzXoP1IHfjaf61yEFfXlyxEEW qrAxRSTxihKyOK3YEO92VR5kB0YMNf14hKKOVsLNv7FFlGGcfbgXYDWY5wphm7TGhX5v7hbbF M69R6ODBe25LN41q4i5bQlel6hAQFNtJYBXsz/DtWdkiB7gUKBRVSc6sEsd60j7BgilDiEBtE txILfs7LbITReRvL6EU/5iyZxapwQheHWyM9nSSvm+qESZKLGl39xXAgt+AP1NfBWVUCdo3Sb a5YZGjFgJeEVJ8AMJGCIrfZv9wnvVgoLQzhH+wWjT6AQMfts/za0v1xUxOqefdUt4BVduKPQi G02Q/w1gIEj7san0Fqp5upZnc+IXiXzSSO4X9hxduE99TJarrg8OgsqN4DYBBbQy0qet+/hNa mDCB6pUodBQmVFOwFCvIe144kdAIfoHB1XJxaLQJhJknFiSgoOpqb0EES6K6CbpIOJeveVFvz hz2EwzUHdKerixVdur3vT7A/So3n82DtisUmAgQZdWWIdvXgBxupdWcXT8lyNSfssGHNcekXj ykVZCa2lThIXouzxo3PvBR2RHEWl+yUdQZX0t9TRXrjbgY5rdw= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32850 Cc: 32850@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 we had a function that can look into window states, then a user > could put it on kill-buffer-hook to look into window states stored > in user variables. It would be useful to have a function to check if > a buffer exists in window state: often there is a need not to kill > a buffer if it's stored in some window state variable (so restoring > a saved window state will always show the same buffers as before). The same argument would hold for window configurations. And looking into those is even more difficult. >> But we don't yet have a >> sufficiently reliable mechanism for providing a serializable value fo= r >> a number of our objects - in particular windows and frames. > > A serializable value of window objects are window states. By analogy = with > the eq/equal dichotomy, window objects can be compared with =E2=80=98e= q=E2=80=99, and > window states with =E2=80=98equal=E2=80=99. I meant that window objects cannot be reliably reconstructed from states. The more obvious reason is that a writable state can record a buffer only via its name and buffer names will be assigned in the way files shown by buffers are visited. Less obvious reasons are that the 'dedicated' value or the values of window parameters may be arbitrary, non-serializable Lisp objects you cannot reconstruct either. So we have no reliable bijective mappings from states to configurations and comparing two states for equality may produce arbitrary results. States are useful for reconstructing a configuration that existed earlier in some approximate way as to be used by desktop and friends. Nothing more. martin From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 19 03:40:57 2018 Received: (at 32850) by debbugs.gnu.org; 19 Oct 2018 07:40:57 +0000 Received: from localhost ([127.0.0.1]:58075 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gDPOz-0007W5-Js for submit@debbugs.gnu.org; Fri, 19 Oct 2018 03:40:57 -0400 Received: from mout.gmx.net ([212.227.15.15]:36071) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gDPOx-0007Vq-SI for 32850@debbugs.gnu.org; Fri, 19 Oct 2018 03:40:56 -0400 Received: from [192.168.1.101] ([212.95.5.57]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MXI5V-1g9xWc1zdN-00WFDY; Fri, 19 Oct 2018 09:40:47 +0200 Received: from [192.168.1.101] ([212.95.5.57]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MXI5V-1g9xWc1zdN-00WFDY; Fri, 19 Oct 2018 09:40:47 +0200 Message-ID: <5BC98A76.9070207@gmx.at> Date: Fri, 19 Oct 2018 09:40:38 +0200 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers References: <875zyrrhk8.fsf@mail.linkov.net> <5BAD2538.1060609@gmx.at> <871s9e1syw.fsf@mail.linkov.net> <5BB082A6.6040709@gmx.at> <87o9cepxfv.fsf@mail.linkov.net> <5BB1DC5D.2070903@gmx.at> <87ftxgqcx0.fsf@mail.linkov.net> <5BBC5C61.4090901@gmx.at> <87ftx79brv.fsf@mail.linkov.net> <5BC5A536.7020603@gmx.at> <87o9bqlu7y.fsf@mail.linkov.net> In-Reply-To: <87o9bqlu7y.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:zu6A48Ka9yn78R8tzbhEKOKJAWMivRgqqean9rHK9kbD5G8kuRe 65faGriBQJ4bg2K/lseuZ+biKEsJnTPxQ6mzm6RUwg+5v+LWPCDQ61vvAg2UpzMJYGbd8EZ bUheh7igActFYtv6NTMCf3sndbUejBayvblOVIueq8/MR3eCfSTFGLm4ZfbyCHvXj4910cv qptPw+k4BruFQ1QTG2nYQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:3NF4y8SPElc=:0/VqFIQzBQK9AX0DwHzyv1 11BWGMK1Ddoh6cQP92bIwzIm+d5ZNhy+fc+owqrO+l+0X/s+oGIB6nU1xfJKgZjAF941+lF0H HY0x25euYkVi4bs4yyvU5xmH4DSQ+HYoX+UMuOjtTZvMI8K2zsUBsLyLbj23jA0SYXLNHdWc5 1HqVTP7JRNkgAyxw5esss2EZeMf+LyeyD1bYxncQlaEDnTSqrfS61xpoeapf8LJSg5pByu22C oEU8S8AArcubiRQELRBlIGeyYBFJbzuqxBEj8OOFdnS3ffSlkOJdHfbpwU/lTIa3sq2NXzF3s duuavoR8gNGbJg/vlxoTU0hXL8FvzIOBqkO3hGbudkbm40O3Q73dJ25wSYnx2h6J9oNMCNTgM n7EfADIz0AlHMD8qleRX3WMZ4jytHKm+LvlWNQx6Yw4UdmwVdyJwPYv40VvdZNfOl+oK0ruV9 UN6rCZ/adiAm6cUMS6oS6w/Hrk0DPwZna9NfMIUQ1eQ8bkmCA+v0/UMTE6o8L86hoEA1QFgV2 aR8q/mp/p1xbCXugbwypbqhoMcCSeg9pmS22uXGyay/1yDK9DkgntrNYUOPoVN83faz8FfAsC gKfuw/Cxgu507dXPn1O50bNc6K2lB2G9XrjsHAT08VCdf6MbK36iSW3NgBLuEw31lTWqMknWX HO5dlZjGyooBN9x1MJ3fw6HhrCv0jotOy2/hAwGYsBek/qaT5av4/ulh51SOkweXEtxS3Wvj6 YSPLO9H6Q7+UGtyyaqD1ZdD6+gACu01esZrM5xSpnYVC7nLRt9bGWTJoWU9SjjGhALVbkQfnM 2UZSvqe9p1bk0+Wnh0w7eY5Bbf2E9YLH+Dpc4JCyeyLpRBBtdw= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32850 Cc: 32850@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 found a problem, it occurs very rarely: > > Debugger entered--Lisp error: (wrong-type-argument stringp nil) > get-buffer(nil) > #f(compiled-function (entry) #)((nil nil nil)) > mapcar(#f(compiled-function (entry) #) (("*Group*" 1 139) (nil nil nil) ("*sent reply to martin rudalics*" 1 1090))) > window--state-put-2(safe 737) > window-state-put(...) > > Do you have an idea how did (nil nil nil) find its way into the list of > prev-buffers? (window-state-get was used with the non-nil WRITABLE arg) The most simple way to find out is to define such a list in window.c and have 'set-window-prev-buffers' holler if the prev_buffers argument is equal to that list. martin From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 20 18:36:19 2018 Received: (at 32850) by debbugs.gnu.org; 20 Oct 2018 22:36:19 +0000 Received: from localhost ([127.0.0.1]:33581 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gDzqz-0001ln-Ss for submit@debbugs.gnu.org; Sat, 20 Oct 2018 18:36:18 -0400 Received: from pop.dreamhost.com ([64.90.62.162]:42372 helo=pdx1-sub0-mail-a10.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gDzqy-0001lg-Ha for 32850@debbugs.gnu.org; Sat, 20 Oct 2018 18:36:16 -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 12CAE8037C; Sat, 20 Oct 2018 15:36:16 -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=cKt9H4uLujfiA5LRBrkV1xsPfZk=; b= YF3KLpEuOthx7xOyHmARvexvuPGukBUuPM8acRCXPZ5gNM0xkO10oJzkDTRev1bq 9x3oEzLI2KHgQ4od2bR3K3qdtp5yfXVuxJcfD4hrjvTK7zhz8z5GSixEBDXuhPLP aO3XWckKfgC1yrl/FOM+FwzZS8Kx+H1+BsP1QMtHdMc= 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 CC51C80381; Sat, 20 Oct 2018 15:36:14 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a10 From: Juri Linkov To: martin rudalics Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers Organization: LINKOV.NET References: <875zyrrhk8.fsf@mail.linkov.net> <5BAD2538.1060609@gmx.at> <871s9e1syw.fsf@mail.linkov.net> <5BB082A6.6040709@gmx.at> <87o9cepxfv.fsf@mail.linkov.net> <5BB1DC5D.2070903@gmx.at> <87ftxgqcx0.fsf@mail.linkov.net> <5BBC5C61.4090901@gmx.at> <87ftx79brv.fsf@mail.linkov.net> <5BC5A536.7020603@gmx.at> <8736t57jcs.fsf@mail.linkov.net> <5BC6E559.3090000@gmx.at> <87zhvcteuy.fsf@mail.linkov.net> <5BC83EE4.8030607@gmx.at> <87h8hig9uw.fsf@mail.linkov.net> <5BC98A5F.5050807@gmx.at> Date: Sun, 21 Oct 2018 00:40:45 +0300 In-Reply-To: <5BC98A5F.5050807@gmx.at> (martin rudalics's message of "Fri, 19 Oct 2018 09:40:15 +0200") Message-ID: <87ftx0nvoi.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: gggruggvucftvghtrhhoucdtuddrgedtkedrfeekgddujeekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrdeliedrvdegleenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrdeliedrvdegledprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgeptd X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32850 Cc: 32850@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 (-) > States are useful for reconstructing a configuration that existed > earlier in some approximate way as to be used by desktop and friends. > Nothing more. This means that in the same session non-writable states should be used instead of window configurations. And for saving to the desktop file, non-writable window states should be converted to writable window states. From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 21 04:22:52 2018 Received: (at 32850) by debbugs.gnu.org; 21 Oct 2018 08:22:52 +0000 Received: from localhost ([127.0.0.1]:33750 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gE90e-0003FN-Ev for submit@debbugs.gnu.org; Sun, 21 Oct 2018 04:22:52 -0400 Received: from mout.gmx.net ([212.227.15.15]:37637) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gE90c-0003F9-Je for 32850@debbugs.gnu.org; Sun, 21 Oct 2018 04:22:51 -0400 Received: from [192.168.1.101] ([46.125.250.51]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0M54fe-1fPBmR2dos-00zC3Y; Sun, 21 Oct 2018 10:22:41 +0200 Received: from [192.168.1.101] ([46.125.250.51]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0M54fe-1fPBmR2dos-00zC3Y; Sun, 21 Oct 2018 10:22:41 +0200 Message-ID: <5BCC374E.603@gmx.at> Date: Sun, 21 Oct 2018 10:22:38 +0200 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers References: <875zyrrhk8.fsf@mail.linkov.net> <5BAD2538.1060609@gmx.at> <871s9e1syw.fsf@mail.linkov.net> <5BB082A6.6040709@gmx.at> <87o9cepxfv.fsf@mail.linkov.net> <5BB1DC5D.2070903@gmx.at> <87ftxgqcx0.fsf@mail.linkov.net> <5BBC5C61.4090901@gmx.at> <87ftx79brv.fsf@mail.linkov.net> <5BC5A536.7020603@gmx.at> <8736t57jcs.fsf@mail.linkov.net> <5BC6E559.3090000@gmx.at> <87zhvcteuy.fsf@mail.linkov.net> <5BC83EE4.8030607@gmx.at> <87h8hig9uw.fsf@mail.linkov.net> <5BC98A5F.5050807@gmx.at> <87ftx0nvoi.fsf@mail.linkov.net> In-Reply-To: <87ftx0nvoi.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:bVvXmXtjuA6RsFfOng7tWdMRhITZSidlRV5KnY3F/dMsByQiMq1 oDUuarVj9fI0F5BiCGVFHQ3bT2vIJ8dqjuZqZlKsyNqyVwLWGwaocMb9Y3fOlWrzQiYnMt5 Of1+gmniAoFOZwijdftLJDmJrFBOvgzl4yIR/qypYE8OBc29DTIB4lXqDSSCk6N51utGKmQ 7OiZLxMVc0CK/LpS/uCNw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:GIIJl06+0UI=:L9SuzcUIgnoOOR6eQ5wD5O 7L1tw5pmlWIHxTEUaEOQXwOK7XyWBu43iMhqv8wqE328Tynb4GG8IL/M66vPDdGhlbUKrOZ7w fKRrmqhqziyG7zFC1p9LwIBdud0gsts0W7FqjXK2evprXy1Rmw/kmkbzAeLS120K099Fr/fwt X5xN7PX9K+7UC+ZaCRpYA6GxLOL9kQ3Ynu+bEJTQuQnAluxQ++4drIFB0xXdB6vKOX9ONOKEK 7qyAQ3P597Lu1L3lDupmCHWLTM31HTwthyl354nky5oY2i8gtO/MTyTtJTAYi7r5zV7tDgPk2 VNhuebwYMXM8oN7mPCHG12IZsCjui1+S1niCcpg3reKOfVHgdZco4nlutaqKVJq5mHfw1ptmS JB4aNT3SJz+dHNLH4jDbh86TFvlTb7VE4QIFqetCDrJW0rqCjKnTnBre+iO3UF7SXdCaJZzSm 1KuyzeC3lDlLqh8F+WaLF1+/25jetgn9jt2lhm01SzFZrjHbRSGIbbgLGq7znjBlclhrYbXy4 p63+URAkgUgPZLNkLZdLfkbYw/w9bjoWGH18jDVb/vwj87fN86FrRLwAvzP9JXkRSc8EnIJF8 hOdipOSsBz2NTkcbp8cqz0Ruu5dQ08QYum498bFFR2/ZTvW51MHDixn2+AYKdK6r3qfFQHTAn no5kr+n81Um8T9HgmEhyZQdmHQGK9676l+JXujy28QfMosQDi9E2cDw2aCO05+mfD33LH0UjR XqtUSevFM3ZpIRsTgFFEYAwtGnIFF6Vr+CDbSaeSc5+c+moK8kkQtjIvqu2UUxX1rthIL4E6h DtMR34Y9itusxZCF8KONiQVkq3lOjzsLUMMNkZ58D4EiyCTuTs= X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 32850 Cc: 32850@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 (/) > This means that in the same session non-writable states should be used > instead of window configurations. Just that the initial idea of states was that they are always writable. > And for saving to the desktop file, > non-writable window states should be converted to writable window states. Can you summarize why we would want non-writable states to replace window configurations? martin From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 21 15:18:58 2018 Received: (at 32850) by debbugs.gnu.org; 21 Oct 2018 19:18:58 +0000 Received: from localhost ([127.0.0.1]:34581 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gEJFa-0004G9-Is for submit@debbugs.gnu.org; Sun, 21 Oct 2018 15:18:58 -0400 Received: from pop.dreamhost.com ([64.90.62.162]:57508 helo=pdx1-sub0-mail-a61.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gEJFZ-0004G2-Bt for 32850@debbugs.gnu.org; Sun, 21 Oct 2018 15:18:57 -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 81DCB80005; Sun, 21 Oct 2018 12:18:56 -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=QvvFIJt+SdrqzNuuong+Lrw6RLg=; b= Bcwk57gxSmEHYnKu7fEjRh+MqUnFbzO9bZ2K5SZmGD6hdLkPYVMe63O3oLD5acbu /dIgUCy6H3LcOQrPeTwRHarsGweCdHyHUV8TUADmwekuEDV5KfSfBdtoiZiofZ0E ONbuY42bYRC/l/UfGULHYmDhsFlNDx6zO6oRWJXhduI= 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 0B83A7FFF8; Sun, 21 Oct 2018 12:18:54 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a61 From: Juri Linkov To: martin rudalics Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers Organization: LINKOV.NET References: <875zyrrhk8.fsf@mail.linkov.net> <5BAD2538.1060609@gmx.at> <871s9e1syw.fsf@mail.linkov.net> <5BB082A6.6040709@gmx.at> <87o9cepxfv.fsf@mail.linkov.net> <5BB1DC5D.2070903@gmx.at> <87ftxgqcx0.fsf@mail.linkov.net> <5BBC5C61.4090901@gmx.at> <87ftx79brv.fsf@mail.linkov.net> <5BC5A536.7020603@gmx.at> <8736t57jcs.fsf@mail.linkov.net> <5BC6E559.3090000@gmx.at> <87zhvcteuy.fsf@mail.linkov.net> <5BC83EE4.8030607@gmx.at> <87h8hig9uw.fsf@mail.linkov.net> <5BC98A5F.5050807@gmx.at> <87ftx0nvoi.fsf@mail.linkov.net> <5BCC374E.603@gmx.at> Date: Sun, 21 Oct 2018 21:14:50 +0300 In-Reply-To: <5BCC374E.603@gmx.at> (martin rudalics's message of "Sun, 21 Oct 2018 10:22:38 +0200") Message-ID: <87a7n7kz7x.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: gggruggvucftvghtrhhoucdtuddrgedtkedrgedtgddufeejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrdeliedrvdegleenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrdeliedrvdegledprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgeptd X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32850 Cc: 32850@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 for saving to the desktop file, >> non-writable window states should be converted to writable window states. > > Can you summarize why we would want non-writable states to replace > window configurations? While window configurations officially are not yet deprecated, I see no more use of them, because window configurations can't be serialized, whereas their morally equivalent window states can. This is because window states are data structures accessible from Lisp. So I perceive window states as window configurations rewritten in Lisp. From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 22 05:07:57 2018 Received: (at 32850) by debbugs.gnu.org; 22 Oct 2018 09:07:57 +0000 Received: from localhost ([127.0.0.1]:35111 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gEWBo-0007A3-VZ for submit@debbugs.gnu.org; Mon, 22 Oct 2018 05:07:57 -0400 Received: from mout.gmx.net ([212.227.15.15]:53971) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gEWBm-00079q-RX for 32850@debbugs.gnu.org; Mon, 22 Oct 2018 05:07:55 -0400 Received: from [192.168.1.101] ([213.162.73.34]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MK0ur-1gD98w0ncD-001ROo; Mon, 22 Oct 2018 11:07:47 +0200 Received: from [192.168.1.101] ([213.162.73.34]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MK0ur-1gD98w0ncD-001ROo; Mon, 22 Oct 2018 11:07:47 +0200 Message-ID: <5BCD935F.8030309@gmx.at> Date: Mon, 22 Oct 2018 11:07:43 +0200 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers References: <875zyrrhk8.fsf@mail.linkov.net> <5BAD2538.1060609@gmx.at> <871s9e1syw.fsf@mail.linkov.net> <5BB082A6.6040709@gmx.at> <87o9cepxfv.fsf@mail.linkov.net> <5BB1DC5D.2070903@gmx.at> <87ftxgqcx0.fsf@mail.linkov.net> <5BBC5C61.4090901@gmx.at> <87ftx79brv.fsf@mail.linkov.net> <5BC5A536.7020603@gmx.at> <8736t57jcs.fsf@mail.linkov.net> <5BC6E559.3090000@gmx.at> <87zhvcteuy.fsf@mail.linkov.net> <5BC83EE4.8030607@gmx.at> <87h8hig9uw.fsf@mail.linkov.net> <5BC98A5F.5050807@gmx.at> <87ftx0nvoi.fsf@mail.linkov.net> <5BCC374E.603@gmx.at> <87a7n7kz7x.fsf@mail.linkov.net> In-Reply-To: <87a7n7kz7x.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:zGF91/xwhvSG2QaZ2naN2XalU4l2QDbxMONJ4Ua36dxyhHt2m3o KjEHKRr45G76FcTBIpXQdBeN7rH/LDu3htutu1XJwiWbVzGTNzzFXqDLW1GMnTKcQH8aGs7 03T3TmM/t4ESyMgiNfWw5kXd1JxtG/x0zK/8gcx2bDF8yJIahtrGjdhEqhcltDDhsvwYrq/ VVfDwg1kOit/AC6+opg+w== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:Ot2A3//zfn0=:8CuMGNgd8wishBgd9BhM9D WpB4RHMCXbRnFG34Q0W2YgQfqYwxz2hO+OpwQlelP9LVqSs6MUCfKKy7dDWIvTJ3ANkqOXz5p dpNfdugf0NNNSXxJJ0y2TNBmXfVNgQk7JuOWEfM5FVplCnhcA2DXSHbLzeFFntx2hHFcQl8mD kiRj5ONekgAuewStkWq/i0TCQBiEk4A/6JBR9Y6jOoZPLpz15YlDaiOqJ830DWSnl6bzXhAvN Os5wjUDOMfhuPOnTM+EQ0aFqoHtWkzJohwMNzfjjRrTxgD3tya1SMJZCAk6skMitc6LW9lMf3 aqB2UIs3rwMuaoUT9gxp5ky158eK9OUrDkTsdzyM2yTBwhkvlq1aP+coj42PnMtJtKJv66Paq w9FZbgK56JChG3TRg32hyBw594x4v9PLrYQVQEJNInI1+EUz0BmuuQ1mI5T7lZ1GWPpfD6xgU or+28VoN24LyBnVP7FnNkTk/jQ0jAFEmhT+5qft/jO9MxlxeRxQPSURJgGeYo08Hljp5l7gEG mZ30t68zUrokd3q4T6TPhZTS8rL3HqFWqMo8uqzLe//ZNG2xwvmtzF9QOjoIlFGizhKqBJXj7 +G2J4g9+TvTIDHtnYcT+mfBnI4/CV9cpBy2F9KIxC01UEXZAaAQgWU4nxWrJQBTH0qGq2rGc5 OdNuAOT9oAF0W3HEGRy+MA2vySLnBv66RcfQxFlR/MRcfGdcgB3gCSEXPBba/Mt1VXhllpVkK sz9rrKT0OpbU6FbE6wG7fuvyRtrP+lm3To6QP3XnftD/JWPUBBlqzcFNzMOFD4C6e1wPSTcmc 6A51mNlrjr6l7To1txrdVUA7Twbjz9laQ5j0AT26R3HmZh+QLQ= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32850 Cc: 32850@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 (-) > While window configurations officially are not yet deprecated, > I see no more use of them, because window configurations can't be > serialized, whereas their morally equivalent window states can. > > This is because window states are data structures accessible from Lisp. > So I perceive window states as window configurations rewritten in Lisp. 'set-window-configuration' writes directly into the window structure while 'window-state-put' splits windows instead which is much slower and at the very least messes up window identities. martin From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 23 17:17:21 2018 Received: (at 32850) by debbugs.gnu.org; 23 Oct 2018 21:17:21 +0000 Received: from localhost ([127.0.0.1]:38598 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gF43F-0003FV-E2 for submit@debbugs.gnu.org; Tue, 23 Oct 2018 17:17:21 -0400 Received: from pop.dreamhost.com ([64.90.62.162]:43752 helo=pdx1-sub0-mail-a73.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gF43D-0003FN-Js for 32850@debbugs.gnu.org; Tue, 23 Oct 2018 17:17:19 -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 31D7680232; Tue, 23 Oct 2018 14:17:19 -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=ylkjNZwpUG3BNQi8HRXtHNheozo=; b= m47iKbLFhufndDKrm9zL9fpjalaHi01eakI62TIF/d7P1RFmVcXjHGzqZlwiMYBY stbv/tfiTIXS49dQCMID3OMGFIsWKZQTghFMxD46Dl/ZH93D89AwfOM79AWuKZ3L plIldc0cJe1JBAAkcRgE76I4QM7rpP/CxdB7jNnZ9a4= 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 D0B5680233; Tue, 23 Oct 2018 14:17:17 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a73 From: Juri Linkov To: martin rudalics Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers Organization: LINKOV.NET References: <875zyrrhk8.fsf@mail.linkov.net> <5BAD2538.1060609@gmx.at> <871s9e1syw.fsf@mail.linkov.net> <5BB082A6.6040709@gmx.at> <87o9cepxfv.fsf@mail.linkov.net> <5BB1DC5D.2070903@gmx.at> <87ftxgqcx0.fsf@mail.linkov.net> <5BBC5C61.4090901@gmx.at> <87ftx79brv.fsf@mail.linkov.net> <5BC5A536.7020603@gmx.at> <8736t57jcs.fsf@mail.linkov.net> <5BC6E559.3090000@gmx.at> <87zhvcteuy.fsf@mail.linkov.net> <5BC83EE4.8030607@gmx.at> <87h8hig9uw.fsf@mail.linkov.net> <5BC98A5F.5050807@gmx.at> <87ftx0nvoi.fsf@mail.linkov.net> <5BCC374E.603@gmx.at> <87a7n7kz7x.fsf@mail.linkov.net> <5BCD935F.8030309@gmx.at> Date: Tue, 23 Oct 2018 23:45:34 +0300 In-Reply-To: <5BCD935F.8030309@gmx.at> (martin rudalics's message of "Mon, 22 Oct 2018 11:07:43 +0200") Message-ID: <87in1szirt.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: gggruggvucftvghtrhhoucdtuddrgedtkedrgeeggdduheelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrdeliedrvdegleenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrdeliedrvdegledprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgepud X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32850 Cc: 32850@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 (-) > 'set-window-configuration' writes directly into the window structure > while 'window-state-put' splits windows instead which is much slower > and at the very least messes up window identities. This means that window configurations still the most suitable within the confines of the same session. And indeed trying to eval: (add-hook 'window-size-change-functions (lambda (_) (message "window-size-change-functions called"))) (window-state-put (window-state-get (frame-root-window (selected-frame)) 'writable) (frame-root-window (selected-frame)) 'safe) (set-window-configuration (current-window-configuration)) you can see that window-state-put wrongly calls the hook window-size-change-functions whereas set-window-configuration doesn't call it that is the correct behavior. Then we desperately need functions that will serialize window configurations to writable window states to save them in the desktop file. From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 24 05:45:23 2018 Received: (at 32850) by debbugs.gnu.org; 24 Oct 2018 09:45:23 +0000 Received: from localhost ([127.0.0.1]:39071 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gFFj9-00020W-4x for submit@debbugs.gnu.org; Wed, 24 Oct 2018 05:45:23 -0400 Received: from mout.gmx.net ([212.227.17.21]:51643) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gFFj7-00020J-DS for 32850@debbugs.gnu.org; Wed, 24 Oct 2018 05:45:21 -0400 Received: from [192.168.1.101] ([212.95.5.202]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MbrR4-1fzMli1DCo-00JNke; Wed, 24 Oct 2018 11:45:12 +0200 Received: from [192.168.1.101] ([212.95.5.202]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MbrR4-1fzMli1DCo-00JNke; Wed, 24 Oct 2018 11:45:12 +0200 Message-ID: <5BD03F21.6040807@gmx.at> Date: Wed, 24 Oct 2018 11:45:05 +0200 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers References: <875zyrrhk8.fsf@mail.linkov.net> <5BAD2538.1060609@gmx.at> <871s9e1syw.fsf@mail.linkov.net> <5BB082A6.6040709@gmx.at> <87o9cepxfv.fsf@mail.linkov.net> <5BB1DC5D.2070903@gmx.at> <87ftxgqcx0.fsf@mail.linkov.net> <5BBC5C61.4090901@gmx.at> <87ftx79brv.fsf@mail.linkov.net> <5BC5A536.7020603@gmx.at> <8736t57jcs.fsf@mail.linkov.net> <5BC6E559.3090000@gmx.at> <87zhvcteuy.fsf@mail.linkov.net> <5BC83EE4.8030607@gmx.at> <87h8hig9uw.fsf@mail.linkov.net> <5BC98A5F.5050807@gmx.at> <87ftx0nvoi.fsf@mail.linkov.net> <5BCC374E.603@gmx.at> <87a7n7kz7x.fsf@mail.linkov.net> <5BCD935F.8030309@gmx.at> <87in1szirt.fsf@mail.linkov.net> In-Reply-To: <87in1szirt.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:3UW/DUDJG1rrVoveVTe2wOs2QaG3Vo23VFDOPNfYCItQLwRtFkm mXwXz1mSEDln+Hhl4He7nFJpxBnUChiudOfQDM9pz6N1OITKVZtzxgLNVU3ey4cSiDc4POE +3ML3KaWlCDYECFdxHnN5QDINZ9SdCITBCWLNdhHVHmFryZ/RhKIH3aM/CQEhiE99S+2l/c pmS+SIp36UsMfk5023DEw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:uaLL8jsdA4s=:0HoKcki1g4GHgbrONTYgAl Ght1yDNVaXTqO1Tn06+ErIf7qib6OZTmSF27WAQsxmpY6KFOaScX8C8RW6NM1UlZHz+uVIMHl YDgmGUYftWgFanBU9is1w9E5ruqrYeZ59TC+sYPyZmpO1rxcUf/h3KJtGF4jJ8A0SOy/n0/3C 1IcwxjMCjZOYwDMwHMKY66zxXbMHRbK1heQa/ULNxJnyTRExDB8tHG2cv+Y91YBhb3cfmuCvj Na5QFqSPKpaRp6d0aY51LNUvTET6G7wrAOXsdNnOndvLosKjwF9y26K7MVbCytPXDb1Rgz4yT RxRYjK6AYiWL3e31zynQ/TsBfy7VmSfe40x5vhdJ3w9SCcLyyKwFmwLS3rvKa4CpcG16c6YZM nItNAXM2BdsrpqFPCgVrt40IYG/GToJEOj1EVMNsPtPI0EeJhUp0eZp85ALivsxdi1Tu5rX0b RJIgHn2tFErdA/xIEM4z2jVgH0kOgSbEaCr3BLirO9zYh2Q+pElCcqvnp+vky5z5THVQsGlrE rFL9mrjj3YOLs9p4iJWovjJ9JUY70HKm/Bfyg6hw4J/cY9BvU4DVITEj+/3zrwIThntDWPnZ3 xDI26MB6jM2uFB4CuLxoS8nZJEN+32tOnnTVfoGoD0UAL0wbbeM0fyJEiVjxn3NjBzXYavE1I N+1wukITTtVAG3T9+86WC94DEazgso8qAmLfRlzo0BGU8P2Uo138M9TqKXSXCbO+VDkaqGVtZ 16vlBrIcx3ZnAtl/nEassC6SDtADSRvqVzbsIWLMYOwOPUs9I3T1BS4Uv+rH+PJ6WkUsPWyl8 DyE5oCBLnRO0iIWsdIIZmcoxijzeZ8WmeKvEInsfMt2xI9A+Wo= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32850 Cc: 32850@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 we desperately need functions that will serialize window > configurations to writable window states to save them in the > desktop file. What's wrong with (save-window-excursion (set-window-configuration configuration) (window-state-get nil t)) martin From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 24 19:46:03 2018 Received: (at 32850) by debbugs.gnu.org; 24 Oct 2018 23:46:03 +0000 Received: from localhost ([127.0.0.1]:41030 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gFSqh-0001bO-Bv for submit@debbugs.gnu.org; Wed, 24 Oct 2018 19:46:03 -0400 Received: from gecko.birch.relay.mailchannels.net ([23.83.209.66]:60920) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gFSqf-0001aU-Up for 32850@debbugs.gnu.org; Wed, 24 Oct 2018 19:46:02 -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 3D1A7283726; Wed, 24 Oct 2018 23:46:00 +0000 (UTC) Received: from pdx1-sub0-mail-a38.g.dreamhost.com (unknown [100.96.16.121]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id F2B3A28367D; Wed, 24 Oct 2018 23:45:59 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a38.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, 24 Oct 2018 23:46:00 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Coil-Towering: 6f35345c6fc46879_1540424760096_2259511442 X-MC-Loop-Signature: 1540424760096:2033410486 X-MC-Ingress-Time: 1540424760096 Received: from pdx1-sub0-mail-a38.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a38.g.dreamhost.com (Postfix) with ESMTP id BE918803BD; Wed, 24 Oct 2018 16:45:59 -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=C9BUXji3Ez5qH1A9dhOqPseQ614=; b= ix0360i2C5d4kj9xqXt/OmEM8BX4Vq6efyCL2+p3j4OrPHSluFkQokW5wcN/PYkK auDkhT0VlouNKy3woJcx1UR6E13p20YMU5MT1B2U6cuwWWmr5uCO1HNnIwZTF0/M 70jViVaToYyOp+2zTKJXhocbTIsa5dpWkLw+5oE1e6I= 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-a38.g.dreamhost.com (Postfix) with ESMTPSA id 1354D803A3; Wed, 24 Oct 2018 16:45:57 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a38 From: Juri Linkov To: martin rudalics Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers Organization: LINKOV.NET References: <875zyrrhk8.fsf@mail.linkov.net> <871s9e1syw.fsf@mail.linkov.net> <5BB082A6.6040709@gmx.at> <87o9cepxfv.fsf@mail.linkov.net> <5BB1DC5D.2070903@gmx.at> <87ftxgqcx0.fsf@mail.linkov.net> <5BBC5C61.4090901@gmx.at> <87ftx79brv.fsf@mail.linkov.net> <5BC5A536.7020603@gmx.at> <8736t57jcs.fsf@mail.linkov.net> <5BC6E559.3090000@gmx.at> <87zhvcteuy.fsf@mail.linkov.net> <5BC83EE4.8030607@gmx.at> <87h8hig9uw.fsf@mail.linkov.net> <5BC98A5F.5050807@gmx.at> <87ftx0nvoi.fsf@mail.linkov.net> <5BCC374E.603@gmx.at> <87a7n7kz7x.fsf@mail.linkov.net> <5BCD935F.8030309@gmx.at> <87in1szirt.fsf@mail.linkov.net> <5BD03F21.6040807@gmx.at> Date: Thu, 25 Oct 2018 02:39:45 +0300 In-Reply-To: <5BD03F21.6040807@gmx.at> (martin rudalics's message of "Wed, 24 Oct 2018 11:45:05 +0200") Message-ID: <87lg6map8e.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: gggruggvucftvghtrhhoucdtuddrgedtkedrgeekgddviecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddthedrudehgeenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdehrdduheegpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtoheprhhuuggrlhhitghssehgmhigrdgrthenucevlhhushhtvghrufhiiigvpedt X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32850 Cc: 32850@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 we desperately need functions that will serialize window >> configurations to writable window states to save them in the >> desktop file. > > What's wrong with > > (save-window-excursion > (set-window-configuration configuration) > (window-state-get nil t)) Is it really a good solution for serialization of tens of window configurations? Is such code suitable to be placed to desktop.el? (let (window-configurations window-states current-window-configuration ;; Let-bind there hooks to nil to prevent them from running (window-configuration-change-hook nil) (window-size-change-functions nil)) ;; As an example, populate a list of window configurations. ;; In reality, all these configurations are different. (dotimes (_ (+ 10 (random 10))) (push (current-window-configuration) window-configurations)) ;; Preserve the current window configuration (setq current-window-configuration (current-window-configuration)) ;; Serialize window configurations for saving in the desktop file (setq window-states (mapcar (lambda (window-configuration) (save-window-excursion (set-window-configuration window-configuration) (window-state-get nil t))) window-configurations)) ;; Restore the previous window-configuration (set-window-configuration current-window-configuration) ;; Now window-states can be saved to the desktop file ;; Restore window-states from the desktop file ;; First, preserve the current window configuration (setq current-window-configuration (current-window-configuration)) ;; Restore the saved list from the desktop file (setq window-configurations (mapcar (lambda (window-state) (save-window-excursion (window-state-put window-state nil 'safe) (current-window-configuration))) window-states)) ;; Restore the previous window-configuration (set-window-configuration current-window-configuration) ;; Now window-configurations are available for another session window-configurations) While testing without let-binding window-configuration-change-hook to nil, window-configuration-change-hook was called 50 times, observable with: (add-hook 'window-configuration-change-hook (lambda () (message "window-configuration-change-hook called"))) when let-bound to nil, these hooks are not called. But after let-binding window-size-change-functions to nil, and testing with (add-hook 'window-size-change-functions (lambda (_) (message "window-size-change-functions called"))) window-size-change-functions is still called once. I don't understand why. From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 25 02:04:38 2018 Received: (at 32850) by debbugs.gnu.org; 25 Oct 2018 06:04:38 +0000 Received: from localhost ([127.0.0.1]:41149 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gFYl4-0006xe-04 for submit@debbugs.gnu.org; Thu, 25 Oct 2018 02:04:38 -0400 Received: from mout.gmx.net ([212.227.17.22]:39137) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gFYl1-0006xQ-Pz for 32850@debbugs.gnu.org; Thu, 25 Oct 2018 02:04:36 -0400 Received: from [192.168.1.101] ([212.95.5.180]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0M3u86-1fPNo80Dpq-00rcRh; Thu, 25 Oct 2018 08:04:26 +0200 Received: from [192.168.1.101] ([212.95.5.180]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0M3u86-1fPNo80Dpq-00rcRh; Thu, 25 Oct 2018 08:04:26 +0200 Message-ID: <5BD15CE0.7080703@gmx.at> Date: Thu, 25 Oct 2018 08:04:16 +0200 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers References: <875zyrrhk8.fsf@mail.linkov.net> <871s9e1syw.fsf@mail.linkov.net> <5BB082A6.6040709@gmx.at> <87o9cepxfv.fsf@mail.linkov.net> <5BB1DC5D.2070903@gmx.at> <87ftxgqcx0.fsf@mail.linkov.net> <5BBC5C61.4090901@gmx.at> <87ftx79brv.fsf@mail.linkov.net> <5BC5A536.7020603@gmx.at> <8736t57jcs.fsf@mail.linkov.net> <5BC6E559.3090000@gmx.at> <87zhvcteuy.fsf@mail.linkov.net> <5BC83EE4.8030607@gmx.at> <87h8hig9uw.fsf@mail.linkov.net> <5BC98A5F.5050807@gmx.at> <87ftx0nvoi.fsf@mail.linkov.net> <5BCC374E.603@gmx.at> <87a7n7kz7x.fsf@mail.linkov.net> <5BCD935F.8030309@gmx.at> <87in1szirt.fsf@mail.linkov.net> <5BD03F21.6040807@gmx.at> <87lg6map8e.fsf@mail.linkov.net> In-Reply-To: <87lg6map8e.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:r/BxNo8SCIs6OMXUEQO+TFjB2BT0xUL1y7GUPUDvw0p2UKnVooX mnHZ+PIFg8Oe2/XuM9rMEXxeR31H3M4T+TtBtXAn/oL4YpEbf3HOfXMpOBW4aKwCeF4b5JE +4e+dMaW0MGSp0o7QWN6m2/tjJv75FbnqaB8ss768oKJg5y1uQ3LVDke/UIKmBJjrP2kfzT 2qURolKeJzrXqIX7dHOJg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:KtleVJ61Ugw=:b01zLgGl/1tzAA3hWLX2lY DVBE7JEHJ9nYYgFbaNH1lIAvBV6t8KRkSzOZOjXHJ0Tpxwk+a42aBlE+Nc2WD3W/KOz/xpsCm njM1FbZXjh568SR5TS3pjr37B7td2AUCAZl/HY7KqD6A1xIJ4TVBYOCWupy+8/+xFfWP9g+QV /LfdWCbrNBtqtP0SpJX7revGWeuf/cBQrDrrJlWCOAuDjmz1zPf3TiFdAmxcvf7azDc6I2MU0 ANEcQKSKEVfYI3tHyXFpyu/6ohGNIkPsXvDI3iob2FyhvowVQ1Fpf29XCiLklQp3Kdpz7/QM6 B4i9/9A0b0jWzKkwJx/whl4Wvgm2ZGvPxN76GfVO41557kOisfbGIKtHITc7W/Qph4041wHVn YP1mJdM15Rfo61GQOA7r97H4Uy7xADAsQ/jRDNfnMADKamHw3CEecjf+QNcobAUi9EOUe+vvK UqOUO074XogMtj6ePEmUl6ECzrKTrdu5TliT7Z8opKM7FBk9CeMGttnwo0VQuHQLin5IUGOCj O4KmJJRPhVao4IgML/JRQj9cnRq4KO0OihsCzmC0QvMOAB0WI9UwxceZ5lAcisGGXT8ZmCNY3 zJGUV4a8vHHL9TDegxspt36HZKQKQXF5kkhPiZ7J5/2uuGH0LVseEBe1sRISU+9vAlQTbdsrB kFKcxIcQkxFDfRqV8K52Be2TwRe2pb8OH20gyf9dklg6KQShf67DaYxXxsIJNzgkFpi1ibRQg 33eVS2a2WPiFTfJOQ/MAyLEN+LZ4O2ZfQEhKvNx9RRvtlJPKscxUydgOYElIKlNBb+8uBHVwd zAs3XK4CmpGDFz4jbknr8ev4myZBSeo0VnDsXkD+XfjcTdXM6I= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32850 Cc: 32850@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 (-) >> (save-window-excursion >> (set-window-configuration configuration) >> (window-state-get nil t)) > > Is it really a good solution for serialization of tens of window configurations? > Is such code suitable to be placed to desktop.el? Which problems do you see in practice? I have no idea about the internals of desktop. If you mean that the windows' states have to be saved too often - maybe to a backup file and as such converted from configurations to states - we can, whenever desktop is active save a configuration immediately to a state whenever it is stored somewhere. That is, add some hook when a window configuration shall be saved to a register and that register should be considered writable and saved somewhere. Is it that what you mean? > While testing without let-binding window-configuration-change-hook to nil, > window-configuration-change-hook was called 50 times, observable with: > > (add-hook 'window-configuration-change-hook > (lambda () (message "window-configuration-change-hook called"))) > > when let-bound to nil, these hooks are not called. Obviously so. The 'window-configuration-change-hook' mechanism is extraordinarily dumb. > But after let-binding window-size-change-functions to nil, > and testing with > > (add-hook 'window-size-change-functions > (lambda (_) (message "window-size-change-functions called"))) > > window-size-change-functions is still called once. > I don't understand why. 'window-size-change-functions' is called by the redisplay mechanism when it detects that at least one window has changed size. This may well happen outside the scope of the let binding. If it happens when restoring the initial configuration which should be identical to the final one, you would have to investigate: Which window changed size and why. Maybe the minibuffer window is involved. martin From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 25 15:41:27 2018 Received: (at 32850) by debbugs.gnu.org; 25 Oct 2018 19:41:27 +0000 Received: from localhost ([127.0.0.1]:42856 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gFlVW-0005jb-VM for submit@debbugs.gnu.org; Thu, 25 Oct 2018 15:41:27 -0400 Received: from giant.birch.relay.mailchannels.net ([23.83.209.68]:55403) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gFlVV-0005jT-Nt for 32850@debbugs.gnu.org; Thu, 25 Oct 2018 15:41:26 -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 01D38437D2; Thu, 25 Oct 2018 19:41:24 +0000 (UTC) Received: from pdx1-sub0-mail-a25.g.dreamhost.com (unknown [100.96.26.166]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id BC45243865; Thu, 25 Oct 2018 19:41:23 +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 19:41:23 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Shelf-Shoe: 055b054076424d66_1540496483883_187049567 X-MC-Loop-Signature: 1540496483883:1809605679 X-MC-Ingress-Time: 1540496483883 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 7903F807BF; Thu, 25 Oct 2018 12:41: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=ZfzLoUBueahpXNb0NGBVzAy1uCo=; b= WvTqiEOLc7HSp9t0QqwUpBaAFeoWevqYRm7PV/7xkbcCxbJM/06i71mLVuqWIr9I ceaxGDgNCvr6p4pDfWsSotx3jLmf2rKIVQU3QEoXlYjuxVJis6nBXFkL80SrRoQ6 H0KZ/mvcgGx7dhOqEJihglGzSC5ztdZazY1Dt4Rx2yI= 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 8258D807C5; Thu, 25 Oct 2018 12:41:20 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a25 From: Juri Linkov To: martin rudalics Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers Organization: LINKOV.NET References: <875zyrrhk8.fsf@mail.linkov.net> <87o9cepxfv.fsf@mail.linkov.net> <5BB1DC5D.2070903@gmx.at> <87ftxgqcx0.fsf@mail.linkov.net> <5BBC5C61.4090901@gmx.at> <87ftx79brv.fsf@mail.linkov.net> <5BC5A536.7020603@gmx.at> <8736t57jcs.fsf@mail.linkov.net> <5BC6E559.3090000@gmx.at> <87zhvcteuy.fsf@mail.linkov.net> <5BC83EE4.8030607@gmx.at> <87h8hig9uw.fsf@mail.linkov.net> <5BC98A5F.5050807@gmx.at> <87ftx0nvoi.fsf@mail.linkov.net> <5BCC374E.603@gmx.at> <87a7n7kz7x.fsf@mail.linkov.net> <5BCD935F.8030309@gmx.at> <87in1szirt.fsf@mail.linkov.net> <5BD03F21.6040807@gmx.at> <87lg6map8e.fsf@mail.linkov.net> <5BD15CE0.7080703@gmx.at> Date: Thu, 25 Oct 2018 22:19:18 +0300 In-Reply-To: <5BD15CE0.7080703@gmx.at> (martin rudalics's message of "Thu, 25 Oct 2018 08:04:16 +0200") Message-ID: <87va5qf1ox.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: gggruggvucftvghtrhhoucdtuddrgedtkedrgeelgddugedvucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdehrdduheegnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddthedrudehgedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgeptd X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32850 Cc: 32850@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 (-) >>> (save-window-excursion >>> (set-window-configuration configuration) >>> (window-state-get nil t)) >> >> Is it really a good solution for serialization of tens of window configurations? >> Is such code suitable to be placed to desktop.el? > > Which problems do you see in practice? I have no idea about the > internals of desktop. If you mean that the windows' states have to be > saved too often - Yes, too often - according to desktop-auto-save-timeout, it should do this juggling with window configurations and states every 30 seconds. > maybe to a backup file and as such converted from configurations to > states - we can, whenever desktop is active save a configuration > immediately to a state whenever it is stored somewhere. That is, add > some hook when a window configuration shall be saved to a register and > that register should be considered writable and saved somewhere. > Is it that what you mean? In fact this means maintaining a duplicate data structure, i.e. in parallel to keep in one list - window configurations, but in another list - window states. The downside is data duplication. If this is the only available solution, then it's ok. But the problem is that window configurations can't be used even in the same session, because they don't keep prev/next-buffers. Please try to eval: (defun set-buffers () (let* ((buffer-a (get-buffer-create "a")) (marker-a (set-marker (make-marker) 1 buffer-a)) (buffer-b (get-buffer-create "b")) (marker-b (set-marker (make-marker) 1 buffer-b))) (set-window-prev-buffers nil (list (list buffer-a marker-a marker-a) (list buffer-b marker-b marker-b))) (set-window-next-buffers nil (list buffer-a)))) (progn (set-buffers) (let ((window-state (window-state-get nil t))) ;; Reset prev/next-buffers (set-window-prev-buffers nil nil) (set-window-next-buffers nil nil) ;; Restore old state with preserved prev/next-buffers (window-state-put window-state nil 'safe) (list (window-prev-buffers) (window-next-buffers)))) window-state-put in the above code correctly restores the old values of prev/next-buffers kept in window-state. (progn (set-buffers) ;; Remember window-configuration with prev/next-buffers (let ((window-configuration (current-window-configuration))) ;; Reset prev/next-buffers (set-window-prev-buffers nil nil) (set-window-next-buffers nil nil) ;; This doesn't restore remembered prev/next-buffers (set-window-configuration window-configuration) ;; window-prev-buffers and window-next-buffers are still nil (list (window-prev-buffers) (window-next-buffers)))) But unfortunately set-window-configuration doesn't restore the old values of prev/next-buffers. From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 25 15:41:36 2018 Received: (at 32850) by debbugs.gnu.org; 25 Oct 2018 19:41:36 +0000 Received: from localhost ([127.0.0.1]:42859 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gFlVg-0005k2-9d for submit@debbugs.gnu.org; Thu, 25 Oct 2018 15:41:36 -0400 Received: from glow.birch.relay.mailchannels.net ([23.83.209.71]:55177) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gFlVe-0005jr-Ln for 32850@debbugs.gnu.org; Thu, 25 Oct 2018 15:41:35 -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 134D35E3C89; Thu, 25 Oct 2018 19:41:33 +0000 (UTC) Received: from pdx1-sub0-mail-a25.g.dreamhost.com (unknown [100.96.26.166]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 974AD5E3BE4; Thu, 25 Oct 2018 19:41:30 +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 19:41:33 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Turn-Harbor: 2d91aa311c3dda42_1540496490790_2665041686 X-MC-Loop-Signature: 1540496490790:922593635 X-MC-Ingress-Time: 1540496490790 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 57EA5807C3; Thu, 25 Oct 2018 12:41:30 -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=LXwKcpnqN38yKAXujqsOvHxXJ90=; b= qzh3DlAFGoWA1O4M8z1XaS8d/pI/sAQZNeEJKcHSI8ZVMMW9S/b09wmOjIDVbtCN bAD2bpHtgKyfXca/5J09Ge0Fp6V8gLva4ESi2C7EiL5QjBRTiCL/ffsXSobEasxU 5kyiO6LKu+q334xlgjEg4j6zFL+VAvj4jAFPyQKC4mk= 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 55375807C5; Thu, 25 Oct 2018 12:41:27 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a25 From: Juri Linkov To: martin rudalics Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers Organization: LINKOV.NET References: <875zyrrhk8.fsf@mail.linkov.net> <5BAD2538.1060609@gmx.at> <871s9e1syw.fsf@mail.linkov.net> <5BB082A6.6040709@gmx.at> <87o9cepxfv.fsf@mail.linkov.net> <5BB1DC5D.2070903@gmx.at> <87ftxgqcx0.fsf@mail.linkov.net> <5BBC5C61.4090901@gmx.at> <87ftx79brv.fsf@mail.linkov.net> <5BC5A536.7020603@gmx.at> <87o9bqlu7y.fsf@mail.linkov.net> <5BC98A76.9070207@gmx.at> Date: Thu, 25 Oct 2018 22:31:20 +0300 In-Reply-To: <5BC98A76.9070207@gmx.at> (martin rudalics's message of "Fri, 19 Oct 2018 09:40:38 +0200") Message-ID: <87in1pltn3.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: gggruggvucftvghtrhhoucdtuddrgedtkedrgeelgddugedvucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdehrdduheegnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddthedrudehgedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgepud X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32850 Cc: 32850@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 found a problem, it occurs very rarely: >> >> Debugger entered--Lisp error: (wrong-type-argument stringp nil) >> get-buffer(nil) >> #f(compiled-function (entry) #)((nil nil nil)) >> mapcar(#f(compiled-function (entry) #) (("*Group*" 1 139) (nil nil nil) ("*sent reply to martin rudalics*" 1 1090))) >> window--state-put-2(safe 737) >> window-state-put(...) >> >> Do you have an idea how did (nil nil nil) find its way into the list of >> prev-buffers? (window-state-get was used with the non-nil WRITABLE arg) > > The most simple way to find out is to define such a list in window.c > and have 'set-window-prev-buffers' holler if the prev_buffers argument > is equal to that list. I can't find out how '(nil nil nil)' gets into the prev-buffers, so to avoid the error, I propose to install this patch: diff --git a/lisp/window.el b/lisp/window.el index 27d7e42280..c562ed3cfa 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -5854,14 +5854,15 @@ window--state-put-2 (set-window-next-buffers window (delq nil (mapcar (lambda (buffer) - (setq buffer (get-buffer buffer)) + (setq buffer (and buffer (get-buffer buffer))) (when (buffer-live-p buffer) buffer)) next-buffers)))) (when prev-buffers (set-window-prev-buffers window (delq nil (mapcar (lambda (entry) - (let ((buffer (get-buffer (nth 0 entry))) + (let ((buffer (and (nth 0 entry) + (get-buffer (nth 0 entry)))) (m1 (nth 1 entry)) (m2 (nth 2 entry))) (when (buffer-live-p buffer) From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 26 03:39:46 2018 Received: (at 32850) by debbugs.gnu.org; 26 Oct 2018 07:39:46 +0000 Received: from localhost ([127.0.0.1]:43149 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gFwig-0000Ew-AI for submit@debbugs.gnu.org; Fri, 26 Oct 2018 03:39:46 -0400 Received: from mout.gmx.net ([212.227.15.19]:33823) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gFwie-0000Eg-N4 for 32850@debbugs.gnu.org; Fri, 26 Oct 2018 03:39:45 -0400 Received: from [192.168.1.101] ([212.95.5.134]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MILxX-1gIyim0mop-004BR7; Fri, 26 Oct 2018 09:39:35 +0200 Received: from [192.168.1.101] ([212.95.5.134]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MILxX-1gIyim0mop-004BR7; Fri, 26 Oct 2018 09:39:35 +0200 Message-ID: <5BD2C4AD.3060402@gmx.at> Date: Fri, 26 Oct 2018 09:39:25 +0200 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers References: <875zyrrhk8.fsf@mail.linkov.net> <87o9cepxfv.fsf@mail.linkov.net> <5BB1DC5D.2070903@gmx.at> <87ftxgqcx0.fsf@mail.linkov.net> <5BBC5C61.4090901@gmx.at> <87ftx79brv.fsf@mail.linkov.net> <5BC5A536.7020603@gmx.at> <8736t57jcs.fsf@mail.linkov.net> <5BC6E559.3090000@gmx.at> <87zhvcteuy.fsf@mail.linkov.net> <5BC83EE4.8030607@gmx.at> <87h8hig9uw.fsf@mail.linkov.net> <5BC98A5F.5050807@gmx.at> <87ftx0nvoi.fsf@mail.linkov.net> <5BCC374E.603@gmx.at> <87a7n7kz7x.fsf@mail.linkov.net> <5BCD935F.8030309@gmx.at> <87in1szirt.fsf@mail.linkov.net> <5BD03F21.6040807@gmx.at> <87lg6map8e.fsf@mail.linkov.net> <5BD15CE0.7080703@gmx.at> <87va5qf1ox.fsf@mail.linkov.net> In-Reply-To: <87va5qf1ox.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:yxDEJQdcrmV2D049p+S+KyZEao/CRiVNv19IJcB1hkP0AvVnPR4 eighwI763YlVZONr5wLsmJZszRTkfcJKFMSy/Jb3QJlJkFh/+dsEs+Y7KPpojgwllXSXBN0 ySLQ7iRVgLzehPu13f0KeMU0seN3P11AnevEhAeUbz79RpFKkRUDVrdXBh5AJ1oEvfqVpJV y4qsge5Qn3Pjhs9ItWKWw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:tZGynAY6BQQ=:JW7Oamh7hauri+1qi5/apU s0SBq0i4kHcYKDyRFXSShilToHftAtEAxjZpDAW6mbYddFM0WXRIRs2b0OdAve4pxS4Q2b1sQ 2Bruh95uTWuTefLon87ZgukznDkUnfpsdJ8FelcbTBZF2qBqwjbTcwj7Xx8gX3ZGwLA3T7aNN fiU6k0vhYNCdbLqJR92lX87Sk+4uzQwWuJ4cZYc+U3UQTBxsoq5peo9BKRBsmDDnMygxrX7B+ ku+SSlOvraDgMPsq0t5PgpCp3yyO1NzyPrHwuEkXtvBgpbEREET0cmFtpExZIRrxRrWO3Kubb SWu1tNUOxhreMgIeicPzuFiSUL2gAQ+NqMmVF65sXVMSXfDtCh8F2E6b3XnMG471v8cXhW5Uz IHv6yar2LFvd8B7q+ydGufulBmfPUUt1a2+AzD4S9cF5Ar9VcydCW/DGbWVs5Fxlf5EUgasKg huELfwINvbOJTHbTS2rW5ukvC7KbUVYBxl4n99/OnR4+toxSQ30QP/+7hDzx6MgvuCS64P7yd c4GdFIwOKAHhRmn1yZ7t1f/0ljLJMD6J7raWgefinvM0qMwSAV9XR7C6OLRIPCMRACuZcB+RS 9WRhM1WdoXD4ITsNppjuXx4MRgizCWB3UC5kqNnzY72pBJSPDOiRnf4ecK/dZRLeHWuPDUnOI Mmvk/aXT4TQPBNR6UFq/YFYTjHQ7IdP3Am+bAcX4SCepvxturoaUV1w0+MqzFteRvPld9VGvi 4CytVMSKSndafaaK2luODIcJazXGGja6J4EAGXFLENVcHO/Orv7iM+MBv3GSbeblNcoupv3uy RsKQxoizrKviHpBltFxk5rZgNNIduAW69woSF+DFSBh+hNyXhI= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32850 Cc: 32850@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 (-) >> Which problems do you see in practice? I have no idea about the >> internals of desktop. If you mean that the windows' states have to be >> saved too often - > > Yes, too often - according to desktop-auto-save-timeout, it should do > this juggling with window configurations and states every 30 seconds. That's not reasonable. More often than not this will catch the current window configuration in an inconsistent state where the minibuffer is active or the user is in a window excurstion. But does desktop save window configurations or states stored somewhere in the first place? > In fact this means maintaining a duplicate data structure, > i.e. in parallel to keep in one list - window configurations, > but in another list - window states. The downside is data duplication. > If this is the only available solution, then it's ok. > > But the problem is that window configurations can't be used > even in the same session, because they don't keep prev/next-buffers. ... > But unfortunately set-window-configuration doesn't restore > the old values of prev/next-buffers. That's disputable anyway. When, in a window excursion, you show some buffer in a window, don't you want to record that buffer in that window's list of previous buffers after exiting from the excursion? Anyway. It would be tedious but probably not impossible to provide a function that transforms a configuration into a state. Doing the opposite is conceptually questionable, at the very least. A basic invariant of the windows code is that a valid window cannot appear twice on the same or a different frame. It may, however, appear an arbitrary number of times in stored window configurations. One consequence implied by that invariant is that you can restore a window configuration only into the frame from where you saved it earlier. When a frame gets deleted, all configurations drawn earlier from that frame are virtually lost. martin From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 26 03:41:20 2018 Received: (at 32850) by debbugs.gnu.org; 26 Oct 2018 07:41:21 +0000 Received: from localhost ([127.0.0.1]:43153 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gFwkC-0000IC-NC for submit@debbugs.gnu.org; Fri, 26 Oct 2018 03:41:20 -0400 Received: from mout.gmx.net ([212.227.15.19]:59335) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gFwkB-0000Hx-Qj for 32850@debbugs.gnu.org; Fri, 26 Oct 2018 03:41:20 -0400 Received: from [192.168.1.101] ([212.95.5.134]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0M243n-1fQsYe0ByN-00u58W; Fri, 26 Oct 2018 09:41:11 +0200 Received: from [192.168.1.101] ([212.95.5.134]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0M243n-1fQsYe0ByN-00u58W; Fri, 26 Oct 2018 09:41:11 +0200 Message-ID: <5BD2C50E.2090508@gmx.at> Date: Fri, 26 Oct 2018 09:41:02 +0200 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers References: <875zyrrhk8.fsf@mail.linkov.net> <5BAD2538.1060609@gmx.at> <871s9e1syw.fsf@mail.linkov.net> <5BB082A6.6040709@gmx.at> <87o9cepxfv.fsf@mail.linkov.net> <5BB1DC5D.2070903@gmx.at> <87ftxgqcx0.fsf@mail.linkov.net> <5BBC5C61.4090901@gmx.at> <87ftx79brv.fsf@mail.linkov.net> <5BC5A536.7020603@gmx.at> <87o9bqlu7y.fsf@mail.linkov.net> <5BC98A76.9070207@gmx.at> <87in1pltn3.fsf@mail.linkov.net> In-Reply-To: <87in1pltn3.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:vhfL/uXp4BJvN8Rfr8qDn/7ISlq2GwYhzgWpbjdiW1QacMdzJvH Qf1H8K3Q+lC5mpfcRZK6aKLGqojjZAnFzd7IHkLTN2ZfdDE7JF34fNLx+yGgzcvARjVFBSn Rvxsp9pEp1B3+6rHrTLPZfQgyeWL5JSU7+gymtOaEkbvZsy2uajlkx4oW8Gg+fr1LAqu410 hkvhSjPCo1fAf0x2dFKkw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:NjhfxzROEx0=:FzWJbm2N+FvMgjY9SYLboF +3V/LbVofKI3FMLScZQCXXRlTA90PosXUBDOLu7jKPDIEbQnitnVNxbaSeCcEaHT3ufuvmYba 14mDTr9nFWImxqjI23dfiT96tae/XQuWKZh9v8Kqrf5mrZOlaZR6PSk8bIY8iIsH6QKJMs/Bj LKxvqeGuPuKS77q38tAVrL+oSfqozwElZJlvgMkn5s691TiVvsf69e5usqCkfTz6/apwf2m8+ zskHbxmN3qBpdnYZ/S5nBbnpnvEAVJVWW1i98rl8Baoaqd4AVg6IM0FDMjab0ur137AunAO3o 5cLMWTJhMom9WIA47QbFWu8TZRAZ6UzHZqTys6capXomZUFc47+hvP45uDz12f01FZjYRqqI9 VAXl1ApR8Eb1zBPp9fTUYtxAEsl49r8u9Pnx3ANnlPOjveqgZatBS2wmw20q+Yn0UB7swa+MS 3UB4xi3cNr3Ls9mCoc2RgZiHqLwhJhP0qqpCnywvO+wYAaNwP9CuVX8H31tK6MGEmw7x8OCWd ygxyOWWlk47hQMkCe0a1A8mfnqUAXilWeOBqWYuLtctrqnr+mt6BeIUUjxAtV8QHLBXO9Bp06 L+m6zdNK9dHWIVO2hJ8xIuaaDN0ea2pBFwmFfnvRl39eVPgB6D+ovdbC32UQa7kcL6VqdQyf1 y8eWGPSk8oq7qGkab3Q7sfhDQzvbuTX4ERlfs/TlHYBgZkCaWRTuVio6BD9wpZhQYnGFSeytV 1MmktObBWfQhOWtb0epKIWCnfNxu+bWoV37GdNHA72iSRLlWOg3nV1wV2GAJqXU1PUIgs9Bcr V2VpN4atiZD+0sms0LkDnJvaSUoN7SkE7J1WxtgaU3oiW2dkEc= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32850 Cc: 32850@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 most simple way to find out is to define such a list in window.c >> and have 'set-window-prev-buffers' holler if the prev_buffers argument >> is equal to that list. > > I can't find out how '(nil nil nil)' gets into the prev-buffers, Did you try what I proposed? If that doesn't catch it, I have no idea. IIUC mark_discard_killed_buffers just removes entries from that list, it cannot introduce any nil valued elements. > so to avoid the error, I propose to install this patch: Well this will just cache the underlying problem. But I have no good idea how to investigate this issue any furher, so install if you like. martin From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 26 04:00:08 2018 Received: (at 32850) by debbugs.gnu.org; 26 Oct 2018 08:00:08 +0000 Received: from localhost ([127.0.0.1]:43166 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gFx2N-0000nN-T1 for submit@debbugs.gnu.org; Fri, 26 Oct 2018 04:00:08 -0400 Received: from eggs.gnu.org ([208.118.235.92]:43567) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gFx2L-0000lP-Dn for 32850@debbugs.gnu.org; Fri, 26 Oct 2018 04:00:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gFx2B-0003C3-Ep for 32850@debbugs.gnu.org; Fri, 26 Oct 2018 04:00:00 -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]:40295) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gFx2B-0003By-AG; Fri, 26 Oct 2018 03:59:55 -0400 Received: from [176.228.60.248] (port=2432 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gFx2A-0007ls-Q7; Fri, 26 Oct 2018 03:59:55 -0400 Date: Fri, 26 Oct 2018 10:59:55 +0300 Message-Id: <83h8h9p284.fsf@gnu.org> From: Eli Zaretskii To: martin rudalics In-reply-to: <5BD2C4AD.3060402@gmx.at> (message from martin rudalics on Fri, 26 Oct 2018 09:39:25 +0200) Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers References: <875zyrrhk8.fsf@mail.linkov.net> <87o9cepxfv.fsf@mail.linkov.net> <5BB1DC5D.2070903@gmx.at> <87ftxgqcx0.fsf@mail.linkov.net> <5BBC5C61.4090901@gmx.at> <87ftx79brv.fsf@mail.linkov.net> <5BC5A536.7020603@gmx.at> <8736t57jcs.fsf@mail.linkov.net> <5BC6E559.3090000@gmx.at> <87zhvcteuy.fsf@mail.linkov.net> <5BC83EE4.8030607@gmx.at> <87h8hig9uw.fsf@mail.linkov.net> <5BC98A5F.5050807@gmx.at> <87ftx0nvoi.fsf@mail.linkov.net> <5BCC374E.603@gmx.at> <87a7n7kz7x.fsf@mail.linkov.net> <5BCD935F.8030309@gmx.at> <87in1szirt.fsf@mail.linkov.net> <5BD03F21.6040807@gmx.at> <87lg6map8e.fsf@mail.linkov.net> <5BD15CE0.7080703@gmx.at> <87va5qf1ox.fsf@mail.linkov.net> <5BD2C4AD.3060402@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: 32850 Cc: 32850@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: Fri, 26 Oct 2018 09:39:25 +0200 > From: martin rudalics > Cc: 32850@debbugs.gnu.org > > >> Which problems do you see in practice? I have no idea about the > >> internals of desktop. If you mean that the windows' states have to be > >> saved too often - > > > > Yes, too often - according to desktop-auto-save-timeout, it should do > > this juggling with window configurations and states every 30 seconds. > > That's not reasonable. I agree. Which is why I have desktop-auto-save-timeout customized to nil on my main machine, and to very large values on others. When this feature first came out, I found that it frequently causes delays in Emacs responses, and I don't see any reason to have the desktop saved every 30 sec. From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 27 16:20:31 2018 Received: (at 32850) by debbugs.gnu.org; 27 Oct 2018 20:20:31 +0000 Received: from localhost ([127.0.0.1]:45785 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGV4R-00006J-B7 for submit@debbugs.gnu.org; Sat, 27 Oct 2018 16:20:31 -0400 Received: from cichlid.maple.relay.mailchannels.net ([23.83.214.36]:34823) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGV4N-00005s-HQ for 32850@debbugs.gnu.org; Sat, 27 Oct 2018 16:20:28 -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 0D5E8682C47; Sat, 27 Oct 2018 20:20:26 +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 C8C24682F9E; Sat, 27 Oct 2018 20:20:25 +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:26 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Dime-Spot: 256efcb1237b7a4f_1540671625907_676887137 X-MC-Loop-Signature: 1540671625907:1705074760 X-MC-Ingress-Time: 1540671625906 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 97F1A7F694; Sat, 27 Oct 2018 13:20: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=B+TOg5JP5QLjS6f0PjBGlbjAV2Y=; b= 2tnji48EFDYFZuTQU2FwIqq20JeWVu2wFiIuZv1UnamfQdH5O2eSE0Cwzr14cGG0 ciZUFR/GuRU+2ofydc/pfIj55xaTRDhFiV18Pwvc8tOgd/HcHWtQcgbQiD4B3flO gjFu3R1XMeWE+0R0hrOrbAR9BkMvZc/tgVSDBwKnCBs= 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 7447C7F68E; Sat, 27 Oct 2018 13:20:24 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a3 From: Juri Linkov To: martin rudalics Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers Organization: LINKOV.NET References: <875zyrrhk8.fsf@mail.linkov.net> <87ftxgqcx0.fsf@mail.linkov.net> <5BBC5C61.4090901@gmx.at> <87ftx79brv.fsf@mail.linkov.net> <5BC5A536.7020603@gmx.at> <8736t57jcs.fsf@mail.linkov.net> <5BC6E559.3090000@gmx.at> <87zhvcteuy.fsf@mail.linkov.net> <5BC83EE4.8030607@gmx.at> <87h8hig9uw.fsf@mail.linkov.net> <5BC98A5F.5050807@gmx.at> <87ftx0nvoi.fsf@mail.linkov.net> <5BCC374E.603@gmx.at> <87a7n7kz7x.fsf@mail.linkov.net> <5BCD935F.8030309@gmx.at> <87in1szirt.fsf@mail.linkov.net> <5BD03F21.6040807@gmx.at> <87lg6map8e.fsf@mail.linkov.net> <5BD15CE0.7080703@gmx.at> <87va5qf1ox.fsf@mail.linkov.net> <5BD2C4AD.3060402@gmx.at> Date: Sat, 27 Oct 2018 23:09:53 +0300 In-Reply-To: <5BD2C4AD.3060402@gmx.at> (martin rudalics's message of "Fri, 26 Oct 2018 09:39:25 +0200") Message-ID: <87r2gbb85y.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: gggruggvucftvghtrhhoucdtuddrgedtkedrheeggdduhedvucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdehrdduheegnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddthedrudehgedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgeptd X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32850 Cc: 32850@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 unfortunately set-window-configuration doesn't restore >> the old values of prev/next-buffers. > > That's disputable anyway. When, in a window excursion, you show some > buffer in a window, don't you want to record that buffer in that > window's list of previous buffers after exiting from the excursion? Thanks for the hint, I see now that the problem is not in set-window-configuration, but in window-state-put. In case of set-window-configuration, `(set-window-next-buffers nil nil)' correctly changes the value of window-next-buffers in the same window that was stored in window-configuration and that is currently selected, i.e. this produces the right result when prev/next-buffers are modified in a new window (so not in the window shared in window configurations): (progn (set-buffers) ;; Remember window-configuration with prev/next-buffers (let ((window-configuration (current-window-configuration))) ;; Create a new window (delete-other-windows) (split-window) (delete-window) ;; Reset prev/next-buffers (set-window-prev-buffers nil nil) (set-window-next-buffers nil nil) ;; This correctly restores remembered prev/next-buffers ;; because window-next-buffers are modified in another window (set-window-configuration window-configuration) ;; window-prev-buffers and window-next-buffers are correct (list (window-prev-buffers) (window-next-buffers)))) But window-state-put has such deficiency with its undocumented prerequisite that a new unique window should be created manually before calling window-state-put to put the state into a new window (to not share it with other window configurations). This means a need in such ugly hack: ;; Create a new window (delete-other-windows) (split-window) (delete-window) ;; Put a previous state into the new window ;; to not share it with other window configurations (window-state-put previously-saved-window-state nil 'safe) ;; Get its window configuration (current-window-configuration) Please confirm is `(delete-other-windows) (split-window) (delete-window)' is the right idiom to create a new window to put the window state into, or there is a special function to create a window, that I can't find. > Anyway. It would be tedious but probably not impossible to provide a > function that transforms a configuration into a state. Doing the > opposite is conceptually questionable, at the very least. The code above does the opposite, but it requires an ugly workaround for window-state-put. > A basic invariant of the windows code is that a valid window cannot > appear twice on the same or a different frame. It may, however, > appear an arbitrary number of times in stored window configurations. Like the earlier code snippet demonstrates it causes problems when the same window appears an arbitrary number of times in stored window configurations. Thus the need to create a new window to put the state into (currently window-state-put itself doesn't create a new unique window). From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 27 17:13:24 2018 Received: (at 32850) by debbugs.gnu.org; 27 Oct 2018 21:13:24 +0000 Received: from localhost ([127.0.0.1]:45843 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGVtc-0003Pi-Kb for submit@debbugs.gnu.org; Sat, 27 Oct 2018 17:13:24 -0400 Received: from giant.birch.relay.mailchannels.net ([23.83.209.68]:6005) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGVta-0003PZ-PX for 32850@debbugs.gnu.org; Sat, 27 Oct 2018 17:13: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 1F1135C3650; Sat, 27 Oct 2018 21:13:21 +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 9EBBD5C35B4; Sat, 27 Oct 2018 21:13:20 +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 21:13:21 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Tart-Harbor: 29e57c1e03f73a9e_1540674800844_2673321125 X-MC-Loop-Signature: 1540674800844:1814725965 X-MC-Ingress-Time: 1540674800844 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 4CA0F7F69C; Sat, 27 Oct 2018 14:13: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=HUK6CqLVyoRxDbACUwpjHCrfCDQ=; b= sbvyEtlejMYeSmjAawgy3Ho+GYFCKn3h/NF55q+lqm/CCS8vGvqf9NBvhF/6Dj1m p4gZPemYRYOpJcFtRb6omzxtvPipx4bxG5N0hnL5eBPDOv4KIkT4W/+qoEpdqZOe Q5lgd2vF8fTlqqIwY71ZGPGtNZlJvU09HH8cKCCLxPw= 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 CE32A7F698; Sat, 27 Oct 2018 14:13:18 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a3 From: Juri Linkov To: martin rudalics Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers Organization: LINKOV.NET References: <875zyrrhk8.fsf@mail.linkov.net> <5BAD2538.1060609@gmx.at> <871s9e1syw.fsf@mail.linkov.net> <5BB082A6.6040709@gmx.at> <87o9cepxfv.fsf@mail.linkov.net> <5BB1DC5D.2070903@gmx.at> <87ftxgqcx0.fsf@mail.linkov.net> <5BBC5C61.4090901@gmx.at> <87ftx79brv.fsf@mail.linkov.net> <5BC5A536.7020603@gmx.at> <87o9bqlu7y.fsf@mail.linkov.net> <5BC98A76.9070207@gmx.at> <87in1pltn3.fsf@mail.linkov.net> <5BD2C50E.2090508@gmx.at> Date: Sun, 28 Oct 2018 00:11:46 +0300 In-Reply-To: <5BD2C50E.2090508@gmx.at> (martin rudalics's message of "Fri, 26 Oct 2018 09:41:02 +0200") Message-ID: <87a7mz2iy5.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: gggruggvucftvghtrhhoucdtuddrgedtkedrheeggdduiedvucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdehrdduheegnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddthedrudehgedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgeptd X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32850 Cc: 32850@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 most simple way to find out is to define such a list in window.c >>> and have 'set-window-prev-buffers' holler if the prev_buffers argument >>> is equal to that list. >> >> I can't find out how '(nil nil nil)' gets into the prev-buffers, > > Did you try what I proposed? If that doesn't catch it, I have no > idea. IIUC mark_discard_killed_buffers just removes entries from that > list, it cannot introduce any nil valued elements. > >> so to avoid the error, I propose to install this patch: > > Well this will just cache the underlying problem. But I have no good > idea how to investigate this issue any furher, so install if you like. I tried this advice: (advice-add 'set-window-prev-buffers :before (lambda (window prev-buffers) (when (member '(nil nil nil) prev-buffers) (let (frames) (mapbacktrace (lambda (evald fun args flags) (push fun frames))) (display-warning 'prev-buffers (format "%S %S" prev-buffers (nreverse frames)) :warning)))) '((name . debug))) but it still doesn't catch (nil nil nil) added to prev-buffers and here is a new backtrace: Debugger entered--Lisp error: (wrong-type-argument stringp nil) get-buffer(nil) #f(compiled-function (entry) #)((nil nil nil)) mapcar(#f(compiled-function (entry) #) (("*Help*" 1 112) (nil nil nil))) window--state-put-2(safe 737) window-state-put((... (buffer "isearch.el" ...) (prev-buffers ("*Help*" 1 112) (nil nil nil))) # safe) frameset--restore-frame(... t) frameset-restore([frameset ...] :reuse-frames t :cleanup-frames t :force-display t :force-onscreen t) desktop-restore-frameset() desktop-read() #f(compiled-function () #)() run-hooks(after-init-hook delayed-warnings-hook) command-line() normal-top-level() From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 27 17:51:47 2018 Received: (at 32850) by debbugs.gnu.org; 27 Oct 2018 21:51:47 +0000 Received: from localhost ([127.0.0.1]:45882 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGWUl-0004LA-3X for submit@debbugs.gnu.org; Sat, 27 Oct 2018 17:51:47 -0400 Received: from glow.birch.relay.mailchannels.net ([23.83.209.71]:49743) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGWUh-0004Kz-Dl for 32850@debbugs.gnu.org; Sat, 27 Oct 2018 17:51:44 -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 021F5281CF2; Sat, 27 Oct 2018 21:51:42 +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 BCD8C281BD1; Sat, 27 Oct 2018 21:51:41 +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 21:51:41 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Cure-Language: 2e17dcf923137027_1540677101868_3819573758 X-MC-Loop-Signature: 1540677101868:3080973128 X-MC-Ingress-Time: 1540677101867 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 8BD477F6A0; Sat, 27 Oct 2018 14:51:41 -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=eOHNNfIB2L20N2IA1R6ge2K7sm8=; b= TJg059DT5/yUdkvlyUEHSL+za+fBNqMqrzRiIMXTGIRhZ0BvZA6K9w0a5lN4XiXb KklqYYimjV9NShNU78C9bNEkHvn593oniJhn4Ldv45eYzXwHfPkUfrrzSNzTR6Du 0j9dM6WPOOSAq+pabn8KRyw5SJJDyBz5KncHdOVwU0k= 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 7F1C57F698; Sat, 27 Oct 2018 14:51:40 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a3 From: Juri Linkov To: martin rudalics Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers Organization: LINKOV.NET References: <875zyrrhk8.fsf@mail.linkov.net> <5BAD2538.1060609@gmx.at> <871s9e1syw.fsf@mail.linkov.net> <5BB082A6.6040709@gmx.at> <87o9cepxfv.fsf@mail.linkov.net> <5BB1DC5D.2070903@gmx.at> <87ftxgqcx0.fsf@mail.linkov.net> <5BBC5C61.4090901@gmx.at> <87ftx79brv.fsf@mail.linkov.net> <5BC5A536.7020603@gmx.at> <87o9bqlu7y.fsf@mail.linkov.net> <5BC98A76.9070207@gmx.at> <87in1pltn3.fsf@mail.linkov.net> <5BD2C50E.2090508@gmx.at> Date: Sun, 28 Oct 2018 00:39:14 +0300 In-Reply-To: <5BD2C50E.2090508@gmx.at> (martin rudalics's message of "Fri, 26 Oct 2018 09:41:02 +0200") Message-ID: <87lg6jysql.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: gggruggvucftvghtrhhoucdtuddrgedtkedrheehgddtgecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddthedrudehgeenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdehrdduheegpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtoheprhhuuggrlhhitghssehgmhigrdgrthenucevlhhushhtvghrufhiiigvpedu X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32850 Cc: 32850@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 most simple way to find out is to define such a list in window.c >>> and have 'set-window-prev-buffers' holler if the prev_buffers argument >>> is equal to that list. >> >> I can't find out how '(nil nil nil)' gets into the prev-buffers, > > Did you try what I proposed? If that doesn't catch it, I have no > idea. IIUC mark_discard_killed_buffers just removes entries from that > list, it cannot introduce any nil valued elements. > >> so to avoid the error, I propose to install this patch: > > Well this will just cache the underlying problem. But I have no good > idea how to investigate this issue any furher, so install if you like. Now I found a reproducible test case: 1. create and remember a window-configuration 2. switch to a different window-configuration 3. kill the buffer that was in prev-buffers of the first window-configuration 4. restore the first window-configuration 5. look into its prev-buffers, it contains: (# # #) 6. (window-state-get nil t) on the window with such prev-buffers produces: (nil nil nil) I believe this patch should fix the problem: diff --git a/lisp/window.el b/lisp/window.el index 27d7e42280..ad8164052f 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -5552,9 +5552,14 @@ window--state-get-1 (buffer (window-buffer window)) (selected (eq window (selected-window))) (next-buffers (when (window-live-p window) - (window-next-buffers window))) + (delq nil (mapcar (lambda (buffer) + (and (buffer-live-p buffer) buffer)) + (window-next-buffers window))))) (prev-buffers (when (window-live-p window) - (window-prev-buffers window))) + (delq nil (mapcar (lambda (entry) + (and (buffer-live-p (nth 0 entry)) + entry)) + (window-prev-buffers window))))) (head `(,type ,@(unless (window-next-sibling window) `((last . t))) From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 28 05:00:51 2018 Received: (at 32850) by debbugs.gnu.org; 28 Oct 2018 09:00:51 +0000 Received: from localhost ([127.0.0.1]:46653 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGgwE-0008NN-UA for submit@debbugs.gnu.org; Sun, 28 Oct 2018 05:00:51 -0400 Received: from mout.gmx.net ([212.227.15.18]:45395) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGgwC-0008NA-Uz for 32850@debbugs.gnu.org; Sun, 28 Oct 2018 05:00:49 -0400 Received: from [192.168.1.101] ([212.95.5.102]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LyEqr-1fSwSD3WhZ-015ae5; Sun, 28 Oct 2018 10:00:40 +0100 Received: from [192.168.1.101] ([212.95.5.102]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LyEqr-1fSwSD3WhZ-015ae5; Sun, 28 Oct 2018 10:00:40 +0100 Message-ID: <5BD57AB5.2040105@gmx.at> Date: Sun, 28 Oct 2018 10:00:37 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers References: <875zyrrhk8.fsf@mail.linkov.net> <87ftxgqcx0.fsf@mail.linkov.net> <5BBC5C61.4090901@gmx.at> <87ftx79brv.fsf@mail.linkov.net> <5BC5A536.7020603@gmx.at> <8736t57jcs.fsf@mail.linkov.net> <5BC6E559.3090000@gmx.at> <87zhvcteuy.fsf@mail.linkov.net> <5BC83EE4.8030607@gmx.at> <87h8hig9uw.fsf@mail.linkov.net> <5BC98A5F.5050807@gmx.at> <87ftx0nvoi.fsf@mail.linkov.net> <5BCC374E.603@gmx.at> <87a7n7kz7x.fsf@mail.linkov.net> <5BCD935F.8030309@gmx.at> <87in1szirt.fsf@mail.linkov.net> <5BD03F21.6040807@gmx.at> <87lg6map8e.fsf@mail.linkov.net> <5BD15CE0.7080703@gmx.at> <87va5qf1ox.fsf@mail.linkov.net> <5BD2C4AD.3060402@gmx.at> <87r2gbb85y.fsf@mail.linkov.net> In-Reply-To: <87r2gbb85y.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:o21f5SwPFA88Hwu0hfATlw05IrEx8SWXJamuP/Z3JZUlU1v/N2f rqVgFnfpxp1G4CfpNDgaKh/cnJziPLaxSOZd08cArcKEFW2Q31hGpEnuPyYpeGJYDjfkKt2 MuRgTzyYGox4HrPD8aFh7esp5QOwPFJmt5aLxaOo+CVxWt+KhmJu44GY6GQxFha4Dboy3VO XYZvnEuXVca73YfS/7EEQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:vI6UOEuDE20=:yrmya8D2jm5EBVLV/OPxBl ZqFZaRmccGAQa97Bq43oD1+SzBlHZ6XT9lV4NP+eiknjFH+h339HVMFOX1v/qSan02INkCu1m Dc0nFCKsPjJ4KQSbuwcxe7OlyLout4wYUsBZS9CbufbScWFRFSLrKq+kWaWkFnnFEzKnEUssS BwjepAE5W2p8LlNH1ooeWe3gWK5rGmgV7m2d7Ex1CiMIOPgyZc/slS5NyOTjTaz59MqHnUHbn omZCqwco2M0So7q8skuyFaB/xgnhnWgagJh16U0GlfiRBFjkyZbRgYNPs3K0/fYXnvQcvw3/p 0nxCIXGkY0a5n2Gb/rYx9XvATgtEDcuOiuBnSTYkkHEX/ht/caHxzuLibcSNRH/njIJ9X2BcI Yaj9xsmqNVh0GfMVj9m3q5R5VUhPtBOPDos9wMZhiQnQbrR4MtFn5S96fZrqMcw45jPSpH5Tj +K5Shn8dQNkV4gMg3D9nzl4ESqVLQK1Ot5ZqXUIjhF19IU9LcWCMSH5SQfgYZ5pVlpUljISuZ 8Lln3axDrQTStAxxXipxjx0pp1QaXFwNYMO4JGdlPuBeQREtomygOttIpePcbgdEdv3HhOTg4 za5ClHs/RNIiKuYDQj8r0KzBAX/gTdWhs45w1eHr9nCABU1NLcS6izATZZSYHpLfSfNioGncB HVbTrmrmbxIQ0qwIpHVJ8z6lVHNsmPvjGWwM6ZLvFf2G7RgQHhZkCNzxnf3HXvP0lbHbnG967 ksvMXb2h+4AmbgIv8U9ke+zZv78Qc+NPd3zBr5N4iSAwrr3HnS0VHEEO9TrVSFNk4a2gvUANB dDCFrhpZj/6VhlALetWaJasCyDxBvX8b6pkuRcEebQEzHlLJP0= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32850 Cc: 32850@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 window-state-put has such deficiency with its undocumented > prerequisite that a new unique window should be created manually > before calling window-state-put to put the state into a new > window (to not share it with other window configurations). Maybe "to not share it with other frames" would be more precise. What you probably want is a facility to clone a window. I have no idea how to do that and which semantics to attach to a cloned window. Always keep in mind: Windows that have been deleted but go on "living" in stored configurations are zombies. And dealing with the undead can be cumbersome ... > This means a need in such ugly hack: > > ;; Create a new window > (delete-other-windows) (split-window) (delete-window) > ;; Put a previous state into the new window > ;; to not share it with other window configurations > (window-state-put previously-saved-window-state nil 'safe) > ;; Get its window configuration > (current-window-configuration) > > Please confirm is `(delete-other-windows) (split-window) (delete-window)' > is the right idiom to create a new window to put the window state into, > or there is a special function to create a window, that I can't find. You can put a window state into any valid window, usually the frame's root window. Just that under the hood 'window-state-put' will do the 'delete-other-windows' then. > The code above does the opposite, but it requires an ugly workaround > for window-state-put. Please elaborate. In which sense does that code make a configuration from a state? > Like the earlier code snippet demonstrates it causes problems when > the same window appears an arbitrary number of times in stored window > configurations. Thus the need to create a new window to put the state into > (currently window-state-put itself doesn't create a new unique window). I lost you. Anything Lisp code can do is create a new unique window. Lisp code cannot create a new non-unique window. martin From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 28 05:01:20 2018 Received: (at 32850) by debbugs.gnu.org; 28 Oct 2018 09:01:20 +0000 Received: from localhost ([127.0.0.1]:46658 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGgwi-0008Oc-77 for submit@debbugs.gnu.org; Sun, 28 Oct 2018 05:01:20 -0400 Received: from mout.gmx.net ([212.227.15.18]:52735) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGgwg-0008OP-4L for 32850@debbugs.gnu.org; Sun, 28 Oct 2018 05:01:18 -0400 Received: from [192.168.1.101] ([212.95.5.102]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MI4yc-1gIKq01FaY-003uKd; Sun, 28 Oct 2018 10:01:10 +0100 Received: from [192.168.1.101] ([212.95.5.102]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MI4yc-1gIKq01FaY-003uKd; Sun, 28 Oct 2018 10:01:10 +0100 Message-ID: <5BD57AD4.1090008@gmx.at> Date: Sun, 28 Oct 2018 10:01:08 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers References: <875zyrrhk8.fsf@mail.linkov.net> <5BAD2538.1060609@gmx.at> <871s9e1syw.fsf@mail.linkov.net> <5BB082A6.6040709@gmx.at> <87o9cepxfv.fsf@mail.linkov.net> <5BB1DC5D.2070903@gmx.at> <87ftxgqcx0.fsf@mail.linkov.net> <5BBC5C61.4090901@gmx.at> <87ftx79brv.fsf@mail.linkov.net> <5BC5A536.7020603@gmx.at> <87o9bqlu7y.fsf@mail.linkov.net> <5BC98A76.9070207@gmx.at> <87in1pltn3.fsf@mail.linkov.net> <5BD2C50E.2090508@gmx.at> <87lg6jysql.fsf@mail.linkov.net> In-Reply-To: <87lg6jysql.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:FlypEPT7xjNyAPMPRigbKhnx+A51HjkZ1tP0KXV9xZv8SZyh1qj vQMSREFe4/6tct4aMTbGZHqsbk8KMxap/3hGP4UR0V+R6do3GrP+XWLQW0mVueBA41Yc/AD YRsLjXxrAcgCgp+WGswJoLRnUEkcSvyYxC2BaZN9j7zVt5WfZVMzA1aBf5RweF2oo0Xf8+l TMG2npomocTWzYmWg/dOg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:ZkRQf86d2Og=:gjYLxZ4RJubdMgWMvZBhLd T63Kz5qyM2tAzbvYQ81OyR4fpOEXeDNzkw78WEYq18VE+cIeKW6tYKeYB4v5ovq/FtkWOhOr4 Pz7wL2lZzq+0fDG1AxoW8uUG7tqKDyD0l1JWsesfO1ZWS346MQb5rQNweRtaziHC2/XdOH0oG 9qsbMsJ3EQZfdLR63EhRXTaiGsch+c5M3YaqJzl9gipVOEQcMfHlNYCFr1T41t68zpvRp0Oa5 L89z2lCnCxuhoE3BGx+M5l/ukZjpTkAlfzr2mhQwwZ28hjVRxELBPIGgfCyKaGJT4S66U3zhp W9yDa2mT3/qnB0DxGlGXmP2bof9kO1ERmrBjhln5r/9+bLqQSvT8E/7hiQBKxt0NW34zA8d1i RqSj/Z/vTNbR/A3GhJHZSOdoihYnaLJQsin6q5zwJUyka3VAGFOUr55BuNPA461U0xKEhCkQM 9LsurpOo0KvzOACZxYFGetX5VqgbUSb6kfBcoIZfN43u2PFpxCH7b+EawQFdb3lp38Md8L/sF 3vFni6qWxcQIlW6dWkZi3v35M6ZjcDyGCFsaMXCMCi1+tSMg0ejC2Cym5E2f4hmfoSzjn34/K bIrvWO2F2wkHydMsZWE1ucwX/x3fFqLOL9c8PZeKsGDWLHo5Nqs6D7jwozj2Q9h0TsT5ThstG WOJwkcLPmSVHgNr81i3mcIz0SmvBOTHRvVbKeiFcjR4xzOyR85bhlYh3/yJxf4yZwJTfeY5c/ O6DTGCrhhtksz9901yRvFhxHjAX1AlRCGtG2Y9sTyTFoaFL6VLJWSChSC9WNPN0SZFJD+hlnY lQOGLeAiYW53KlL548kgjX5QvOinfyPE1MBe0v8iaBXUJwHLJ0= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32850 Cc: 32850@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 found a reproducible test case: > > 1. create and remember a window-configuration > > 2. switch to a different window-configuration > > 3. kill the buffer that was in prev-buffers of the > first window-configuration > > 4. restore the first window-configuration > > 5. look into its prev-buffers, it contains: > > (# # #) Hmmm... so even live windows can make troubles as soon as they are stored in a configuration. You have probably seen the tribulations of 'switch-to-prev-buffer' and 'switch-to-next-buffer' when they encounter a killed buffer in one of these lists. > 6. (window-state-get nil t) on the window with such prev-buffers > produces: > > (nil nil nil) > > I believe this patch should fix the problem: > > diff --git a/lisp/window.el b/lisp/window.el > index 27d7e42280..ad8164052f 100644 > --- a/lisp/window.el > +++ b/lisp/window.el > @@ -5552,9 +5552,14 @@ window--state-get-1 > (buffer (window-buffer window)) > (selected (eq window (selected-window))) > (next-buffers (when (window-live-p window) > - (window-next-buffers window))) > + (delq nil (mapcar (lambda (buffer) > + (and (buffer-live-p buffer) buffer)) > + (window-next-buffers window))))) > (prev-buffers (when (window-live-p window) > - (window-prev-buffers window))) > + (delq nil (mapcar (lambda (entry) > + (and (buffer-live-p (nth 0 entry)) > + entry)) > + (window-prev-buffers window))))) > (head > `(,type > ,@(unless (window-next-sibling window) `((last . t))) OK. Wouldn't 'window-state-put' run into a similar problem when a buffer in some prev or next list gets killed in between getting and putting? martin From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 28 15:40:22 2018 Received: (at 32850) by debbugs.gnu.org; 28 Oct 2018 19:40:22 +0000 Received: from localhost ([127.0.0.1]:49341 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGqv8-00052l-3a for submit@debbugs.gnu.org; Sun, 28 Oct 2018 15:40:22 -0400 Received: from gecko.birch.relay.mailchannels.net ([23.83.209.66]:43320) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGqv6-00052b-5n for 32850@debbugs.gnu.org; Sun, 28 Oct 2018 15:40:20 -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 7C5E25E240E; Sun, 28 Oct 2018 19:40:18 +0000 (UTC) Received: from pdx1-sub0-mail-a9.g.dreamhost.com (unknown [100.96.26.166]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 4974E5E26F3; Sun, 28 Oct 2018 19:40:18 +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:18 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Share-Ski: 7a85b17006564366_1540755618373_3986465006 X-MC-Loop-Signature: 1540755618373:3157298583 X-MC-Ingress-Time: 1540755618373 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 0EA137F790; Sun, 28 Oct 2018 12:40:18 -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=FwvR0IihTjxIkJrMQGydNhn/wA8=; b= lolmbgu8RLpdaFjXkvcv7NCzSoAAFHNepSwCML/ClwXKyBsPYmbboUYM7BnbDlyj WnMbLjlaQspej03RUZv0Cvq9S9mePlBpbLLTLPVoSMp7i8iNWy82zRQilUORbKk2 gyjfYyHGvQfStU2bYFGuCB8nMLB011oFYdVAi3iy6zs= 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 018357F788; Sun, 28 Oct 2018 12:40:15 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a9 From: Juri Linkov To: martin rudalics Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers Organization: LINKOV.NET References: <875zyrrhk8.fsf@mail.linkov.net> <5BAD2538.1060609@gmx.at> <871s9e1syw.fsf@mail.linkov.net> <5BB082A6.6040709@gmx.at> <87o9cepxfv.fsf@mail.linkov.net> <5BB1DC5D.2070903@gmx.at> <87ftxgqcx0.fsf@mail.linkov.net> <5BBC5C61.4090901@gmx.at> <87ftx79brv.fsf@mail.linkov.net> <5BC5A536.7020603@gmx.at> <87o9bqlu7y.fsf@mail.linkov.net> <5BC98A76.9070207@gmx.at> <87in1pltn3.fsf@mail.linkov.net> <5BD2C50E.2090508@gmx.at> <87lg6jysql.fsf@mail.linkov.net> <5BD57AD4.1090008@gmx.at> Date: Sun, 28 Oct 2018 21:09:15 +0200 In-Reply-To: <5BD57AD4.1090008@gmx.at> (martin rudalics's message of "Sun, 28 Oct 2018 10:01:08 +0100") Message-ID: <87in1m1dec.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: gggruggvucftvghtrhhoucdtuddrgedtkedrheeigddufedtucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdehrdduheegnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddthedrudehgedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgeptd X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 32850 Cc: 32850@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 (-) >> @@ -5552,9 +5552,14 @@ window--state-get-1 >> (buffer (window-buffer window)) >> (selected (eq window (selected-window))) >> (next-buffers (when (window-live-p window) >> - (window-next-buffers window))) >> + (delq nil (mapcar (lambda (buffer) >> + (and (buffer-live-p buffer) buffer)) >> + (window-next-buffers window))))) >> (prev-buffers (when (window-live-p window) >> - (window-prev-buffers window))) >> + (delq nil (mapcar (lambda (entry) >> + (and (buffer-live-p (nth 0 entry)) >> + entry)) >> + (window-prev-buffers window))))) >> (head >> `(,type >> ,@(unless (window-next-sibling window) `((last . t))) > > OK. Wouldn't 'window-state-put' run into a similar problem when a > buffer in some prev or next list gets killed in between getting and > putting? 'window-state-put' already checks for 'buffer-live-p', and checking for nil is not needed in 'window-state-put' after the patch above will protect against nil getting into the window state. From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 28 15:40:28 2018 Received: (at 32850) by debbugs.gnu.org; 28 Oct 2018 19:40:28 +0000 Received: from localhost ([127.0.0.1]:49344 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGqvE-000536-Cz for submit@debbugs.gnu.org; Sun, 28 Oct 2018 15:40:28 -0400 Received: from common.maple.relay.mailchannels.net ([23.83.214.38]:30142) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGqvC-00052y-QJ for 32850@debbugs.gnu.org; Sun, 28 Oct 2018 15:40:27 -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 71EC7502387; Sun, 28 Oct 2018 19:40:25 +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 3662D501A34; Sun, 28 Oct 2018 19:40:25 +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:25 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Battle-Reign: 57eebbbf3e833eb2_1540755625334_3371305255 X-MC-Loop-Signature: 1540755625334:2189969970 X-MC-Ingress-Time: 1540755625334 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 EA5B37F795; Sun, 28 Oct 2018 12:40:24 -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=ckwVdMxqei4sIrmDZsjOr4lYQhw=; b= Xqr8lszuSMcB0Cyj9TUitW/3khczfBPAlx/Q3czj4gZeY6aedcrjPajfFdg/p2ma CT9v0yJCCRWk1EeW/jrYzZ+BPTGEcHo0HdH+Sw6OzdpKFmNERfd5Qzh+PdWXvcJO TLod/XFyF6TTxQOJHZXYy4JAfv2deOOLqb4DOTFlKls= 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 000D67F794; Sun, 28 Oct 2018 12:40:22 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a9 From: Juri Linkov To: martin rudalics Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers Organization: LINKOV.NET References: <875zyrrhk8.fsf@mail.linkov.net> <87ftx79brv.fsf@mail.linkov.net> <5BC5A536.7020603@gmx.at> <8736t57jcs.fsf@mail.linkov.net> <5BC6E559.3090000@gmx.at> <87zhvcteuy.fsf@mail.linkov.net> <5BC83EE4.8030607@gmx.at> <87h8hig9uw.fsf@mail.linkov.net> <5BC98A5F.5050807@gmx.at> <87ftx0nvoi.fsf@mail.linkov.net> <5BCC374E.603@gmx.at> <87a7n7kz7x.fsf@mail.linkov.net> <5BCD935F.8030309@gmx.at> <87in1szirt.fsf@mail.linkov.net> <5BD03F21.6040807@gmx.at> <87lg6map8e.fsf@mail.linkov.net> <5BD15CE0.7080703@gmx.at> <87va5qf1ox.fsf@mail.linkov.net> <5BD2C4AD.3060402@gmx.at> <87r2gbb85y.fsf@mail.linkov.net> <5BD57AB5.2040105@gmx.at> Date: Sun, 28 Oct 2018 21:29:33 +0200 In-Reply-To: <5BD57AB5.2040105@gmx.at> (martin rudalics's message of "Sun, 28 Oct 2018 10:00:37 +0100") Message-ID: <87woq2xn22.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: gggruggvucftvghtrhhoucdtuddrgedtkedrheeigddufedvucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdehrdduheegnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddthedrudehgedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgeptd X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32850 Cc: 32850@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 (-) > What you probably want is a facility to clone a window. I have no > idea how to do that and which semantics to attach to a cloned window. I guess a cloned window implies the same state with a different identity. > You can put a window state into any valid window, usually the frame's > root window. I see no difference, still the same problem is that window-state-put doesn't create a new window: (let* ((orig-window (catch 'live (walk-window-subtree (lambda (window) (when (window-live-p window) (throw 'live window))) (frame-root-window (selected-frame))))) (orig-window-state (window-state-get (frame-root-window (selected-frame)) 'writable))) (window-state-put orig-window-state (frame-root-window (selected-frame)) 'safe) (eq orig-window (catch 'live (walk-window-subtree (lambda (window) (when (window-live-p window) (throw 'live window))) (frame-root-window (selected-frame)))))) returns t that indicates the problem. Thus such ugly hack is required to workaround this problem: (let* ((orig-window (catch 'live (walk-window-subtree (lambda (window) (when (window-live-p window) (throw 'live window))) (frame-root-window (selected-frame))))) (orig-window-state (window-state-get (frame-root-window (selected-frame)) 'writable))) ;; Hack alert! Create a new window (delete-other-windows) (split-window) (delete-window) (window-state-put orig-window-state (frame-root-window (selected-frame)) 'safe) (eq orig-window (catch 'live (walk-window-subtree (lambda (window) (when (window-live-p window) (throw 'live window))) (frame-root-window (selected-frame)))))) correctly returns nil. > Just that under the hood 'window-state-put' will do the > 'delete-other-windows' then. Now I see the root of this problem: it's because 'delete-other-windows' keeps one window and reuses it for the restored state. So a proper fix for 'window-state-put' should use a cloned window like you proposed. From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 29 04:44:06 2018 Received: (at 32850) by debbugs.gnu.org; 29 Oct 2018 08:44:07 +0000 Received: from localhost ([127.0.0.1]:49909 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gH39a-0002xt-KW for submit@debbugs.gnu.org; Mon, 29 Oct 2018 04:44:06 -0400 Received: from mout.gmx.net ([212.227.17.20]:50923) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gH39Y-0002xB-Ry for 32850@debbugs.gnu.org; Mon, 29 Oct 2018 04:44:05 -0400 Received: from [192.168.1.101] ([46.125.249.45]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MNZVG-1gEJKY1r1G-0079yy; Mon, 29 Oct 2018 09:43:56 +0100 Received: from [192.168.1.101] ([46.125.249.45]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MNZVG-1gEJKY1r1G-0079yy; Mon, 29 Oct 2018 09:43:56 +0100 Message-ID: <5BD6C848.3000701@gmx.at> Date: Mon, 29 Oct 2018 09:43:52 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers References: <875zyrrhk8.fsf@mail.linkov.net> <5BAD2538.1060609@gmx.at> <871s9e1syw.fsf@mail.linkov.net> <5BB082A6.6040709@gmx.at> <87o9cepxfv.fsf@mail.linkov.net> <5BB1DC5D.2070903@gmx.at> <87ftxgqcx0.fsf@mail.linkov.net> <5BBC5C61.4090901@gmx.at> <87ftx79brv.fsf@mail.linkov.net> <5BC5A536.7020603@gmx.at> <87o9bqlu7y.fsf@mail.linkov.net> <5BC98A76.9070207@gmx.at> <87in1pltn3.fsf@mail.linkov.net> <5BD2C50E.2090508@gmx.at> <87lg6jysql.fsf@mail.linkov.net> <5BD57AD4.1090008@gmx.at> <87in1m1dec.fsf@mail.linkov.net> In-Reply-To: <87in1m1dec.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:3rqjEu5YosfSCEL/URSDy0a2duc5bH+NIWVUunzSvRE9sfpCeGu 2zjzZ0CFX6SurdHbKzxpuoDTK9jUc/vFw95C8j+trxkT/mvqQJPEYF1GnqBxvPiC3YvU+ND sbs1Hv/R2/ZAD19ofQwnHhnep5mA5xUJdciCpEgojJM25AYROs1SQuU0XjY4l68AqipYzzc 8A6CrZAkYTFUj0r9jYuLg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:Jxivxmemo0U=:vi0WfFnXarklK0Qe5+93tE D3jXxjbJtfQ5GzqVXrg5Dp7vXmhaTpLuYEDDcf/YX0omHQGExpvvvP0viDiX9gLfOVewWpibq eRGikyg4yraCCVjbgUBii3bnKUypVkhEGK54OCSzIYFRMtenFMFfh+NuI20+bYXml/A9rxFBh iYu/5RSnsgJ7iLSLPCyztmXw4ifkV9v6F3BiceI1xZRzk8r6dipm0I0BIRZku/EO5wzPMDsdE PksLroyrxoj5TPV1+JioN39cMZqwPb9FMyrZRSSu9qo+RnaKSNtM1lyoOwaJind3T6wy4FjzP 8muh2WKH47gPS205HEGr8akmWT5iE+FfCIje6Cd1jsxYNNt24lwHwgtz0nZSacZ+J8Tt7Zdl7 R+bN9LqbNXfVrMr61HsiJ0oReDlyAKuqHsUbOjhLMtjTAcNyMgXhK3qjRI86ILNVQawUKEC/J BgNNvYgazcJmp4ggF6fg4F/rJD/TzAbkHy+sVeZeOoTMayJRiFVyCEYB9HadkUTT+YIk3XWhh PDHdRRV2gW4zJUSR110wek/jVwu2Mcv2nENJA2Q6Vn5Gaj9LTUvNGMONyslEmtZ91xSKGeGNb yONludZ+mXAQG85oLzQKdGCuy23V0RZEib2UQheTBMAETgwcuZ3khpxv4XATzdyWIyIjptz55 OJSIlBuf4VrIhVzXp3HAraFkHHlokAEiSS+rpjZd5JHXjWvFamqm1fdNGHUfSpKV0/Il0X25v D4z7E66zTTbdzPU60/4LZGDxnG8CgNOKCxClulKYKPY/a3hpz+BRhNUqyLd5tRJVl9hJan3aj 2jlTu9Zs094S09TkI7HvEof48+F3vtqQO01ED2VRhgyb/YdWMk= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32850 Cc: 32850@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 (-) > 'window-state-put' already checks for 'buffer-live-p', and checking for nil > is not needed in 'window-state-put' after the patch above will protect > against nil getting into the window state. OK. Install then. Thanks, martin From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 29 04:44:45 2018 Received: (at 32850) by debbugs.gnu.org; 29 Oct 2018 08:44:45 +0000 Received: from localhost ([127.0.0.1]:49912 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gH3AC-0002yk-W2 for submit@debbugs.gnu.org; Mon, 29 Oct 2018 04:44:45 -0400 Received: from mout.gmx.net ([212.227.17.22]:37373) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gH3AB-0002yW-2c for 32850@debbugs.gnu.org; Mon, 29 Oct 2018 04:44:43 -0400 Received: from [192.168.1.101] ([46.125.249.45]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LuKHz-1fXVuW09W3-011g0S; Mon, 29 Oct 2018 09:44:35 +0100 Received: from [192.168.1.101] ([46.125.249.45]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LuKHz-1fXVuW09W3-011g0S; Mon, 29 Oct 2018 09:44:35 +0100 Message-ID: <5BD6C86F.9030508@gmx.at> Date: Mon, 29 Oct 2018 09:44:31 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers References: <875zyrrhk8.fsf@mail.linkov.net> <87ftx79brv.fsf@mail.linkov.net> <5BC5A536.7020603@gmx.at> <8736t57jcs.fsf@mail.linkov.net> <5BC6E559.3090000@gmx.at> <87zhvcteuy.fsf@mail.linkov.net> <5BC83EE4.8030607@gmx.at> <87h8hig9uw.fsf@mail.linkov.net> <5BC98A5F.5050807@gmx.at> <87ftx0nvoi.fsf@mail.linkov.net> <5BCC374E.603@gmx.at> <87a7n7kz7x.fsf@mail.linkov.net> <5BCD935F.8030309@gmx.at> <87in1szirt.fsf@mail.linkov.net> <5BD03F21.6040807@gmx.at> <87lg6map8e.fsf@mail.linkov.net> <5BD15CE0.7080703@gmx.at> <87va5qf1ox.fsf@mail.linkov.net> <5BD2C4AD.3060402@gmx.at> <87r2gbb85y.fsf@mail.linkov.net> <5BD57AB5.2040105@gmx.at> <87woq2xn22.fsf@mail.linkov.net> In-Reply-To: <87woq2xn22.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:rb2GHW6vuMmj92O+EupEiCWM37EOGjVOuVRIl0kzWU6jKiQEpVc +nuziTsuODuCYJPT0FexfeihlMusIpSvT7QfNidakSVfFVlZUjOdCS+6GnRJtLyJLN37JLh h83DD6f4HRg/1yeTzQLUQ2EO9uRLfXDv09S8QJB0Ae4bMfMn26Pv/8HYpanSMdku830ZGG8 WjeEULwJf2skDbvgb8Jeg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:4u97AwNqLdg=:3K3YL4mwWxpH0lNVeeezeg JOrGL3qvAEHBMgMIhjloIzYuGXefqoDUqalNDZEePx3b1OX2LZsrNfGFWd5dEtMiQgVE02Fto 1/vFdEDAgDaLOKdQCL3NVgtdZxEHYadTvUNwEAwyWySzdzWV54AdRr7e3pxPg9HPfscgrAgQc xbW7rUM2CQKEy2Kowr9WprXp4NdHDxwawYnm2+8DQY9mFZZ4EtLkfRY8aOR2CkZQJlD4Jm8Ud VB6kam3WEvPpu5JkXj2hGHxJN9aLrvMZzZkGKhlduoMCxwfcTvUdJs9EXybTLjj2z8LxSXDVk uOUtK69nhNNDYFmI1F/f3TkV+aqsRN7WqltU32SLYjRDZvrjf5wlM9eXMMGaSUb/OE75DZKJQ izI5c3R7rTI3j2l90de+Lsa6Hr993ic/NPqrwrKx8TDBl2iEdvSOXK90ekgpOY/3kMxLjvoV1 LVZH6QJZ0tGAtVOm4GWqjt0FFXHfzu1y9wVM9mCjWGeysksuRvE2GXo6GtCP0PIeTlEaPoDpj nPrDKonM2VfRVdX0VdXv9Cr+8uX+1n9JGacsev1N6JDUIuCvmI4ynEDVBTuJQg7qHPXfcemQl +8CwU2KIARp6kNtrNCSM+upqAoOvOOdfu6OJ2fIiIbGDAaEgK9enVYt0vIL6nd6rfTsoHU8I3 /fZ7o4Tj+jMvVBEibuGij+fNqC/oi/KYy0jjEuV9yBKy8JHV2uOjjTRfMlZFvsKUfEwJZKfOe pG3/AfKnfwpsxeEUi6xIpQ8xiKrpuS0yKPwKBpPPacld6vjoRGZv1EzpU9UBgR3gDJv1ewabt RsCQRigIrXdOA8/RRN1IKb/TMUmoBZ7vyW1Bwyzdksq1PGfaS4= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32850 Cc: 32850@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 you probably want is a facility to clone a window. I have no >> idea how to do that and which semantics to attach to a cloned window. > > I guess a cloned window implies the same state with a different > identity. A different window object, hence. > Now I see the root of this problem: it's because 'delete-other-windows' > keeps one window and reuses it for the restored state. There's no reasonable way to avoid that - each frame needs a live root window. > So a proper fix for 'window-state-put' should use a cloned window > like you proposed. Couldn't we work around this problem some other way? Pumping up the window's sequence number, for example? Adding a function that replaces the live root window of a frame with a different object is somewhat ludicrous. martin From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 29 18:53:25 2018 Received: (at 32850) by debbugs.gnu.org; 29 Oct 2018 22:53:25 +0000 Received: from localhost ([127.0.0.1]:52298 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHGPT-0004mp-M6 for submit@debbugs.gnu.org; Mon, 29 Oct 2018 18:53:23 -0400 Received: from gorilla.birch.relay.mailchannels.net ([23.83.209.75]:56527) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHGPQ-0004mc-PP for 32850@debbugs.gnu.org; Mon, 29 Oct 2018 18:53:22 -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 13931121BB5; Mon, 29 Oct 2018 22:53:19 +0000 (UTC) Received: from pdx1-sub0-mail-a54.g.dreamhost.com (unknown [100.96.35.77]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id CA0221227B8; Mon, 29 Oct 2018 22:53:18 +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:19 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Power-Industry: 07c7791061fbf8b5_1540853598898_2916887156 X-MC-Loop-Signature: 1540853598898:2696961178 X-MC-Ingress-Time: 1540853598898 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 874838082B; Mon, 29 Oct 2018 15:53:18 -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=ePBmv3jDjnTO8uv6TpQqGnhkPPk=; b= KuCjgRHbPhaP3wFy7nEbgId5F59AxIET9P1DlXj4Fm9E8+3OukQrGcJ43yBI8kvN wb9gn4et2QOtxcoaOcJzuLdcczbMruAMISKXlXe24jpfFjsya/q1+yV7M4onUvWr 3JbdeM5THzTUKJPIjJalHT8Lto48X2biR5HrDX/xl7U= 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 989AC80831; Mon, 29 Oct 2018 15:53:15 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a54 From: Juri Linkov To: martin rudalics Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers Organization: LINKOV.NET References: <875zyrrhk8.fsf@mail.linkov.net> <8736t57jcs.fsf@mail.linkov.net> <5BC6E559.3090000@gmx.at> <87zhvcteuy.fsf@mail.linkov.net> <5BC83EE4.8030607@gmx.at> <87h8hig9uw.fsf@mail.linkov.net> <5BC98A5F.5050807@gmx.at> <87ftx0nvoi.fsf@mail.linkov.net> <5BCC374E.603@gmx.at> <87a7n7kz7x.fsf@mail.linkov.net> <5BCD935F.8030309@gmx.at> <87in1szirt.fsf@mail.linkov.net> <5BD03F21.6040807@gmx.at> <87lg6map8e.fsf@mail.linkov.net> <5BD15CE0.7080703@gmx.at> <87va5qf1ox.fsf@mail.linkov.net> <5BD2C4AD.3060402@gmx.at> <87r2gbb85y.fsf@mail.linkov.net> <5BD57AB5.2040105@gmx.at> <87woq2xn22.fsf@mail.linkov.net> <5BD6C86F.9030508@gmx.at> Date: Tue, 30 Oct 2018 00:45:25 +0200 In-Reply-To: <5BD6C86F.9030508@gmx.at> (martin rudalics's message of "Mon, 29 Oct 2018 09:44:31 +0100") Message-ID: <878t2g74oq.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: gggruggvucftvghtrhhoucdtuddrgedtkedrheelgddtfecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddtuddrudehjeenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutddurdduheejpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtoheprhhuuggrlhhitghssehgmhigrdgrthenucevlhhushhtvghrufhiiigvpedu X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32850 Cc: 32850@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 a proper fix for 'window-state-put' should use a cloned window >> like you proposed. > > Couldn't we work around this problem some other way? I proposed one workaround: (delete-other-windows) (split-window) (delete-window) > Pumping up the window's sequence number, for example? What will 'eq' return on windows with different sequence numbers? From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 30 05:00:35 2018 Received: (at 32850) by debbugs.gnu.org; 30 Oct 2018 09:00:35 +0000 Received: from localhost ([127.0.0.1]:53289 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHPt4-0003PA-Rx for submit@debbugs.gnu.org; Tue, 30 Oct 2018 05:00:35 -0400 Received: from mout.gmx.net ([212.227.15.15]:39985) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHPt3-0003IN-6c for 32850@debbugs.gnu.org; Tue, 30 Oct 2018 05:00:33 -0400 Received: from [192.168.1.101] ([213.162.73.177]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Lvkwm-1fU8723cxo-017Vbu; Tue, 30 Oct 2018 10:00:24 +0100 Received: from [192.168.1.101] ([213.162.73.177]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Lvkwm-1fU8723cxo-017Vbu; Tue, 30 Oct 2018 10:00:24 +0100 Message-ID: <5BD81DA2.4020003@gmx.at> Date: Tue, 30 Oct 2018 10:00:18 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers References: <875zyrrhk8.fsf@mail.linkov.net> <8736t57jcs.fsf@mail.linkov.net> <5BC6E559.3090000@gmx.at> <87zhvcteuy.fsf@mail.linkov.net> <5BC83EE4.8030607@gmx.at> <87h8hig9uw.fsf@mail.linkov.net> <5BC98A5F.5050807@gmx.at> <87ftx0nvoi.fsf@mail.linkov.net> <5BCC374E.603@gmx.at> <87a7n7kz7x.fsf@mail.linkov.net> <5BCD935F.8030309@gmx.at> <87in1szirt.fsf@mail.linkov.net> <5BD03F21.6040807@gmx.at> <87lg6map8e.fsf@mail.linkov.net> <5BD15CE0.7080703@gmx.at> <87va5qf1ox.fsf@mail.linkov.net> <5BD2C4AD.3060402@gmx.at> <87r2gbb85y.fsf@mail.linkov.net> <5BD57AB5.2040105@gmx.at> <87woq2xn22.fsf@mail.linkov.net> <5BD6C86F.9030508@gmx.at> <878t2g74oq.fsf@mail.linkov.net> In-Reply-To: <878t2g74oq.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:qkb0HPzznrC2VgV18JvCesyJlisoVjeVPB+VLL2AwA9k6rtsHcv xY1e0OkWSNoEpW7t/+zxyFrxDzQOu6AmqcGyxXJFyvaPpPbin/wtl988K7Ruy0pcH1GrHdd HszQ5Kg7iuBRDYvZMj0zM8zRcobCqS1Tuc/8rtO+MATHVD05fPd9WD9iD7dYPyOMOhN0Qqn ALu0jHlWNH4qAL4w6Xbxg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:0BHPi5Xlw7s=:Jpy/2/ppdi29O48J1jJXrv Ozc8/QYjs9cMpQbCaccrfeBsfnefRA8On7q3VIAYDuK8ba4+tjVCEGP6xbFhFsqzr/XwYrUjo ktKx8LU+4omZDVQEUMAsSc38EYefhXVCK1amMEys7MWFyS4iJ0TmwZvKo2S6UHasQ/Xwni+4u N2iZVb9NlQ9XLmqqdDUK2O6i+sWzkokzP5N73Ov6t2HUi+6w774CKFgfhHlowYoK7VK5dv2dc sItPj1DtvVeHAA869Q9DBrcD6l6++zpwTE/FRrLjMXv3aGw4KWpfKFz4yODKTA3hx/MipD9P7 +q2PflRe+2jYJCwHeAvZuRKUDxD5QtyclCCVJRphalYc+P8hdWTZGkEEie6PnBhxO8VByVu5t f4jQqX1VwvokOQKMql8b8eyAPj7W0wqMFO5WW0HHdnNSSjQgRYh/WwBWIQ/JiiWnr4QShrE5s jgl5mfm174iBsPU1G7Wxizvn6TnVR9aR8QE/4UDKwcfwe5760qYbDOS8sF1MqiipCvoeK7+wK xDQRflGasodEthl0ggagS3PeYbDlj0MFguqRmYhAEvsIPasUGLZBQPf92AIqUpKnBcw2OaE2v N3bP3ecuEiGfdQBC5351YelC7hUpKTxwa/1FuBW02Tz3jrn/jVebhizJK+yk7dMlx4ujuwobd 2fHYPYcMmGzdw/u+N/HHbFxcg6W+5oN8iAsVplckAbiKOSiVY6fJ/x1dEakaVC2CrhRhqUCec BQ+D8r0FyirRckdxWaL+16WI+wP/+2Kcg9JgKWeH1CsRCx0TkyesyiM0imE9ti2glIcyPAqmC 5Of0a6AE41yDF70uZJU+DimekJZrFzDNSb2i1v+sLoM8T+0Qyw= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32850 Cc: 32850@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 proposed one workaround: > > (delete-other-windows) (split-window) (delete-window) OK. If we document it sufficiently, let's use that. >> Pumping up the window's sequence number, for example? > > What will 'eq' return on windows with different sequence numbers? t if it is the same window object. I obviously meant the caller to check the sequence number in addition to 'eq'. martin From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 30 17:53:24 2018 Received: (at 32850) by debbugs.gnu.org; 30 Oct 2018 21:53:24 +0000 Received: from localhost ([127.0.0.1]:55971 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHbwy-0000yD-6F for submit@debbugs.gnu.org; Tue, 30 Oct 2018 17:53:24 -0400 Received: from glow.birch.relay.mailchannels.net ([23.83.209.71]:31479) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHbwt-0000y1-VJ for 32850@debbugs.gnu.org; Tue, 30 Oct 2018 17:53:22 -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 819A842AE8; Tue, 30 Oct 2018 21:53:18 +0000 (UTC) Received: from pdx1-sub0-mail-a74.g.dreamhost.com (unknown [100.96.19.78]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 1783742AFA; Tue, 30 Oct 2018 21:53:18 +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:18 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Invention-Shelf: 2561df156a313d04_1540936398241_3224993933 X-MC-Loop-Signature: 1540936398240:2955467360 X-MC-Ingress-Time: 1540936398240 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 D68DC80ACE; Tue, 30 Oct 2018 14:53:17 -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=Y7blQghwbXMaTCa96sUJ3dFGqt0=; b= ZQgFfRrUcwyX7i/GdEynAOWJaF+o+dIBt0GS3AR8C1aSP5s/xpJSX10CMSWupa8w 3LNujHYgUxnTu03d4/3Ds906hj9oD1PhqXxhv//e1x2QcgB0tZQUIn+6XLv6H62x gxJAu7kqTx6KMMMmpcqLoOXl0CoXqlR+88xFtMaTa6M= 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 4108F80AD7; Tue, 30 Oct 2018 14:53:15 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a74 From: Juri Linkov To: martin rudalics Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers Organization: LINKOV.NET References: <875zyrrhk8.fsf@mail.linkov.net> <87zhvcteuy.fsf@mail.linkov.net> <5BC83EE4.8030607@gmx.at> <87h8hig9uw.fsf@mail.linkov.net> <5BC98A5F.5050807@gmx.at> <87ftx0nvoi.fsf@mail.linkov.net> <5BCC374E.603@gmx.at> <87a7n7kz7x.fsf@mail.linkov.net> <5BCD935F.8030309@gmx.at> <87in1szirt.fsf@mail.linkov.net> <5BD03F21.6040807@gmx.at> <87lg6map8e.fsf@mail.linkov.net> <5BD15CE0.7080703@gmx.at> <87va5qf1ox.fsf@mail.linkov.net> <5BD2C4AD.3060402@gmx.at> <87r2gbb85y.fsf@mail.linkov.net> <5BD57AB5.2040105@gmx.at> <87woq2xn22.fsf@mail.linkov.net> <5BD6C86F.9030508@gmx.at> <878t2g74oq.fsf@mail.linkov.net> <5BD81DA2.4020003@gmx.at> Date: Tue, 30 Oct 2018 23:23:29 +0200 In-Reply-To: <5BD81DA2.4020003@gmx.at> (martin rudalics's message of "Tue, 30 Oct 2018 10:00:18 +0100") Message-ID: <87k1lzruwe.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: gggruggvucftvghtrhhoucdtuddrgedtkedriedtgdduhedvucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutddurdduheejnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtuddrudehjedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgepud X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 32850 Cc: 32850@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 (-) >> (delete-other-windows) (split-window) (delete-window) > > OK. If we document it sufficiently, let's use that. I thought it's ugly. But if there is no other way: diff --git a/lisp/window.el b/lisp/window.el index bcd4fa2959..9fdf005202 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -5898,20 +5898,12 @@ window-state-put windows can get as small as `window-safe-min-height' and `window-safe-min-width'." (setq window-state-put-stale-windows nil) - (setq window (window-normalize-window window)) - ;; When WINDOW is internal, reduce it to a live one to put STATE into, - ;; see Bug#16793. + ;; When WINDOW is internal or nil, create a new window. (unless (window-live-p window) - (let ((root window)) - (setq window (catch 'live - (walk-window-subtree - (lambda (window) - (when (and (window-live-p window) - (not (window-parameter window 'window-side))) - (throw 'live window))) - root))) - (delete-other-windows-internal window root))) + (delete-other-windows) + (setq window (split-window)) + (delete-window)) (set-window-dedicated-p window nil) From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 31 04:11:49 2018 Received: (at 32850) by debbugs.gnu.org; 31 Oct 2018 08:11:49 +0000 Received: from localhost ([127.0.0.1]:56230 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHlbR-00036V-0G for submit@debbugs.gnu.org; Wed, 31 Oct 2018 04:11:49 -0400 Received: from mout.gmx.net ([212.227.15.19]:33263) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHlbP-00036J-OR for 32850@debbugs.gnu.org; Wed, 31 Oct 2018 04:11:48 -0400 Received: from [192.168.1.101] ([213.162.73.82]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MXZbS-1g68MB3m7S-00WWuL; Wed, 31 Oct 2018 09:11:38 +0100 Received: from [192.168.1.101] ([213.162.73.82]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MXZbS-1g68MB3m7S-00WWuL; Wed, 31 Oct 2018 09:11:38 +0100 Message-ID: <5BD963B3.3080800@gmx.at> Date: Wed, 31 Oct 2018 09:11:31 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers References: <875zyrrhk8.fsf@mail.linkov.net> <87zhvcteuy.fsf@mail.linkov.net> <5BC83EE4.8030607@gmx.at> <87h8hig9uw.fsf@mail.linkov.net> <5BC98A5F.5050807@gmx.at> <87ftx0nvoi.fsf@mail.linkov.net> <5BCC374E.603@gmx.at> <87a7n7kz7x.fsf@mail.linkov.net> <5BCD935F.8030309@gmx.at> <87in1szirt.fsf@mail.linkov.net> <5BD03F21.6040807@gmx.at> <87lg6map8e.fsf@mail.linkov.net> <5BD15CE0.7080703@gmx.at> <87va5qf1ox.fsf@mail.linkov.net> <5BD2C4AD.3060402@gmx.at> <87r2gbb85y.fsf@mail.linkov.net> <5BD57AB5.2040105@gmx.at> <87woq2xn22.fsf@mail.linkov.net> <5BD6C86F.9030508@gmx.at> <878t2g74oq.fsf@mail.linkov.net> <5BD81DA2.4020003@gmx.at> <87k1lzruwe.fsf@mail.linkov.net> In-Reply-To: <87k1lzruwe.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:hG8aVPAAaX7lIoWVj2/k3pYsYBJvq6UNaEthPgCE0z57qlXzVjk M7HgpVuNmx8XaBkOhCo0LQBPVQYTslPUKxQdrREuGawGBBoVDSTLT0k8bqtDzFO4j6RNVxY XTxQb4tjESRaBCrecm6XRHdHZr1TsVGGSZwFtiu6Tus1IachK+iESqfRmtrwEm7Wek+kcY+ RVXpOPuotQNUBCpaJ5B3Q== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:pCusgWixVT8=:Vqx1rHgNAPYfj6uxX7IC6B +KSeUGDRigIohd7CTNvntHpvwBKxKpECnUgCukOn0P0nAxDQm6DMwDwLbTze+5XihUDws9Hdd hcYjLBYS2tGanME3DYj5LQTFqyY12xSv8gtY1FZjLSdLSJUQ2C1W5BZd2EbL1/b407U0+1cok iZOKyPViNCmXrV9l4CInh2XY7X2YGNVQsXGDunXmLp44EmWTYxksQHxVR5hRH8qvrEEfPFZd7 wZM1tTgpS4Lm+Qc6S813ybnRIgESb1Z4ZBXU+boL0SeIhEJTwgtkpRQgyTpI5QT9Q9Q7A4GTG ZzxF53AM2bnW93Qajy+UfmGacfxvJir2C2C+Ch2V0L06J0GwwhWB+8clmMvVWvLSoyPO/EivX t6Z2q/3c/fbvjpOtTi1dV2+O4mK+/oWy0Fh31QQIfbwUq/Mfsi02HHkiFPb0mYKMAiaP9qhnX cVOSqNK5k6bf17zOyIW7zdqDVNiSQ01hHq55iXU3QQnyg0foX5EcYpbxJInE91+8mFCisYw7Q mkEAhWYNibiluoy5rjhH8jYpJQJ8ixOxKh6VRyrOJ2HyMOmVpoC0vtex0YxWN/kq7JmwaeXpB Z7u3wEQSPQRLFUwp29NFSee7dgTVhsTwMjnwo9yM1SofhIAo08vMfs8pJ0XFG73KjJJ177zY7 Jfb0T9Liz8hQVW3GBD9b32+8lHyd0TDZ6O4fgKIZyqmBmbaHku4qa+op7ofGEcpIu2VrRYkqr lR8fWQZabIUdZxqsaZvKVNdpLQ1SNdsIZGQZhk6vIhS2lsaVE+mbM5Q9FomH3pgpxQDbzbwvK 1YKS/up8JaQ2W2vxHwrkcVZdsn10QUlG2Vhy6N2RD/UOISzjnA= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32850 Cc: 32850@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 (-) >>> (delete-other-windows) (split-window) (delete-window) >> >> OK. If we document it sufficiently, let's use that. > > I thought it's ugly. But if there is no other way: It's very ugly. > diff --git a/lisp/window.el b/lisp/window.el > index bcd4fa2959..9fdf005202 100644 > --- a/lisp/window.el > +++ b/lisp/window.el > @@ -5898,20 +5898,12 @@ window-state-put > windows can get as small as `window-safe-min-height' and > `window-safe-min-width'." > (setq window-state-put-stale-windows nil) > - (setq window (window-normalize-window window)) > > - ;; When WINDOW is internal, reduce it to a live one to put STATE into, > - ;; see Bug#16793. > + ;; When WINDOW is internal or nil, create a new window. > (unless (window-live-p window) > - (let ((root window)) > - (setq window (catch 'live > - (walk-window-subtree > - (lambda (window) > - (when (and (window-live-p window) > - (not (window-parameter window 'window-side))) > - (throw 'live window))) > - root))) > - (delete-other-windows-internal window root))) So you want to elide this part because 'delete-other-windows' below handles it? But the latter respects the 'no-delete-other-windows' parameter too which might be unwanted in the state putting mechanism. > + (delete-other-windows) > + (setq window (split-window)) > + (delete-window)) martin From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 31 17:36:42 2018 Received: (at 32850) by debbugs.gnu.org; 31 Oct 2018 21:36:42 +0000 Received: from localhost ([127.0.0.1]:57512 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHyAL-0007SU-Uu for submit@debbugs.gnu.org; Wed, 31 Oct 2018 17:36:42 -0400 Received: from glass.birch.relay.mailchannels.net ([23.83.209.70]:21452) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHyAF-0007S4-T6 for 32850@debbugs.gnu.org; Wed, 31 Oct 2018 17:36:36 -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 761673E33CE; Wed, 31 Oct 2018 21:36:34 +0000 (UTC) Received: from pdx1-sub0-mail-a37.g.dreamhost.com (unknown [100.96.36.160]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 2C2683E2EBA; Wed, 31 Oct 2018 21:36:34 +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:34 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Society-Sponge: 6570604f7e551737_1541021794289_2278226604 X-MC-Loop-Signature: 1541021794289:3603967128 X-MC-Ingress-Time: 1541021794288 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 E091A7FE49; Wed, 31 Oct 2018 14:36:33 -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=Med0iLYXuwv4O4yftq27MTIVPOw=; b= MRXA+jzPD3DMoWGUCBiY9h0qy6XlkDlvdBVTuR2LzYwII1/0TV/1HDSfa5qceX7S vwIjgiRvLIXAYN/pnmOzNu0GNekDRBhC67+oyKyyrGG2UHh9LNt6SWHvn3enwmbS TXQQmSQgZyjejQdLd20WBEmmnFshQ3+DKNblEDnZ7lc= 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 C5B267FE55; Wed, 31 Oct 2018 14:36:32 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a37 From: Juri Linkov To: martin rudalics Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers Organization: LINKOV.NET References: <875zyrrhk8.fsf@mail.linkov.net> <87h8hig9uw.fsf@mail.linkov.net> <5BC98A5F.5050807@gmx.at> <87ftx0nvoi.fsf@mail.linkov.net> <5BCC374E.603@gmx.at> <87a7n7kz7x.fsf@mail.linkov.net> <5BCD935F.8030309@gmx.at> <87in1szirt.fsf@mail.linkov.net> <5BD03F21.6040807@gmx.at> <87lg6map8e.fsf@mail.linkov.net> <5BD15CE0.7080703@gmx.at> <87va5qf1ox.fsf@mail.linkov.net> <5BD2C4AD.3060402@gmx.at> <87r2gbb85y.fsf@mail.linkov.net> <5BD57AB5.2040105@gmx.at> <87woq2xn22.fsf@mail.linkov.net> <5BD6C86F.9030508@gmx.at> <878t2g74oq.fsf@mail.linkov.net> <5BD81DA2.4020003@gmx.at> <87k1lzruwe.fsf@mail.linkov.net> <5BD963B3.3080800@gmx.at> Date: Wed, 31 Oct 2018 23:25:20 +0200 In-Reply-To: <5BD963B3.3080800@gmx.at> (martin rudalics's message of "Wed, 31 Oct 2018 09:11:31 +0100") Message-ID: <877ehx95bz.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: 32850 Cc: 32850@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 you want to elide this part because 'delete-other-windows' below > handles it? But the latter respects the 'no-delete-other-windows' > parameter too which might be unwanted in the state putting mechanism. Then is this right? diff --git a/lisp/window.el b/lisp/window.el index bcd4fa2959..346096c2f8 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -5898,20 +5898,12 @@ window-state-put windows can get as small as `window-safe-min-height' and `window-safe-min-width'." (setq window-state-put-stale-windows nil) - (setq window (window-normalize-window window)) - ;; When WINDOW is internal, reduce it to a live one to put STATE into, - ;; see Bug#16793. + ;; When WINDOW is internal or nil, create a new window. (unless (window-live-p window) - (let ((root window)) - (setq window (catch 'live - (walk-window-subtree - (lambda (window) - (when (and (window-live-p window) - (not (window-parameter window 'window-side))) - (throw 'live window))) - root))) - (delete-other-windows-internal window root))) + (delete-other-windows-internal) + (setq window (split-window)) + (delete-window)) (set-window-dedicated-p window nil) From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 01 05:03:51 2018 Received: (at 32850) by debbugs.gnu.org; 1 Nov 2018 09:03:51 +0000 Received: from localhost ([127.0.0.1]:57728 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gI8tK-0003GA-No for submit@debbugs.gnu.org; Thu, 01 Nov 2018 05:03:50 -0400 Received: from mout.gmx.net ([212.227.17.20]:51351) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gI8tI-0003Fq-LE for 32850@debbugs.gnu.org; Thu, 01 Nov 2018 05:03:49 -0400 Received: from [192.168.1.101] ([46.125.250.45]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MgGDK-1fweGQ2r6U-00NfRw; Thu, 01 Nov 2018 10:03:40 +0100 Received: from [192.168.1.101] ([46.125.250.45]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MgGDK-1fweGQ2r6U-00NfRw; Thu, 01 Nov 2018 10:03:40 +0100 Message-ID: <5BDAC163.10606@gmx.at> Date: Thu, 01 Nov 2018 10:03:31 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers References: <875zyrrhk8.fsf@mail.linkov.net> <87h8hig9uw.fsf@mail.linkov.net> <5BC98A5F.5050807@gmx.at> <87ftx0nvoi.fsf@mail.linkov.net> <5BCC374E.603@gmx.at> <87a7n7kz7x.fsf@mail.linkov.net> <5BCD935F.8030309@gmx.at> <87in1szirt.fsf@mail.linkov.net> <5BD03F21.6040807@gmx.at> <87lg6map8e.fsf@mail.linkov.net> <5BD15CE0.7080703@gmx.at> <87va5qf1ox.fsf@mail.linkov.net> <5BD2C4AD.3060402@gmx.at> <87r2gbb85y.fsf@mail.linkov.net> <5BD57AB5.2040105@gmx.at> <87woq2xn22.fsf@mail.linkov.net> <5BD6C86F.9030508@gmx.at> <878t2g74oq.fsf@mail.linkov.net> <5BD81DA2.4020003@gmx.at> <87k1lzruwe.fsf@mail.linkov.net> <5BD963B3.3080800@gmx.at> <877ehx95bz.fsf@mail.linkov.net> In-Reply-To: <877ehx95bz.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:lAg4gUWSdGpAWstDmMYqaLMCQJDJv8gVLHk42gJcRujeecq3Bk5 bOWHnRAoqcNhLLLleY0WJ1ubFNc4aBYqDzjl95MXLVqA+DOuEQNEOBclM1E+Ax64D6hJyVB 1JXxMq5ssAR9cogA/v4jKnuv25uhV3+HHOt4OMlYgCf3fm94x90M8OuejPu9/cmVCk4LaOX kT8nx8nCOxabuiBMIX2nw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:wIotPttwdjY=:x8DZXgqFabNPe3dWVZu5QL EOmbv4gRJI4moeFrsXgBEk5DQy83J/6/DxCTuvLqCIjABI4C/bBKWJSjA/B52x27RJXlToHR+ bGy576h2Ry0rksukyLKVTZ/vzSQs2OcOLuAYqAXzQ7So5Ab5R1nZ5+M8NpTXjTHmz0YZcFbN2 gPSMzXHCKfepH3+YKVIXkrlBPU8LLnTiCEf8PCTHcGiUPHmeuE8QtfY2aFwnp6E+AJes4TE9B SWgoF+GdFHjyvybNjAWdW+eVWYcjX97vysF387VPKEW0ZXoGr1/4HM0LikBwHJDTcfDupiWwg 8EulCmsa+z+IVoCC0vMgP1GmAIUTDFtwkHbqFFapGHb1eOGSzxDjVkr+7L9z/ELuG2XFbHoE0 AhoZf/fUtg6ddB5KBIvTwl1zUwNxD5QbH7MfLb/D++4NInmxdzRLpFyG8omuNwV7hOpaUnbku RtMMJJXAwJR1Y2Uib8pwTFpREDOPsetDD75CfF4IdIETSouC6CzyeXtT6VqSuQdntzSJ8SaCQ M8qkLhQi6kfyuKO4w8TJ2ayxpTCTMLfMmXhkf57+6fMDkPu/iyjOj/rV+COtRQKlNCpQuGVHr HDIOO10d03ixwXxEbHzlup2VqDJ2S+fnoNvTHPz+gALcY6cAnHBY77FSjHDF1c4XPMQCA1yRr L09R3k77NnDQd/o81TarGpxy6RZCv+a5KrETtTgOcgxYXdZt26Nks8BW3r9gPgsNzjKgTn6jm ZPhsTYOKc6svDZyFFYTh6aSw36q81X2+7pJNhp1eKx4XHqMBDRZm30F+oTj1QQagrbdy9OZBn BqpvTrOdD4GJxLXd2RfbxJ4tyYSJFtSwrES7Kf4KBJBCkwLErkd5xlfVWLKmVaZqspEV55Hze 27Dga9YHzIGkkl8YOcYgLABQ3CxpVzJTx8m+/okM/j/TerxU3a6FT5qw5Hy1tG X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32850 Cc: 32850@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 is this right? > > diff --git a/lisp/window.el b/lisp/window.el > index bcd4fa2959..346096c2f8 100644 > --- a/lisp/window.el > +++ b/lisp/window.el > @@ -5898,20 +5898,12 @@ window-state-put > windows can get as small as `window-safe-min-height' and > `window-safe-min-width'." > (setq window-state-put-stale-windows nil) > - (setq window (window-normalize-window window)) > > - ;; When WINDOW is internal, reduce it to a live one to put STATE into, > - ;; see Bug#16793. > + ;; When WINDOW is internal or nil, create a new window. > (unless (window-live-p window) > - (let ((root window)) > - (setq window (catch 'live > - (walk-window-subtree > - (lambda (window) > - (when (and (window-live-p window) > - (not (window-parameter window 'window-side))) > - (throw 'live window))) > - root))) > - (delete-other-windows-internal window root))) > + (delete-other-windows-internal) > + (setq window (split-window)) > + (delete-window)) > > (set-window-dedicated-p window nil) What would be bad about leaving most of that code in place and just adding the > + (setq window (split-window)) > + (delete-window)) ugliness? martin From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 01 18:46:36 2018 Received: (at 32850) by debbugs.gnu.org; 1 Nov 2018 22:46:36 +0000 Received: from localhost ([127.0.0.1]:59009 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gILjY-0006Rl-6z for submit@debbugs.gnu.org; Thu, 01 Nov 2018 18:46:36 -0400 Received: from indri.birch.relay.mailchannels.net ([23.83.209.92]:4395) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gILjW-0006Ra-F9 for 32850@debbugs.gnu.org; Thu, 01 Nov 2018 18:46:35 -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 CC7C95E3299; Thu, 1 Nov 2018 22:46:32 +0000 (UTC) Received: from pdx1-sub0-mail-a35.g.dreamhost.com (unknown [100.96.19.78]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 9AEE65E2C9C; Thu, 1 Nov 2018 22:46:32 +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:32 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Shoe-Glossy: 5a2b9e8d60b7b370_1541112392709_3155247870 X-MC-Loop-Signature: 1541112392709:2602537060 X-MC-Ingress-Time: 1541112392708 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 641C67ED3A; Thu, 1 Nov 2018 15:46: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=RRnt65a8pyGF1hkWbkT6BZst2mM=; b= tpw8HHZm4PipqqnOPWR3QIdGA6nrZEik5fXl3Zqqwqc6vA53VWcXdM6rXldyTdOR 8mOLVazPYHUskbFSnbHTl2K+jSyIQjHmf8ZxwIXXfS5EsFX3o9SGU25xsi4AbAGJ EZ4Pz2xoCBomEJcv6iXP5vOmFVzv9OYQB/KsdkN2k0M= 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 E95567F5F8; Thu, 1 Nov 2018 15:46:30 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a35 From: Juri Linkov To: martin rudalics Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers Organization: LINKOV.NET References: <875zyrrhk8.fsf@mail.linkov.net> <87ftx0nvoi.fsf@mail.linkov.net> <5BCC374E.603@gmx.at> <87a7n7kz7x.fsf@mail.linkov.net> <5BCD935F.8030309@gmx.at> <87in1szirt.fsf@mail.linkov.net> <5BD03F21.6040807@gmx.at> <87lg6map8e.fsf@mail.linkov.net> <5BD15CE0.7080703@gmx.at> <87va5qf1ox.fsf@mail.linkov.net> <5BD2C4AD.3060402@gmx.at> <87r2gbb85y.fsf@mail.linkov.net> <5BD57AB5.2040105@gmx.at> <87woq2xn22.fsf@mail.linkov.net> <5BD6C86F.9030508@gmx.at> <878t2g74oq.fsf@mail.linkov.net> <5BD81DA2.4020003@gmx.at> <87k1lzruwe.fsf@mail.linkov.net> <5BD963B3.3080800@gmx.at> <877ehx95bz.fsf@mail.linkov.net> <5BDAC163.10606@gmx.at> Date: Fri, 02 Nov 2018 00:30:54 +0200 In-Reply-To: <5BDAC163.10606@gmx.at> (martin rudalics's message of "Thu, 01 Nov 2018 10:03:31 +0100") Message-ID: <87sh0kig69.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: 0.0 (/) X-Debbugs-Envelope-To: 32850 Cc: 32850@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 (-) >> - (let ((root window)) >> - (setq window (catch 'live >> - (walk-window-subtree >> - (lambda (window) >> - (when (and (window-live-p window) >> - (not (window-parameter window 'window-side))) >> - (throw 'live window))) >> - root))) >> - (delete-other-windows-internal window root))) >> + (delete-other-windows-internal) >> + (setq window (split-window)) >> + (delete-window)) >> >> (set-window-dedicated-p window nil) > > What would be bad about leaving most of that code in place and just > adding the > >> + (setq window (split-window)) >> + (delete-window)) There is no need to find a window using walk-window-subtree when this window will be deleted anyway (if function argument is nil or not a live window). OTOH, a live window should not be deleted when given by the argument of window-state-put. From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 02 04:44:13 2018 Received: (at 32850) by debbugs.gnu.org; 2 Nov 2018 08:44:13 +0000 Received: from localhost ([127.0.0.1]:59236 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gIV3t-0006Ok-J9 for submit@debbugs.gnu.org; Fri, 02 Nov 2018 04:44:13 -0400 Received: from mout.gmx.net ([212.227.15.15]:40037) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gIV3r-0006OW-5W for 32850@debbugs.gnu.org; Fri, 02 Nov 2018 04:44:11 -0400 Received: from [192.168.1.101] ([213.162.73.248]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MVeCF-1g2vr333lf-00Z1PK; Fri, 02 Nov 2018 09:44:02 +0100 Received: from [192.168.1.101] ([213.162.73.248]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MVeCF-1g2vr333lf-00Z1PK; Fri, 02 Nov 2018 09:44:02 +0100 Message-ID: <5BDC0E49.6020200@gmx.at> Date: Fri, 02 Nov 2018 09:43:53 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers References: <875zyrrhk8.fsf@mail.linkov.net> <87ftx0nvoi.fsf@mail.linkov.net> <5BCC374E.603@gmx.at> <87a7n7kz7x.fsf@mail.linkov.net> <5BCD935F.8030309@gmx.at> <87in1szirt.fsf@mail.linkov.net> <5BD03F21.6040807@gmx.at> <87lg6map8e.fsf@mail.linkov.net> <5BD15CE0.7080703@gmx.at> <87va5qf1ox.fsf@mail.linkov.net> <5BD2C4AD.3060402@gmx.at> <87r2gbb85y.fsf@mail.linkov.net> <5BD57AB5.2040105@gmx.at> <87woq2xn22.fsf@mail.linkov.net> <5BD6C86F.9030508@gmx.at> <878t2g74oq.fsf@mail.linkov.net> <5BD81DA2.4020003@gmx.at> <87k1lzruwe.fsf@mail.linkov.net> <5BD963B3.3080800@gmx.at> <877ehx95bz.fsf@mail.linkov.net> <5BDAC163.10606@gmx.at> <87sh0kig69.fsf@mail.linkov.net> In-Reply-To: <87sh0kig69.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:BIMTUxhc//A1CyfnAsZNVVj4FE+K4tzCsBO3HwHnFyiDOjXQ1BA 4Y1d/37qWKj6LiZ8+JA8zjKHhoarBOQUWUKAHLeKeGEDeNwWj9ukedoqEeoLJp00fD16GC+ GOcmrpzoQOZV/TFb6cMevGlWVBkxFFZ/MTXW9kR0OQTaQqm5tRQwV8jNgVQzzpaFjt8ALOM k/UCACOiu89yi6i8jA0SQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:aO9CP4ue5xc=:F0qiLDNg/VDBUuNe89vBe2 4EX9SmRpjLfZpihM9901WwzB1qvoPlfz+svBuCbrqjR6KTuDzbI638Ke9zCrMsqyDU67K/K2R fx8NP/23GE6OFQy53YrpMP8zjBQG5W1+/jNJ1UhKuPBGQtx5ZlY8U3vQZHXJIVb7DnNsDR8mD E99Zpq4ViLQ+QRF+yepps7/+mBBNnfpUJCyx9JopACPRRrRd6DRGbieUeSPAql9Y9CrjcKGUA aoI2TDTRxkRa6Qg87gNqhmvECtVd0rsaqYBwZPNzpyoAmnTLonYP12RinWtMHjKusqlXVWQ3P rypoS3OQ3I4uDUfRiQl8VSxM64qOVEJbiE4tTPg3cXdgJx2uxyEKTW53MfolPTFUtGvkdzg/3 t19Q6he/TgRydsHxRq4iNjVeDJ5mw6JebvzDJGAfKZIBLjylFYrZQ7XNfQy/9TKKFxpFJi2cp yoYPdaDehMuFXZQhcwJnTvDSi13PFYP1QVOV0L2mP8Gxak5OF0YYBNzppWTLAKk4q6W8Anruj 1gNouE1RerrX6Al0A20tp8Led1dOq2J+3hSqBNCfeZ2BEew1vV3PRgVHI+erDliU4o0FJhxsW vinZjrG6hHDEXkbJ2LQXIVwKfql1lyIixsrSmenXhF8L7c8J3EQZxf5PtaxE5OuwYcl9kVltA wAVIf84tQKS+9fGY499sTK9Wq4U+zu5YzCk10ZxOUuwODTX9Pd+wJJYrCFJLg5N691z5Omj0b wbepBj9KhjP4xaHQE6ZeDofRo6EYXcUD0+LH2OUUlWYV3c4MZI6h2yRCQOTNowyH3o3yeY9Xn P92/0BW63RZTmXoQseBBx8XSrh1KPw40yqcZ7OeSrQQVr4jKjc= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32850 Cc: 32850@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 is no need to find a window using walk-window-subtree > when this window will be deleted anyway (if function argument > is nil or not a live window). > > OTOH, a live window should not be deleted when given > by the argument of window-state-put. Sounds reasonable (Bug#16793 just wants a live window there and splitting and deleting the old one should do that trivially). Feel free to install if you see no further problems. martin From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 05 16:39:14 2018 Received: (at 32850) by debbugs.gnu.org; 5 Nov 2018 21:39:14 +0000 Received: from localhost ([127.0.0.1]:35787 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gJmaX-00047x-PV for submit@debbugs.gnu.org; Mon, 05 Nov 2018 16:39:14 -0500 Received: from quail.birch.relay.mailchannels.net ([23.83.209.151]:51925) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gJmaV-00047p-IK for 32850@debbugs.gnu.org; Mon, 05 Nov 2018 16:39:12 -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 B3E20283A4C; Mon, 5 Nov 2018 21:39:10 +0000 (UTC) Received: from pdx1-sub0-mail-a31.g.dreamhost.com (unknown [100.96.19.78]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 7BFB2283A95; Mon, 5 Nov 2018 21:39:10 +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 21:39:10 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Continue-Arithmetic: 7d9b589a50af3770_1541453950602_1029092119 X-MC-Loop-Signature: 1541453950601:691661353 X-MC-Ingress-Time: 1541453950601 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 4469D804D5; Mon, 5 Nov 2018 13:39:10 -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=uzCUEFjsqwMTzJgQpyEdVnap8DY=; b= urL6wtFYIRNqhqXM5pN3uvVZKL2+fzsNmrXEvHSndmJWb+gA6Fdd5Os+Ws8+tpU5 Dt855olOHX9pVKBlHyOy0dW1hNz+ece/awp7lQTNJDeLA4Tj3olskcTcaiGX4oLF tkcGTaDXhiyA5mgRjvbRu5ds9VCq0PyEzmDPM1vbMco= 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 2A076804CD; Mon, 5 Nov 2018 13:39:07 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a31 From: Juri Linkov To: martin rudalics Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers Organization: LINKOV.NET References: <875zyrrhk8.fsf@mail.linkov.net> <87a7n7kz7x.fsf@mail.linkov.net> <5BCD935F.8030309@gmx.at> <87in1szirt.fsf@mail.linkov.net> <5BD03F21.6040807@gmx.at> <87lg6map8e.fsf@mail.linkov.net> <5BD15CE0.7080703@gmx.at> <87va5qf1ox.fsf@mail.linkov.net> <5BD2C4AD.3060402@gmx.at> <87r2gbb85y.fsf@mail.linkov.net> <5BD57AB5.2040105@gmx.at> <87woq2xn22.fsf@mail.linkov.net> <5BD6C86F.9030508@gmx.at> <878t2g74oq.fsf@mail.linkov.net> <5BD81DA2.4020003@gmx.at> <87k1lzruwe.fsf@mail.linkov.net> <5BD963B3.3080800@gmx.at> <877ehx95bz.fsf@mail.linkov.net> <5BDAC163.10606@gmx.at> <87sh0kig69.fsf@mail.linkov.net> <5BDC0E49.6020200@gmx.at> Date: Mon, 05 Nov 2018 23:38:27 +0200 In-Reply-To: <5BDC0E49.6020200@gmx.at> (martin rudalics's message of "Fri, 02 Nov 2018 09:43:53 +0100") Message-ID: <87ftwfyzq9.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: gggruggvucftvghtrhhoucdtuddrgedtkedrjeehgdduheefucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdejrddvgeegnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtjedrvdeggedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgepud 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: > Sounds reasonable (Bug#16793 just wants a live window there and > splitting and deleting the old one should do that trivially). Feel > free to install if you see no further problems. After reading bug#16793, I see that the original intention was to restore a window state on the same frame where the subtree of the specified internal window is. If this is important, then a better change is: [...] 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.151 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.151 listed in list.dnswl.org] X-Debbugs-Envelope-To: 32850 Cc: 32850@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 (/) > Sounds reasonable (Bug#16793 just wants a live window there and > splitting and deleting the old one should do that trivially). Feel > free to install if you see no further problems. After reading bug#16793, I see that the original intention was to restore a window state on the same frame where the subtree of the specified internal window is. If this is important, then a better change is: diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi index 772bcdf9a6..49698f45bf 100644 --- a/doc/lispref/windows.texi +++ b/doc/lispref/windows.texi @@ -5706,9 +5706,10 @@ Window Configurations The argument @var{state} should be the state of a window returned by an earlier invocation of @code{window-state-get}, see above. The optional argument @var{window} can be either a live window or an -internal window (@pxref{Windows and Frames}) and defaults to the -selected one. If @var{window} is not live, it is replaced by a live -window before putting @var{state} into it. +internal window (@pxref{Windows and Frames}). If @var{window} is not +live, it is replaced by a new live window created on the same subtree +before putting @var{state} into it. If @var{window} is nil, it puts +the window state into a new window. If the optional argument @var{ignore} is non-@code{nil}, it means to ignore minimum window sizes and fixed-size restrictions. If @var{ignore} diff --git a/lisp/window.el b/lisp/window.el index bcd4fa2959..b8a8b81af3 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -5889,29 +5889,34 @@ window-state-put "Put window state STATE into WINDOW. STATE should be the state of a window returned by an earlier invocation of `window-state-get'. Optional argument WINDOW must -specify a valid window and defaults to the selected one. If -WINDOW is not live, replace WINDOW by a live one before putting -STATE into it. +specify a valid window. If WINDOW is not live, replace WINDOW +by a new live one created on the same subtree. If WINDOW is nil, +create a new window before putting STATE into it. Optional argument IGNORE non-nil means ignore minimum window sizes and fixed size restrictions. IGNORE equal `safe' means windows can get as small as `window-safe-min-height' and `window-safe-min-width'." (setq window-state-put-stale-windows nil) - (setq window (window-normalize-window window)) - ;; When WINDOW is internal, reduce it to a live one to put STATE into, - ;; see Bug#16793. + ;; When WINDOW is internal or nil, reduce it to a live one, + ;; then create a new window on the same subtree to put STATE into. (unless (window-live-p window) (let ((root window)) - (setq window (catch 'live - (walk-window-subtree - (lambda (window) - (when (and (window-live-p window) - (not (window-parameter window 'window-side))) - (throw 'live window))) - root))) - (delete-other-windows-internal window root))) + (setq window (if root + (catch 'live + (walk-window-subtree + (lambda (window) + (when (and (window-live-p window) + (not (window-parameter + window 'window-side))) + (throw 'live window))) + root)) + (selected-window))) + (delete-other-windows-internal window root) + ;; Create a new window to replace the existing one. + (setq window (prog1 (split-window window) + (delete-window window))))) (set-window-dedicated-p window nil) From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 05 22:26:55 2018 Received: (at 32850) by debbugs.gnu.org; 6 Nov 2018 03:26:55 +0000 Received: from localhost ([127.0.0.1]:35895 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gJs11-0006C0-Gu for submit@debbugs.gnu.org; Mon, 05 Nov 2018 22:26:55 -0500 Received: from eggs.gnu.org ([208.118.235.92]:35141) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gJs0z-0006Bo-Rg for 32850@debbugs.gnu.org; Mon, 05 Nov 2018 22:26:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gJs0o-0004iM-Vy for 32850@debbugs.gnu.org; Mon, 05 Nov 2018 22:26:48 -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]:42994) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gJs0m-0004bP-KB; Mon, 05 Nov 2018 22:26:41 -0500 Received: from [176.228.60.248] (port=4045 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gJs0m-0007yW-8U; Mon, 05 Nov 2018 22:26:40 -0500 Date: Tue, 06 Nov 2018 05:26:37 +0200 Message-Id: <83ftwedgya.fsf@gnu.org> From: Eli Zaretskii To: Juri Linkov In-reply-to: <87ftwfyzq9.fsf@mail.linkov.net> (message from Juri Linkov on Mon, 05 Nov 2018 23:38:27 +0200) Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers References: <875zyrrhk8.fsf@mail.linkov.net> <87a7n7kz7x.fsf@mail.linkov.net> <5BCD935F.8030309@gmx.at> <87in1szirt.fsf@mail.linkov.net> <5BD03F21.6040807@gmx.at> <87lg6map8e.fsf@mail.linkov.net> <5BD15CE0.7080703@gmx.at> <87va5qf1ox.fsf@mail.linkov.net> <5BD2C4AD.3060402@gmx.at> <87r2gbb85y.fsf@mail.linkov.net> <5BD57AB5.2040105@gmx.at> <87woq2xn22.fsf@mail.linkov.net> <5BD6C86F.9030508@gmx.at> <878t2g74oq.fsf@mail.linkov.net> <5BD81DA2.4020003@gmx.at> <87k1lzruwe.fsf@mail.linkov.net> <5BD963B3.3080800@gmx.at> <877ehx95bz.fsf@mail.linkov.net> <5BDAC163.10606@gmx.at> <87sh0kig69.fsf@mail.linkov.net> <5BDC0E49.6020200@gmx.at> <87ftwfyzq9.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: 32850 Cc: rudalics@gmx.at, 32850@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: Mon, 05 Nov 2018 23:38:27 +0200 > Cc: 32850@debbugs.gnu.org > > diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi > index 772bcdf9a6..49698f45bf 100644 > --- a/doc/lispref/windows.texi > +++ b/doc/lispref/windows.texi > @@ -5706,9 +5706,10 @@ Window Configurations > The argument @var{state} should be the state of a window returned by > an earlier invocation of @code{window-state-get}, see above. The > optional argument @var{window} can be either a live window or an > -internal window (@pxref{Windows and Frames}) and defaults to the > -selected one. If @var{window} is not live, it is replaced by a live > -window before putting @var{state} into it. > +internal window (@pxref{Windows and Frames}). If @var{window} is not ^^^^^^^^^^^^^^^^^^^^^^ > +live, it is replaced by a new live window created on the same subtree ^^^^ "If @var{window} is not a live window, ..." > +before putting @var{state} into it. If @var{window} is nil, it puts ^^^ "nil" is a symbol, so @code{nil}. > diff --git a/lisp/window.el b/lisp/window.el > index bcd4fa2959..b8a8b81af3 100644 > --- a/lisp/window.el > +++ b/lisp/window.el > @@ -5889,29 +5889,34 @@ window-state-put > "Put window state STATE into WINDOW. > STATE should be the state of a window returned by an earlier > invocation of `window-state-get'. Optional argument WINDOW must > -specify a valid window and defaults to the selected one. If > -WINDOW is not live, replace WINDOW by a live one before putting > -STATE into it. > +specify a valid window. If WINDOW is not live, replace WINDOW Same here. From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 06 03:46:25 2018 Received: (at 32850) by debbugs.gnu.org; 6 Nov 2018 08:46:25 +0000 Received: from localhost ([127.0.0.1]:35968 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gJx0B-0005Y2-UN for submit@debbugs.gnu.org; Tue, 06 Nov 2018 03:46:24 -0500 Received: from mout.gmx.net ([212.227.17.22]:56195) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gJx0A-0005Xp-4N for 32850@debbugs.gnu.org; Tue, 06 Nov 2018 03:46:22 -0500 Received: from [192.168.1.101] ([213.162.68.231]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MVrQS-1g06nt3xAu-00X3sV; Tue, 06 Nov 2018 09:46:14 +0100 Received: from [192.168.1.101] ([213.162.68.231]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MVrQS-1g06nt3xAu-00X3sV; Tue, 06 Nov 2018 09:46:14 +0100 Message-ID: <5BE154D3.4050009@gmx.at> Date: Tue, 06 Nov 2018 09:46:11 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers References: <875zyrrhk8.fsf@mail.linkov.net> <87a7n7kz7x.fsf@mail.linkov.net> <5BCD935F.8030309@gmx.at> <87in1szirt.fsf@mail.linkov.net> <5BD03F21.6040807@gmx.at> <87lg6map8e.fsf@mail.linkov.net> <5BD15CE0.7080703@gmx.at> <87va5qf1ox.fsf@mail.linkov.net> <5BD2C4AD.3060402@gmx.at> <87r2gbb85y.fsf@mail.linkov.net> <5BD57AB5.2040105@gmx.at> <87woq2xn22.fsf@mail.linkov.net> <5BD6C86F.9030508@gmx.at> <878t2g74oq.fsf@mail.linkov.net> <5BD81DA2.4020003@gmx.at> <87k1lzruwe.fsf@mail.linkov.net> <5BD963B3.3080800@gmx.at> <877ehx95bz.fsf@mail.linkov.net> <5BDAC163.10606@gmx.at> <87sh0kig69.fsf@mail.linkov.net> <5BDC0E49.6020200@gmx.at> <87ftwfyzq9.fsf@mail.linkov.net> In-Reply-To: <87ftwfyzq9.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:AEkVuUSASr7i+qXRjWWTlBN2T6zqn8QY8GQwjXA4uks/ufNXGip LzaVSUiljx/UCnbeJvCZo9LqksKDYFSSBfEU5Hm0gV7NHHnbJ2TauWYDyeSqI1eryWTYl+4 EjXEvFCvmE6ocVU7DLErhId4EjK1yrZwNGNENdOlzrtLMtP3mWd5i+8bGNYj3nQsb1EqijE 8iEBeZyqyapDxE0kZpCUQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:z3N07MY6oH0=:Hk/NZwgMv6h82rLiY+6hFu e1s8lqy9ow01QW0mC/nVtVds1dl8m3ruiue6jlF0BFoe79Rjx/npsvYY9KcZBSfriQbBk3UpP Ba6UUdSr8smgiWpzOikV9Lm3dPKHRNuZNn+8G+Go2DzWjyJDViZhiDLOADuExhubdg/XPY+zC fBwaPwFRQihzIL0D5uFLEvE2vjxZtHy4qRB3zelX1c6d7dqxdjelzz8oHkT9gY7hREKCkGkBW B9341//azqa1B74FZ7jzp6f2QOeLIZEFp5UgB9aEEAaBM2yWBnPa0GFtknZLWDJrYJiQ8R5mV WPBs1aQzPQI08JXXEXrzP8ExmuZMoX2bydXpl8QOMvWaIvcXsdNskooyfmJM/WGjSzyh2weic PaWcbUjId1mLRhO9pJPJltjZOXvhcSyl7uVy1MnvhYVtMnKOthyKHdJFYM1BykAT0/veWy9do 9/MhN8buQnmyQ5Qj7F2r+1otA919pOk+6lpgikZTiET76yK80bidf4BIRO8DeRX4H6bdZSHab xobyWcjcm+p3xvwBZR/qBxruAJMhtqMPDDbbSSTyOHAVXinihFMXqIEEHWsR+zUB1vsrO7g7w 9V85AYGUwqAwjIPJkLOPoBJNm8aqhiYTi2cqC4JDtaFnPcNdAhZac6GX268TDmZ7Sn6Imwpq8 OEaamP9EYrszOh0bg9+t/Q3NUfau/fkWvQV4+wrF0GM3Vp7bcpbao3SdVRYZ7VphZPDTI0QBy ZXjWGO3QCMOPVPkrs8n3VBWPUwjxdZJR6I7Izrjr7CemS5qDvo8hrh1hd6Ww0j5T3irwl2ApH E4thH2A1xf3AXQfumC2Ov22G0kARXAWqvZdFKUH+WY+mEEPfpw= X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 32850 Cc: 32850@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 (/) > +internal window (@pxref{Windows and Frames}). If @var{window} is not > +live, it is replaced by a new live window created on the same subtree The term "subtree" seems hardly comprehensible in this context. martin From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 06 17:56:54 2018 Received: (at 32850) by debbugs.gnu.org; 6 Nov 2018 22:56:54 +0000 Received: from localhost ([127.0.0.1]:37944 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gKAHG-0003JV-Bf for submit@debbugs.gnu.org; Tue, 06 Nov 2018 17:56:54 -0500 Received: from common.maple.relay.mailchannels.net ([23.83.214.38]:23649) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gKAHE-0003JN-M0 for 32850@debbugs.gnu.org; Tue, 06 Nov 2018 17:56: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 A3AD943467; Tue, 6 Nov 2018 22:56:47 +0000 (UTC) Received: from pdx1-sub0-mail-a56.g.dreamhost.com (unknown [100.96.26.166]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 65C54439C5; Tue, 6 Nov 2018 22:56:47 +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:56:47 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Ski-Eyes: 14be064f11c2aa89_1541545007528_974016732 X-MC-Loop-Signature: 1541545007528:2180792921 X-MC-Ingress-Time: 1541545007527 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 342AC80619; Tue, 6 Nov 2018 14:56: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=5i9cRwQ5ZVZGkb/e7KU+KNhxW+M=; b= e3q0kRHyRJtCZeN5BpbtTIbHBoNU5ldnEXwDAKvjD+OLOVMuhf61sXo1U8CGyI01 706qdyyi0ehW+NlLe6Yc5ScQCm9k/b1zhfdgujvEs1f6v78ztVTtE7di8Y1nVBEz dspgwPCdivgKbV8HNef8A4riOV4a9dcMrTVC00uvpjs= 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 616438061E; Tue, 6 Nov 2018 14:56:44 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a56 From: Juri Linkov To: Eli Zaretskii Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers Organization: LINKOV.NET References: <875zyrrhk8.fsf@mail.linkov.net> <87in1szirt.fsf@mail.linkov.net> <5BD03F21.6040807@gmx.at> <87lg6map8e.fsf@mail.linkov.net> <5BD15CE0.7080703@gmx.at> <87va5qf1ox.fsf@mail.linkov.net> <5BD2C4AD.3060402@gmx.at> <87r2gbb85y.fsf@mail.linkov.net> <5BD57AB5.2040105@gmx.at> <87woq2xn22.fsf@mail.linkov.net> <5BD6C86F.9030508@gmx.at> <878t2g74oq.fsf@mail.linkov.net> <5BD81DA2.4020003@gmx.at> <87k1lzruwe.fsf@mail.linkov.net> <5BD963B3.3080800@gmx.at> <877ehx95bz.fsf@mail.linkov.net> <5BDAC163.10606@gmx.at> <87sh0kig69.fsf@mail.linkov.net> <5BDC0E49.6020200@gmx.at> <87ftwfyzq9.fsf@mail.linkov.net> <83ftwedgya.fsf@gnu.org> Date: Wed, 07 Nov 2018 00:35:44 +0200 In-Reply-To: <83ftwedgya.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 06 Nov 2018 05:26:37 +0200") Message-ID: <87k1lprf2n.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: gggruggvucftvghtrhhoucdtuddrgedtkedrjeekgddthecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddtjedrvdeggeenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdejrddvgeegpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtohepvghlihiisehgnhhurdhorhhgnecuvehluhhsthgvrhfuihiivgeptd X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32850 Cc: rudalics@gmx.at, 32850@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 (-) >> -selected one. If @var{window} is not live, it is replaced by a live >> -window before putting @var{state} into it. >> +internal window (@pxref{Windows and Frames}). If @var{window} is not > ^^^^^^^^^^^^^^^^^^^^^^ >> +live, it is replaced by a new live window created on the same subtree > ^^^^ > > "If @var{window} is not a live window, ..." > >> +before putting @var{state} into it. If @var{window} is nil, it puts > ^^^ > "nil" is a symbol, so @code{nil}. > >> -specify a valid window and defaults to the selected one. If >> -WINDOW is not live, replace WINDOW by a live one before putting >> -STATE into it. >> +specify a valid window. If WINDOW is not live, replace WINDOW > > Same here. Fixed in a new patch, also taking into account Martin's suggestion to not use the term "subtree". diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi index 772bcdf9a6..9301fdfa9d 100644 --- a/doc/lispref/windows.texi +++ b/doc/lispref/windows.texi @@ -5706,9 +5706,10 @@ Window Configurations The argument @var{state} should be the state of a window returned by an earlier invocation of @code{window-state-get}, see above. The optional argument @var{window} can be either a live window or an -internal window (@pxref{Windows and Frames}) and defaults to the -selected one. If @var{window} is not live, it is replaced by a live -window before putting @var{state} into it. +internal window (@pxref{Windows and Frames}). If @var{window} is not +a live window, it is replaced by a new live window created on the same +frame before putting @var{state} into it. If @var{window} is @code{nil}, +it puts the window state into a new window. If the optional argument @var{ignore} is non-@code{nil}, it means to ignore minimum window sizes and fixed-size restrictions. If @var{ignore} diff --git a/lisp/window.el b/lisp/window.el index bcd4fa2959..c0eeba7261 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -5889,29 +5889,34 @@ window-state-put "Put window state STATE into WINDOW. STATE should be the state of a window returned by an earlier invocation of `window-state-get'. Optional argument WINDOW must -specify a valid window and defaults to the selected one. If -WINDOW is not live, replace WINDOW by a live one before putting -STATE into it. +specify a valid window. If WINDOW is not a live window, +replace WINDOW by a new live window created on the same frame. +If WINDOW is nil, create a new window before putting STATE into it. Optional argument IGNORE non-nil means ignore minimum window sizes and fixed size restrictions. IGNORE equal `safe' means windows can get as small as `window-safe-min-height' and `window-safe-min-width'." (setq window-state-put-stale-windows nil) - (setq window (window-normalize-window window)) - ;; When WINDOW is internal, reduce it to a live one to put STATE into, - ;; see Bug#16793. + ;; When WINDOW is internal or nil, reduce it to a live one, + ;; then create a new window on the same frame to put STATE into. (unless (window-live-p window) (let ((root window)) - (setq window (catch 'live - (walk-window-subtree - (lambda (window) - (when (and (window-live-p window) - (not (window-parameter window 'window-side))) - (throw 'live window))) - root))) - (delete-other-windows-internal window root))) + (setq window (if root + (catch 'live + (walk-window-subtree + (lambda (window) + (when (and (window-live-p window) + (not (window-parameter + window 'window-side))) + (throw 'live window))) + root)) + (selected-window))) + (delete-other-windows-internal window root) + ;; Create a new window to replace the existing one. + (setq window (prog1 (split-window window) + (delete-window window))))) (set-window-dedicated-p window nil) From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 10 16:59:34 2018 Received: (at 32850) by debbugs.gnu.org; 10 Nov 2018 21:59:34 +0000 Received: from localhost ([127.0.0.1]:45117 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gLbHy-0004sN-8T for submit@debbugs.gnu.org; Sat, 10 Nov 2018 16:59:34 -0500 Received: from bird.maple.relay.mailchannels.net ([23.83.214.17]:43861) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gLbHu-0004sD-Bz for 32850@debbugs.gnu.org; Sat, 10 Nov 2018 16:59: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 54F935C395C; Sat, 10 Nov 2018 21:59:29 +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 07A335C38FA; Sat, 10 Nov 2018 21:59:29 +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:29 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Supply-Cooperative: 5a8d97344122504a_1541887169157_2850346457 X-MC-Loop-Signature: 1541887169157:132425662 X-MC-Ingress-Time: 1541887169156 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 C41F68091E; Sat, 10 Nov 2018 13:59:28 -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=UMGWxEKpevD6jxgcpybvrNsNoBY=; b= TNZnmGLa2hOJrzLA+Bopn3HUxMvnGyAqv5brPCH5Aq2qj2/Ylk5q66dJEd61Zus3 vUQpc4iBoeimnLdR2vltlxV12ujqWxtWPq4Runisui91Z2HXz5K/1birVjeykvOm 5rmM4045ylI7+aWfckh2tbAKdqzalRteeUg4RBBHr3Y= 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 5BE6C7F44E; Sat, 10 Nov 2018 13:59:26 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a77 From: Juri Linkov To: martin rudalics Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers Organization: LINKOV.NET References: <875zyrrhk8.fsf@mail.linkov.net> <87ftxgqcx0.fsf@mail.linkov.net> <5BBC5C61.4090901@gmx.at> <87ftx79brv.fsf@mail.linkov.net> <5BC5A536.7020603@gmx.at> <8736t57jcs.fsf@mail.linkov.net> <5BC6E559.3090000@gmx.at> <87zhvcteuy.fsf@mail.linkov.net> <5BC83EE4.8030607@gmx.at> <87h8hig9uw.fsf@mail.linkov.net> <5BC98A5F.5050807@gmx.at> <87ftx0nvoi.fsf@mail.linkov.net> <5BCC374E.603@gmx.at> <87a7n7kz7x.fsf@mail.linkov.net> <5BCD935F.8030309@gmx.at> <87in1szirt.fsf@mail.linkov.net> <5BD03F21.6040807@gmx.at> <87lg6map8e.fsf@mail.linkov.net> <5BD15CE0.7080703@gmx.at> <87va5qf1ox.fsf@mail.linkov.net> <5BD2C4AD.3060402@gmx.at> Date: Sat, 10 Nov 2018 23:56:49 +0200 In-Reply-To: <5BD2C4AD.3060402@gmx.at> (martin rudalics's message of "Fri, 26 Oct 2018 09:39:25 +0200") Message-ID: <87o9awip7q.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: gggruggvucftvghtrhhoucdtuddrgedtkedrkeehgdduheeiucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucffohhmrghinhepghhithhlrggsrdgtohhmnecukfhppeeluddruddvledruddtjedrvdeggeenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdejrddvgeegpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtoheprhhuuggrlhhitghssehgmhigrdgrthenucevlhhushhtvghrufhiiigvpedt X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32850 Cc: 32850@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 does desktop save window configurations or states stored somewhere > in the first place? In case you're interested, here's is a working solution that saves window configurations to the desktop file: https://gitlab.com/link0ff/emacs-wincows/commit/e2d1c132 From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 11 03:53:53 2018 Received: (at 32850) by debbugs.gnu.org; 11 Nov 2018 08:53:54 +0000 Received: from localhost ([127.0.0.1]:45284 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gLlVB-0005lH-LD for submit@debbugs.gnu.org; Sun, 11 Nov 2018 03:53:53 -0500 Received: from mout.gmx.net ([212.227.17.22]:45569) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gLlV9-0005l1-Em for 32850@debbugs.gnu.org; Sun, 11 Nov 2018 03:53:51 -0500 Received: from [192.168.1.101] ([212.95.5.227]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0Lwoiq-1fSXOA3PVg-016MNN; Sun, 11 Nov 2018 09:53:42 +0100 Message-ID: <5BE7EE14.1060008@gmx.at> Date: Sun, 11 Nov 2018 09:53:40 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers References: <875zyrrhk8.fsf@mail.linkov.net> <87ftxgqcx0.fsf@mail.linkov.net> <5BBC5C61.4090901@gmx.at> <87ftx79brv.fsf@mail.linkov.net> <5BC5A536.7020603@gmx.at> <8736t57jcs.fsf@mail.linkov.net> <5BC6E559.3090000@gmx.at> <87zhvcteuy.fsf@mail.linkov.net> <5BC83EE4.8030607@gmx.at> <87h8hig9uw.fsf@mail.linkov.net> <5BC98A5F.5050807@gmx.at> <87ftx0nvoi.fsf@mail.linkov.net> <5BCC374E.603@gmx.at> <87a7n7kz7x.fsf@mail.linkov.net> <5BCD935F.8030309@gmx.at> <87in1szirt.fsf@mail.linkov.net> <5BD03F21.6040807@gmx.at> <87lg6map8e.fsf@mail.linkov.net> <5BD15CE0.7080703@gmx.at> <87va5qf1ox.fsf@mail.linkov.net> <5BD2C4AD.3060402@gmx.at> <87o9awip7q.fsf@mail.linkov.net> In-Reply-To: <87o9awip7q.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:XPoIaQqh84hmeuKZcZQDsBn3RpMi2EdWJ7aM739+Z3XbNtI4Q+W Gwvz/aA5nlcnHFmrWQs0o5YO5DWM58J3aA2wJRApWBpIMjF/2FJV+qh/hG/ZzCHbfae4GzK oihtISWJhADL9h5p9zG/yUSyOC7ofND8cjHUrT8DB3usXK7S+VAUjIEVX9l6Qq/sWKr00Ha pVgG1V4NSiUx1/kA/4SPA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:aLsGy4MvDx4=:TkH8SN1Hh3IBh9K77MxgIu yEEdM2CEgcKlor5XtoSa2rZiq76MX0LLFuzKGi0gfUdHwAfq/aEEYoq0acplbc/GNGUZD85CG ZVm8wj6fzKUVLua95I2f3oWjPrrq/c7c/n22e6mjA0pWi9weTGAgwhU2ntU1zrV2gd1kDFcM5 7HQZ90xHKCOkdnZuNo7wS4MUm2e+k/R1MUSAbIBw4U/fBptN98MMChfAZv48z+nFj3SoR/JQB fqpGu1SkFhVTDg09x+kFwiN+pKCONnQ0otB/TezKtgMAzTUvZX52igYPsRrM5Zl0Tv972w+44 cvyflg8jMMfuMZCLxqSHMHiJ1d2p4TP44cjJJEFNoiJp7Cyibk+LngfagIw8o7CMV7Bub/jTl qDCmEejy92/FXEhbU/xKQtLWy2t603DfXq8Ww/xDV/Ov87uFu9yKdRGx5qa8qBcagWr1ziMph b906BPFMAqpIPUzs0XYMIX0uKN7GszelZL27cH9KewGRmGcA1PKN32eORYwQs4SguEhtNW2VC U0pufWewNIo4wwShEN/vq+AZ0rpa1tOW5E1tNgWB6HOo6g8YCR6R4Vx2oP0tC82ceoo9OiS8l yenDuGSlhilKBdGSFG9rxuVAguRbuSYPGL5qLhMAL+vSmg4yYEFlYlU+dlNGJcOULvbqp3kZt w1aDMgffjwBKZj+qIPtgE6Zj8nsLXVtr8rCO4ohaN6Y8NiET7ahnExcCJgfz9Hp+JpS2uCTqE nR2V9lj0qate95THyGPPQeCSYQq5J1IF5zYkw7XIufxiwsouVEYWgJwzkIsMex/zXmBYJ+RtD iy8K+otdwKYct1/f3XrlQz/3Tb6hvSIDD4h2NY9qT/adcuOzFomoNl4/hGXlVrjI/5yC3gLUr LOiJWqeLAUdiebJjz22yP9qLDK/RLzUoym63w1CNw8wp/qd6mi3gzXp2EHmkHk X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32850 Cc: 32850@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 case you're interested, here's is a working solution > that saves window configurations to the desktop file: > https://gitlab.com/link0ff/emacs-wincows/commit/e2d1c132 It would be nice to combine wincows.el with frame-tabs.el, somehow. martin From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 11 15:29:16 2018 Received: (at 32850) by debbugs.gnu.org; 11 Nov 2018 20:29:16 +0000 Received: from localhost ([127.0.0.1]:46805 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gLwM8-0005np-01 for submit@debbugs.gnu.org; Sun, 11 Nov 2018 15:29:16 -0500 Received: from eastern.maple.relay.mailchannels.net ([23.83.214.55]:44367) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gLwM5-0005nc-83 for 32850@debbugs.gnu.org; Sun, 11 Nov 2018 15:29:13 -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 944D1121A89; Sun, 11 Nov 2018 20:29:11 +0000 (UTC) Received: from pdx1-sub0-mail-a77.g.dreamhost.com (unknown [100.96.19.74]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 53D42123841; Sun, 11 Nov 2018 20:29:11 +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, 11 Nov 2018 20:29:11 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Unite-Obese: 3b91312d2a9d3fe6_1541968151421_1410104964 X-MC-Loop-Signature: 1541968151421:421784087 X-MC-Ingress-Time: 1541968151421 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 0587D7FDF5; Sun, 11 Nov 2018 12:29:11 -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=rZAqOn8mlJrRYjCH20MfiibMk90=; b= w+BY/7WwDqFpBgFs5f+2ny9d7Z3Z66kAn3D8Xj94r89nTx2FPpn0UdXGF1AeJucN 6HuM9Uf3HiK75UeWQKfZ7mNP7r5Abtb1KN2a65+9imFrZtYpY9337utL32tlU3eU c5h5CIBSfNjJPvLzx2LafzQjyofdnfUfJvDVJ2SHKlw= 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 C9BB87FDF2; Sun, 11 Nov 2018 12:29:08 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a77 From: Juri Linkov To: martin rudalics Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers Organization: LINKOV.NET References: <875zyrrhk8.fsf@mail.linkov.net> <87ftx79brv.fsf@mail.linkov.net> <5BC5A536.7020603@gmx.at> <8736t57jcs.fsf@mail.linkov.net> <5BC6E559.3090000@gmx.at> <87zhvcteuy.fsf@mail.linkov.net> <5BC83EE4.8030607@gmx.at> <87h8hig9uw.fsf@mail.linkov.net> <5BC98A5F.5050807@gmx.at> <87ftx0nvoi.fsf@mail.linkov.net> <5BCC374E.603@gmx.at> <87a7n7kz7x.fsf@mail.linkov.net> <5BCD935F.8030309@gmx.at> <87in1szirt.fsf@mail.linkov.net> <5BD03F21.6040807@gmx.at> <87lg6map8e.fsf@mail.linkov.net> <5BD15CE0.7080703@gmx.at> <87va5qf1ox.fsf@mail.linkov.net> <5BD2C4AD.3060402@gmx.at> <87o9awip7q.fsf@mail.linkov.net> <5BE7EE14.1060008@gmx.at> Date: Sun, 11 Nov 2018 22:23:29 +0200 In-Reply-To: <5BE7EE14.1060008@gmx.at> (martin rudalics's message of "Sun, 11 Nov 2018 09:53:40 +0100") Message-ID: <87ftw7nz26.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: gggruggvucftvghtrhhoucdtuddrgedtkedrkeejgddufeekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucffohhmrghinhepghhithhlrggsrdgtohhmnecukfhppeeluddruddvledruddtjedrvdeggeenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdejrddvgeegpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtoheprhhuuggrlhhitghssehgmhigrdgrthenucevlhhushhtvghrufhiiigvpedt X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32850 Cc: 32850@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 case you're interested, here's is a working solution >> that saves window configurations to the desktop file: >> https://gitlab.com/link0ff/emacs-wincows/commit/e2d1c132 > > It would be nice to combine wincows.el with frame-tabs.el, somehow. Since now finally we have persistence for window configurations, I'm going to revive the x-tabs branch. The package wincows.el was needed for testing what will be the internal functionality in the x-tabs branch. And for the user interface it could use what you implemented for displaying tabs in side windows in frame-tabs.el. Would you allow using your code from frame-tabs.el in the x-tabs branch? From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 12 03:54:02 2018 Received: (at 32850) by debbugs.gnu.org; 12 Nov 2018 08:54:02 +0000 Received: from localhost ([127.0.0.1]:47071 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gM7yr-0000uC-LO for submit@debbugs.gnu.org; Mon, 12 Nov 2018 03:54:01 -0500 Received: from mout.gmx.net ([212.227.15.18]:48739) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gM7yp-0000ts-Ew for 32850@debbugs.gnu.org; Mon, 12 Nov 2018 03:53:59 -0500 Received: from [192.168.1.101] ([213.162.73.18]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MFuC6-1gJJtb47Pi-00EyOu; Mon, 12 Nov 2018 09:53:50 +0100 Message-ID: <5BE93F99.3010500@gmx.at> Date: Mon, 12 Nov 2018 09:53:45 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers References: <875zyrrhk8.fsf@mail.linkov.net> <87ftx79brv.fsf@mail.linkov.net> <5BC5A536.7020603@gmx.at> <8736t57jcs.fsf@mail.linkov.net> <5BC6E559.3090000@gmx.at> <87zhvcteuy.fsf@mail.linkov.net> <5BC83EE4.8030607@gmx.at> <87h8hig9uw.fsf@mail.linkov.net> <5BC98A5F.5050807@gmx.at> <87ftx0nvoi.fsf@mail.linkov.net> <5BCC374E.603@gmx.at> <87a7n7kz7x.fsf@mail.linkov.net> <5BCD935F.8030309@gmx.at> <87in1szirt.fsf@mail.linkov.net> <5BD03F21.6040807@gmx.at> <87lg6map8e.fsf@mail.linkov.net> <5BD15CE0.7080703@gmx.at> <87va5qf1ox.fsf@mail.linkov.net> <5BD2C4AD.3060402@gmx.at> <87o9awip7q.fsf@mail.linkov.net> <5BE7EE14.1060008@gmx.at> <87ftw7nz26.fsf@mail.linkov.net> In-Reply-To: <87ftw7nz26.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:yLGnMpL0A3jq9aCfmIHR6psWvHVmyiuJ8HrhNFAIvzGLL2JKemr B7MIzB/NP/A9Cq9R+88zuNArx3fC/R8KVL+QuolZQDhXibV4QjTA5GO79ABrhS717dITaV0 j/V8rbXmtzqmIbp6mH0OahqS0SKTvrtq+xe+XLm2Xey29NSpm/s8FNgvdqZx+Y5ENGByGvL lrWx4+GaQIHlntggKn3+A== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:4KNLurqHlrQ=:/WnpFYtT7p5cuUausaLIp+ c0rEm6DY3O9LJaLyw3OM7UWQ40/IzbseUHsb0ADWIjUSZO19imeg4nYmBwcdHGi4vwC969l5b XCFXIhfARl6gNhfJYn6s5A0jl/Xo06EQ3BGva7sh59hMunBwPvijFYm+33ZTw8vxN6923yfHR liyc1O6ZJXWvVyTWH1Y1tJ9rlzTf5StsXjvu7fR9qnBM9p6Ui0LJmXV+uooq3PfbEbEoxSqmx iLpoBT0WP96CqvxjlLrw/TgTmH0gopTSCnmpZUYyxLxHkaW9MzwqamwYbisppJnXbGMHZuvlO KjlpEGQ+fsJpNWF6usU0bmY+7a/EHIinn1BGAM/Nr/6q9c+DhZpDbO8bPiM7Jx99p2EtFNhiC QT3JFHbjza+n8xZ8Nflworbz+fIkPSRPEy3s1Ic6US8VaNnneUVe4jQ9khvUZfFCuo2dCQQPE dHhOT66kJ2kXrcCdCXcWjT6deb8PCPO5cZU1JhvVJqDGQQAOBE+lZUfqjBEerkDX1xg8gCBrp bmoy9VnxgkrbPGX26kj2rKCb6A/L9cJhSoojA34lYBazT8WeuG1hDvyEg8H4pajLg5EtzZrk7 MaAoOAjXrYph49R6Z2mv6mocDaGDYX/R+Ryt7PU/Z/m1zC4w5wbgLcf392Sx/g1RURMhoGaGS UZm9QDirm07vjLlesz7E/kDV9+kSvm8IBqcitEpC9T1YYorm1Ss0xkvi53BlsbVNEudXwVXR+ maQOxRvtLY7xn15HI8mB3kcVTamdrIjnqxfTbkmu01s6XzON131s9VnxShDq8XseDOwKikGu+ qJzG5IOG55u4Na1rL4Vr8o8uD9QEkWGaYkW8ZX6xMOikwjUMAcz5IOH+yOxn7vN+YSwiPvtF3 oP4kDeqg0WcU4SwepbezWDZXaR7GIh0XcUdkvQOGg189KaYqyelCYdTC700G+F X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32850 Cc: 32850@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 (-) > Since now finally we have persistence for window configurations, > I'm going to revive the x-tabs branch. The package wincows.el > was needed for testing what will be the internal functionality > in the x-tabs branch. And for the user interface it could use > what you implemented for displaying tabs in side windows in frame-tabs.el. > Would you allow using your code from frame-tabs.el in the x-tabs branch? Sure. IIRC you used a menubar-like window to implement a tab-bar back then. Does the "x" stand for X-only? Would this limit us to X-based builds? martin From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 12 19:01:46 2018 Received: (at 32850) by debbugs.gnu.org; 13 Nov 2018 00:01:46 +0000 Received: from localhost ([127.0.0.1]:48439 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gMM9K-0006JF-6U for submit@debbugs.gnu.org; Mon, 12 Nov 2018 19:01:46 -0500 Received: from insect.birch.relay.mailchannels.net ([23.83.209.93]:9776) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gMM9I-0006J6-FW for 32850@debbugs.gnu.org; Mon, 12 Nov 2018 19:01:44 -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 8E63D502E9E; Tue, 13 Nov 2018 00:01:40 +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 4DA79503284; Tue, 13 Nov 2018 00:01:40 +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:40 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Illegal-Cooperative: 4d1e9912422c6145_1542067300400_3475386931 X-MC-Loop-Signature: 1542067300400:2238288936 X-MC-Ingress-Time: 1542067300399 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 1375B7FF31; Mon, 12 Nov 2018 16:01:40 -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=nIf2TB352By08XLQFXW5N8N3vyE=; b= 2gLn6Z7CGEsQvl9o1NJX5AlbT+0XZCjN/30wZxEAv/PbH2nN9XdYQ4Znmmbfv3cY D3/4HEYi3ysGiAsFHnVr5P6MzuGPU/FcEcxzVQIrXmuswGGRAwNHahKvsczzu3Ud 87kAjl0W41oxShoBfsYj/OrkltIB/eej7lcvp7/WvR8= 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 2A51E7FF38; Mon, 12 Nov 2018 16:01:37 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a77 From: Juri Linkov To: martin rudalics Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers Organization: LINKOV.NET References: <875zyrrhk8.fsf@mail.linkov.net> <8736t57jcs.fsf@mail.linkov.net> <5BC6E559.3090000@gmx.at> <87zhvcteuy.fsf@mail.linkov.net> <5BC83EE4.8030607@gmx.at> <87h8hig9uw.fsf@mail.linkov.net> <5BC98A5F.5050807@gmx.at> <87ftx0nvoi.fsf@mail.linkov.net> <5BCC374E.603@gmx.at> <87a7n7kz7x.fsf@mail.linkov.net> <5BCD935F.8030309@gmx.at> <87in1szirt.fsf@mail.linkov.net> <5BD03F21.6040807@gmx.at> <87lg6map8e.fsf@mail.linkov.net> <5BD15CE0.7080703@gmx.at> <87va5qf1ox.fsf@mail.linkov.net> <5BD2C4AD.3060402@gmx.at> <87o9awip7q.fsf@mail.linkov.net> <5BE7EE14.1060008@gmx.at> <87ftw7nz26.fsf@mail.linkov.net> <5BE93F99.3010500@gmx.at> Date: Tue, 13 Nov 2018 01:47:17 +0200 In-Reply-To: <5BE93F99.3010500@gmx.at> (martin rudalics's message of "Mon, 12 Nov 2018 09:53:45 +0100") Message-ID: <87tvkluad6.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: gggruggvucftvghtrhhoucdtuddrgedtkedrledtgdduiecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddtjedrvdeggeenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdejrddvgeegpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtoheprhhuuggrlhhitghssehgmhigrdgrthenucevlhhushhtvghrufhiiigvpedv X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32850 Cc: 32850@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 (-) >> Since now finally we have persistence for window configurations, >> I'm going to revive the x-tabs branch. The package wincows.el >> was needed for testing what will be the internal functionality >> in the x-tabs branch. And for the user interface it could use >> what you implemented for displaying tabs in side windows in frame-tabs.el. >> Would you allow using your code from frame-tabs.el in the x-tabs branch? > > Sure. IIRC you used a menubar-like window to implement a tab-bar back > then. Does the "x" stand for X-only? Would this limit us to X-based > builds? The x-tabs branch is for X-based builds, and the gtk-tabs branch that Jan implemented is for GTK-based builds. Both are for the frame-local tab-bars and can't be used for window-local tab-bars. Do you know a solution for window-local tab-bars other than duplicating header-line in each window to provide shelter for tab-bars? From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 13 04:10:00 2018 Received: (at 32850) by debbugs.gnu.org; 13 Nov 2018 09:10:00 +0000 Received: from localhost ([127.0.0.1]:48589 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gMUhs-0002h7-Br for submit@debbugs.gnu.org; Tue, 13 Nov 2018 04:10:00 -0500 Received: from mout.gmx.net ([212.227.15.19]:55285) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gMUhq-0002gv-OX for 32850@debbugs.gnu.org; Tue, 13 Nov 2018 04:09:59 -0500 Received: from [192.168.1.101] ([213.162.73.32]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LnPSg-1fpthY2bCo-00hgHb; Tue, 13 Nov 2018 10:09:50 +0100 Message-ID: <5BEA94D9.5080908@gmx.at> Date: Tue, 13 Nov 2018 10:09:45 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers References: <875zyrrhk8.fsf@mail.linkov.net> <8736t57jcs.fsf@mail.linkov.net> <5BC6E559.3090000@gmx.at> <87zhvcteuy.fsf@mail.linkov.net> <5BC83EE4.8030607@gmx.at> <87h8hig9uw.fsf@mail.linkov.net> <5BC98A5F.5050807@gmx.at> <87ftx0nvoi.fsf@mail.linkov.net> <5BCC374E.603@gmx.at> <87a7n7kz7x.fsf@mail.linkov.net> <5BCD935F.8030309@gmx.at> <87in1szirt.fsf@mail.linkov.net> <5BD03F21.6040807@gmx.at> <87lg6map8e.fsf@mail.linkov.net> <5BD15CE0.7080703@gmx.at> <87va5qf1ox.fsf@mail.linkov.net> <5BD2C4AD.3060402@gmx.at> <87o9awip7q.fsf@mail.linkov.net> <5BE7EE14.1060008@gmx.at> <87ftw7nz26.fsf@mail.linkov.net> <5BE93F99.3010500@gmx.at> <87tvkluad6.fsf@mail.linkov.net> In-Reply-To: <87tvkluad6.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:/IQdyBNpoxA0FutjIr8rCv1APFN1cYIxA5dIS+wfPvXFp/BNIA+ SHV+A7BYFswrDrm4iNnpWkRTWmZAIYzxCi8NT61sUnDg1uk18hyjZlsX0ssf8bJWEWlwokx HVOuTrOQi6QTpb/JWzOrVwlnnlVL4OAlHRChtrIgb4zYEIOt53Kyzo9sCTxSqEcJKN1iS6n iK20nbbwpWjK9Opkj2Vvw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:z3iPIOQgYKE=:nfk1qOrqFl1QVi2Bxud2Oj QzEHXQxlk0EtzTDM8ZbPVRdMJh9GbH6W4dLvu8s/6lJvsIqlbL0GPoRtUqjnr9iKRuG7wRwQ5 UsxZh6oVc7+DDPGmxDZ5EU0xYSdanrmBDx+xbqQgMRZCimHrY4hrnlT1O7QdfaL554GGJzTy+ JCy75xTV+V/EBtO0Mkema8FHGx9ufrqBrXCIgZbdfem4MYXgsP2LISL8r3Y2AK/q+xJCujIAo g1Xpl7ZSekNtNL44SQmpJYefvlgQqyhDdMWMYRCK6wjbQ1b8BquurJXX4i55oYKD1tsJ30qGj yf2WMayH6zs+dCmnZcl/qiT5hVOvh48cMlDcWBJVYO0YE+n1NDaHDV5DR+8KOL3BDRXJRyd8N j3g6c8EwUaO+7H4zbPggG/pXo2O7abvTQp3ppP7Z0cn8TpUyNQR8bnUOnsMv31LWfszWIHt7I 4Pq03CjQQVgt2cX+BH91Qb8sO3XF9hr8uFomNgwsndam4ssyXYqNgbcbfojHSu+wJT5L8RxbF K3rXgVBwH/wqBC+GcwIOkg4qcNhWcbcYPt4n1wqNoNJRpLXmnIzp+VfsBJFsOvhzoklUzzln0 7Wv+6gJuD3Q6PFq0jRK9ms3UKqvFXgPlLwjq+/aKU5+uJOGJ9ptk1RsGbkS7EEeqrL5tvJ5kZ HTqb2sZGD/WeBgNU105uh9UjtV4RM1v+6XesKJz9t0M1dFUOYxrp3Xac+KxAMGzQ3/1mtlUO+ /rc+cYMGG/o5a/CIwtpSTA6n5zI6mwEP32cpcaZVlnbAuWM1AQxcKk9EW80OZyZHeMlxQG8ZW cxPEKiAfac7Yy05z0KXFMmcy5CmukESh8QyLZ9V6l92hJEqL90bSck0/DMQGsl8dSL+hwP30q rOVWpDrE9caSMQDTuGYJqI9AJT3COmGnFjHvMRdt+sEn5S6jH2hDKe/RIPxdn9 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32850 Cc: 32850@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 x-tabs branch is for X-based builds, and the gtk-tabs branch > that Jan implemented is for GTK-based builds. Both are for the > frame-local tab-bars and can't be used for window-local tab-bars. > Do you know a solution for window-local tab-bars other than > duplicating header-line in each window to provide shelter for tab-bars? Mine uses atomic windows. But window-local tab-bars are not really useful for displaying window configurations anyway (just like mode-lines are not suited for displaying the battery charge IMHO). Anyway, the problem with an X-based solution is that we would have to find a solution for non-X-based systems. How "much" X-dependency does x-tabs have? martin From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 13 18:49:54 2018 Received: (at 32850) by debbugs.gnu.org; 13 Nov 2018 23:49:54 +0000 Received: from localhost ([127.0.0.1]:50748 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gMiRO-0005Jv-4u for submit@debbugs.gnu.org; Tue, 13 Nov 2018 18:49:54 -0500 Received: from otter.birch.relay.mailchannels.net ([23.83.209.139]:53775) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gMiRM-0005Jn-OD for 32850@debbugs.gnu.org; Tue, 13 Nov 2018 18:49: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 9AA6C124A7A; Tue, 13 Nov 2018 23:49:51 +0000 (UTC) Received: from pdx1-sub0-mail-a77.g.dreamhost.com (unknown [100.96.35.77]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 4D538124B5E; Tue, 13 Nov 2018 23:49:51 +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:51 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-White-Hook: 29e3e3637684dabf_1542152991452_717858294 X-MC-Loop-Signature: 1542152991452:1115729490 X-MC-Ingress-Time: 1542152991451 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 0E8AA80051; Tue, 13 Nov 2018 15:49: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=rOC9bIeA1vnr6uDW23kryLSGwyQ=; b= G4OlqzLRfGZpebSyNSb/D1RoBL81cADTkGE7Jt8buPFcuVFkGa64l12nOwoTaFmB vfSx0P3BIFY4kRC+Wetj2v0skWcii83Oi/mzrgDNjJ9gYJVpER3zxI9vlKVzc8L4 rS5jwINDLz35iFgEs7NNaZY1bMEEiQtvBLQwKqiaGZY= 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 39A128004F; Tue, 13 Nov 2018 15:49:48 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a77 From: Juri Linkov To: martin rudalics Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers Organization: LINKOV.NET References: <875zyrrhk8.fsf@mail.linkov.net> <87zhvcteuy.fsf@mail.linkov.net> <5BC83EE4.8030607@gmx.at> <87h8hig9uw.fsf@mail.linkov.net> <5BC98A5F.5050807@gmx.at> <87ftx0nvoi.fsf@mail.linkov.net> <5BCC374E.603@gmx.at> <87a7n7kz7x.fsf@mail.linkov.net> <5BCD935F.8030309@gmx.at> <87in1szirt.fsf@mail.linkov.net> <5BD03F21.6040807@gmx.at> <87lg6map8e.fsf@mail.linkov.net> <5BD15CE0.7080703@gmx.at> <87va5qf1ox.fsf@mail.linkov.net> <5BD2C4AD.3060402@gmx.at> <87o9awip7q.fsf@mail.linkov.net> <5BE7EE14.1060008@gmx.at> <87ftw7nz26.fsf@mail.linkov.net> <5BE93F99.3010500@gmx.at> <87tvkluad6.fsf@mail.linkov.net> <5BEA94D9.5080908@gmx.at> Date: Wed, 14 Nov 2018 01:43:15 +0200 In-Reply-To: <5BEA94D9.5080908@gmx.at> (martin rudalics's message of "Tue, 13 Nov 2018 10:09:45 +0100") Message-ID: <87bm6s5yss.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: gggruggvucftvghtrhhoucdtuddrgedtkedrledvgddufecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddtjedrvdeggeenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdejrddvgeegpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtoheprhhuuggrlhhitghssehgmhigrdgrthenucevlhhushhtvghrufhiiigvpedu 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: >> The x-tabs branch is for X-based builds, and the gtk-tabs branch >> that Jan implemented is for GTK-based builds. Both are for the >> frame-local tab-bars and can't be used for window-local tab-bars. >> Do you know a solution for window-local tab-bars other than >> duplicating header-line in each window to provide shelter for tab-bars? > > Mine uses atomic windows. [...] 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.139 listed in bl.score.senderscore.com] X-Debbugs-Envelope-To: 32850 Cc: 32850@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 (/) >> The x-tabs branch is for X-based builds, and the gtk-tabs branch >> that Jan implemented is for GTK-based builds. Both are for the >> frame-local tab-bars and can't be used for window-local tab-bars. >> Do you know a solution for window-local tab-bars other than >> duplicating header-line in each window to provide shelter for tab-bars? > > Mine uses atomic windows. I thought side windows, no? > But window-local tab-bars are not really useful for displaying window > configurations anyway Yes, they are not useful for window configurations, but window-local tab-bars are extremely useful for displaying the list of prev/next buffers as tabs. So the user can see the names of all buffers that were displayed in the window, and clicking on the tab will switch to any of previously displayed buffers. And clicking on [x] will remove the buffer from the list of previous window-local buffers. > (just like mode-lines are not suited for displaying the battery charge > IMHO). I agree, mode-lines duplicate the battery charge information in every window. What do you think about creating the frame-local mode-line using the bottom side window? > Anyway, the problem with an X-based solution is that we would have to > find a solution for non-X-based systems. How "much" X-dependency does > x-tabs have? The same X-dependency as the tool-bar uses, and there is no tool-bar on non-X-based systems. From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 14 03:35:01 2018 Received: (at 32850) by debbugs.gnu.org; 14 Nov 2018 08:35:01 +0000 Received: from localhost ([127.0.0.1]:50932 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gMqdY-00015I-Pt for submit@debbugs.gnu.org; Wed, 14 Nov 2018 03:35:01 -0500 Received: from mout.gmx.net ([212.227.15.18]:47297) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gMqdW-000153-Oz for 32850@debbugs.gnu.org; Wed, 14 Nov 2018 03:34:59 -0500 Received: from [192.168.1.101] ([212.95.5.83]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0M0Ppl-1fUSWt34aT-00udZf; Wed, 14 Nov 2018 09:34:50 +0100 Message-ID: <5BEBDE23.8000402@gmx.at> Date: Wed, 14 Nov 2018 09:34:43 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers References: <875zyrrhk8.fsf@mail.linkov.net> <87zhvcteuy.fsf@mail.linkov.net> <5BC83EE4.8030607@gmx.at> <87h8hig9uw.fsf@mail.linkov.net> <5BC98A5F.5050807@gmx.at> <87ftx0nvoi.fsf@mail.linkov.net> <5BCC374E.603@gmx.at> <87a7n7kz7x.fsf@mail.linkov.net> <5BCD935F.8030309@gmx.at> <87in1szirt.fsf@mail.linkov.net> <5BD03F21.6040807@gmx.at> <87lg6map8e.fsf@mail.linkov.net> <5BD15CE0.7080703@gmx.at> <87va5qf1ox.fsf@mail.linkov.net> <5BD2C4AD.3060402@gmx.at> <87o9awip7q.fsf@mail.linkov.net> <5BE7EE14.1060008@gmx.at> <87ftw7nz26.fsf@mail.linkov.net> <5BE93F99.3010500@gmx.at> <87tvkluad6.fsf@mail.linkov.net> <5BEA94D9.5080908@gmx.at> <87bm6s5yss.fsf@mail.linkov.net> In-Reply-To: <87bm6s5yss.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:fsrf3rC84+pLGPQI5mXgTNwG1O5rVl+yr2w7vW8RJW1HLO547Qn EZsY3vkw0ZY8xyt8RY4WOZEilCeiqJA8slShj07KuZPTo9CXQVwGkjJuUZC8HKCjGYL26jL KR1uBUD0s7/TnqSYPkATsxeFW0bm0gi7fUQCmfp5qG3QUmLgYYEIka1xLb8UCW+BUVPfXHg jHo0Cqwxn27igNaXQsaVw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:k+8DGr2Sy4U=:gRimyUJ5RhjtCTNdWwHT1z KHOJAdIf6uWZHh+GSC5NpV8j2370OwoQTsu1B+ION1cuIjttOnaAUEIMwZrNgNylytaRmr922 CbuwzMRL/NKi79CcDvWlqJFWwn91FfqZvsGKaKhrj9NbR0F2tjLdgUd/Usv6p0O8Psot6kcNH ECGjyi/RuholbTxzSF7yogutUEnzmSdL5iQXK8q3LotxwZY0dYJnhz/Ys2yDXjEnOomlyiely yzgs1Q6euNQzwjX5gy0aYrMxMlNPII3an80vTIDFbnYWocp2reYddS+x7vVWEeyEfaLPyJgC8 xyigzRLwgZar/LVSflXTJJRaNbpErHo2nwOIFlztvHnE3MT0dy84SLkcsPNjQAsqwMTDzfaDS Ac/Vmheom2ErWW1bPn0iuCbg7TbSTkwp9BgpLhuooqThhn27K66pQJW4yn5fA/j/qMcJHr+Gk kf8k+eOBzNI7GrGgFfNye7JTihzOZoQiYjgZNE7rM/jRLr9wu1andkhMhpjMCc8zvyuVWtGLG 7jjlq7krasYP9eTMbWlPPC3rWH/5VFZ9/kXCqgII/rs04SpeIbC5KIh+4JiId8Ioebasx4byE wB0wXlBl+Md+XuPQxeo3tTq+BqPZPsq+BEFaD2qHatY0L2B7CmCV+wWVMni5hCxeL92utNwR6 QhyIHrS0b5hngM+CowUABDjMQKSNNPT8leFEwavB7twTotZVahW61SUHGyFpdneppxfLmRt5+ LBajumXAWmsjbPhZxua7vKCFeCdMOYAwl/o9KZIG+svfQwf/jcIZU7vBcSVsSQkfRk2DRxZzm EmPDOdRn5ca0vhBaIuESaghWrbd7C/WpZnak+gEL8QhNMMABP/xlxFbgi5duHrlqCJXQpiQxI O9mFWJKVvdZxwM1jvTGdw1fzb4xvF1b6UvEuMQQbxQ4w0Jrg2cIHBQe1LTiGcH X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32850 Cc: 32850@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 x-tabs branch is for X-based builds, and the gtk-tabs branch >>> that Jan implemented is for GTK-based builds. Both are for the >>> frame-local tab-bars and can't be used for window-local tab-bars. >>> Do you know a solution for window-local tab-bars other than >>> duplicating header-line in each window to provide shelter for tab-bars? >> >> Mine uses atomic windows. > > I thought side windows, no? Atomic windows. Side windows are used for the frame-local tab-bar. >> But window-local tab-bars are not really useful for displaying window >> configurations anyway > > Yes, they are not useful for window configurations, but > window-local tab-bars are extremely useful for displaying > the list of prev/next buffers as tabs. So the user can see > the names of all buffers that were displayed in the window, > and clicking on the tab will switch to any of previously > displayed buffers. And clicking on [x] will remove the > buffer from the list of previous window-local buffers. That was my idea behind window-local tab-bars back then. Today I think that we should instead pop up a menu of previous buffers when moving the mouse over the mode-line's buffer-name. > I agree, mode-lines duplicate the battery charge information > in every window. What do you think about creating the frame-local > mode-line using the bottom side window? By default I would display them (possibly right-adjusted) only in the mode-line of the bottom-most-right-most window. martin From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 14 19:31:51 2018 Received: (at 32850) by debbugs.gnu.org; 15 Nov 2018 00:31:52 +0000 Received: from localhost ([127.0.0.1]:52734 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gN5ZX-0001Ov-Nh for submit@debbugs.gnu.org; Wed, 14 Nov 2018 19:31:51 -0500 Received: from catfish.maple.relay.mailchannels.net ([23.83.214.32]:16417) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gN5ZT-0001Od-1x for 32850@debbugs.gnu.org; Wed, 14 Nov 2018 19:31: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 74929281396; Thu, 15 Nov 2018 00:31:45 +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 3B3492824EA; Thu, 15 Nov 2018 00:31:45 +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:45 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Illegal-Trouble: 6856f53f12c1575c_1542241905330_1234750767 X-MC-Loop-Signature: 1542241905330:49176015 X-MC-Ingress-Time: 1542241905329 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 015F3815FB; Wed, 14 Nov 2018 16:31: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=J50tMayH8AYM7OxSu6rZr7WdlpU=; b= pe4WdX6PrtAKVESgDH5T5MawdseRMPEY0U1yyLbXm10x18GaDhnKIpnfUYPB2q5o CGhxy86kJ+WXWMMie6G3C/ptUvScrBBFp2okXW2I5RQHr3FrF1PSNWnMFmOPjCEv DJ7b8XzlrzyqYBFlUkHcstjq7SqsOSvKQsikRgYZKkg= 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 8CA2A815FD; Wed, 14 Nov 2018 16:31:43 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a77 From: Juri Linkov To: martin rudalics Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers Organization: LINKOV.NET References: <875zyrrhk8.fsf@mail.linkov.net> <87h8hig9uw.fsf@mail.linkov.net> <5BC98A5F.5050807@gmx.at> <87ftx0nvoi.fsf@mail.linkov.net> <5BCC374E.603@gmx.at> <87a7n7kz7x.fsf@mail.linkov.net> <5BCD935F.8030309@gmx.at> <87in1szirt.fsf@mail.linkov.net> <5BD03F21.6040807@gmx.at> <87lg6map8e.fsf@mail.linkov.net> <5BD15CE0.7080703@gmx.at> <87va5qf1ox.fsf@mail.linkov.net> <5BD2C4AD.3060402@gmx.at> <87o9awip7q.fsf@mail.linkov.net> <5BE7EE14.1060008@gmx.at> <87ftw7nz26.fsf@mail.linkov.net> <5BE93F99.3010500@gmx.at> <87tvkluad6.fsf@mail.linkov.net> <5BEA94D9.5080908@gmx.at> <87bm6s5yss.fsf@mail.linkov.net> <5BEBDE23.8000402@gmx.at> Date: Thu, 15 Nov 2018 02:02:04 +0200 In-Reply-To: <5BEBDE23.8000402@gmx.at> (martin rudalics's message of "Wed, 14 Nov 2018 09:34:43 +0100") Message-ID: <87pnv7i4xv.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: gggruggvucftvghtrhhoucdtuddrgedtkedrleeggddvhecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddtjedrvdeggeenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdejrddvgeegpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtoheprhhuuggrlhhitghssehgmhigrdgrthenucevlhhushhtvghrufhiiigvpedt X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32850 Cc: 32850@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-local tab-bars are extremely useful for displaying >> the list of prev/next buffers as tabs. So the user can see >> the names of all buffers that were displayed in the window, >> and clicking on the tab will switch to any of previously >> displayed buffers. And clicking on [x] will remove the >> buffer from the list of previous window-local buffers. > > That was my idea behind window-local tab-bars back then. That was a very good idea. > Today I think that we should instead pop up a menu of previous buffers > when moving the mouse over the mode-line's buffer-name. Not intuitive at all. >> I agree, mode-lines duplicate the battery charge information >> in every window. What do you think about creating the frame-local >> mode-line using the bottom side window? > > By default I would display them (possibly right-adjusted) only in the > mode-line of the bottom-most-right-most window. Good idea. Simply to add a conditional display to mode-line-format with (and (not (window-in-direction 'down)) (not (window-in-direction 'left))) From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 15 04:13:17 2018 Received: (at 32850) by debbugs.gnu.org; 15 Nov 2018 09:13:17 +0000 Received: from localhost ([127.0.0.1]:52988 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gNDi9-0007vT-49 for submit@debbugs.gnu.org; Thu, 15 Nov 2018 04:13:17 -0500 Received: from mout.gmx.net ([212.227.15.15]:59387) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gNDi8-0007vG-5V for 32850@debbugs.gnu.org; Thu, 15 Nov 2018 04:13:16 -0500 Received: from [192.168.1.101] ([212.95.5.247]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LhfZR-1fjQyQ44qf-00mohk; Thu, 15 Nov 2018 10:13:08 +0100 Message-ID: <5BED389B.6080008@gmx.at> Date: Thu, 15 Nov 2018 10:12:59 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers References: <875zyrrhk8.fsf@mail.linkov.net> <87h8hig9uw.fsf@mail.linkov.net> <5BC98A5F.5050807@gmx.at> <87ftx0nvoi.fsf@mail.linkov.net> <5BCC374E.603@gmx.at> <87a7n7kz7x.fsf@mail.linkov.net> <5BCD935F.8030309@gmx.at> <87in1szirt.fsf@mail.linkov.net> <5BD03F21.6040807@gmx.at> <87lg6map8e.fsf@mail.linkov.net> <5BD15CE0.7080703@gmx.at> <87va5qf1ox.fsf@mail.linkov.net> <5BD2C4AD.3060402@gmx.at> <87o9awip7q.fsf@mail.linkov.net> <5BE7EE14.1060008@gmx.at> <87ftw7nz26.fsf@mail.linkov.net> <5BE93F99.3010500@gmx.at> <87tvkluad6.fsf@mail.linkov.net> <5BEA94D9.5080908@gmx.at> <87bm6s5yss.fsf@mail.linkov.net> <5BEBDE23.8000402@gmx.at> <87pnv7i4xv.fsf@mail.linkov.net> In-Reply-To: <87pnv7i4xv.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:/L6G7iF55iQVKIJnNUdNJYvL3MAFN/+EZxyDfLFDBUEhQp+jzeJ a1uHNOa9cqMuOtUE8KWKIM5kAiR4ic/ZsbCAPxxJZL5+NnaZeAXHIPmER0gPv33mRIwRr66 0Rmpnp7r9Z2Vk9EMgIBr6RN/MkXbGDf1hDOz0rvlHYNcXcx5+GlD9SjbAnPa0HkhcC/vinf YTMeiFXPrkZ/plAQNHygw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:wNMOgL/fxWk=:hguY6e/B6GBx8fdjKcnn3V PWgF/w0o5/4vRXYOQn/7oBkuA132m8ggv6kfMzN+3XFnN6lOlvgHijjlHuqikcN4qMJTd72u2 aw6NaURxVa0H3aksxpAfqXGZZgcnOUx+u/edoUiqsREjI8xbxoJ1KzN667t1f9I3opEOtnHeU fa7klpCzSkp9hNn1PoBmM7qEH4YdbvVtAzrHFRxCw9R1rgSF7Y9xHvBOM4cxy5xxru/KVRJ7K iRAF8SoTa+pvISP4eUFd8L/louje52OPpAtjncq8VAP8NQwQCr3/cN2UDMuQWGgwSIagkzGdE bUkS2UCJ7o+4edEAwVUP8eb3hM5uvGi0loZZLzcvpWxF1tl46Vbgv3eNDSTXfnNE4LAPPU2dk KM5y4zwycqX/bCYztOwwZqDbxxDoINIPquIUNvjW4Kc5kOypcHr2FE6hrHnvk3UL/w8mkkVdy OzGA55r2Hu1hM19pJItBjmukn/Zb9iuxUIke7UglxG8KwAoGjVQAiNZOBSvE8giRBh+0ZBQ60 1Hl64GuugMBw8EGd9uX5R0zZ7BpNnNQGYKcSaQbXRomZsXgD0AQPrt6BqXnJx43dKJ6sfz2YP RyiJVV+ibfxaYdYs+qFOY9F9mv7n3sgQa1vo5pVRAr6ogxt5dKFv9kyDYkOPpCIg1NaKD2KWP A/XnnB8Nd8Y8MxU7THld3jOjxrHC0f3RV/90YrHCGJQmqkbbsNjiETFRPaqJZUgsHyQ7B8fMH ael6GTNef7OUM3gf6YgZC0oG/OXTTiPnUgiE3BddPjC3QqUXDqqiGvGJvjxb8DJnLi9M7uYBn +fS4nBAgHMYC0pRsiB4Oz9ovaACiscpFKV+JTK8E4n88qFybREfpqY9n/m71kWJiPLdzxDxjO SFstXfRFE5PF7IuE5ogf5Sq0KJE2GSTDyw6ADd4zAVySRVXNDh0PwYj3hp76r7tBpiTkgzDmg pmg4a9c612Q== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32850 Cc: 32850@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 (-) >> Today I think that we should instead pop up a menu of previous buffers >> when moving the mouse over the mode-line's buffer-name. > > Not intuitive at all. Why not? We currently tell there in a tooltip that it's a "buffer name" and how to switch to the previous and next buffer. Is that intuitive? > Good idea. Simply to add a conditional display to mode-line-format with > > (and (not (window-in-direction 'down)) > (not (window-in-direction 'left))) Right-adjusted would be fine to make it more clear that this is not a window-buffer pertinent information. martin From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 15 04:24:01 2018 Received: (at 32850) by debbugs.gnu.org; 15 Nov 2018 09:24:01 +0000 Received: from localhost ([127.0.0.1]:52997 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gNDsV-0008Bx-DF for submit@debbugs.gnu.org; Thu, 15 Nov 2018 04:24:00 -0500 Received: from mout.gmx.net ([212.227.15.19]:48501) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gNDsT-0008Bj-CN for 32850@debbugs.gnu.org; Thu, 15 Nov 2018 04:23:57 -0500 Received: from [192.168.1.101] ([212.95.5.247]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MSv6D-1fvUH3235p-00RrKw; Thu, 15 Nov 2018 10:23:48 +0100 Message-ID: <5BED3B1B.3000609@gmx.at> Date: Thu, 15 Nov 2018 10:23:39 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers References: <875zyrrhk8.fsf@mail.linkov.net> <87h8hig9uw.fsf@mail.linkov.net> <5BC98A5F.5050807@gmx.at> <87ftx0nvoi.fsf@mail.linkov.net> <5BCC374E.603@gmx.at> <87a7n7kz7x.fsf@mail.linkov.net> <5BCD935F.8030309@gmx.at> <87in1szirt.fsf@mail.linkov.net> <5BD03F21.6040807@gmx.at> <87lg6map8e.fsf@mail.linkov.net> <5BD15CE0.7080703@gmx.at> <87va5qf1ox.fsf@mail.linkov.net> <5BD2C4AD.3060402@gmx.at> <87o9awip7q.fsf@mail.linkov.net> <5BE7EE14.1060008@gmx.at> <87ftw7nz26.fsf@mail.linkov.net> <5BE93F99.3010500@gmx.at> <87tvkluad6.fsf@mail.linkov.net> <5BEA94D9.5080908@gmx.at> <87bm6s5yss.fsf@mail.linkov.net> <5BEBDE23.8000402@gmx.at> <87pnv7i4xv.fsf@mail.linkov.net> In-Reply-To: <87pnv7i4xv.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:TSyEOWW4dTisSxQwJ8u12sfqAEsR2n75mLVk0c5ycMsxtYD1QCW RwzklIHsJLdtjpaJzSqsH1ZDlBDI99ekbmWpvuEuXLfnxN/IsSRaA5LiGCMyHMv7hzERhot cZMVEfLPN/ZDVlCAWI7Pb4+UO5tx0znVDP2Bmu6IU+a1irnw5rg5Ket0M49vlzn5OWUtKLW l1I50xBsJ1ZpLVJJRpRhw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:m98t7pfrLas=:ECbgnq1NdcK98+zoOXIrsh CfSv9N/ULxCiSOKrI12M2leoTzHIKMpLDVKs/qQNJ703u1L2l2N9Lk9DmnLiQPOsfy4dLRz9k MPZ2svfLaV/wLJqZhy7vP4EjXzs3F+2tiszv3CSb6ToMTMd/LyAd7tlBkrgtFnLJHL1D2Eb8a oRZ0bCycxPF7tVGbIjJjEW4nQv/Co89uRPubpl4YCY+knrzJJpbf+Kmx3mzoe5+exondULlc+ gWm9k9kub/tin5UqAIQ9ht0FqTeFdnqmQHWBtbxS/BSp7HTTEbqNmZB0J2rqgC7+nAAjCDdvG WIpQusm75Dzs5230BlrHcjgh5h+R85eRe8aZQFX8l3sBsLQ1udgRYDtsmbVGZEBxbtnW9q3GG 4dpWHalOX5oSJ67jKHRFdnXcX37DW9jG0r8SoI1LbxAZe9I/q1UaSyVNIHcduiLPqRlE6Mw+m zVPHamw96TtLeoi6IsX8hLVHSvg/zIQ0Ox0FbXh2U5QSOSUih2OMvRkbrTbpamHrzmUV9I5hT edC+xm/++qNAHwibcE7EvJJgLyd+QUtHfEHg+m0R+vBKnMcfyyu8h28mogD535rTVpl4RTU0i GtgtvUh2DegZcM605mc4S07FRPOMOF7c0BGm+jnX4+9V+594jbTyyI35IbPyo7ptlHWPi9xvN e+zRRDwriw60RAXd1vT1yJdHzsAFgoehDDVYVRIyUZp20i4pigXLzTLGMab0GQOyqNqGVPJ6z iycz9mxDcuS42/ht0dxxCAZ2Fg/+myFDySdhNvR17z6vo0IAMzldLyVXsiJPVMX3UbJ3vRnNy Ck1BTO077/ieEBCOUtmqvUNZUOmoWI7AlC7gB76PdgkyXvyCGIajZfohzYF3C3yl09Fwc+qsi iymZAJPqPICaNu+7xUNl6iMUf6HIhoN6TZRghLpDAG9zws5aqah9cyXwL6/8GbPzjfS5HpJyJ Qq+7eE7uVOQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32850 Cc: 32850@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 (-) > Good idea. Simply to add a conditional display to mode-line-format with > > (and (not (window-in-direction 'down)) > (not (window-in-direction 'left))) I forgot. You probably mean (and (not (window-in-direction 'down nil nil nil nil 'nomini)) (not (window-in-direction 'right nil nil nil nil 'nomini))) here. martin From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 15 16:53:05 2018 Received: (at 32850) by debbugs.gnu.org; 15 Nov 2018 21:53:05 +0000 Received: from localhost ([127.0.0.1]:54520 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gNPZQ-0007Ng-RV for submit@debbugs.gnu.org; Thu, 15 Nov 2018 16:53:05 -0500 Received: from eastern.maple.relay.mailchannels.net ([23.83.214.55]:51742) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gNPZN-0007N1-Tn for 32850@debbugs.gnu.org; Thu, 15 Nov 2018 16:53:03 -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 62D4B3E34C0; Thu, 15 Nov 2018 21:53:00 +0000 (UTC) Received: from pdx1-sub0-mail-a77.g.dreamhost.com (unknown [100.96.19.74]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id ECC153E43EF; Thu, 15 Nov 2018 21:52:59 +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 21:53:00 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Spot-Suffer: 535987ec5d449a01_1542318780209_3409008144 X-MC-Loop-Signature: 1542318780209:3577450106 X-MC-Ingress-Time: 1542318780208 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 B428D80287; Thu, 15 Nov 2018 13:52: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=nTrhcr4OM4hbE0XAX8dBb8hVgyM=; b= A8j0yTnTsEdpetENAvisgwgpn1UZVIVvWNgL6P18Cjh2hra3eROhJGLOWSMKVgoX tFXqGDSTHGC5IsCB/ToD3KOvA9pXE6TAhP1f7C2qcNRP4MQOxE8SSaBcHqFHuycv UjhgLUzok7ifT1768Z/TQzFcwagygJ1vvEdHeMx+sTo= 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 142D180276; Thu, 15 Nov 2018 13:52:57 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a77 From: Juri Linkov To: martin rudalics Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers Organization: LINKOV.NET References: <875zyrrhk8.fsf@mail.linkov.net> <87ftx0nvoi.fsf@mail.linkov.net> <5BCC374E.603@gmx.at> <87a7n7kz7x.fsf@mail.linkov.net> <5BCD935F.8030309@gmx.at> <87in1szirt.fsf@mail.linkov.net> <5BD03F21.6040807@gmx.at> <87lg6map8e.fsf@mail.linkov.net> <5BD15CE0.7080703@gmx.at> <87va5qf1ox.fsf@mail.linkov.net> <5BD2C4AD.3060402@gmx.at> <87o9awip7q.fsf@mail.linkov.net> <5BE7EE14.1060008@gmx.at> <87ftw7nz26.fsf@mail.linkov.net> <5BE93F99.3010500@gmx.at> <87tvkluad6.fsf@mail.linkov.net> <5BEA94D9.5080908@gmx.at> <87bm6s5yss.fsf@mail.linkov.net> <5BEBDE23.8000402@gmx.at> <87pnv7i4xv.fsf@mail.linkov.net> <5BED389B.6080008@gmx.at> Date: Thu, 15 Nov 2018 23:30:48 +0200 In-Reply-To: <5BED389B.6080008@gmx.at> (martin rudalics's message of "Thu, 15 Nov 2018 10:12:59 +0100") Message-ID: <877ehexdhb.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: gggruggvucftvghtrhhoucdtuddrgedtkedrleehgddugeekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdejrddvgeegnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtjedrvdeggedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgeptd X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32850 Cc: 32850@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 (-) >>> Today I think that we should instead pop up a menu of previous buffers >>> when moving the mouse over the mode-line's buffer-name. >> >> Not intuitive at all. > > Why not? We currently tell there in a tooltip that it's a "buffer > name" and how to switch to the previous and next buffer. Is that > intuitive? I don't use the mouse. Whereas window-local tab-bar showing a list of prev/next-buffers allows using the keyboard to navigate. For example, when the window-local tab-bar shows such tabs: [buffer-2] [buffer-1] [current-buffer] [buffer+1] [buffer+2] Then I know that I can just type `C-2 C-x left' to get to the second previous buffer, or to get the second next buffer with `C-2 C-x right'. >> Good idea. Simply to add a conditional display to mode-line-format with >> >> (and (not (window-in-direction 'down)) >> (not (window-in-direction 'left))) > > Right-adjusted would be fine to make it more clear that this is not a > window-buffer pertinent information. If there is enough space to put global information. For example, in Gnus mode-lines are so long, that have no free space for more information. > I forgot. You probably mean > > (and (not (window-in-direction 'down nil nil nil nil 'nomini)) > (not (window-in-direction 'right nil nil nil nil 'nomini))) > > here. Exactly. From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 16 03:53:10 2018 Received: (at 32850) by debbugs.gnu.org; 16 Nov 2018 08:53:10 +0000 Received: from localhost ([127.0.0.1]:54710 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gNZsE-0008Ix-3R for submit@debbugs.gnu.org; Fri, 16 Nov 2018 03:53:10 -0500 Received: from mout.gmx.net ([212.227.15.18]:42207) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gNZsB-0008Ie-SD for 32850@debbugs.gnu.org; Fri, 16 Nov 2018 03:53:08 -0500 Received: from [192.168.1.101] ([212.95.5.219]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Lgql4-1fiF6V3QIA-00oBdo; Fri, 16 Nov 2018 09:52:57 +0100 Message-ID: <5BEE855D.3080801@gmx.at> Date: Fri, 16 Nov 2018 09:52:45 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers References: <875zyrrhk8.fsf@mail.linkov.net> <87ftx0nvoi.fsf@mail.linkov.net> <5BCC374E.603@gmx.at> <87a7n7kz7x.fsf@mail.linkov.net> <5BCD935F.8030309@gmx.at> <87in1szirt.fsf@mail.linkov.net> <5BD03F21.6040807@gmx.at> <87lg6map8e.fsf@mail.linkov.net> <5BD15CE0.7080703@gmx.at> <87va5qf1ox.fsf@mail.linkov.net> <5BD2C4AD.3060402@gmx.at> <87o9awip7q.fsf@mail.linkov.net> <5BE7EE14.1060008@gmx.at> <87ftw7nz26.fsf@mail.linkov.net> <5BE93F99.3010500@gmx.at> <87tvkluad6.fsf@mail.linkov.net> <5BEA94D9.5080908@gmx.at> <87bm6s5yss.fsf@mail.linkov.net> <5BEBDE23.8000402@gmx.at> <87pnv7i4xv.fsf@mail.linkov.net> <5BED389B.6080008@gmx.at> <877ehexdhb.fsf@mail.linkov.net> In-Reply-To: <877ehexdhb.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:OkZMP7GUtSRLobbPa+A4Pz4lcDJJLHp84/cq7JEB2hMDzuVvH7u GUOHoEpZY275FdJIebZxqHaLrICquREjpVub0ZjzkjJ+LwEK0e9MiWWyhx/Zzo1LyrUQJTP FrHosNEop7drLVcOor2qfX6NBiuI1jeNtTgu47YMiFhC+pDoh7EpyzJBdX61hIwv42L2OtC ncnyyzVHjhxsV/QyxiZ7Q== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:cfQoADmBNSI=:mU98443Wxjy6Ntw2r9ojsN UN63xyqPxmSfYnxFoN5yy5lDQR7T0J7CpXk7kCgeouZX7A3xEYiIu8HziXHcGWRK6/i7u+55g dKyZBHRCrvbmy92N4S0+XugbhjHD/wkrnxYxzgSJsPytqEId0vJQC7dvIOk4XBrHO2h5h42Na cLPjhxm4nyJQmAMvZr1aMdODwzMBhxTcEImldj+to+Abj3h0no0RSFn48b7MM9KD0dFeXHN9i tywQ/7mf4XwP3hJjbyuckFEYCNzlV57fdk7jdCaYoSePwof8qG26EPvVQogrMAAqeVPJPf5AJ jrdEYeZJu1AfT4rcTptO7L1MEZzmj5IQYyDMUM2cJklQq8cbXxw3+x33BRrTgfhYq9Soq8Of0 nYBkmKEJVtFnrga0jMYIP8/qCyClfCFk8nEiBZIXRLXLImEM/YKUjsgD0O6UK7JfDqiGU5yYT NRZ2W2/mFCQC19AYeB+pX9esKF5La50zfu7lSrW1T4TV5UHYm+AZZLtJzb8XaGOvvsIGc/Fwe 1vCWxUWJAwEEZZDCF/+xiSLD0CrN+DtdVtS6f2Aj8CLcMSH2i02fe1+naXxmatXZ16K+SHYeA ihQmKWCD+txadwCtsiuIC8SpBUop/dvUWLYOPZ8Ziul50TGlmPzJzTJmVWGYAxQHNv0NpBUjy GveL09EA8hlKNGzcngu9hR8pqO6L9Gfxa5EpZ9uvAweHIeJjWRsJDXQq2lr+cH49gy9B8QDSo 3OwLEZndSps/eSf0LNnEMdIm9see+wcKYRc/umF17cEJGDXrKOSHJ8FA1BF+WelfrihdmFrCn JDcBOTeKqcdFNokfPHyFze5CxzIwVsHAlkJo0l4uHS+z/3alIct2zrM0zoFooe88QfdZXFgbC K0GX55WKtAjCzbXGLTcpf/l9cx1XN8cdWy0bL97rIt3wOt6hEx+BIpSI7qu5E6V8j6I156EOp tG8f0Gu4NYg== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32850 Cc: 32850@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 don't use the mouse. Whereas window-local tab-bar showing a list > of prev/next-buffers allows using the keyboard to navigate. > For example, when the window-local tab-bar shows such tabs: > > [buffer-2] [buffer-1] [current-buffer] [buffer+1] [buffer+2] > > Then I know that I can just type `C-2 C-x left' to get to the second > previous buffer, or to get the second next buffer with `C-2 C-x right'. Then we at least facultatively should show that prefix number in the tab. In either case you don't necessarily need window-local tabs for that. We could have the frame's tabbar show tabs in the order of the frame's selected window. martin From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 17 12:00:21 2018 Received: (at 32850) by debbugs.gnu.org; 17 Nov 2018 17:00:21 +0000 Received: from localhost ([127.0.0.1]:58101 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gO3xF-0006Vs-IP for submit@debbugs.gnu.org; Sat, 17 Nov 2018 12:00:21 -0500 Received: from sinyavsky.aurox.ch ([37.35.109.145]:34024) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gO3xC-0006Ve-SR for 32850@debbugs.gnu.org; Sat, 17 Nov 2018 12:00:20 -0500 Received: from sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) by sinyavsky.aurox.ch (Postfix) with ESMTP id 43AF422993 for <32850@debbugs.gnu.org>; Sat, 17 Nov 2018 17:04:55 +0000 (UTC) Authentication-Results: sinyavsky.aurox.ch (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=aurox.ch DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aurox.ch; h= references:reply-to:subject:subject:in-reply-to:to:from:from :message-id:date:date; s=dkim; t=1542474293; x=1543338294; bh=T1 uTdY/eyiCuH0chWEOgnH55X/drF2jSmjUgDg0Ru9Q=; b=YrY7T1YyJYSU2JnQAn Rbr03+Q1j1XnQKLU1lZSiPn+fcw/9F8/se2IjgKUBgUGyBggiwnKejsA3M4EYOMP hlCy61J9Ae7NTOSFafFFOvq5HiSZqEXXLJzxoa3eloT2oHV0lW6Lfe3Zh6n0avKs olMrlELjm0rLBuffCeRuE1GSg= X-Virus-Scanned: Debian amavisd-new at test.virtualizor.com Received: from sinyavsky.aurox.ch ([127.0.0.1]) by sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id bQEYW7xXnxE8 for <32850@debbugs.gnu.org>; Sat, 17 Nov 2018 17:04:53 +0000 (UTC) Received: from gray (unknown [IPv6:2a02:1205:34ff:bc50:c62c:3ff:fe30:b864]) by sinyavsky.aurox.ch (Postfix) with ESMTPSA id 14768228C2; Sat, 17 Nov 2018 17:04:53 +0000 (UTC) Date: Sat, 17 Nov 2018 18:01:51 +0100 Message-Id: From: charles@aurox.ch (Charles A. Roelli) To: Juri Linkov In-reply-to: <877ehexdhb.fsf@mail.linkov.net> (message from Juri Linkov on Thu, 15 Nov 2018 23:30:48 +0200) Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers References: <875zyrrhk8.fsf@mail.linkov.net> <87ftx0nvoi.fsf@mail.linkov.net> <5BCC374E.603@gmx.at> <87a7n7kz7x.fsf@mail.linkov.net> <5BCD935F.8030309@gmx.at> <87in1szirt.fsf@mail.linkov.net> <5BD03F21.6040807@gmx.at> <87lg6map8e.fsf@mail.linkov.net> <5BD15CE0.7080703@gmx.at> <87va5qf1ox.fsf@mail.linkov.net> <5BD2C4AD.3060402@gmx.at> <87o9awip7q.fsf@mail.linkov.net> <5BE7EE14.1060008@gmx.at> <87ftw7nz26.fsf@mail.linkov.net> <5BE93F99.3010500@gmx.at> <87tvkluad6.fsf@mail.linkov.net> <5BEA94D9.5080908@gmx.at> <87bm6s5yss.fsf@mail.linkov.net> <5BEBDE23.8000402@gmx.at> <87pnv7i4xv.fsf@mail.linkov.net> <5BED389B.6080008@gmx.at> <877ehexdhb.fsf@mail.linkov.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 32850 Cc: rudalics@gmx.at, 32850@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: , Reply-To: charles@aurox.ch Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Juri Linkov > Date: Thu, 15 Nov 2018 23:30:48 +0200 > > I don't use the mouse. Whereas window-local tab-bar showing a list > of prev/next-buffers allows using the keyboard to navigate. > For example, when the window-local tab-bar shows such tabs: > > [buffer-2] [buffer-1] [current-buffer] [buffer+1] [buffer+2] > > Then I know that I can just type `C-2 C-x left' to get to the second > previous buffer, or to get the second next buffer with `C-2 C-x right'. C-x and C-x do not yet support prefix args, right? From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 17 17:01:53 2018 Received: (at 32850) by debbugs.gnu.org; 17 Nov 2018 22:01:53 +0000 Received: from localhost ([127.0.0.1]:58189 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gO8f3-0007VL-6w for submit@debbugs.gnu.org; Sat, 17 Nov 2018 17:01:53 -0500 Received: from common.maple.relay.mailchannels.net ([23.83.214.38]:31839) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gO8f1-0007VC-JI for 32850@debbugs.gnu.org; Sat, 17 Nov 2018 17:01: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 C67915C3A28; Sat, 17 Nov 2018 22:01:49 +0000 (UTC) Received: from pdx1-sub0-mail-a77.g.dreamhost.com (unknown [100.96.11.179]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 7BCD75C214E; Sat, 17 Nov 2018 22:01:49 +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:01:49 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Decisive-Shoe: 30cf6eb1721cf275_1542492109614_3748937724 X-MC-Loop-Signature: 1542492109613:3597281269 X-MC-Ingress-Time: 1542492109613 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 3BAC4804C8; Sat, 17 Nov 2018 14:01: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=1VxzHpHOs5puCmpUQNsUnKuc07w=; b= BL8q0gWBXT9x3nrDzRD6/ERIWwz3ki+AIYIkYmx3G171Hq0G4EN/WeCS4VGOM8Qg C86Z8jnEnVi8/URvpxY7nwTxqqGLiqJx6797f+WQxSq6zJCczFVPMi22WP9869rT Q53Mgu3loLui+4VfluO+YtPVLhJZZC/RS83cJgL8OH4= 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 AF352804CB; Sat, 17 Nov 2018 14:01:46 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a77 From: Juri Linkov To: charles@aurox.ch (Charles A. Roelli) Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers Organization: LINKOV.NET References: <875zyrrhk8.fsf@mail.linkov.net> <87a7n7kz7x.fsf@mail.linkov.net> <5BCD935F.8030309@gmx.at> <87in1szirt.fsf@mail.linkov.net> <5BD03F21.6040807@gmx.at> <87lg6map8e.fsf@mail.linkov.net> <5BD15CE0.7080703@gmx.at> <87va5qf1ox.fsf@mail.linkov.net> <5BD2C4AD.3060402@gmx.at> <87o9awip7q.fsf@mail.linkov.net> <5BE7EE14.1060008@gmx.at> <87ftw7nz26.fsf@mail.linkov.net> <5BE93F99.3010500@gmx.at> <87tvkluad6.fsf@mail.linkov.net> <5BEA94D9.5080908@gmx.at> <87bm6s5yss.fsf@mail.linkov.net> <5BEBDE23.8000402@gmx.at> <87pnv7i4xv.fsf@mail.linkov.net> <5BED389B.6080008@gmx.at> <877ehexdhb.fsf@mail.linkov.net> Date: Sun, 18 Nov 2018 00:01:14 +0200 In-Reply-To: (Charles A. Roelli's message of "Sat, 17 Nov 2018 18:01:51 +0100") Message-ID: <8736rzwehh.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: gggruggvucftvghtrhhoucdtuddrgedtkedrleelgdduiedtucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdejrddvgeegnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtjedrvdeggedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopegthhgrrhhlvghssegruhhrohigrdgthhenucevlhhushhtvghrufhiiigvpedu X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32850 Cc: rudalics@gmx.at, 32850@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 use the mouse. Whereas window-local tab-bar showing a list >> of prev/next-buffers allows using the keyboard to navigate. >> For example, when the window-local tab-bar shows such tabs: >> >> [buffer-2] [buffer-1] [current-buffer] [buffer+1] [buffer+2] >> >> Then I know that I can just type `C-2 C-x left' to get to the second >> previous buffer, or to get the second next buffer with `C-2 C-x right'. > > C-x and C-x do not yet support prefix args, right? Right, we need to support prefix args of C-x and C-x . From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 17 17:14:57 2018 Received: (at 32850) by debbugs.gnu.org; 17 Nov 2018 22:14:57 +0000 Received: from localhost ([127.0.0.1]:58201 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gO8rh-0007nc-4H for submit@debbugs.gnu.org; Sat, 17 Nov 2018 17:14:57 -0500 Received: from otter.birch.relay.mailchannels.net ([23.83.209.139]:62642) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gO8re-0007nT-QB for 32850@debbugs.gnu.org; Sat, 17 Nov 2018 17:14:55 -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 2320128307D; Sat, 17 Nov 2018 22:14:53 +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 D90B5283084; Sat, 17 Nov 2018 22:14:52 +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:14:53 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Exultant-Robust: 14ce42380a297f0e_1542492892979_2411989260 X-MC-Loop-Signature: 1542492892979:1942735022 X-MC-Ingress-Time: 1542492892978 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 960B8804CF; Sat, 17 Nov 2018 14:14: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=54gu85UwlDcOeAAQbvQfxZ96M30=; b= E37bxrxfSoWNqKgDvaBjtPKVWPn28tZ40CmSFebqojroDYFQWrYAnBhPLzfbgr3M WvZ9UrkpT/TEFYSX9wub3BlFCHvTWDuvfmvWDHT0vvMQmiE5LErY+IdiAItqCOBP 5bPn3PXMI1H3+W4gJIz8kAujl8WSooyAUwzFYAhDzy0= 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 AB99F804CD; Sat, 17 Nov 2018 14:14:50 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a77 From: Juri Linkov To: martin rudalics Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers Organization: LINKOV.NET References: <875zyrrhk8.fsf@mail.linkov.net> <87a7n7kz7x.fsf@mail.linkov.net> <5BCD935F.8030309@gmx.at> <87in1szirt.fsf@mail.linkov.net> <5BD03F21.6040807@gmx.at> <87lg6map8e.fsf@mail.linkov.net> <5BD15CE0.7080703@gmx.at> <87va5qf1ox.fsf@mail.linkov.net> <5BD2C4AD.3060402@gmx.at> <87o9awip7q.fsf@mail.linkov.net> <5BE7EE14.1060008@gmx.at> <87ftw7nz26.fsf@mail.linkov.net> <5BE93F99.3010500@gmx.at> <87tvkluad6.fsf@mail.linkov.net> <5BEA94D9.5080908@gmx.at> <87bm6s5yss.fsf@mail.linkov.net> <5BEBDE23.8000402@gmx.at> <87pnv7i4xv.fsf@mail.linkov.net> <5BED389B.6080008@gmx.at> <877ehexdhb.fsf@mail.linkov.net> <5BEE855D.3080801@gmx.at> Date: Sun, 18 Nov 2018 00:04:04 +0200 In-Reply-To: <5BEE855D.3080801@gmx.at> (martin rudalics's message of "Fri, 16 Nov 2018 09:52:45 +0100") Message-ID: <87r2fjuzbn.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: gggruggvucftvghtrhhoucdtuddrgedtkedrleelgdduiedvucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdejrddvgeegnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtjedrvdeggedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgeptd X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32850 Cc: 32850@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 use the mouse. Whereas window-local tab-bar showing a list >> of prev/next-buffers allows using the keyboard to navigate. >> For example, when the window-local tab-bar shows such tabs: >> >> [buffer-2] [buffer-1] [current-buffer] [buffer+1] [buffer+2] >> >> Then I know that I can just type `C-2 C-x left' to get to the second >> previous buffer, or to get the second next buffer with `C-2 C-x right'. > > Then we at least facultatively should show that prefix number in the > tab. Web browsers allow switching tabs by absolute numbers, e.g. C-2 or M-2, but they don't show these numbers in tabs. From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 18 04:23:32 2018 Received: (at 32850) by debbugs.gnu.org; 18 Nov 2018 09:23:32 +0000 Received: from localhost ([127.0.0.1]:58321 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gOJIi-0007Kc-Fi for submit@debbugs.gnu.org; Sun, 18 Nov 2018 04:23:32 -0500 Received: from mout.gmx.net ([212.227.15.15]:60063) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gOJIg-0007KO-QO for 32850@debbugs.gnu.org; Sun, 18 Nov 2018 04:23:31 -0500 Received: from [192.168.1.101] ([212.95.5.128]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Lvkwm-1fNn421eI8-017UbR; Sun, 18 Nov 2018 10:23:22 +0100 Message-ID: <5BF12F88.6090001@gmx.at> Date: Sun, 18 Nov 2018 10:23:20 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov , "Charles A. Roelli" Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers References: <875zyrrhk8.fsf@mail.linkov.net> <87a7n7kz7x.fsf@mail.linkov.net> <5BCD935F.8030309@gmx.at> <87in1szirt.fsf@mail.linkov.net> <5BD03F21.6040807@gmx.at> <87lg6map8e.fsf@mail.linkov.net> <5BD15CE0.7080703@gmx.at> <87va5qf1ox.fsf@mail.linkov.net> <5BD2C4AD.3060402@gmx.at> <87o9awip7q.fsf@mail.linkov.net> <5BE7EE14.1060008@gmx.at> <87ftw7nz26.fsf@mail.linkov.net> <5BE93F99.3010500@gmx.at> <87tvkluad6.fsf@mail.linkov.net> <5BEA94D9.5080908@gmx.at> <87bm6s5yss.fsf@mail.linkov.net> <5BEBDE23.8000402@gmx.at> <87pnv7i4xv.fsf@mail.linkov.net> <5BED389B.6080008@gmx.at> <877ehexdhb.fsf@mail.linkov.net> <8736rzwehh.fsf@mail.linkov.net> In-Reply-To: <8736rzwehh.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:L3WuvMYxnH9DD8BSdKhwF865EnqsAzYxyeYWtVNzlTgIAHzmjSC 0sV6M19M++mDyR5T3h/mdglDbJalpevaRdUPFiVkUtPYNj+6FVqT9OJqHYfmoPnyJzj8rLA Qi9rXgon1sxXhLPbtaBsIIFKNCyohE0P1pWyPYidWK5lplk8XwCFFLXojIhUb8wn+3vX4hy 3Vx4O9XOuxLcaKMlTLEyg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:CUCznS2fi5A=:K0CCLi+A4iZRjsmhTYBI2g uh5X9vxR8kG6KUiilgk0sX2BgI9vknsHPe2NLnWkq4GQ9vHAgDiz1/NW/HIahujHJAQFNLiL/ 8iJNzycllDw2MOpX/Vccg5Ucaoe0Q/Vh7l8lmwLjX8LubQTNiFZKCCyuCSoDzV1FfkL17EXxj FjB+cbeoBmxNypw+8S59CW1YTI7AvKwHr9pNyNCqRCbDXURtAO08HJG0CjKjQQ9A5abIxCgKy hnho5fVrsfe7l/Z6hE8JTKQpuakXXzCzZOhFO3FiNLNwk+nqItTR+lrX+qOfg0QuKL8WwQclD 6VdhVoGDEjZG61/f4NvBZogfcfxbBSHyUEm27fGPdNexlNLanOqA54YFD3FgIUiqNtv3yPvY1 iieEWWfesffIjyN7Lijio7HfAzpz63cXDLDe+hzaJYDzyB7iPW53q5fecj+vBDO2/1HZSpmJ/ zCzlalpsouhl7vYa904Kw3qXspuRme086cfa+SGcd9UgWRzDvj8sbMA1jovnBvly2bzR18I4O qPf1g6GuqWkolwTb7+1w4f33RXyhKl3HFj1r+IUQA+Y1jQ8ze3/qBiXoTSkOjQHcRP6ZBj0JZ p9WAbGc130P03B8SzmaNW0nu/RrfiyY5NzxVXmeNvHA42vOtDozh7Mowst7B4Hq3sIA6hHh5k 5IJpOIC3W2jorCMk4zG7V1dgG9jHS8Yhg21Y4POvdAgApgvjj5OMOz5E+jQK2PpIW/vqh1l9Q IYdFxoUSKLEQlikfGA+IMKMt7xIJbZYo1/zgbxpAzsBscbi0LpHnxmZLXrquBhOUZb+BJL9LM uSaAvKY9F0RAbze/BMJFvPVavNix/xrpj6T/ocsbW3jxjXa/ykx0yjH+vel6x5JXKhg5oCzsm eLQnSbnAgmHAP2foj2PE7D7yWp239i74+NUuPdfMcTeXj4dhNnBE6j5jOJudbG X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32850 Cc: 32850@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 (-) >> C-x and C-x do not yet support prefix args, right? > > Right, we need to support prefix args of C-x and C-x . Could you do that please? Thanks, martin From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 18 04:24:04 2018 Received: (at 32850) by debbugs.gnu.org; 18 Nov 2018 09:24:04 +0000 Received: from localhost ([127.0.0.1]:58326 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gOJJD-0007Lx-OT for submit@debbugs.gnu.org; Sun, 18 Nov 2018 04:24:03 -0500 Received: from mout.gmx.net ([212.227.15.18]:52075) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gOJJA-0007LC-4W for 32850@debbugs.gnu.org; Sun, 18 Nov 2018 04:24:00 -0500 Received: from [192.168.1.101] ([212.95.5.128]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MILxX-1gRrwW37fT-004Cq5; Sun, 18 Nov 2018 10:23:51 +0100 Message-ID: <5BF12FA5.6050505@gmx.at> Date: Sun, 18 Nov 2018 10:23:49 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers References: <875zyrrhk8.fsf@mail.linkov.net> <87a7n7kz7x.fsf@mail.linkov.net> <5BCD935F.8030309@gmx.at> <87in1szirt.fsf@mail.linkov.net> <5BD03F21.6040807@gmx.at> <87lg6map8e.fsf@mail.linkov.net> <5BD15CE0.7080703@gmx.at> <87va5qf1ox.fsf@mail.linkov.net> <5BD2C4AD.3060402@gmx.at> <87o9awip7q.fsf@mail.linkov.net> <5BE7EE14.1060008@gmx.at> <87ftw7nz26.fsf@mail.linkov.net> <5BE93F99.3010500@gmx.at> <87tvkluad6.fsf@mail.linkov.net> <5BEA94D9.5080908@gmx.at> <87bm6s5yss.fsf@mail.linkov.net> <5BEBDE23.8000402@gmx.at> <87pnv7i4xv.fsf@mail.linkov.net> <5BED389B.6080008@gmx.at> <877ehexdhb.fsf@mail.linkov.net> <5BEE855D.3080801@gmx.at> <87r2fjuzbn.fsf@mail.linkov.net> In-Reply-To: <87r2fjuzbn.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:tvBJI8uWWbaRt1iFJIlLVv4rAR9dD/q5z6mGc1U9UdnLcawSQZW lJH+rinvJFtzaiOptcQb/BUvSy+yFkWrp4ix+of0CegQoblS4GnYwViYcAL3kMEh+QeL4WF 5Una6XipFDQK+jixwjYCxe2pYg3ooqD5g9MmZAsi9OrnjmSTA8ZcFj6IYnZzlmUYk7FUEzg O3Htwj8/wp/Fbpte7sPAw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:GFqFNMxH8Mg=:4OCS4kw3EZ3OfL6toDfYVW fPSBXVS00qRH0Eg772ye37Bk5oJ+hddzCvimCCDmnIbQwlq7bRhPrelsw/ZeGy6FUDxXCclDF PSyslo7oXzkb34XOWrM/w/579aNLTu5fa0Wo6gvMJueZoPJ2pWkytX13nFel7UZ989t9Bk9nI JIIWXAjnx6kG0hSIrP3IP2pgcQiRzr2xp+l2Mhj8n+gA4BTYha+ZiBDSgGOZl+PjuOb3MMns0 nxDuypmkswwkqt8iYySb0es95Q7Mr0CM6uPN2L0aTsopJ92J2SDmjtAyGV7ujeJxNKQaIIEDt DJHFs78gjYeXhIVMh0pcnHYxp27ILusC0s0Z4HzcLIkvKkvICYDSnFg9zH3wOTNatizia6v/n ZEt4tNjMKCccIauLohGWvR8+aNLyXu8Em2J/NH7/BYvZfkKX3/CwSxzBl7tSiJ34AKBcK7XqD OksnYb89yEpoxwCWwHCTR4qjbd7RX2GOqXsfRJrrhbMdjbo06fdcztHnyXgZIVmtHrEErpn7g VHJibV7FZvwD5h+3FT8xYvI1hRH8tbP1j4GogPAsx4c0Rx0W50mAA8UnPqN+NRobEy4KSi9j+ e/cTWtAW6S5vTqKZXMZ79oj7ewFF+ybTKw9m+B5/p013u7gMKgLUO55nRRQaRRZy5E2fe5Uas 8462RG4iIEafTM/MWDHVyVYcLyDQnX5s42RvBOqFjqcLbnHNrsj8P/czo1G7PhFCKlx00DMTg A/GMcn3F4Ip5DldQwqm75VnPAbj1IuwZzT5au+ZDDu3OqHNblpBEBDgvP0xtFAll7YlDHJveu pA/KJbLu16pIHI2RpLFJHEyb/IAThCJiOhwuSlBk04D1YC6Hk7qdPW48uwcCMlKuN0GDHEDTz eIsDMVYKuEFc0s9Mm72fVIY7lMAULWfScov8TD7/MwDa80T4RLSoeOfvqGroRf X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32850 Cc: 32850@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 we at least facultatively should show that prefix number in the >> tab. > > Web browsers allow switching tabs by absolute numbers, e.g. C-2 or M-2, > but they don't show these numbers in tabs. It would have been a pain to supply such numbers in the first place - they would have had to be updated whenever another window or buffer gets selected or is made current. So forget this idea. martin From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 18 18:07:16 2018 Received: (at 32850) by debbugs.gnu.org; 18 Nov 2018 23:07:16 +0000 Received: from localhost ([127.0.0.1]:59470 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gOW9s-0008A5-51 for submit@debbugs.gnu.org; Sun, 18 Nov 2018 18:07:16 -0500 Received: from bird.maple.relay.mailchannels.net ([23.83.214.17]:47233) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gOW9q-00089v-Gz for 32850@debbugs.gnu.org; Sun, 18 Nov 2018 18:07:15 -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 21F2C502DF0; Sun, 18 Nov 2018 23:07:13 +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 D30AA502E25; Sun, 18 Nov 2018 23:07:12 +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:13 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Grain-Suffer: 1a01f565367f03fc_1542582432989_4172885547 X-MC-Loop-Signature: 1542582432989:2510514259 X-MC-Ingress-Time: 1542582432988 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 8E442805E9; Sun, 18 Nov 2018 15:07:12 -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=TBWbT7Wlsl1oZPGES3LaQ7vXq+M=; b= J4+boJXH0mcaJD6W+vh8UDBkM0yEEjmpSJ5PAf/KECcfrYuTlDK4Wsgu1TpFwej4 wHonHuxstve6dbJzc1xoKNNcPym6ftZ2Dinvl4EWcmhS15oVP/qnjBenkPYalkhx LxgKpUCKmfmveoC0Jk7YOhiNAMLzFAhQOsfq3DbX/ns= 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 BE5A7805E2; Sun, 18 Nov 2018 15:07:08 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a77 From: Juri Linkov To: martin rudalics Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers Organization: LINKOV.NET References: <875zyrrhk8.fsf@mail.linkov.net> <87in1szirt.fsf@mail.linkov.net> <5BD03F21.6040807@gmx.at> <87lg6map8e.fsf@mail.linkov.net> <5BD15CE0.7080703@gmx.at> <87va5qf1ox.fsf@mail.linkov.net> <5BD2C4AD.3060402@gmx.at> <87o9awip7q.fsf@mail.linkov.net> <5BE7EE14.1060008@gmx.at> <87ftw7nz26.fsf@mail.linkov.net> <5BE93F99.3010500@gmx.at> <87tvkluad6.fsf@mail.linkov.net> <5BEA94D9.5080908@gmx.at> <87bm6s5yss.fsf@mail.linkov.net> <5BEBDE23.8000402@gmx.at> <87pnv7i4xv.fsf@mail.linkov.net> <5BED389B.6080008@gmx.at> <877ehexdhb.fsf@mail.linkov.net> <8736rzwehh.fsf@mail.linkov.net> <5BF12F88.6090001@gmx.at> Date: Mon, 19 Nov 2018 00:47:34 +0200 In-Reply-To: <5BF12F88.6090001@gmx.at> (martin rudalics's message of "Sun, 18 Nov 2018 10:23:20 +0100") Message-ID: <877eha57g9.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: gggruggvucftvghtrhhoucdtuddrgedtkedruddtvddgtdehucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesmhdtreertdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdejrddvgeegnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtjedrvdeggedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgeptd X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32850 Cc: "Charles A. Roelli" , 32850@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 >>> C-x and C-x do not yet support prefix args, right? >> >> Right, we need to support prefix args of C-x and C-x . > > Could you do that please? Like this? --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=prev-next-buffer-arg.patch diff --git a/lisp/window.el b/lisp/window.el index 172ee72997..1d3133c359 100644 *** a/lisp/window.el --- b/lisp/window.el *************** *** 4664,4690 **** (interactive) (switch-to-buffer (last-buffer))) ! (defun next-buffer () ! "In selected window switch to next buffer." ! (interactive) (cond ((window-minibuffer-p) (error "Cannot switch buffers in minibuffer window")) ((eq (window-dedicated-p) t) (error "Window is strongly dedicated to its buffer")) ! (t ! (switch-to-next-buffer)))) ! ! (defun previous-buffer () ! "In selected window switch to previous buffer." ! (interactive) (cond ((window-minibuffer-p) (error "Cannot switch buffers in minibuffer window")) ((eq (window-dedicated-p) t) (error "Window is strongly dedicated to its buffer")) ! (t ! (switch-to-prev-buffer)))) (defun delete-windows-on (&optional buffer-or-name frame) "Delete all windows showing BUFFER-OR-NAME. --- 4664,4698 ---- (interactive) (switch-to-buffer (last-buffer))) ! (defun next-buffer (&optional arg) ! "In selected window switch to next buffer. ! With a prefix argument, switch to ARGth next buffer." ! (interactive "p") (cond ((window-minibuffer-p) (error "Cannot switch buffers in minibuffer window")) ((eq (window-dedicated-p) t) (error "Window is strongly dedicated to its buffer")) ! (t (setq arg (or arg 1)) ! (if (< arg 0) ! (previous-buffer (abs arg)) ! (while (<= 0 (setq arg (1- arg))) ! (switch-to-next-buffer)))))) ! ! (defun previous-buffer (&optional arg) ! "In selected window switch to previous buffer. ! With a prefix argument, switch to ARGth previous buffer." ! (interactive "p") (cond ((window-minibuffer-p) (error "Cannot switch buffers in minibuffer window")) ((eq (window-dedicated-p) t) (error "Window is strongly dedicated to its buffer")) ! (t (setq arg (or arg 1)) ! (if (< arg 0) ! (next-buffer (abs arg)) ! (while (<= 0 (setq arg (1- arg))) ! (switch-to-prev-buffer)))))) (defun delete-windows-on (&optional buffer-or-name frame) "Delete all windows showing BUFFER-OR-NAME. --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 19 04:42:32 2018 Received: (at 32850) by debbugs.gnu.org; 19 Nov 2018 09:42:32 +0000 Received: from localhost ([127.0.0.1]:59666 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gOg4e-0006bw-BB for submit@debbugs.gnu.org; Mon, 19 Nov 2018 04:42:32 -0500 Received: from mout.gmx.net ([212.227.15.18]:44935) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gOg4c-0006bk-P6 for 32850@debbugs.gnu.org; Mon, 19 Nov 2018 04:42:31 -0500 Received: from [192.168.1.101] ([46.125.249.53]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Md3li-1g6bDg42YU-00I9Go; Mon, 19 Nov 2018 10:42:15 +0100 Message-ID: <5BF28572.8090502@gmx.at> Date: Mon, 19 Nov 2018 10:42:10 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers References: <875zyrrhk8.fsf@mail.linkov.net> <87in1szirt.fsf@mail.linkov.net> <5BD03F21.6040807@gmx.at> <87lg6map8e.fsf@mail.linkov.net> <5BD15CE0.7080703@gmx.at> <87va5qf1ox.fsf@mail.linkov.net> <5BD2C4AD.3060402@gmx.at> <87o9awip7q.fsf@mail.linkov.net> <5BE7EE14.1060008@gmx.at> <87ftw7nz26.fsf@mail.linkov.net> <5BE93F99.3010500@gmx.at> <87tvkluad6.fsf@mail.linkov.net> <5BEA94D9.5080908@gmx.at> <87bm6s5yss.fsf@mail.linkov.net> <5BEBDE23.8000402@gmx.at> <87pnv7i4xv.fsf@mail.linkov.net> <5BED389B.6080008@gmx.at> <877ehexdhb.fsf@mail.linkov.net> <8736rzwehh.fsf@mail.linkov.net> <5BF12F88.6090001@gmx.at> <877eha57g9.fsf@mail.linkov.net> In-Reply-To: <877eha57g9.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:L7JhaB6rDIucJUP+DIdVKibn6XaDF2iBiI1mvvbE0X03axFd0H8 Ge8pgDTpKS//en7oyz2H0Svhpq3zFpPqC28MlyJQKYbJp4UJ22HYuRClgHj0+vgnstVnRyv H9kXpUv/meoqKD44ZhKx35Se9vytJQHvFsBQlxdvZth4lFAJOptQ1ppNGmxFuwMku3TPa6g DJkOlQInNYj4N4E1QUUbg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:LEJpCW0dNGo=:R8X1OS3zFUd3BGXKxkiDWZ zZWT6StSIT8ejD3GZFNOMaQRYeHnDkGPBToZJe5ACROfoFKn9t1umQ952Qy73kJBm4ymXMgks IJN4kGnz9amyPOaXd66fQqO9uvbWU2wGauWTzff1iTDGt1KhGJ+12r0fpNubdA2AtsQafHhJb Jaqds3rI7rmyOzJkb2e1NpPvkB3TnxxqxDysNw2c8suRhk1Jn6OtAwWVD3vzFk5KvdPqvwWc0 X1nDsJXktcvsZhFSazINVPbtVMUNa+tR7tqln6yCgSDXQKiwwxDUk9Qfl0i6Y7L2ReBls5wHj dhYH/cvlANUtpUiGZ3PD9lzR+3ZH3ews3HA3zfNIXIr4DMoWWFKl7PXM5Hw/MOXNclx0ZrOR4 CaepDp/wjzPDfOeDRbbAPkN0i/zhRkpKiJHIRbakywu3rZ3ShDWD9vy75SKavC3WOHTmB+IjU cHAKWU9HUCRhgCWjI+QqqAzZURuw/PiuGg4R2QTCeCwFvY1H7c0acU+n+Tq0XB0dygD/Q/bCl s4bGimxOdS+HqSfopNdrpvPSFHYJ+fQ6Ybfrh1kENATPSk381RnQkFjnCCX95CfyaJptRWDaL 18KVBnm9n7oeXMaxnZ8Adu/ieaRwS8ASwUJWRhRY309iOzJ0OwPk83IfZySAevP4/dCXZnH3g /BvIcGztj2kEF3G8PT2ekI4ptVes18zydwNRrY+6w/5lWMHsfPaJUlM/lxjBu2FD4YnRpRz9X TlkRCrIcvyk8wigfDyOlxMeA/P3WBD9Te584hs1SIfmuIJ3jW8dH4sC+vr7JV/6kzpxeg4W2M +gKwkUzgBWf2lXVdyu2qbz2M/LXZINeaijrkEg7ffBfrR+0Weudcfo8d467fUiKyUfbg5ib/n JQGMqyhZCql8R03vKwOrbD2I+TylVuDb/mTuX2wItGYXCdMoN1j0WFusP1T8Q7 X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 32850 Cc: "Charles A. Roelli" , 32850@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 (/) >>> Right, we need to support prefix args of C-x and C-x . >> >> Could you do that please? > > Like this? I doubt that ! (while (<= 0 (setq arg (1- arg))) ! (switch-to-next-buffer)))))) and ! (while (<= 0 (setq arg (1- arg))) ! (switch-to-prev-buffer)))))) will DTRT. They pretend that all these buffers were actually shown in the window and thus "presented" to the user. As a consequence, switching from a buffer B to the fourth previous buffer and subsequently switching to the next buffer would not get us back to B but to the third previous buffer of B at the time we switched to the previous buffer. I suppose you won't like that. What we should probably do instead here is to get the fourth buffer of what 'window-prev-buffers' returns and try to switch to that buffer either via 'switch-to-buffer' or 'pop-to-buffer-same-window'. martin From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 19 17:52:46 2018 Received: (at 32850) by debbugs.gnu.org; 19 Nov 2018 22:52:46 +0000 Received: from localhost ([127.0.0.1]:33210 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gOsPO-0000VM-Jg for submit@debbugs.gnu.org; Mon, 19 Nov 2018 17:52:46 -0500 Received: from golden.birch.relay.mailchannels.net ([23.83.209.73]:59328) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gOsPM-0000VD-Sk for 32850@debbugs.gnu.org; Mon, 19 Nov 2018 17:52: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 D36FF682C93; Mon, 19 Nov 2018 22:52:42 +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 886AE6824C4; Mon, 19 Nov 2018 22:52:42 +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:42 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Army-Shade: 28b78dc156069a16_1542667962718_1983895507 X-MC-Loop-Signature: 1542667962718:612911367 X-MC-Ingress-Time: 1542667962717 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 4E2A880767; Mon, 19 Nov 2018 14:52: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; s=linkov.net; bh=R0l26rFelwfdCHANge6XKa7w5bY=; b= f/OR0Wi/9bX5C3e9BTIVQy+NIICGHJgGxLz3TmgggccSTRwuw8v+IFzGj4GG/YbB 8vDuTscgNwGeK82Izq59rPdC64k7VzHtL51T00Cn5F5YJxqyRktmBN+mjHBUuplI PqWJ46Z+6tps1ztOmmva5iuJ4PCRH6PGgyP/h6ddbpg= 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 8844580763; Mon, 19 Nov 2018 14:52:40 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a37 From: Juri Linkov To: martin rudalics Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers Organization: LINKOV.NET References: <875zyrrhk8.fsf@mail.linkov.net> <87lg6map8e.fsf@mail.linkov.net> <5BD15CE0.7080703@gmx.at> <87va5qf1ox.fsf@mail.linkov.net> <5BD2C4AD.3060402@gmx.at> <87o9awip7q.fsf@mail.linkov.net> <5BE7EE14.1060008@gmx.at> <87ftw7nz26.fsf@mail.linkov.net> <5BE93F99.3010500@gmx.at> <87tvkluad6.fsf@mail.linkov.net> <5BEA94D9.5080908@gmx.at> <87bm6s5yss.fsf@mail.linkov.net> <5BEBDE23.8000402@gmx.at> <87pnv7i4xv.fsf@mail.linkov.net> <5BED389B.6080008@gmx.at> <877ehexdhb.fsf@mail.linkov.net> <8736rzwehh.fsf@mail.linkov.net> <5BF12F88.6090001@gmx.at> <877eha57g9.fsf@mail.linkov.net> <5BF28572.8090502@gmx.at> Date: Tue, 20 Nov 2018 00:28:40 +0200 In-Reply-To: <5BF28572.8090502@gmx.at> (martin rudalics's message of "Mon, 19 Nov 2018 10:42:10 +0100") Message-ID: <87pnv01z3b.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: gggruggvucftvghtrhhoucdtuddrgedtkedruddtgedgtdegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdehrddvhedvnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddthedrvdehvddprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgeptd X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32850 Cc: "Charles A. Roelli" , 32850@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 (-) >>>> Right, we need to support prefix args of C-x and C-x . >>> >>> Could you do that please? >> >> Like this? > > I doubt that > > ! (while (<= 0 (setq arg (1- arg))) > ! (switch-to-next-buffer)))))) > > and > > ! (while (<= 0 (setq arg (1- arg))) > ! (switch-to-prev-buffer)))))) > > will DTRT. They pretend that all these buffers were actually shown in > the window and thus "presented" to the user. As a consequence, > switching from a buffer B to the fourth previous buffer and > subsequently switching to the next buffer would not get us back to B > but to the third previous buffer of B at the time we switched to the > previous buffer. I suppose you won't like that. Why not? 'C-2 C-x ' could be just a shortcut for 'C-x C-x '. > What we should probably do instead here is to get the fourth buffer of > what 'window-prev-buffers' returns and try to switch to that buffer > either via 'switch-to-buffer' or 'pop-to-buffer-same-window'. But what if the users don't want to break the chain of previous/next buffers? For example: [buffer-A] [buffer-B] [buffer-C] [buffer-D] [buffer-E] prev-buffers current-buffer next-buffers After 'C-2 C-x ' I'd want to have the same sequence of buffers, just changing the current buffer: [buffer-A] [buffer-B] [buffer-C] [buffer-D] [buffer-E] current-buffer next-buffers Not what you seems to suggest that takes ARGth previous buffer to display and breaks the order of buffers: [buffer-B] [buffer-C] [buffer-A] [buffer-D] [buffer-E] current-buffer IOW, I use 'C-x ' and 'C-x ' to "scroll" the list of prev/next buffers. From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 20 04:28:12 2018 Received: (at 32850) by debbugs.gnu.org; 20 Nov 2018 09:28:12 +0000 Received: from localhost ([127.0.0.1]:33379 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gP2KK-0007GK-EN for submit@debbugs.gnu.org; Tue, 20 Nov 2018 04:28:12 -0500 Received: from mout.gmx.net ([212.227.15.18]:34723) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gP2KI-0007G7-2C for 32850@debbugs.gnu.org; Tue, 20 Nov 2018 04:28:10 -0500 Received: from [192.168.1.101] ([46.125.250.103]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Ld1CS-1fgw513UPo-00iF1a; Tue, 20 Nov 2018 10:27:59 +0100 Message-ID: <5BF3D398.5070004@gmx.at> Date: Tue, 20 Nov 2018 10:27:52 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers References: <875zyrrhk8.fsf@mail.linkov.net> <87lg6map8e.fsf@mail.linkov.net> <5BD15CE0.7080703@gmx.at> <87va5qf1ox.fsf@mail.linkov.net> <5BD2C4AD.3060402@gmx.at> <87o9awip7q.fsf@mail.linkov.net> <5BE7EE14.1060008@gmx.at> <87ftw7nz26.fsf@mail.linkov.net> <5BE93F99.3010500@gmx.at> <87tvkluad6.fsf@mail.linkov.net> <5BEA94D9.5080908@gmx.at> <87bm6s5yss.fsf@mail.linkov.net> <5BEBDE23.8000402@gmx.at> <87pnv7i4xv.fsf@mail.linkov.net> <5BED389B.6080008@gmx.at> <877ehexdhb.fsf@mail.linkov.net> <8736rzwehh.fsf@mail.linkov.net> <5BF12F88.6090001@gmx.at> <877eha57g9.fsf@mail.linkov.net> <5BF28572.8090502@gmx.at> <87pnv01z3b.fsf@mail.linkov.net> In-Reply-To: <87pnv01z3b.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:me7zBOh9CODW9AW5AFHhQ+yXfzy/FN6JUxh+2QgN4hzvJsyYdkc xtEDubMBp7rphN/2JDDz1LVa362Z4TqpUonW20JH7kRrX7WWpuabGTe/nkGUEMGiZce/ti9 IZLiL4e1AN5r5EuU5xZmA6rK2Ah3Za22s7WtbZIDh1X0aYsDE+bTAE7D8Yas9P7VSURr3Ag tOqGmtxeMGQqfeOw2vkIw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:QHmcEsX3ahY=:GQ8sSkj4svqPp29lip4AIk agkx+kacskVt60iRvZQ9u/wT/08oF9q/Hf45Cb8FCZkpos6NNOkRaq5GRQuhVXR9b5c8Hg4Yf 6P6QLtuoSByCkzhF+obffo65ufIXmgsBgo0Y+EaF9sMlAdHU8Tn1JZwiG2oFKm4a9y/bYx9bH 9mRBoDKaqTt1LAhB51R8w56OfbkvuCnItro3Eq4l6NqnsYzMG9mpEaghxKlC5cGd6mVEc5FsS +nevmtEFBcagqPq36TXTKxofiyIFXQ4ng/Nc+NsLlQYqyTDUbiEw8OQzdMF05RtUsESgVby+J BW4pVFj53aBoNuuIVFXXv3s8UElhRBls6gJzfDmUgTbuGQgmuUB7C2zZDue4oY/pjcQOA6M2B XxiXDUzJhKVuVf+ZHPH3wPnyhT7E7pzj6ajCvy1cjrhIKQkMlLziHczaC8pP1CSEYe4iExnu/ ZWVU03YPGoen15usJsX7MZa/hVzXkc++faamVbVG3MKnkcCcN6ObrKqhyK8hZ5/+Mi1JFBiLv kmeudMYviePEbDnn6Z9iQI/brCsGH5FvOEDsc8kDas9KZhOLy+kkCyYT5G3ScVSWpwldeYlm3 gRqHJuCEvo4F+2/v1/FhE/TJYETBOhjj+CWGiLNCLIfXmvA57dkjLviaWZ4+SBLbewKxj/bGK WmJxhv8GkfR3RfyDNr4lFKyrZW41wxCv6hwVUpHTMouFQt4CpX1vH+E2p6Z+OsEWX/072Bfyq j2SiTqDpmvnWJV0J6gOZBi8m+mvxz6dnze6aee918GJ8OkD+PQ9zwF9aHneKozaOlpQH4W3cC RK4WraayYclPwqrfgQGyz6oQr224nis+ZtM1gT19wRG/y82zaOWkw7s8CViJa2oiBgYkk0BL/ 3LUaGhMaXncORvTX6DqKU7ajAO+vcIUXRCZEbxGR0XByPKJeui3bkV8yc1B321 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32850 Cc: "Charles A. Roelli" , 32850@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 (-) > Why not? 'C-2 C-x ' could be just a shortcut for > 'C-x C-x '. > >> What we should probably do instead here is to get the fourth buffer of >> what 'window-prev-buffers' returns and try to switch to that buffer >> either via 'switch-to-buffer' or 'pop-to-buffer-same-window'. > > But what if the users don't want to break the chain of > previous/next buffers? For example: > > [buffer-A] [buffer-B] [buffer-C] [buffer-D] [buffer-E] > prev-buffers current-buffer next-buffers > > After 'C-2 C-x ' I'd want to have the same sequence of buffers, > just changing the current buffer: > > [buffer-A] [buffer-B] [buffer-C] [buffer-D] [buffer-E] > current-buffer next-buffers > > Not what you seems to suggest that takes ARGth previous buffer > to display and breaks the order of buffers: > > [buffer-B] [buffer-C] [buffer-A] [buffer-D] [buffer-E] > current-buffer > > IOW, I use 'C-x ' and 'C-x ' to "scroll" the list > of prev/next buffers. So what you're after is to make the visual effect of C-2 C-x the same as that of C-x b buffer-A but keep the impact on the lists of previous buffers and next buffers distinct. If people are OK with that I won't insist. But please describe the behavior in the doc-strings of 'previous-buffer' and 'next-buffer' in sufficient detail. Also note that the overhead induced by executing these functions then becomes proportional to the value of the prefix argument (for each single switch you call 'set-window-prev-buffers', 'set-window-next-buffers' 'record-window-buffer', 'unrecord-window-buffer' and run 'buffer-list-update-hook', 'window-scroll-functions' and 'window-configuration-change-hook'). Finally note that you change 'buffer-display-time' without actually displaying the buffer and the mystic last_selected_window slot in buffer.h. martin From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 20 19:50:21 2018 Received: (at 32850) by debbugs.gnu.org; 21 Nov 2018 00:50:21 +0000 Received: from localhost ([127.0.0.1]:37593 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gPGih-00063r-Df for submit@debbugs.gnu.org; Tue, 20 Nov 2018 19:50:21 -0500 Received: from common.maple.relay.mailchannels.net ([23.83.214.38]:59698) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gPGie-00063e-13 for 32850@debbugs.gnu.org; Tue, 20 Nov 2018 19:50:17 -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 9B0E12836BC; Wed, 21 Nov 2018 00:50:14 +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 3EEE0283898; Wed, 21 Nov 2018 00:50:11 +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:14 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Zesty-Spicy: 2010cae07ccf8705_1542761411342_1123430617 X-MC-Loop-Signature: 1542761411342:1574831255 X-MC-Ingress-Time: 1542761411342 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 06B93808D4; Tue, 20 Nov 2018 16:50:11 -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=IWma+TJjZkfuNb9d/9vX272KMBg=; b= uY8plJx+DgxTrp+1nnh94UyyGMmXdZLcE4VWkcI+4hH175Wh+NJ38YgTZ/j4RllI 0tdbR/KKMO9jy7a1a3extQ9NdQEwa2PIouV73fdBZnTMuTsqw1NA0Yg5EX3Qa/Xb wjDaYBsNH8t6EUXKHApylrI8ylS1om6zeXbkUHdeOHk= 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 C4AE6808D3; Tue, 20 Nov 2018 16:50:07 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a37 From: Juri Linkov To: martin rudalics Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers Organization: LINKOV.NET References: <875zyrrhk8.fsf@mail.linkov.net> <87va5qf1ox.fsf@mail.linkov.net> <5BD2C4AD.3060402@gmx.at> <87o9awip7q.fsf@mail.linkov.net> <5BE7EE14.1060008@gmx.at> <87ftw7nz26.fsf@mail.linkov.net> <5BE93F99.3010500@gmx.at> <87tvkluad6.fsf@mail.linkov.net> <5BEA94D9.5080908@gmx.at> <87bm6s5yss.fsf@mail.linkov.net> <5BEBDE23.8000402@gmx.at> <87pnv7i4xv.fsf@mail.linkov.net> <5BED389B.6080008@gmx.at> <877ehexdhb.fsf@mail.linkov.net> <8736rzwehh.fsf@mail.linkov.net> <5BF12F88.6090001@gmx.at> <877eha57g9.fsf@mail.linkov.net> <5BF28572.8090502@gmx.at> <87pnv01z3b.fsf@mail.linkov.net> <5BF3D398.5070004@gmx.at> Date: Wed, 21 Nov 2018 02:08:27 +0200 In-Reply-To: <5BF3D398.5070004@gmx.at> (martin rudalics's message of "Tue, 20 Nov 2018 10:27:52 +0100") Message-ID: <87in0r1dg4.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: gggruggvucftvghtrhhoucdtuddrgedtkedruddtiedgvdejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdehrddvhedvnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddthedrvdehvddprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgeptd X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32850 Cc: "Charles A. Roelli" , 32850@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 (-) > Also note that the overhead induced by executing these functions then > becomes proportional to the value of the prefix argument (for each > single switch you call 'set-window-prev-buffers', > 'set-window-next-buffers' 'record-window-buffer', > 'unrecord-window-buffer' and run 'buffer-list-update-hook', > 'window-scroll-functions' and 'window-configuration-change-hook'). Aren't hooks intended to run only once when the command is finished? > Finally note that you change 'buffer-display-time' without actually > displaying the buffer and the mystic last_selected_window slot in > buffer.h. Whereas 'buffer-display-time' is not very important, changing its value looks wrong, indeed. From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 21 03:20:37 2018 Received: (at 32850) by debbugs.gnu.org; 21 Nov 2018 08:20:37 +0000 Received: from localhost ([127.0.0.1]:37762 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gPNkT-00041O-5g for submit@debbugs.gnu.org; Wed, 21 Nov 2018 03:20:37 -0500 Received: from mout.gmx.net ([212.227.17.20]:60959) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gPNkS-00041C-Ac for 32850@debbugs.gnu.org; Wed, 21 Nov 2018 03:20:36 -0500 Received: from [192.168.1.101] ([213.162.73.56]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MegeC-1g5dwT0MjQ-00OGEZ; Wed, 21 Nov 2018 09:20:21 +0100 Message-ID: <5BF5153D.8050609@gmx.at> Date: Wed, 21 Nov 2018 09:20:13 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers References: <875zyrrhk8.fsf@mail.linkov.net> <87va5qf1ox.fsf@mail.linkov.net> <5BD2C4AD.3060402@gmx.at> <87o9awip7q.fsf@mail.linkov.net> <5BE7EE14.1060008@gmx.at> <87ftw7nz26.fsf@mail.linkov.net> <5BE93F99.3010500@gmx.at> <87tvkluad6.fsf@mail.linkov.net> <5BEA94D9.5080908@gmx.at> <87bm6s5yss.fsf@mail.linkov.net> <5BEBDE23.8000402@gmx.at> <87pnv7i4xv.fsf@mail.linkov.net> <5BED389B.6080008@gmx.at> <877ehexdhb.fsf@mail.linkov.net> <8736rzwehh.fsf@mail.linkov.net> <5BF12F88.6090001@gmx.at> <877eha57g9.fsf@mail.linkov.net> <5BF28572.8090502@gmx.at> <87pnv01z3b.fsf@mail.linkov.net> <5BF3D398.5070004@gmx.at> <87in0r1dg4.fsf@mail.linkov.net> In-Reply-To: <87in0r1dg4.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:EG1y4GWlh95vBXiyleQbFt+9N8+2mTZpkTD1n/cQ7X8iOd3ZzFT IcQWAQSxkoEx/vwZXggY+Q043sp0kqppq9ruCnvPwXfs+y/6KNHN9GHS60p6X/jD84SL7bT ka2WaFW763Dasd4KwJGG84D/lOngyFspUfLK6jkDc6awFPA40cJbZY94PZ7C33CmjwQKadK U17F+W3wPIv5tVBtXLkeQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:BoWrcZMuWDU=:Mwjwh8ylDiesMMc3eYZJ7D 4nPX6gFPpybxYHSORnuVSLbiqJfcmfJ/CIbWXM42HWEpJKGbFdB22qz9zMuNhOzTQ9zHHkXqr w8NCsS/4ll9NT4tbdZrJ25qfxUkNkrIGpxeY1jQ7pv1CJ2NSwOE2PU903oC908mY6IbgNUGnz 00p/hEQSRe56F5z8NbJHzREZbPTkKcBc/iNn8H3pQH+izG3GtQm5gxZwR8MDLhS95hFEYWDWh t30BgADzxJ1AbIuV3WWbqLxGsZrEnt6+kW78PPBPzeto83RyJHNJnaDYB2UZyqhGi4F60g/V+ me2n9t0h1k/UygRRezdw/GWRDgW5AjdRWjgL/OTTPuFKUL11QQKQYVOhgxA6CA2jDtq5pKf1I h8olxp8k3oSkTVwftTcsyYZJCWPw05M6elTmeTfx70IAxuubbxwt5wVF++ulrO0VQnbKkPwPk 6IrOuy2mHlqgqODiOczmKHWBsu43Ngp9QL+BUtb4UCcNa4XuimdtZhokng0NvMMVVKH9dKYUj b4RQB5vjUsD6ZDIQOs2IiGu35m7FMjVTHEMsOHOO/8FsRZCw28epfMd7cFuBm0bPwnI2OIJ+T np1pEPY94O1EtVTG3N5fh1YbF6PZN2mlF++GSjUjqtQ4aMVtg6rttRp+BHFBOc4NhGdCJf9zU Ef/BkAEuLywS60i+68afBjIdK2SDJ/SKdB2sSumiZOANzqhfhfO36Ikkxbe8pbqhIQFPpkBXi JmiKHKLCUnQ7KLuc+csiTXzVys8JxjBmcFsmqbBPY/fVLHfDX1GPM4E2l374x1/QZOwdqRLo7 v4gqUCM0TckaCNPai3In2B/Vh6JUmGydl17up+rlfmSHgzZStiSbE9WItN1useIzQ6PJpDs5L qVs+A3Mue7saQgBWFPR2+PSHFUMC4qUL77KBunSlFaP0WYTb5lyJdodZEe1wWQ X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32850 Cc: "Charles A. Roelli" , 32850@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 (-) >> Also note that the overhead induced by executing these functions then >> becomes proportional to the value of the prefix argument (for each >> single switch you call 'set-window-prev-buffers', >> 'set-window-next-buffers' 'record-window-buffer', >> 'unrecord-window-buffer' and run 'buffer-list-update-hook', >> 'window-scroll-functions' and 'window-configuration-change-hook'). > > Aren't hooks intended to run only once when the command is finished? 'post-command-hook' only. 'window-size-change-functions' is currently run once for each redisplay. The three I cited above are run for every set_window_buffer when the buffer changes. Note that you are your own client here since you want to pretend that all these buffers were indeed displayed. martin From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 21 18:57:48 2018 Received: (at 32850) by debbugs.gnu.org; 21 Nov 2018 23:57:48 +0000 Received: from localhost ([127.0.0.1]:40358 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gPcNQ-0006j1-3R for submit@debbugs.gnu.org; Wed, 21 Nov 2018 18:57:48 -0500 Received: from palegreen.birch.relay.mailchannels.net ([23.83.209.140]:60700) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gPcNO-0006it-Nt for 32850@debbugs.gnu.org; Wed, 21 Nov 2018 18:57: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 5D7A8502595; Wed, 21 Nov 2018 23:57:45 +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 1D073500223; Wed, 21 Nov 2018 23:57:45 +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:45 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Harmony-Interest: 00effdc7597230ee_1542844665215_1140092106 X-MC-Loop-Signature: 1542844665215:3709572371 X-MC-Ingress-Time: 1542844665214 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 DC59F80931; Wed, 21 Nov 2018 15:57: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; s=linkov.net; bh=lNQsu/GCO/XXVKng+a7EX6INJsY=; b= FKF1tN7jXuuvE15GIQoDY1Qb9cBDgzFqX7KLDZHv4OeEXlSDryeDuseqvq/3eI58 AwmmWuCi9NN+g6wDVk/CAv2s48zjnjuHGV7UkXoCV96FB1Zcb6vJ/PUxIZPbWg/F kuVafQtbsQPXeLcRgvAtx9jiv8ShnwhAuM6LT4m4myI= 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 5EDC880920; Wed, 21 Nov 2018 15:57:41 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a37 From: Juri Linkov To: martin rudalics Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers Organization: LINKOV.NET References: <875zyrrhk8.fsf@mail.linkov.net> <87o9awip7q.fsf@mail.linkov.net> <5BE7EE14.1060008@gmx.at> <87ftw7nz26.fsf@mail.linkov.net> <5BE93F99.3010500@gmx.at> <87tvkluad6.fsf@mail.linkov.net> <5BEA94D9.5080908@gmx.at> <87bm6s5yss.fsf@mail.linkov.net> <5BEBDE23.8000402@gmx.at> <87pnv7i4xv.fsf@mail.linkov.net> <5BED389B.6080008@gmx.at> <877ehexdhb.fsf@mail.linkov.net> <8736rzwehh.fsf@mail.linkov.net> <5BF12F88.6090001@gmx.at> <877eha57g9.fsf@mail.linkov.net> <5BF28572.8090502@gmx.at> <87pnv01z3b.fsf@mail.linkov.net> <5BF3D398.5070004@gmx.at> <87in0r1dg4.fsf@mail.linkov.net> <5BF5153D.8050609@gmx.at> Date: Thu, 22 Nov 2018 01:44:34 +0200 In-Reply-To: <5BF5153D.8050609@gmx.at> (martin rudalics's message of "Wed, 21 Nov 2018 09:20:13 +0100") Message-ID: <874lca9esd.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: gggruggvucftvghtrhhoucdtuddrgedtkedruddtkedgudejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdehrddvhedvnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddthedrvdehvddprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgepvd X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32850 Cc: "Charles A. Roelli" , 32850@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 (-) >>> Also note that the overhead induced by executing these functions then >>> becomes proportional to the value of the prefix argument (for each >>> single switch you call 'set-window-prev-buffers', >>> 'set-window-next-buffers' 'record-window-buffer', >>> 'unrecord-window-buffer' and run 'buffer-list-update-hook', >>> 'window-scroll-functions' and 'window-configuration-change-hook'). >> >> Aren't hooks intended to run only once when the command is finished? > > 'post-command-hook' only. 'window-size-change-functions' is currently > run once for each redisplay. The three I cited above are run for > every set_window_buffer when the buffer changes. Note that you are > your own client here since you want to pretend that all these buffers > were indeed displayed. We could let-bind these hooks to nil in the loop, and let to call them only for the last 'previous-buffer' call. From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 22 02:42:22 2018 Received: (at 32850) by debbugs.gnu.org; 22 Nov 2018 07:42:22 +0000 Received: from localhost ([127.0.0.1]:40459 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gPjd0-0001T4-74 for submit@debbugs.gnu.org; Thu, 22 Nov 2018 02:42:22 -0500 Received: from mout.gmx.net ([212.227.17.21]:45777) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gPjcx-0001Sr-W1 for 32850@debbugs.gnu.org; Thu, 22 Nov 2018 02:42:20 -0500 Received: from [192.168.1.101] ([212.95.5.41]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0M7H2Y-1fSwAs3o0c-00x4AZ; Thu, 22 Nov 2018 08:42:05 +0100 Message-ID: <5BF65DC4.4090702@gmx.at> Date: Thu, 22 Nov 2018 08:41:56 +0100 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers References: <875zyrrhk8.fsf@mail.linkov.net> <87o9awip7q.fsf@mail.linkov.net> <5BE7EE14.1060008@gmx.at> <87ftw7nz26.fsf@mail.linkov.net> <5BE93F99.3010500@gmx.at> <87tvkluad6.fsf@mail.linkov.net> <5BEA94D9.5080908@gmx.at> <87bm6s5yss.fsf@mail.linkov.net> <5BEBDE23.8000402@gmx.at> <87pnv7i4xv.fsf@mail.linkov.net> <5BED389B.6080008@gmx.at> <877ehexdhb.fsf@mail.linkov.net> <8736rzwehh.fsf@mail.linkov.net> <5BF12F88.6090001@gmx.at> <877eha57g9.fsf@mail.linkov.net> <5BF28572.8090502@gmx.at> <87pnv01z3b.fsf@mail.linkov.net> <5BF3D398.5070004@gmx.at> <87in0r1dg4.fsf@mail.linkov.net> <5BF5153D.8050609@gmx.at> <874lca9esd.fsf@mail.linkov.net> In-Reply-To: <874lca9esd.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:oOGnU+zmI5yVetvufZdm+urFMs1X2NxGeGA5KBY0EkRn22EBL8s t150oxkert3xUlk4/GCS6m23wVnqz0wZkjuXcikzuCL+VxaS9uycB/Gr0uwXjyi9O/LyScI /lEK6donpaYSUXq+tXzMhJi7uxhDqp/As9eEBgLGViGmZBOKSfhR+JS2udve8EatYZAiKKi /rZEQZHM9q7y235obpLzA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:h67DFb4yYys=:nBULeNA5u2WQNn7i04S9hQ 7WAJxV2iCxnqyudCsLldiW/hAYM27w8/BddR1pQeS7DPxUXNpzTevC+4Pgl4W/yHXrPT/UtMP ty8aogR6Du/9/3DeumFyrVJZb55VSEo+iKPKFk1FTAhUrNNRdc/Ik/oaWrSi2e3mPLCqTyaF0 LL84dIQYDPDDGV5rrdKiAQgAW1cT5Nh5NZp4bw21c/8YJxZ+w0cawKeElRCG0QVjhnqV/9SAq +ii1yzUAX4xmjvTpaosjvF3TBKh/W2Pca1mCDOwen0f4zbgREahktlcw5ddXZFWB0h0QHTorl 65kgk/DvYysbrv8qg8qHcqwo+JmKkhH68THH/o7qz7T+XKOv6ubdnjOupq9fbzIT+6IR+k+xu 2Os6lTcCoBAcKjbZZ2+MekSIm2ePYsLPUmmeLe5EBFITfEkA01ek44TAVOkow0Anxv2Dvro8r 2T8n1zcTK5s+LbKySN76/86X8A86gUSBRUvH8nEzBbuI/HQTiXeT+7XSpi+bm74NPNUktQZT8 MfJGSgCTqDkgBO1OgLriu54RWFV4OsG1CPBT9zmFlomnoHtu4vxgBCLehLdaoju9zAdmK9Aoe VKgffZ3f2YtjoIa7piA2Ite8FuNGjAPbw8vjmxxClyj/4zBG9JgutlRG72M3v5p3RyBHzZrU+ MRqfOQBShsi+1Hqb5ik4S7dp4artIhuUxsULYSgAxofeW0roByVlVHJBT1Npu39TyULeS2ewq UJo2akVuvAbG47mLvIRNazsVkxhCX2w+09lPwXT6udHDIJXTtsg9yK9Ai8w7ovWcf5VFa20oW ia5W26huh1e5acybAfK7Dkl2vz54S1O5qwYfb2ubSApAnPaQH4c6wPdIxh601Nr03j18RAiuO jcLXQzsZSBa/rV2ASvV1mlcQJMGW2WFTcLBIFCsKYgSG9VnV128RDpi94Q7tA0 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32850 Cc: "Charles A. Roelli" , 32850@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 could let-bind these hooks to nil in the loop, and let to call them > only for the last 'previous-buffer' call. Maybe. I wouldn't rely on this to work in all possible scenarios including killed buffers and the frame's 'buffer-predicate'. martin From unknown Fri Jun 20 07:18:31 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 20 Dec 2018 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