tvl-depot/users/tazjin/emacs/config
Vincent Ambo df4a09864a feat(tazjin/emacs): implement reliably-switch-buffer
Adds a completing-read function (defaulting to ivy for me, but it
doesn't matter) that offers a reliable alternative to standard
buffer-switching implementations.

In particular, this implementation retains a mapping of
buffer names to their buffer *objects*, so that the correct buffer is
selected even if some renaming took place during the selection.

I tried to account for a bunch of the common behaviours I could think
of:

* invisible buffers are ... invisible
* entering a buffer name manually creates that buffer, if there is no
  match
* ... unless that buffer is an invisible buffer, in which case it is
  selected and switched to
* the first element is always `(other-buffer (current-buffer))`,
  because of the ordering of #'buffer-list

Yet, the entire code of my implementation is less than the *setup*
code of ivy-switch-buffers, so it's possible I missed something. Well,
I'll find out ...

Change-Id: I08be0da0863d06c9a930e5efaf916719655db90e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/9147
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2023-08-23 20:22:25 +00:00
..
bindings.el feat(tazjin/emacs): implement reliably-switch-buffer 2023-08-23 20:22:25 +00:00
custom.el style(tazjin/emacs): Disable my dark theme (again) 2022-03-07 11:44:25 +00:00
desktop.el fix(tazjin/emacs): reset both xrandr outputs correctly 2023-07-28 20:11:58 +00:00
eshell-setup.el chore(tazjin/emacs): Move //tools/emacs to //users/tazjin/emacs 2020-06-18 20:19:50 +01:00
functions.el feat(tazjin/emacs): implement reliably-switch-buffer 2023-08-23 20:22:25 +00:00
init.el fix(tazjin/emacs): unbind dangerous telega.el shortcut 2023-08-08 09:44:11 +00:00
look-and-feel.el feat(tazjin/emacs): modeline warning if tty sessions are logged in 2023-07-22 09:26:06 +00:00
mail-setup.el refactor(tazjin/emacs): Switch to sending mail via lieer 2021-05-22 20:58:47 +00:00
modes.el chore(tazjin/emacs): Move //tools/emacs to //users/tazjin/emacs 2020-06-18 20:19:50 +01:00
settings.el feat(tazjin/emacs): use python-mode for Starlark files 2023-08-08 09:44:11 +00:00