Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add affixations to buffer switching functions when exordium-help-extensions #240

Merged
merged 7 commits into from
Feb 25, 2025

Conversation

pkryger
Copy link
Collaborator

@pkryger pkryger commented Feb 6, 2025

This ensures consistency when switching to buffers using different methods, for
example swich-to-buffer, C-x b, swich-to-buffer-other-window,
C-x 4 b, or projectile-switch-to-buffer, C-c p b.

Using the opportunity to add a few minor fixes, and a couple of new keybindings.

As usual, please see individual commits for details.

Using `after` uses `eval-after-load` unconditionally, which, in case of setting
up bindings is an overkill, as all bindings are in global map
Add a new keybinding for Google suggest and remap `switch-to-buffer` to
`helm-buffers-list`, which offers a couple alternative actions on buffers.

Also turn on detailed completions.
`helm-xref` unconditionally hijacks `xref-show-xrefs-function` and
`xref-show-definitions-function`. I don't think this is expected.

BREAKING CHANGE: don't install `helm-xref` unless in `exordium-helm-everywhere`
Need to use generic `completing-read` framework to get affixation to work. The
latter however doesn't have any actions defined, so copying relevant attributes
from `helm-source-buffers-list`.

BREAKING CHANGE: When `exordium-helm-everywhere` the binding `C-x b` now points
  to `switch-to-buffer` (was: `helm-buffers-list`). This is consistent with
  other bindings (for example `C-x 4 b` - `switch-to-buffer-other-window`), but
  some extra behaviour from `helm-buffers-list` is not available (i.e.,
  candidate buffers sorting and highlighting).
This is done in an attempt to provide a consistent interface when switching to
a buffer, and is hidden behind `exordium-extra-help` flag.

This is done similarily to what Exordium does for `switch-to-buffer` and
`helpful` commands do under the hood. Both of these, when
`completions-detailed` is non-nil use `helm-completing-read-extra-metadata` to
select an affixation function.
Copy link
Collaborator

@steve-downey steve-downey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@pkryger pkryger merged commit 1afc9ee into emacs-exordium:master Feb 25, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants