syl20bnr / spacemacs

A community-driven Emacs distribution - The best editor is neither Emacs nor Vim, it's Emacs *and* Vim!
http://spacemacs.org
GNU General Public License v3.0
23.64k stars 4.89k forks source link

neotree won't show help under Emacs style key-binding #8086

Closed asdfasdfasdfasdf4 closed 4 years ago

asdfasdfasdfasdf4 commented 7 years ago

Description: Neotree will prompt "Cannot make side window the only window" and no hot-key help shows up when "?" is pressed under Emacs style key binding, where Vim style key-binding works perfectly, does shows the help prompt.

Reproduction Guide (The problem): 1) set dotspacemacs to emacs style key-binding 2) Start spacemacs "M-x neotree" 3) In the neotree side window press "?"

Observed Behaviour: Will prompt "Cannot make side window the only window" emacs

Expected Behaviour: Shows a new window above the mini-buffer on short-cuts for neotree. Under Vim style key-binding, the help window does appear.

System Info :computer:

bmag commented 7 years ago

Using develop branch, I had to disable purpose-mode to be able to reproduce the error. Here's the backtrace:

Debugger entered--Lisp error: (error "Cannot make side window the only window")
  signal(error ("Cannot make side window the only window"))
  error("Cannot make side window the only window")
  delete-other-windows(#<window 550 on  *NeoTree*>)
  #[(&rest --cl-rest--) "\203\f [ ... snipped byte-code ...]
  apply(#[(&rest --cl-rest--) "\203\f [ ... snipped byte-code ...]
  ad-Advice-popwin:create-popup-window(#[(&rest --cl-rest--) "\203\f [ ... snipped byte-code ...]
  apply(ad-Advice-popwin:create-popup-window #[(&rest --cl-rest--) "\203\f [ ... snipped byte-code ...]
  popwin:create-popup-window(0.4 bottom t)
  popwin:popup-buffer(#<buffer *Help*> :width 30 :height 0.4 :position bottom :noselect t :dedicated t :stick t :tail nil)
  popwin:display-buffer-1(#<buffer *Help*> :if-config-not-found #[(buffer) "\302   \"\207" [buffer not-this-window popwin:original-display-buffer] 3])
  popwin:display-buffer(#<buffer *Help*> nil)
  popwin:display-buffer-action(#<buffer *Help*> nil)
  display-buffer(#<buffer *Help*> nil)
  temp-buffer-window-show(#<buffer *Help*> nil)
  describe-mode()
  funcall-interactively(describe-mode)
  call-interactively(describe-mode nil nil)
  command-execute(describe-mode)

Apparently, popwin doesn't handle side windows correctly, and neotree had become a real side window (from a technical perspective) a few months ago. This probably reproduces with stock Emacs, Neotree and Popwin, so I suggest you report it upstream to Popwin

bmag commented 7 years ago

For anyone wondering, this only happens for Emacs editing style, because in Hybrid and Vim editing styles a transient state is used instead of calling describe-mode.

feluxe commented 6 years ago

I get the same error when I open Neotree and try to create a new file: SPC-f-T c

Cannot make side window the only window.

I'm using Vim editing style.

bmag commented 6 years ago

@feluxe that's a different upstream issue, see https://github.com/jaypei/emacs-neotree/issues/226

clm84 commented 6 years ago

Related issue I think: when trying to delete multiple buffers from IBuffer while neotree is open on the side, I get:

Cannot split side window or parent window of side window
oracleyue commented 6 years ago

I confirm the bug pointed by @bmag : it is due to popwin. Once I turn off the popwin mode, it will work fine.

stradicat commented 5 years ago

I confirm the bug pointed by @bmag : it is due to popwin. Once I turn off the popwin mode, it will work fine.

This worked for me too.

Proposed solutions in NeoTree did not.

github-actions[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!