-
Notifications
You must be signed in to change notification settings - Fork 443
Description
Describe the bug
I am not sure if this is a bug or a feature request or just a rant but I am finding it very difficult to reason about buffer navigation.
We want to efficiently navigate between buffers by keyboard in the absence of visual clues (the long line of tabs we see at the top of chrome or firefox). This means that we (or at least I) need a mental model of buffers and the relations between them. The problem is that nyxt offers TWO models and only one of them is predictable.
Last access model
-switch-buffer
-switch-buffer-last
Anything that uses a buffer-source
offers a list of buffers sorted by last-access. This is predictable and often what we want but, by its very nature, it is volatile.
The very wonderful switch-buffer-last
hits a good proportion of the use-cases for this model.
Next/previous model
-switch-buffer-next
-switch-buffer-previous
-list-buffers
-show-buffers-panel
This is non-volatile but utterly unpredictable: it imposes a tree structure on the output of buffer-list
which comes from a call to alex:hash-table-values
which I guess has no idea about sort order. In particular, newly created buffers get slotted into the ordering at apparently random places. This is the case even when the tree structure is flat, so that is not the issue. Moreover, I know no way to change this ordering (in chrome/firefox, I would use a mouse to place tabs next to each other).
Why I care
I would very much like to be able to arrange three buffers in such a way that switch-buffer-next/prev moves between them (think three-way cut/paste tasks: there are times when the admin part of my life is dominated such things, sigh)
Suggestions
I guess what I am suggesting is that a rational but user-adjustable ordering underlie the next/previous model. Perhaps start with buffer creation order?
Extra marks for some kind of pinning: mark buffers to be permanently first/second/... in this ordering so that keys like C-1
, C-2
could switch to those quickly.
Nyxt version: 2.1.1-413-g69dbf721
Renderer version: GI-GTK
Operating system kernel: Linux 4.19.0-17-amd64
Lisp implementation: SBCL 2.1.1 (Dynamic space size: 1073741824)
Features: (:SLYNK :WEBKIT2 :WEBKIT2-2.32 :WEBKIT2-PASTE-PLAINTEXT :WEBKIT2-TRACKING
:WEBKIT2-MUTE :WEBKIT2-EMOJI :WEBKIT2-MEDIA :WEBKIT2-SANDBOXING :GTK-3-22
:GTK-3-20 :GTK-3-18 :GTK-3-16 :GTK-3-14 :GTK-3-12 :GTK-3-10 :GTK-3-8 :GTK-3-6
:GTK-3-4 :GTK :GDK-3-22 :GDK-3-20 :GDK-3-18 :GDK-3-16 :GDK-3-14 :GDK-3-12
:GDK-3-10 :GDK-3-8 :GDK-3-6 :GDK-3-4 :CAIRO-1-10 :CAIRO-1-12 :GDK-PIXBUF
:GLIB-2-30 :GLIB-2-32 :GLIB-2-34 :GLIB-2-36 :GLIB-2-38 :GLIB-2-40 :GLIB-2-42
:GLIB-2-44 :GLIB-2-46 :GLIB-2-48 :GLIB-2-50 :GLIB-2-52 :GLIB-2-54 :GLIB-2-56
:GLIB-2-58 :GLIB :NYXT-2 :FSET-EXT-STRINGS :CUSTOM-HASH-TABLE-NATIVE :SWANK
:PLUMP-UTF-32 :GLOBAL-VARS :DECLARE-TYPES :PARENSCRIPT :NAMED-READTABLES
:21BIT-CHARS :CHUNGA :FLEXI-STREAMS :CLOSER-MOP :CL-PPCRE-UNICODE :CL-UNICODE
:CL-PPCRE :BORDEAUX-THREADS :SPLIT-SEQUENCE CHIPZ-SYSTEM:GRAY-STREAMS
:FAST-IO-SV :FAST-IO :SBCL-USES-SB-ROTATE-BYTE :ASDF-SYSTEM-CONNECTIONS
:CL-JSON-CLOS :CL-JSON :THREAD-SUPPORT CFFI-FEATURES:FLAT-NAMESPACE
CFFI-FEATURES:X86-64 CFFI-FEATURES:UNIX :CFFI CFFI-SYS::FLAT-NAMESPACE
ALEXANDRIA::SEQUENCE-EMPTYP :QUICKLISP :ASDF3.3 :ASDF3.2 :ASDF3.1 :ASDF3
:ASDF2 :ASDF :OS-UNIX :NON-BASE-CHARS-EXIST-P :ASDF-UNICODE :X86-64 :GENCGC
:64-BIT :ANSI-CL :COMMON-LISP :ELF :IEEE-FLOATING-POINT :LINUX :LITTLE-ENDIAN
:PACKAGE-LOCAL-NICKNAMES :SB-LDB :SB-PACKAGE-LOCKS :SB-THREAD :SB-UNICODE
:SBCL :UNIX)
ASDF version: 3.3.1
Critical dependencies: (/home/fran/common-lisp/nyxt/_build/submodules/cl-cffi-gtk/gtk/cl-cffi-gtk.asd
/home/fran/common-lisp/nyxt/_build/quicklisp-client/dists/quicklisp/software/cl-gobject-introspection-20210124-git/cl-gobject-introspection.asd
/home/fran/common-lisp/nyxt/_build/submodules/cl-webkit/webkit2/cl-webkit2.asd)
Quicklisp dist version: 2021-06-30
Quicklisp client version: 2020-01-04
Local project directories: (/home/fran/common-lisp/nyxt/_build/submodules/
/home/fran/common-lisp/nyxt/_build/quicklisp-client/local-projects/)
Critical dependencies(#<SYSTEM cl-cffi-gtk / cl-cffi-gtk-20201220-git / quicklisp 2021-06-30>
#<SYSTEM cl-gobject-introspection / cl-gobject-introspection-20210124-git / quicklisp 2021-06-30>
#<SYSTEM cl-webkit2 / cl-webkit-20210630-git / quicklisp 2021-06-30>)