Closed farosas closed 9 years ago
Is this the expected behavior?
No.) I'll take a look.
Don't know if it's relevant, but I do not run emacs --daemon
beforehand. I have ALTERNATE_EDITOR=""
in my .bashrc so that the first time I run emacsclient, it will start the daemon for me.
Well, for now I came up with this temporary solution(until I invent something cleverer):
(with-eval-after-load "persp-mode-autoloads"
(setq wg-morph-on nil)
(add-hook 'after-init-hook #'(lambda () (persp-mode 1)))
(defun persp-first-find-file-hook ()
(lexical-let ((cb (current-buffer)))
(setq persp-restore-window-conf-method
#'(lambda (frame persp new-frame)
(setq persp-restore-window-conf-method t)
(persp-restore-window-conf frame persp new-frame)
(switch-to-buffer cb)))
(remove-hook 'server-visit-hook #'persp-first-find-file-hook)))
(when (daemonp)
(add-hook 'server-visit-hook #'persp-first-find-file-hook)))
I tested it a bit and it looks like working for your case.
This must be solved by 3d87018216c7c71001cea56119c8a64f2d88f553
I'm using emacs 24.4 and when I open it for the first time with
emacsclient -c <filename>
it will show the file and then switch to the scratch buffer.Is this the expected behavior?
I am using the following init.el: