Selecting which buffer to switch to

Hi,

I would like an interactive buffer list to select which buffer to switch to (quite similar to emacs behaviour).

switch-buffer command seems to have the behaviour I am looking for.
However it automatically switch buffer as you browse the list of buffers.

I understand there is probably a way to redefine the command, but my lisp is far from being good enough for this.

Any hint on how could this be customized so that the buffer will be displayed only when selected and not refresh interactively as we go over the buffer list?

1 Like

I like that buffers are switched automatically for preview but I agree that an additional command without the preview wouldd be quite convenient too, especially for slow machines or slow internet. On my laptop where Nyxt performance quickly reaches the limits, the computer often freezes due to too much RAM (or CPU?) use when I preview too many buffers in a short time.

The same is true for delete-buffer.

You can toggle the follow mode commands within the prompt buffer Cc C-f I believe (though you’d have to check the bindings)! As per changing the default behavior of the command, I can think of no easy way to do it besides rewriting the command within your init file!

I’m definitely a lisp noob. Is the concept of advice-add emacs-specific? Is there something similar for nyxt/common lisp that could be helpful here?

Advice is not Elisp specific, there are libraries for Common Lisp that can do it too. We don’t use them because there are other ways to achieve the effect!

For example, you could use our hooks library or customize the buffer source!

If you customize the buffer source to remove the follow action then you don’t need to modify the command. Would it help if I provided a code sample of how to do this?

1 Like