Skip to content

spacemacs-layouts-restrict-spc-tab default value (nil) not respected sometimes due to advice #17210

@bcc32

Description

@bcc32

Some users at my site reported a recent regression to spacemacs/alternate-buffer (SPC TAB) which seems to be due to the refactor in #17161. With spacemacs-layouts enabled and its layer variables all set to the defaults, you can reproduce with the following steps:

  1. emacs
  2. SPC f f foo to create a new buffer for a file that doesn't exist yet, and save it
  3. SPC l 2 to create a new layout, give it an arbitrary name
  4. SPC f f foo, visiting the same buffer as before but from the new layout
  5. SPC f f bar to visit another file, creating a new buffer in the new layout
  6. SPC TAB goes to *spacemacs* instead of foo's buffer

If I understand the bug correctly, it is because spacemacs/alternate-buffer now relies on previous-buffer, which calls switch-to-prev-buffer, and the latter is advised by default to cause buffer-list to omit the foo buffer. This violates the expected behavior of spacemacs-layouts-restrict-spc-tab = nil.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions