From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#69993: Wrap window buffers while cycling Date: Thu, 28 Mar 2024 19:57:56 +0200 Organization: LINKOV.NET Message-ID: <86sf0abeg3.fsf@mail.linkov.net> References: <86h6gug41x.fsf@mail.linkov.net> <3419df35-1b96-4a64-8ed7-722a05c58742@gmx.at> <86le66ckhj.fsf@mail.linkov.net> <86h6gs2lk7.fsf@mail.linkov.net> <5c71ea64-0f97-4b90-af61-1156fe33f1ea@gmx.at> <86cyreu78w.fsf@mail.linkov.net> <463c9242-56ef-4c99-9fe6-4b70be2071b2@gmx.at> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40530"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) Cc: 69993@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Mar 28 19:06:27 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rpu8w-000AOF-9y for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 28 Mar 2024 19:06:26 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rpu8Z-0006qt-Ub; Thu, 28 Mar 2024 14:06:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rpu8Z-0006qO-2N for bug-gnu-emacs@gnu.org; Thu, 28 Mar 2024 14:06:03 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rpu8Y-00031B-PA for bug-gnu-emacs@gnu.org; Thu, 28 Mar 2024 14:06:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rpu8Z-00021x-Hu for bug-gnu-emacs@gnu.org; Thu, 28 Mar 2024 14:06:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 28 Mar 2024 18:06:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69993 X-GNU-PR-Package: emacs Original-Received: via spool by 69993-submit@debbugs.gnu.org id=B69993.17116491197679 (code B ref 69993); Thu, 28 Mar 2024 18:06:03 +0000 Original-Received: (at 69993) by debbugs.gnu.org; 28 Mar 2024 18:05:19 +0000 Original-Received: from localhost ([127.0.0.1]:41102 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rpu7r-0001zm-El for submit@debbugs.gnu.org; Thu, 28 Mar 2024 14:05:19 -0400 Original-Received: from relay6-d.mail.gandi.net ([2001:4b98:dc4:8::226]:45115) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rpu7e-0001xj-Hw for 69993@debbugs.gnu.org; Thu, 28 Mar 2024 14:05:07 -0400 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id 491E9C0003; Thu, 28 Mar 2024 18:04:57 +0000 (UTC) In-Reply-To: <463c9242-56ef-4c99-9fe6-4b70be2071b2@gmx.at> (martin rudalics's message of "Thu, 28 Mar 2024 10:19:23 +0100") X-GND-Sasl: juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:282249 Archived-At: >>> What is the "fixed order"? When I use C-x b, that buffer becomes the >>> one most recently shown in that window. >> >> The fixed order is similar to how tabs work in web browsers. >> It would be unexpected when switching to a tab will always >> move it to the end of the tab line. This is why it's unexpected >> for C-x b to move tabs when tab-line-mode is used. > > But the lists of previous and next buffers have to reflect the order in > which these buffers were shown in a window. You probably can't map them > directly to tabs. They are already mapped to tabs, and users happily used them for 5 years. The only remaining problem the users complain about is that switching buffers messes up the order. There is no problem in using a fixed order because buffers will be still ordered by the order they were shown in a window. Only need a way to switch between buffers already shown in a window. For users of tab-line-mode there is no difference whether to use 'C-x C-left' or 'C-x b' to switch to the previous buffer. >>> I think 'switch-to-prev-buffer-wrap' already confuses things. Wrapping, >>> for me, means to wrap around like when navigating on a ring of buffers. >>> Whether this should include buffers never shown in the window before is >>> a different issue IMO. And whether C-x b should change the order is yet >>> another issue. So maybe we need three options instead of one... >> >> I can't imagine why anyone would need wrapping when C-x C-left >> will visit hundreds of buffers never shown in the window. > > Emacs "wrapped" in that case ever since (with at least two buffers). The case of 'emacs -Q' has no practical significance. >> So we need only two options: wrapping buffers shown in the window, >> and to keep the fixed order of C-x b. So I will create a new request >> for the fixed order of C-x b. And here is the final patch for wrapping: > > I still don't agree with it. IMHO we have to cater for two cases: > > (1) The classic behavior where switching may show a buffer never shown > in the window before. I suppose you mean that > 'switch-to-prev-buffer-wrap' does not affect it. If that's the > case, please say so. Indeed, 'switch-to-prev-buffer-wrap' does not affect it. Switching to a buffer that was never shown in the window should still reset the list of next-buffers to nil. > (2) The new behavior where switching may only show buffers shown in that > window before. For this you want to either wrap or not. So the > option 'switch-to-prev-buffer-wrap' will affect (2) only. Right? 'switch-to-prev-buffer-wrap' will affect only 'C-x C-left' and 'C-x C-right' cycling buffers shown in that window before.