Closed seagle0128 closed 7 years ago
Yes it should work on Windows, in fact last time I checked it worked. Unfortunately I do not currently have access to a Windows machine right now. Does setting restart-emacs-restore-frames
to nil
fix this?
Nop, it doesn't work...
Oh, thanks for the quick feedback. Let me see if I can get hold of a Windows machine to debug this
Thanks, @iqbalansari . BTW, I enabled desktop-save-mode
.
I got some chance to test on Windows, it seems that standalone instances of Emacs restart (and frames are restored) but it fails for Emacs started in daemon mode. Is that correct?
I don't understand what's exact meaning of daemon mode. I am running GNU Emacs x64 GUI on Windows 7, and enable enable-save-mode
and server-mode
. Do you mean server-mode
is daemon mode?
I did some research here.
runemacs.exe
, disable server-mode
, and restart-emacs
. [FAIL]runemacs.exe
, enable server-mode
, and restart-emacs
. [FAIL]emacs.exe
, disable server-mode
, and restart-emacs
. [OK]emacs.exe
, enable server-mode
, and restart-emacs
. [FAIL] I prefer runemacs.exe
. Hope it's helpful.
I don't understand what's exact meaning of daemon mode.
Daemon mode is when you start Emacs with --daemon
flag, it is same as server-mode
except that no initial frame is created, you can edit files using Emacsclient.
The research you did is certainly helpful, thanks a lot, however it is working for me for all the above combinations you posted. My Emacs configuration is very minimal
(require 'package)
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/"))
(package-initialize)
(unless (package-installed-p 'restart-emacs)
(package-refresh-contents)
(package-install 'restart-emacs))
(setq restart-emacs-restore-frames t)
(ido-mode +1)
(desktop-save-mode)
Could it be that something in you Emacs configuration is causing issues? Could you try using restart-emacs
with minimal configuration? Alternatively can you share you Emacs configuration or try with the above configuration to see if issue still occurs?
Thanks for your patience
Thanks for your quick and detailed reply! I will update the results once I complete. BTW, you can find my Emacs configurations here https://github.com/seagle0128/.emacs.d. Maybe you can point out the root cause as well.
I just tried your configuration and restart and restoring frames worked flawlessly with and without server mode with both runemacs.exe
and emacs.exe
. Once you get to try the minimal configuration I posted above could you also try disabling desktop-save-mode
(in your configuration) and see if it works?
@iqbalansari I used minimal configuration and my configuration to test. I found some clues.
restart-emacs
doesn't work with spu
package (https://github.com/mola-T/spu). If disable spu, it works well.
Great news, I will try to debug further today. What is strange is that your configuration worked any issues on my side (I am assuming you have spu
enabled by default)
Yes, it's enabled by default. My spu
configuration is below.
;; Silent package upgrader
(use-package spu
:defer 10 ;; defer package loading for 10 seconds
:config (spu-package-upgrade-daily))
Anyway, I use auto-package-update
instead of spu
and it works well now.
@iqbalansari Thanks very much! The fixing works well. I'd like close it for now.
Thanks for the confirmation @seagle0128 although it seems that the fix I pushed yesterday is not foolproof, I guess I will wait for timp's maintainer to respond
I am using GNU Emacs 25.1 on Windows 7.
restart-emacs
doesn't restart actually.GNU Emacs x64: https://sourceforge.net/projects/emacsbinw64/files/release/ (emacs-w64-25.1-O2-with-modules.7z)
My configuration is
I execute
runemacs.exe
to start Emacs.