From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Constantin Kulikov Newsgroups: gmane.emacs.bugs Subject: bug#72345: 29.4; Emacs daemon on Windows OS Date: Mon, 29 Jul 2024 12:28:08 +0300 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000003aca4c061e5f7b38" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14786"; mail-complaints-to="usenet@ciao.gmane.io" To: 72345@debbugs.gnu.org, code@sebasmonia.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jul 29 11:29:16 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sYMgt-0003gl-Ja for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 29 Jul 2024 11:29:15 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sYMgW-0005vS-Nz; Mon, 29 Jul 2024 05:28:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sYMgU-0005n9-HU for bug-gnu-emacs@gnu.org; Mon, 29 Jul 2024 05:28:50 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sYMgU-0001aO-8r for bug-gnu-emacs@gnu.org; Mon, 29 Jul 2024 05:28:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=Date:From:In-Reply-To:References:MIME-Version:To:Subject; bh=veEHVyxhXdKAPxycWOVJ1FNwnz9I6szm9wn1xVHXYf8=; b=nTxwDJGBc0xlnQ0P+CbBUpxRdgGzx8c6NQV3Bm1GSJmQQsRl+RajaXpWM1RcrB7XAbADNI28S2t9iF/lCUE6W3A8fqnc89mxvOU2AEH4i7GpFFTUvNoul6JYagEVKO0z5OxK9xuuzryVBkvdEwHRFfW+HZX+3qrRU16to+tOxcSM+EyySLmTMl7vyGB23xPmv5+T9jRbEgTaXwkr+cmfMuHbzUuqYJtC0xZRHhhWR8GxOFrRnEuf9S+dX5Y9w1ogeFDS4+NoxBgwnaB+xJYBd0utYcmWNMCbKG3J04LiIkY+Z2RXSNGIQWUpwYDJOZJhNywQtmDEYBcFfPE0OVk7Xg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sYMgg-00067Q-8O for bug-gnu-emacs@gnu.org; Mon, 29 Jul 2024 05:29:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Constantin Kulikov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 29 Jul 2024 09:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72345 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org, code@sebasmonia.com Original-Received: via spool by submit@debbugs.gnu.org id=B.172224531923438 (code B ref -1); Mon, 29 Jul 2024 09:29:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 29 Jul 2024 09:28:39 +0000 Original-Received: from localhost ([127.0.0.1]:44868 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sYMgJ-00065w-54 for submit@debbugs.gnu.org; Mon, 29 Jul 2024 05:28:39 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:47134) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sYMgF-00065g-G4 for submit@debbugs.gnu.org; Mon, 29 Jul 2024 05:28:38 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sYMg2-00041m-IB for bug-gnu-emacs@gnu.org; Mon, 29 Jul 2024 05:28:22 -0400 Original-Received: from mail-ej1-x634.google.com ([2a00:1450:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sYMg0-0001T5-Qd for bug-gnu-emacs@gnu.org; Mon, 29 Jul 2024 05:28:22 -0400 Original-Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-a7a843bef98so330532866b.2 for ; Mon, 29 Jul 2024 02:28:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722245299; x=1722850099; darn=gnu.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=veEHVyxhXdKAPxycWOVJ1FNwnz9I6szm9wn1xVHXYf8=; b=P36dMETi6+1NkghvkVSaw6dGgAgzS7gGIudkt1E9SMUSVjAwoPIsDHHTWwjBSu90Pp wu0910iYS0Tbl84tLWwFUa0E4DsE5Vfce/gJaXs1lalbXrgMbCnuhZMNR8oKfz6OjDbI YNEV18zl/+9qjhIcDnSzThrbJ+6IYKARqk1JIIT7o9tdIKFt5PWiBpqlh1s4DuNW+NoN fgWuHETkYNvDfEVftaZ9obWuOK3W1Mq6rV/bYzuvhkRkcCsUJzxc8QdOLcrxVrjhU+De hZC+8L6QDvXqFOK+VhU3QaD7TKziLgp4YP8NzBmt7ypwz1/QCdEc4toXGQu7l++JE5Wa 38cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722245299; x=1722850099; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=veEHVyxhXdKAPxycWOVJ1FNwnz9I6szm9wn1xVHXYf8=; b=kL8RwM5HYnp/fE4BnpPzm37CiotYppTnmiCavZiQSUPwYlD1HhjxEIMYtsxicFWard +ix1KWaJVkqJle66bSp0n6asDd71sP0e6NGHlg7XXsUeb22AXt3rsWpSyDqegodNlJ6N +d115xX/X10IlpXuPx8lZ6V9QzHfoGWiUdmEfUC4LiRMkeNW9m6WBJ5O7wZP/BQfNw36 iHWTZKSurFqYa5pWgpY/EiUtJgbS3a//TiNBPva9MPHjpo6Z1wRZsEVjNh6loevUp14R 0b+CdCQPEu09FTypz3P8EmJfqCnPSiTefCUrFr/1af8eYZ2dXlBwqX9xnlHTYM0oWG36 03Tw== X-Gm-Message-State: AOJu0YyFco01IzI9c0xG1BMoD4hlDQElzbONTfw7Se6aOJAjXhiLmHcz ioeR4hK4Vc4TBZmVayOYmRihGz9sXCnd0LYeBR7Qd/BR6/jBfd3v4tyTZ747/ti/o5wbMzoJTJR J0nSldjjU7NGqO2NzJh+K4LIFmaoTyu2N X-Google-Smtp-Source: AGHT+IGx9RfHZvrjlWXG+0H3sdSPB5rHTYr1qy3A23TgRB0chqsxFe1jdfu8HO0Khafom1GVqImO0U3M8sXQ3WPjrlQ= X-Received: by 2002:a17:906:dc95:b0:a7a:ae85:f245 with SMTP id a640c23a62f3a-a7d400e1eddmr507353366b.38.1722245298438; Mon, 29 Jul 2024 02:28:18 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::634; envelope-from=zxnotdead@gmail.com; helo=mail-ej1-x634.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:289508 Archived-At: --0000000000003aca4c061e5f7b38 Content-Type: text/plain; charset="UTF-8" *> It works with standard read-* methods, and fail if used with for example ivy-mode.* This is not true either. I can switch buffer with C-x b, but can not get help for a function with C-h f . *> Can you try this in good old cmd* cmd makes no difference *> One suggestion I make to every Windows user, is to setup a HOMEenvironment variable.* Good suggestion. As for emacs, one can also specify --init-directory in the command line. I found the root of the problem. The horrors I described in starting post happens only if you specify custom command line parameters in emacs --daemon command, like: ``` # emacs.exe --daemon -myparam test ``` Which can be used in a config like: ``` (let ((myparamcons (member "-myparam" command-line-args))) (setq myparam (cadr myparamcons))) ``` If you specify such a command line argument then the server file is not created by default and if you manually (server-start) from your config then emacs read-* functions are trying to read input from the terminal. But interestingly that if you press C-x C-c in emacsclient frame -- then emacs request to save modified files are handled properly in GUI frame. So the "solution" is not to specify any custom command line arguments. I consider it as a bug. On Mon, 29 Jul 2024 at 03:20, Constantin Kulikov wrote: > *> input from terminal is not working properly* > Well this is not true. It works with standard read-* methods, and fail if > used with for example ivy-mode. > > On Mon, 29 Jul 2024 at 01:08, Constantin Kulikov > wrote: > >> (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) >> > --0000000000003aca4c061e5f7b38 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
> It works with standard read-* met= hods, and fail if used with for example ivy-mode.

