GNU bug report logs - #32850
27.0.50; window-swap-states doesn't swap window prev/next-buffers

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Thu, 27 Sep 2018 00:06:02 UTC

Severity: minor

Found in version 27.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


Message #226 received at 32850 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Juri Linkov <juri <at> linkov.net>
Cc: "Charles A. Roelli" <charles <at> aurox.ch>, 32850 <at> debbugs.gnu.org
Subject: Re: bug#32850: 27.0.50;
 window-swap-states doesn't swap window prev/next-buffers
Date: Tue, 20 Nov 2018 10:27:52 +0100
> Why not?  'C-2 C-x <left>' could be just a shortcut for
> 'C-x <left> C-x <left>'.
>
>> 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 <left>' 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 <left>' and 'C-x <right>' to "scroll" the list
> of prev/next buffers.

So what you're after is to make the visual effect of C-2 C-x <left>
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




This bug report was last modified 6 years and 183 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.