Doom-emacs: How do I run doom-emacs --daemon on Windows 10 (work machine)

Created on 14 May 2020  Â·  2Comments  Â·  Source: hlissner/doom-emacs

What are you trying to achieve?
I try to run doom-emacs (GNU Emacs 26.3) as a daemon on Windows 10 (work machine)

What have you tried?
I installed Emacs 26.3 on Windows 10.
I am able to start emacs.exe or runemacs.exe, but the loading time is (~14-15 sec) is horrible. I tried to run emasc --daemon and without doom was able to start and using with emacsclientw (loading time under <1 sec).

This works fine without doom:

  • Daemon: C:\EMACSLOCATION\emacs-26.3\bin\emacs.exe "--fg-daemon" or "--daemon"
  • Client: e.g: C:\EMACSLOCATION\emacs-26.3\bin\emacsclientw.exe "temp.org"

I installed fresh installation of doom without any change. After installation of doom. The daemon is able to start, but client is not able to find it:

> emacs --daemon
Starting Emacs daemon.
Doom loaded 142 packages across 29 modules in 35.573s
> emacsclientw "temp.org"

Return me error message:

Emacsclient ERROR:
emacsclientw: No socket or alternate editor. Please use:
-- server-file (or environment variable) 
-- alternate-editor (...)

emacsclienterror

And also daemon does not create any files in %APPDATA%/server directory

Do I need to reconfigure config.el file ?

Additional information

System information

λ .emacs.d\bin\doom.cmd version
Doom v2.0.9 (Emacs v26.3)
Branch: develop
Commit: a7c2cbab9042d0f19ff88efbdcf5a50e8a317035
Build date: 2020-05-12 22:40:07 -0400
  • Emacs 26.3
  • Windows 10 Version 10.0.17763 Build 17763
  • HOME is setup it to %APPDATA%


emacs version 26.3
features XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS THREADS LCMS2
build aug 29, 2019
buildopts (--without-dbus --host=x86_64-w64-mingw32 --without-compress-install 'CFLAGS=-O2 -static -g3')
windowsys w32
daemonp server-running
doom version 2.0.9
build grafted, HEAD -> develop, origin/develop, origin/HEAD a7c2cbab 2020-05-12 22:40:07 -0400
dir ~/.doom.d/
system type windows-nt
config x86_64-w64-mingw32
shell C:/MYLOCATION/Emacs/emacs-26.3/libexec/emacs/26.3/x86_64-w64-mingw32/cmdproxy.exe
uname n/a
config envfile envvar-file
elc-files 0
modules (:completion company ivy :ui doom doom-dashboard doom-quit hl-todo modeline ophints (popup +defaults) vc-gutter vi-tilde-fringe workspaces :editor (evil +everywhere) file-templates fold snippets :emacs dired electric undo vc :checkers syntax :tools (eval +overlay) lookup magit :lang emacs-lisp markdown org sh :config (default +bindings +smartparens))
packages (n/a)
unpin (n/a)
elpa (n/a)

Thanks for advice

question redaemon windows resolved

Most helpful comment

All 2 comments

Very good tutorial. It works great. The main issue probably was setup PATH for home directory and also for EMACS_SERVER_FILE the file path C:\Users\USERNAME.emacs.d.local\cache\server\server.
Thanks for help. That tutorial should be in wiki.

Was this page helpful?
3 / 5 - 1 ratings

Related issues

rgrinberg picture rgrinberg  Â·  3Comments

laishulu picture laishulu  Â·  3Comments

governorgoat picture governorgoat  Â·  3Comments

Vvkmnn picture Vvkmnn  Â·  3Comments

Ptival picture Ptival  Â·  3Comments