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 00:53:38 +0800 Message-ID: <20200605165338.GB846@smoon.bkoty.ru> References: <87img65htu.fsf@smoon.bkoty.ru> <87sgf9hiik.fsf@tcd.ie> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="neYutvxvOLaeuPCA" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="103070"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 41719@debbugs.gnu.org To: "Basil L. Contovounesios" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jun 05 19:05:16 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 1jhFmN-000QlR-L2 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 05 Jun 2020 19:05:15 +0200 Original-Received: from localhost ([::1]:59528 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jhFmM-0006CU-Mn for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 05 Jun 2020 13:05:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41134) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jhFbY-00019p-Eu for bug-gnu-emacs@gnu.org; Fri, 05 Jun 2020 12:54:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38204) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jhFbW-0002G3-AL for bug-gnu-emacs@gnu.org; Fri, 05 Jun 2020 12:54:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jhFbW-0002U1-8R for bug-gnu-emacs@gnu.org; Fri, 05 Jun 2020 12:54:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Vladimir Lomov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 05 Jun 2020 16:54:02 +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.15913760309527 (code B ref 41719); Fri, 05 Jun 2020 16:54:02 +0000 Original-Received: (at 41719) by debbugs.gnu.org; 5 Jun 2020 16:53:50 +0000 Original-Received: from localhost ([127.0.0.1]:49750 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jhFbK-0002Tb-7v for submit@debbugs.gnu.org; Fri, 05 Jun 2020 12:53:50 -0400 Original-Received: from forward100p.mail.yandex.net ([77.88.28.100]:58585) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jhFbI-0002TJ-0o for 41719@debbugs.gnu.org; Fri, 05 Jun 2020 12:53:49 -0400 Original-Received: from forward101q.mail.yandex.net (forward101q.mail.yandex.net [IPv6:2a02:6b8:c0e:4b:0:640:4012:bb98]) by forward100p.mail.yandex.net (Yandex) with ESMTP id 8C35F598146E; Fri, 5 Jun 2020 19:53:40 +0300 (MSK) Original-Received: from mxback8q.mail.yandex.net (mxback8q.mail.yandex.net [IPv6:2a02:6b8:c0e:42:0:640:b38f:32ec]) by forward101q.mail.yandex.net (Yandex) with ESMTP id 87448CF40009; Fri, 5 Jun 2020 19:53:40 +0300 (MSK) Original-Received: from vla3-3dd1bd6927b2.qloud-c.yandex.net (vla3-3dd1bd6927b2.qloud-c.yandex.net [2a02:6b8:c15:350f:0:640:3dd1:bd69]) by mxback8q.mail.yandex.net (mxback/Yandex) with ESMTP id g6SuFzlXIX-recqauKW; Fri, 05 Jun 2020 19:53:40 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1591376020; bh=fqJezKUtJIhEi8u2Vj+3ZWN1EAULKlEwKZ9NyZIxciE=; h=In-Reply-To:Subject:Cc:To:From:References:Date:Message-ID; b=gn0yVcpYXXZAVPTJVdnNMEZDbWWT+AXVCUs08yWKdgjkJfO+X9gfjfo/hX7qvuPYr kH0QFVCB+EDChGEEUGGIQgO+aWMrV8DQ/PjGp1CmNNe1MzKt3Ed7WN6eaWg+APfmVz AKZIO6fNS18mxBd014iAmDP7NBdRug/eM+L00IFk= Authentication-Results: mxback8q.mail.yandex.net; dkim=pass header.i=@yandex.ru Original-Received: by vla3-3dd1bd6927b2.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id sfbmO2tnwi-rdWOPpY1; Fri, 05 Jun 2020 19:53:39 +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 49dpcy6MJ3z3hj25; Sat, 6 Jun 2020 00:53:38 +0800 (+08) Content-Disposition: inline In-Reply-To: <87sgf9hiik.fsf@tcd.ie> 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:181574 Archived-At: --neYutvxvOLaeuPCA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello, ** Basil L. Contovounesios [2020-06-05 12:14:11 +0100]: > Vladimir Lomov writes: >> The 'emacs' allows to set the so-called 'instance' when run in X window >> system using '--name' option. The same time the 'emacsclient' doesn't >> have such option and if 'emacs' is run in daemon mode ('emacs >> --daemon=3D...') it is impossible (?) to change the 'instance' of emacs >> window (frame in Emacs terminology) created by 'emacsclient'. >> >> I tried to use '-F' option of 'emacsclient' but I didn't get desire >> result, WM_CLASS isn't changed, only WM_ICON_NAME. It is possible that I >> do things wrong, >> >> $ emacsclient -s /run/user/1000/emacs-default -F '((name . "default") = (title . "USER@HOST"))' >> >> but this topic is covered by manual (Emacs, 21.11 "Frame Parameters" and >> Emacs Lisp 29.4.3 "Window Frame Parameters") very unclear. >> >> 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. On the other hand, if Emacs is run in daemon >> mode it is the purpose of emacsclient to (allow to) set the 'instance' >> and 'title' of created window. > Sorry if I misunderstood, Yes, seems so. > but are you looking for emacsclient's --socket-name=3DNAME argument? =46rom emacsclient(1) -s, --socket-name=3DFILENAME use socket named FILENAME for communication. This can also be specified via the EMACS_SOCKET_NAME environment variable. > This can be the same NAME passed as the --daemon=3DNAME argument to emacs. =46rom emacs(1) --daemon[=3Dname], --bg-daemon[=3Dname] Start Emacs as a daemon, enabling the Emacs server and disconnecting from the terminal. You can then use the emacsclient (see emacsclient(1)) command to connect to the server (with optional nam= e). So if I use >> $ emacsclient -s /run/user/1000/emacs-default -F '((name . "default") = (title . "USER@HOST"))' then I use socket it means I use '--daemon' for emacs. Indeed I use socket activation provided by systemd. =46rom emacs(1) --name=3Dname Specify the name which should be assigned to the initial Emacs wind= ow. This controls looking up X resources as well as the window title. -T name, --title=3Dname Specify the title for the initial X window. When Emacs is run by just running 'emacs' and querying X properties $ xprop | grep 'WM_CLASS\|WM_NAME\|WM_ICON_NAME' one gets 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" While running Emacs by $ emacs --name default --title USER@HOST one gets 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" In other words, emacs has option to set instance name (first string of WM_CLASS value) and set window title. On the other hand emacsclient doesn't have such option so it is (seem) impossible to set 'instance'. I wonder why= it doesn't have such options. I read Emacs and Emacs Lisp manuals about frame parameters but don't get if= it is possible to set instance (and possibly name) using frame parameters. I tried to use -F option but don't get desired result. --- Vladimir Lomov --=20 Natural laws have no pity. --neYutvxvOLaeuPCA Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQQaopaKwcQWyz7yQfAHGfInzJc4BQUCXtp4hgAKCRAHGfInzJc4 BYp3AP43WFOfUVpICWK38bqE6bc9nRzXzlng7Hf0i6BZLAGWqAD/fyEDPZYPld1F Ut8pWm1+4rUjOuO0CV3BY/lbZkJfLwE= =1ITm -----END PGP SIGNATURE----- --neYutvxvOLaeuPCA--