unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Constantin Kulikov <zxnotdead@gmail.com>
To: 72345@debbugs.gnu.org
Subject: bug#72345: 29.4; Emacs daemon on Windows OS
Date: Mon, 29 Jul 2024 01:08:44 +0300	[thread overview]
Message-ID: <CAFkz2ypozZoBaMb-jnd264frit7UYsxzbyXCqE-GZFmT-pVHDg@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2379 bytes --]

Trying to use emacs daemon on Windows:

In powershell, cd where emacs is unziped and run it:

```
# .\bin\emacs.exe -q --load D:\path-to-my-init\init.el --daemon
```

I use emacs.exe but it does not matter if I use runemacs.exe here and in
all other commands mentioned in this bugreport, the only difference is
that the emacs process is detached from the terminal.

The first problem was the "server socket" file. It was not created. Then I
tried without loading my init.el:

```
# .\bin\emacs.exe -q --daemon
```

The server file was created in
C:\Users\User\AppData\Roaming\.emacs.d\server

That's ok, but I need it to be in another location. Internet suggests to
set EMACS_SERVER_FILE environment variable, so I set it in powershell
before running emacs:

```
# $env:EMACS_SERVER_FILE = "D:\emacs\.emacs.d\server\server"
```

Seems like it's ignored by emacs. Maybe it's outdated.

Then I tried loading my init.el again, the server file was not created.
I tried starting with --debug, etc. No errors. Then I added
`(server-start)` and other server-* settings to init.el, restarted emacs
and got the server file in the desired location.
Now it is time for emacsclient (emacsclientw makes no difference here):

```
# .\bin\emacsclient.exe -server-file "$(Resolve-Path
'.\.emacs.d\server\server')" -c
```

The frame was created. Success? I'm pressing M-x to enter a command
and... emacs is waiting for input but not in GUI frame but in terminal
where the daemon was started! (runemacs.exe --daemon waits input somewhere
nowhere)
Fail!
(And even the input from terminal is not working properly in that case. You
can enter
string to terminal and it reacts to Enter key press, but seems like
input received by emacs is always nil)


In GNU Emacs 29.4 (build 2, x86_64-w64-mingw32) of 2024-07-05 built on
 AVALON
Windowing system distributor 'Microsoft Corp.', version 10.0.20348
System Description: Microsoft Windows Server 2022 Datacenter
(v10.0.2009.20348.1366)

Configured using:
 'configure --with-modules --without-dbus --with-native-compilation=aot
 --without-compress-install --with-sqlite3 --with-tree-sitter
 CFLAGS=-O2'

Configured features:
ACL GIF GMP GNUTLS HARFBUZZ JPEG JSON LCMS2 LIBXML2 MODULES NATIVE_COMP
NOTIFY W32NOTIFY PDUMPER PNG RSVG SOUND SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XPM ZLIB

(NATIVE_COMP present but libgccjit not available)

[-- Attachment #2: Type: text/html, Size: 2837 bytes --]

             reply	other threads:[~2024-07-28 22:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-28 22:08 Constantin Kulikov [this message]
2024-07-29  0:20 ` bug#72345: 29.4; Emacs daemon on Windows OS Constantin Kulikov
2024-07-29  9:28   ` Constantin Kulikov
2024-07-29 10:52     ` Constantin Kulikov
2024-07-29 12:12     ` Eli Zaretskii
2024-08-24  8:20       ` Eli Zaretskii
2024-07-29  3:43 ` Sebastián Monía

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFkz2ypozZoBaMb-jnd264frit7UYsxzbyXCqE-GZFmT-pVHDg@mail.gmail.com \
    --to=zxnotdead@gmail.com \
    --cc=72345@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).