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

Spacemacs layouts - SPC b b not layout local if invoked before SPC B b if ido is excluded #5788

Closed
cpaulik opened this issue Apr 13, 2016 · 19 comments

Comments

@cpaulik
Copy link
Contributor

cpaulik commented Apr 13, 2016

Description

SPC b b is not layout local until SPC B b was invoked once when ido is in dotspacemacs-excluded-packages

Reproduction guide

  • Start Emacs
  • SPC p l SPC b b. This shows all buffers for me.
  • Then SPC B b ESC SPC b b shows only the buffers of the project.

Expected behaviour:
The first SPC b b should only show the layout buffer.

System Info

  • OS: gnu/linux
  • Emacs: 24.5.1
  • Spacemacs: 0.105.18
  • Spacemacs branch: develop (rev. 5ee970f)
  • Graphic display: t
  • Distribution: spacemacs
  • Editing style: vim
  • Completion: helm
  • Layers:
(ansible
 (auto-completion :variables auto-completion-enable-snippets-in-popup t auto-completion-private-snippets-directory "~/dotfiles/.spacemacs-config/snippets/" auto-completion-enable-help-tooltip nil)
 chrome clojure colors custom_org_config django
 (elfeed :variables rmh-elfeed-org-files
         (list "~/Dropbox/org/feeds.org"))
 emacs-lisp emoji erc finance games
 (git :variables git-gutter-use-fringe t)
 github gnus graphviz html ipython-notebook javascript latex lua markdown my-mu4e my_python org org-ipython org-page pandoc pdf-tools php
 (python :variables python-enable-yapf-format-on-save nil python-auto-set-local-pyenv-version 'on-project-switch python-test-runner
         '(pytest))
 ranger research-config restclient ruby rust search-engine semantic
 (shell :variables shell-default-shell 'term shell-default-term-shell "/bin/zsh")
 shell-scripts
 (spell-checking :variables spell-checking-enable-by-default nil)
 spacemacs-helm spacemacs-layouts syntax-checking systemd tmux vagrant
 (version-control :variables version-control-diff-tool 'diff-hl)
 yaml)

Backtrace

BACKTRACE IF RELEVANT
@StreakyCobra
Copy link
Contributor

It seems to still be layout local here. But it's late, maybe I did something wrong. Will test further tomorrow.

@cpaulik
Copy link
Contributor Author

cpaulik commented Apr 13, 2016

Hmm, it is also late here. I've tried again now. It starts working correctly when I press SPC B b once. So please try from a freshly started emacs SPC p l SPC b b. This shows all buffers for me. Then SPC B b ESC SPC b b shows only the buffers of the project.

@cpaulik cpaulik changed the title Spacemacs layouts - SPC b b is no longer layout local Spacemacs layouts - SPC b b not layout local if invoked before SPC B b Apr 13, 2016
@robbyoconnor
Copy link
Contributor

I've yet to be able to get it to work

@StreakyCobra
Copy link
Contributor

I tested again, I still cannot reproduce. This is what I did:

Preparation

  • Rebased on last develop
  • Updated packages
  • rm ~/.emacs.d/elpa/pers-mode… just to be sure it's not quelpa version anymore
  • Started Emacs to redownload persp-mode, closed emacs.

Reproducing

  • Starting Emacs
  • SPC p l, selecting a project, pressing RET, selecting a file, pressing RET
  • SPC b b

This shows me only the file I have selected in the current project, *messages* and *spacemacs* are not shown for instance. SPC B b gives the complete list.

@cpaulik
Copy link
Contributor Author

cpaulik commented Apr 14, 2016

@StreakyCobra Thanks. I've seen this on two machines of mine. I'll try to wipe the complete elpa when I have time to see if it persists.

@sooheon
Copy link

sooheon commented Apr 14, 2016

By the way, for those using spacemacs-ivy layer this functionality is broken, as helm-mini is hardcoded in the function.

@cpaulik
Copy link
Contributor Author

cpaulik commented Apr 14, 2016

I've completely wiped elpa and reinstalled everything. Still the same 😟

@syl20bnr
Copy link
Owner

Mmhhhh did you try to remove the Spacemacs-layouts layouts from the list of your used layers ? This is a shot in the dark I'm not in front of a computer. (Spacemacs-layouts is already added by the Spacemacs distribution).

Did you try with a vanilla Spacemacs ?

@robbyoconnor
Copy link
Contributor

robbyoconnor commented Apr 15, 2016

Are you using helm or ivy @cpaulik

@cpaulik
Copy link
Contributor Author

cpaulik commented Apr 15, 2016

Thanks, guys. It was caused by having ido in my dotspacemacs-excluded-packages. I don't remember why exactly I put it there. I guess it was used somewhere where I wanted helm.

@cpaulik
Copy link
Contributor Author

cpaulik commented Apr 15, 2016

Should I close this or does this require a fix?

@syl20bnr
Copy link
Owner

Keep it open for now, I don't understand why excluding ido would trigger this bug.

@cpaulik cpaulik changed the title Spacemacs layouts - SPC b b not layout local if invoked before SPC B b Spacemacs layouts - SPC b b not layout local if invoked before SPC B b if ido is excluded Apr 15, 2016
@deuill
Copy link
Contributor

deuill commented Apr 15, 2016

Not sure if I'm understanding this bug report wrong, but are buffers supposed to be layout-specific (as proposed in #4590)? If so, I'm getting the same issue, i.e.:

  • Start up Emacs
  • Change to project layout with SPC p l, choose any project file (say, main.c)
  • List of buffers with SPC b b includes *spacemacs*, *Messages*, main.c etc
  • Change to different project layout, choose any file. List of layouts (SPC b b) includes files from previous project layout (in this case, main.c).

Restarting Emacs also stores all buffers across layouts. My excluded packages are empty.

@StreakyCobra
Copy link
Contributor

I'm not sure if the layout-specific feature is in master yet. On which branch are you?

@deuill
Copy link
Contributor

deuill commented Apr 15, 2016

@StreakyCobra ah, my bad, I am indeed on master. I missed the part where the bug has been reported against develop. Consider this my +1 though (for the feature, not the bug ;) )!

@StreakyCobra
Copy link
Contributor

😃 It will arrive in master in the next release

@sooheon
Copy link

sooheon commented Apr 16, 2016

Is there a milestone for spacemacs-ivy compatibility, (and someone interested in working on it) or does it need a volunteer?

aroig added a commit to aroig/spacemacs that referenced this issue Aug 20, 2016
This fixes two issues regarding layouts.

1. Since Bad-ptr/persp-mode.el@e950bf15, persp-mode requires setting
persp-hook-up-emacs-buffer-completion in order to install the hooks for
ido & friends. This variable is nil by default, making SPB b b not
restrict to layout-local buffers.

2. The function spacemacs-layouts/non-restricted-buffer-list removes a
hook and re-adds it later. This makes the assumption that the hook was
already present. If it was not (due to 1) then SPC B b changes global
state by adding that hook. Instead, just let-bind the hook variable
for the scope we need it changed.

This explains and partially fixes syl20bnr#5788 and syl20bnr#6266. It does not fix the
dependency on ido-mode. If ido-mode is excluded, persp-mode will not
install the hook for ido, and SPB b b will still be unrestricted.
TheBB pushed a commit that referenced this issue Aug 22, 2016
This fixes two issues regarding layouts.

1. Since Bad-ptr/persp-mode.el@e950bf15, persp-mode requires setting
persp-hook-up-emacs-buffer-completion in order to install the hooks for
ido & friends. This variable is nil by default, making SPB b b not
restrict to layout-local buffers.

2. The function spacemacs-layouts/non-restricted-buffer-list removes a
hook and re-adds it later. This makes the assumption that the hook was
already present. If it was not (due to 1) then SPC B b changes global
state by adding that hook. Instead, just let-bind the hook variable
for the scope we need it changed.

This explains and partially fixes #5788 and #6266. It does not fix the
dependency on ido-mode. If ido-mode is excluded, persp-mode will not
install the hook for ido, and SPB b b will still be unrestricted.
@d12frosted
Copy link
Collaborator

Fixed with release of Spacemacs v0.200.

@robbyoconnor
Copy link
Contributor

Not so fast: #7240 does this but it's not fixed yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants