[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Solved] RE: How to bring previous-buffer to cycle through the full list

From: Jürgen Hartmann
Subject: [Solved] RE: How to bring previous-buffer to cycle through the full list of buffers
Date: Mon, 11 May 2015 09:55:35 +0200

Thank you, Martin Rudalics, for your solution:

>> After the windows history is exhausted by repetitively applying
>> previous-buffer, the cycling continues with all the other buffers in the
>> global buffer list, but this time unconditionally skipping those of them that
>> are visible in other windows--regardless of the setting in
>> switch-to-visible-buffer.
> Try to replace the line
>       (if (get-buffer-window buffer frame)
> with
>       (if (and (not switch-to-visible-buffer)
>            (get-buffer-window new-buffer frame))
> in both `switch-to-prev-buffer' and `switch-to-next-buffer' (move these
> functions to your .emacs if you cannot rebuild Emacs).
> I didn't test this and don't know whether it has any adversary effect,
> so you may have to play around with it ;-)
> martin

(It should read "buffer" instead of "new-buffer".)

This is exactly the solution I looked for. And more than that, it fully
respects the setting in switch-to-visible-buffer. Perfect!

In the tests I performed up to now I could not find any adversary effects. If
there are some, they are well hidden and will hardly be traced back to this
modification. :-)

Thank you very much for that.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]