Open danielkrizian opened 5 years ago
Hi @danielkrizian, this might happen if Emacs is not able to start successfully in the daemon mode, possibly due to some bug in init file, could try running /opt/conda/bin/emacs --daemon=server --resume-layouts --restart-emacs-desktop <desktop file>
yourself, this might given some hint as to what went wrong. As to using the information in desktop file, you use the function restart-emacs--restore-frames-using-desktop
to load frames from the desktop file, do something like (restart-emacs--restore-frames-using-desktop "<desktop file>")
Hi @iqbalansari, thanks, I tried running as you suggested, still don't get the expected behavior, i.e. don't get the expected message Emacs daemon restarted! Use '%s -nw -s %s %s' to reconnect to it
and the terminal does not show the restored emacs buffers from previous session.
Step by step what I did:
$ emacs --daemon
$ emacsclient -t
In the open Spacemacs terminal session that pops up, SPC q r
tied to dotspacemacs/resume-emacs-resume-layouts
.
I am now back in the terminal.
$ htop
PID USER PRI NI VIRT RES SHR S CPU% MEM% TIME+ Command
23102 dk 20 0 189M 124M 8776 S 0.0 0.2 0:03.47 /opt/conda/bin/emacs --daemon=server --resume-layouts --restart-emacs-desktop /tmp/restart-emacs-desktopdBkj0J
22953 dk 20 0 231M 166M 8768 S 0.0 0.3 0:04.78 /opt/conda/bin/emacs --daemon=server --resume-layouts --restart-emacs-desktop /tmp/restart-emacs-desktopdBkj0J
$ /opt/conda/bin/emacs --daemon=server --resume-layouts --restart-emacs-desktop /tmp/restart-emacs-desktopdBkj0J
Loading /home/dk/dotfiles/.spacemacs.d/init.el (source)...
Loading /home/dk/dotfiles/.spacemacs.d/init.el (source)...done
Loading /home/dk/dotfiles/.emacs.d/custom.el (source)...
Loading t-mouse...
Loading t-mouse...done
Loading xt-mouse...
Loading xt-mouse...done
Loading /home/dk/dotfiles/.emacs.d/custom.el (source)...done
spacemacs buffer error: (beginning-of-buffer)
Eshell virtualenv support initialized.
Spacemacs is ready.
No desktop file.
$
Note the last command prompt ($
). At this point I would have expected message in the terminal saying Emacs daemon restarted! Use '%s -nw -s %s %s' to reconnect to it
. Instead I am back in the terminal and see the third emacs process running in htop
, without being able to attach to it and see the usual emacs terminal environment buffers.
$ htop
PID USER PRI NI VIRT RES SHR S CPU% MEM% TIME+ Command
23102 dk 20 0 189M 124M 8776 S 0.0 0.2 0:03.47 /opt/conda/bin/emacs --daemon=server --resume-layouts --restart-emacs-desktop /tmp/restart-emacs-desktopdBkj0J
22953 dk 20 0 231M 166M 8768 S 0.0 0.3 0:04.78 /opt/conda/bin/emacs --daemon=server --resume-layouts --restart-emacs-desktop /tmp/restart-emacs-desktopdBkj0J
22952 dk 20 0 74812 11620 10276 S 0.0 0.0 0:00.01 /opt/conda/bin/emacs --daemon=server --resume-layouts --restart-emacs-desktop /tmp/restart-emacs-desktopdBkj0J
This seems like the problematic error
spacemacs buffer error: (beginning-of-buffer)
It seems this error is preventing Emacs init from completely running and thus restart-emacs
's startup hook which prints this message is never getting a chance
Hello @danielkrizian, any update on this? Is this still happening?
I have started emacs (v26.1) server:
I connected using
From within emacs, well spacemacs, I restarted the daemon
SPC q r
, which executeddotspacemacs/resume-emacs-resume-layouts
tied torestart-emacs.el
.After daemon restarted, I see the process in
htop
running but can't reconnect to it.I was expecting to see the message
Emacs daemon restarted! Use '%s -nw -s %s %s' to reconnect to it
pop up in my bash terminal, but it does not appear.How can I reconnect to the server? I tried this:
Can I use the
/tmp/restart-emacs-desktopOpor7P
information somehow?