When visiting a folder with emacsclient, for example through emacsclient .
, using dired, opening a folder using a
will cause emacsclient to terminate. I believe this is because a
, bound to dired-find-alternate-file
will close the buffer emacsclient is in some way bound to causing it to terminate. I observe the same behavior when using dired-single.el
.
Is there any way to prevent this from happening? Given my above assumptions about how why this happens: to make dired reuse the same buffer rather than destroy it?
dired-find-alternate-file
's doc string says:In Dired, visit file or directory on current line via ‘find-alternate-file’. This kills the Dired buffer, then visits the current line’s file or directory.
So it seems to me that the only way to avoid the problem is to avoid usingdired-find-alternate-file
. What's wrong withdired-find-file
(bound tof
)? It leaves the directory buffer alone, so emacsclient can continue enjoying its existence.