From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Vladimir Lomov Newsgroups: gmane.emacs.bugs Subject: bug#41719: 28.0.50; [FR] emacsclient should provide '--name' option as emacs Date: Sat, 6 Jun 2020 22:52:21 +0800 Message-ID: <20200606145221.GC846@smoon.bkoty.ru> References: <87img65htu.fsf@smoon.bkoty.ru> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="/e2eDi0V/xtL+Mc8" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="66852"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 41719@debbugs.gnu.org To: Dmitry Alexandrov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 06 16:53:13 2020 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 1jhaC8-000HK7-JG for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 06 Jun 2020 16:53:12 +0200 Original-Received: from localhost ([::1]:51478 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jhaC7-00067d-1n for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 06 Jun 2020 10:53:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45186) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jhaBx-00067F-UI for bug-gnu-emacs@gnu.org; Sat, 06 Jun 2020 10:53:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40750) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jhaBx-00058i-LR for bug-gnu-emacs@gnu.org; Sat, 06 Jun 2020 10:53:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jhaBx-00027C-K4 for bug-gnu-emacs@gnu.org; Sat, 06 Jun 2020 10:53:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Vladimir Lomov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 06 Jun 2020 14:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41719 X-GNU-PR-Package: emacs Original-Received: via spool by 41719-submit@debbugs.gnu.org id=B41719.15914551548097 (code B ref 41719); Sat, 06 Jun 2020 14:53:01 +0000 Original-Received: (at 41719) by debbugs.gnu.org; 6 Jun 2020 14:52:34 +0000 Original-Received: from localhost ([127.0.0.1]:52296 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jhaBW-00026W-9m for submit@debbugs.gnu.org; Sat, 06 Jun 2020 10:52:34 -0400 Original-Received: from forward103j.mail.yandex.net ([5.45.198.246]:34964) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jhaBS-00026G-TF for 41719@debbugs.gnu.org; Sat, 06 Jun 2020 10:52:32 -0400 Original-Received: from forward103q.mail.yandex.net (forward103q.mail.yandex.net [IPv6:2a02:6b8:c0e:50:0:640:b21c:d009]) by forward103j.mail.yandex.net (Yandex) with ESMTP id 7A0BB67400D7; Sat, 6 Jun 2020 17:52:23 +0300 (MSK) Original-Received: from mxback8q.mail.yandex.net (mxback8q.mail.yandex.net [IPv6:2a02:6b8:c0e:42:0:640:b38f:32ec]) by forward103q.mail.yandex.net (Yandex) with ESMTP id 74F1261E0009; Sat, 6 Jun 2020 17:52:23 +0300 (MSK) Original-Received: from vla3-4c649d03f525.qloud-c.yandex.net (vla3-4c649d03f525.qloud-c.yandex.net [2a02:6b8:c15:2584:0:640:4c64:9d03]) by mxback8q.mail.yandex.net (mxback/Yandex) with ESMTP id FKAGDcl9yj-qNcmFNJr; Sat, 06 Jun 2020 17:52:23 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1591455143; bh=keh1DBHY+oMp3tmSPMSLjt8rgDi8DhEnL10nRWXcGjg=; h=In-Reply-To:Subject:Cc:To:From:References:Date:Message-ID; b=gUBb0PCYSahzlyQGPqi3DSjZoPi4g6ODhIGvZoHF7oRtHdWkxRRDkYrBBVRWkuyRh PHWZKEq0QKpG51l6pf/WZjIlQs6YDnP5H3/yhsLvC75pEucuJAxrnk2wDZEsZAIDAf x55p2Cjqr396ad/v349Xw17WOr720Q4i1OQuDWu0= Authentication-Results: mxback8q.mail.yandex.net; dkim=pass header.i=@yandex.ru Original-Received: by vla3-4c649d03f525.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id h3SHi0KVqL-qMXqYl9w; Sat, 06 Jun 2020 17:52:22 +0300 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client certificate not present) Original-Received: by smoon.bkoty.ru (Postfix, from userid 1000) id 49fMtY3DWqz3hj6H; Sat, 6 Jun 2020 22:52:21 +0800 (+08) Content-Disposition: inline In-Reply-To: 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" Xref: news.gmane.io gmane.emacs.bugs:181619 Archived-At: --/e2eDi0V/xtL+Mc8 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello, ** Dmitry Alexandrov [2020-06-06 15:36:06 +0300]: > Vladimir Lomov wrote: >> I tried to use '-F' option of 'emacsclient' but I didn't get desire resu= lt, >> WM_CLASS isn't changed, only WM_ICON_NAME. > Works for me (Emacs 28, no toolkit). Do you able to change WM_CLASS? >> It is possible that I do things wrong, >> >> $ emacsclient -s /run/user/1000/emacs-default -F '((name . "default") = (title . "USER@HOST"))' > FWIW, this command does not necessary create a _new_ frame. Use =E2=80= =98-c=E2=80=99, > =E2=80=98--create-frame=E2=80=99 to force it. My fault, I didn't added it in example but of course use it (without it emacsclient doesn't create window). Let me give more details what I did and what I get. 1. Run Emacs without parameters $ emacs $ xprop | grep 'WM_CLASS\|WM_NAME\|WM_ICON_NAME' WM_CLASS(STRING) =3D "emacs", "Emacs" WM_ICON_NAME(STRING) =3D "emacs@smoon.bkoty.ru" _NET_WM_ICON_NAME(UTF8_STRING) =3D "emacs@smoon.bkoty.ru" WM_NAME(STRING) =3D "emacs@smoon.bkoty.ru" _NET_WM_NAME(UTF8_STRING) =3D "emacs@smoon.bkoty.ru" 2. Run Emacs with parameters $ emacs --name default --title USER@HOST $ xprop | grep 'WM_CLASS\|WM_NAME\|WM_ICON_NAME' WM_CLASS(STRING) =3D "default", "Emacs" WM_ICON_NAME(STRING) =3D "default" _NET_WM_ICON_NAME(UTF8_STRING) =3D "USER@HOST" WM_NAME(STRING) =3D "USER@HOST" _NET_WM_NAME(UTF8_STRING) =3D "USER@HOST" 3. Run emacsclient (the socket is created by systemd, emacs started by service) $ emacsclient -s /run/user/1000/emacs-default -c $ xprop | grep 'WM_CLASS\|WM_NAME\|WM_ICON_NAME' WM_CLASS(STRING) =3D "emacs", "Emacs" WM_ICON_NAME(STRING) =3D "*scratch*" _NET_WM_ICON_NAME(UTF8_STRING) =3D "*scratch*" WM_NAME(STRING) =3D "*scratch*" _NET_WM_NAME(UTF8_STRING) =3D "*scratch*" But this time I already have openned Emacs windown. If I close it (C-x 5 0) and run emacsclient again I get WM_CLASS(STRING) =3D "emacs", "Emacs" WM_ICON_NAME(STRING) =3D "emacs@smoon.bkoty.ru" _NET_WM_ICON_NAME(UTF8_STRING) =3D "emacs@smoon.bkoty.ru" WM_NAME(STRING) =3D "emacs@smoon.bkoty.ru" _NET_WM_NAME(UTF8_STRING) =3D "emacs@smoon.bkoty.ru" 4. Run emacsclient with -F $ emacsclient -s /run/user/1000/emacs-default -c -F '((name . "default") (t= itle . "USER@HOST")) $ xprop | grep 'WM_CLASS\|WM_NAME\|WM_ICON_NAME' WM_CLASS(STRING) =3D "emacs", "Emacs" WM_ICON_NAME(STRING) =3D "default" _NET_WM_ICON_NAME(UTF8_STRING) =3D "USER@HOST" WM_NAME(STRING) =3D "USER@HOST" _NET_WM_NAME(UTF8_STRING) =3D "USER@HOST" This time I don't have openned Emacs window. If I run the same command when Emacs already has window (created by emacsclient) then I get WM_CLASS(STRING) =3D "emacs", "Emacs" WM_ICON_NAME(STRING) =3D "default" _NET_WM_ICON_NAME(UTF8_STRING) =3D "USER@HOST" WM_NAME(STRING) =3D "USER@HOST" _NET_WM_NAME(UTF8_STRING) =3D "USER@HOST" As one may see only emacs allows to set 'instance' (WM_CLASS, first string) with --name option. >> Even if it is possible to change the 'instance' of Emacs window created = by >> 'emacsclient' using the '-F' option it would be nice to have more simple >> way to achieve this. > It would be nice to give some examples, how it can be useful. --- WBR, Vladimir Lomov --=20 If you marry a man who cheats on his wife, you'll be married to a man who cheats on his wife. -- Ann Landers --/e2eDi0V/xtL+Mc8 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQQaopaKwcQWyz7yQfAHGfInzJc4BQUCXtutjwAKCRAHGfInzJc4 BTkOAQCujqFzRsoRKE3NeT9xkv8MK7orflZ8+yrVrNARmmnHJgEAxfqu7moPL06C Tt7vOEIsYWgNn35W3SfyJaSKMv9tpQ8= =oN8F -----END PGP SIGNATURE----- --/e2eDi0V/xtL+Mc8--