From: Juri Linkov <juri@linkov.net>
To: martin rudalics <rudalics@gmx.at>
Cc: 69993@debbugs.gnu.org
Subject: bug#69993: Wrap window buffers while cycling
Date: Tue, 09 Apr 2024 19:37:50 +0300 [thread overview]
Message-ID: <864jcajzxi.fsf@mail.linkov.net> (raw)
In-Reply-To: <f0a8c8ef-b722-4b62-ae17-c73cbef390ce@gmx.at> (martin rudalics's message of "Tue, 9 Apr 2024 11:04:38 +0200")
>> The problem is that from the point of view of tab-line users
>> currently there is no wrapping because the tab-line already
>> restricts itself to the buffers shown in that window only.
>
> I'm afraid we still misunderstand each other: For me "wrap" means that
> when I'm at the beginning of a list and want to go to its previous
> element, I go to the last element of the list. When I'm at the end of a
> list and want to go to its next element, I go to the first element of
> the list.
>
> I think that if we added a 'switch-to-prev-buffer-wrap' option, we would
> emulate the behavior sketched above regardless of whether it's triggered
> by 'switch-to-prev-buffer' or 'tab-line-switch-to-prev-tab'. Currently,
> 'switch-to-prev-buffer' always wraps while 'tab-line-switch-to-prev-tab'
> obeys the value of 'tab-line-switch-cycling'.
The users won't understand how currently 'switch-to-prev-buffer' always wraps,
when going to the previous element at the beginning of a list
doesn't go to the last element of the tab-line.
> 'tab-line-switch-cycling' could then be used to override the more
> general 'switch-to-prev-buffer-wrap' when calling
> 'tab-line-switch-to-prev-tab'. Or we could alias
> 'tab-line-switch-cycling' to 'switch-to-prev-buffer-wrap'. And we could
> use the term 'switch-to-prev-buffer-cycle' instead.
I think "cycle" is a wrong name. Cycling is using
'switch-to-prev-buffer'. But wrapping is going
from the beginning to the end of the tab-line.
>> But if you think that 'switch-to-prev-buffer-wrap' should be renamed
>> to something that makes no sense for tab-line users such as
>> 'switch-to-prev-buffer-restrict', then still it can be used
>> from tab-line.el like this:
>>
>> (when tab-line-switch-cycling
>> (let-bind ((switch-to-prev-buffer-restrict tab-line-switch-cycling))
>> (switch-to-prev-buffer window)))
>
> An option like say 'switch-to-prev-buffer-restrict' should effectively
> affect 'switch-to-prev-buffer' only. 'tab-line-switch-to-prev-tab'
> would not switch to a buffer never shown in that window and could be
> implemented as you sketched above.
>
> To sum up, I think that we should not mingle the concepts of
> wrapping/cycling and restricting into one and the same option but
> provide two options instead.
Mixing wrapping/cycling and restricting is unavoidable:
you can see how the previous patch reorders prev/next buffers
to make the order of tabs stay the same after wrapping.
next prev parent reply other threads:[~2024-04-09 16:37 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-25 7:42 bug#69993: Wrap window buffers while cycling Juri Linkov
2024-03-25 9:41 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-25 17:16 ` Juri Linkov
2024-03-26 9:56 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-27 7:20 ` Juri Linkov
2024-03-27 8:48 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-28 7:54 ` Juri Linkov
2024-03-28 9:19 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-28 17:57 ` Juri Linkov
2024-03-29 8:45 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-29 16:35 ` Juri Linkov
2024-03-30 9:37 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-30 18:24 ` Juri Linkov
2024-03-31 8:32 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-02 6:37 ` Juri Linkov
2024-04-02 8:22 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-02 16:28 ` Juri Linkov
2024-04-03 8:24 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-03 17:45 ` Juri Linkov
2024-04-04 8:03 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-05 6:45 ` Juri Linkov
2024-04-05 9:08 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-05 16:32 ` Juri Linkov
2024-04-06 18:43 ` Juri Linkov
2024-04-07 8:23 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-09 6:35 ` Juri Linkov
2024-04-09 9:04 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-09 16:37 ` Juri Linkov [this message]
2024-04-10 8:46 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-10 17:45 ` Juri Linkov
2024-04-11 9:18 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-12 6:35 ` Juri Linkov
2024-04-12 8:37 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-12 16:23 ` Juri Linkov
2024-04-14 16:15 ` Juri Linkov
2024-04-16 6:38 ` Juri Linkov
2024-04-17 17:56 ` Juri Linkov
2024-04-24 16:39 ` Juri Linkov
2024-04-25 8:31 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-25 17:40 ` Juri Linkov
2024-04-02 16:34 ` Juri Linkov
2024-04-03 8:24 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-03 17:44 ` Juri Linkov
2024-04-04 6:22 ` Juri Linkov
2024-04-02 16:40 ` Juri Linkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=864jcajzxi.fsf@mail.linkov.net \
--to=juri@linkov.net \
--cc=69993@debbugs.gnu.org \
--cc=rudalics@gmx.at \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).