This is not true either. I can switch buffer with C-x b= , but can not get help for a function with C-h f .

> Can you try this in good old cmd
cmd makes no difference

> One su= ggestion I make to every Windows user, is to setup a HOME
environment va= riable.


Good suggestion. As for emacs, one= can also specify --init-directory in the command line.

I found the root of the problem. The horrors I described in starting = post happens only if you specify custom command line parameters in emacs --= daemon command, like:

```
# emacs.exe --daemon -myparam test
```

Which can be used in a config like:

```
(let ((myparamcons (member &q= uot;-myparam" command-line-args)))
=C2=A0 =C2=A0 (setq myparam (cadr myparamcons)))
``= `

If you specify such a command line argument then= the server file is not created by default and if you manually (server-star= t) from your config then emacs read-* functions are trying to read input fr= om the terminal. But interestingly that if you press C-x C-c in emacsclient= frame -- then emacs request to save modified files are handled properly in= GUI frame.

So the "solution"=C2=A0is no= t to specify any custom command line arguments.
I consider it as = a bug.


On Mon, 29 Jul 2024 at 03:20, Constantin Kulikov <<= a href=3D"mailto:zxnotdead@gmail.com">zxnotdead@gmail.com> wrote:
<= div dir=3D"ltr">> input from terminal is not working properly
Well this is not true. It works with standard read-* methods, and fa= il if used with for example ivy-mode.

<= div dir=3D"ltr" class=3D"gmail_attr">On Mon, 29 Jul 2024 at 01:08, Constant= in Kulikov <zxn= otdead@gmail.com> wrote:
(And even the input from terminal is = not working properly in=C2=A0that case. You can enter
string to terminal= and it reacts to Enter key press, but seems like
input received by emac= s is always nil)
--0000000000003aca4c061e5f7b38--