punassuming / ranger.el

Bringing the goodness of ranger to dired!
699 stars 52 forks source link

eshell does not exit with ranger #174

Closed srustamo closed 6 years ago

srustamo commented 6 years ago

Typing exit in 'eshell' buffer does not exit eshell and gives this error:

Debugger entered--Lisp error: (wrong-type-argument window-live-p ranger-window)
  #<subr select-window>(ranger-window nil)
  ad-Advice-select-window(#<subr select-window> ranger-window)
  apply(ad-Advice-select-window #<subr select-window> ranger-window)
  select-window(ranger-window)
  (lambda nil (unless (one-window-p) (delete-window)) (select-window (quote ranger-window)))()
  run-hooks(eshell-exit-hook)
  eshell-kill-buffer-function()
  kill-buffer(#<buffer *eshell*>)
  eshell-life-is-too-much()
  eshell-send-input(nil)
  funcall-interactively(eshell-send-input nil)
  call-interactively(eshell-send-input nil nil)
  command-execute(eshell-send-input)
srustamo commented 6 years ago

Looks like it was a local issue.

aryadev commented 6 years ago

@srustamo so what was the fix? I get this on both Windows and Linux.

srustamo commented 6 years ago

Sorry, it's been a while, can't remember the context. I tried it right now on 26.1. `eshell' exits without error.

kamysheblid commented 3 years ago

The problem is this addition to the eshell-exit-hook

https://github.com/ralesi/ranger.el/blob/2498519cb21dcd5791d240607a72a204d1761668/ranger.el#L1171-L1173

I think the error is from (select-window 'ranger-window). It probably isnt supposed to have a quote since it is referring to a window object stored in the symbol ranger-window. Removing the quote in my ranger.el fixed the issue.

Can be fixed by merging my pr #232

saucoide commented 2 years ago

I tried kamysheblid pr and it solves the bug for me, any chance to get #232 merged?