alexluigit / dirvish

A polished Dired with batteries included.
GNU General Public License v3.0
822 stars 46 forks source link

[Bug] Emacs closing when providing path in emacsclient #232

Open boyswan opened 1 year ago

boyswan commented 1 year ago

Thank you for the bug report

Bug description

When using emacs daemon and opening a frame using emacsclient -c foobar.el, dirvish will close the entire frame when trying to open a file from another directory.

If a initial path is not provided, such as emacsclient -c then it behaves as expected. Non-daemon mode works as expected when providing a path emacs foobar.el.

Steps to reproduce

(use-package dirvish
  :init
  (dirvish-override-dired-mode))

Start emacs daemon emacs --daemon

Navigate to a directory: cd foo/bar/

Open directory with new emacs frame emacsclient -c .

Opening a file in foo/bar/. works, but navigating to a parent/subdirectory and opening a file will close the current emacs frame.

Expected behavior

The frame should stay open and behave the same as when an initial path is not provided to emacsclient -c

OS

Linux

Emacs Version

29

Emacs Configurations

Default

Error callstack

No response

Anything else

No response

dinkonin commented 1 year ago

I have the same problem.

(setq dirvish-reuse-session nil) fixes it for me but I think there should be a way to keep using emacsclient with a single session.