From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: chad Newsgroups: gmane.emacs.devel Subject: Re: How to get DISPLAY of emacsclient? Date: Tue, 29 Nov 2022 19:41:11 -0500 Message-ID: References: <973588ef-d931-47a0-66d3-f8d70d92bd57@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000001c182605eea55d87" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29581"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Max Nikulin Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Nov 30 01:41:58 2022 Return-path: Envelope-to: ged-emacs-devel@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 1p0BAj-0007ZT-CF for ged-emacs-devel@m.gmane-mx.org; Wed, 30 Nov 2022 01:41:57 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p0BAM-00008I-SJ; Tue, 29 Nov 2022 19:41:35 -0500 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 1p0BAE-00006z-89 for emacs-devel@gnu.org; Tue, 29 Nov 2022 19:41:29 -0500 Original-Received: from mail-yw1-x112d.google.com ([2607:f8b0:4864:20::112d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p0BAC-00023g-F5 for emacs-devel@gnu.org; Tue, 29 Nov 2022 19:41:25 -0500 Original-Received: by mail-yw1-x112d.google.com with SMTP id 00721157ae682-3c090251d59so100572847b3.4 for ; Tue, 29 Nov 2022 16:41:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=g0fw4t9xkpjscJZUzxwbGjmAXF8WiYk1U5HXtXUV5gs=; b=WoHQyrqcAFOQneM59fIlsZ2WMkvM9LdchzQEC63KTJUk9lL+XBKyIaPFCzagZim0Nc DYrvLTifkuuaqB2BRWL/mIjubXkt2PZ0f9dPDRF4a2JdgeJmM9qIYOmxBPMs/61sCRMB a2RpzDLtOb9L3NbDUm4hwrAt64h0/BZ++AI9HZGqQSON0++qEckmirjeGSlDiWNdWJLh xzZlrKHhDNSO+Q/cGMqlSlMaSY1RzxF2O3ksxFlGpEJQOboQpQsOu7xkP9FwTfQ9wMws F1L+ZDhbxJnCFWpUwK0rT9zq9g+AVsG+TgEdyuu4n1WuHlN39Dwzht4IQeW0lKVlk8bg RjIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc: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=g0fw4t9xkpjscJZUzxwbGjmAXF8WiYk1U5HXtXUV5gs=; b=m0A0ILycgFjkk45C4qTL1FB4+tZ58FiRIubEGKjxCI3pTAX8PLPMewHJ2O99RrhnqT JvsNYX0Lsg88lKutO5Tmxz0hOuJInaCnh/cDeleCPPBo1rLLerUUTyvrxT92Hy2RynZL qTI0zT1u66lIn7p/fgc4EqkK8iNtwQhHDgCv2+i4lPWjrEt9O5TTixRpoUlR18PKew8I gJ8b2squ72X+G6YmY0a8JpmluOGvHgIHy1AN2XQTo5MWDgOYlC1M7um4e8r/ETl0+ZIy e0VxGirt8n7Gce1/Kdfdl6zN8zZw3f0hQrbBdQAvn6pmcslFwHmOVPXu1wr0SEt79CbF tiYw== X-Gm-Message-State: ANoB5pnPBOaEtsPFiRkJBnCTFJNiaCh2mYuEaaXLt1P0fBYyHdtGPgyq lNpOCug8aeGL5XWKtK5zLKpZjUaTxnpSfAtkql1W8soT8aA= X-Google-Smtp-Source: AA0mqf5W3d/vN3l0fkulpBSRZ9yeAq3FIPzkKq82cQ7bIBhsL5l8vRTHcNKpi4WGpRUOeW9b8+ygPaEdrs7BmKnqvPY= X-Received: by 2002:a0d:c8c1:0:b0:3c4:bc23:82d9 with SMTP id k184-20020a0dc8c1000000b003c4bc2382d9mr14186277ywd.216.1669768882688; Tue, 29 Nov 2022 16:41:22 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::112d; envelope-from=yandros@gmail.com; helo=mail-yw1-x112d.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: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:300738 Archived-At: --0000000000001c182605eea55d87 Content-Type: text/plain; charset="UTF-8" On Tue, Nov 29, 2022 at 1:11 PM Max Nikulin wrote: > [...] > Add to user notes content of X selection when emacs is started as > daemong with no frames and the user prefers to avoid distraction due to > creation of a new frame. > In general, you seem to assume that there's no way for emacs to create a new X11 frame object without it being immediately visible to the user. In my experience, that's only true in the limited subset of cases where the user has chosen a window manager that enforces that choice. Further, that wasn't the default when I last looked -- but that was quite some time ago, and I don't know about the current options/defaults for common X11-based display systems of today. Can anyone shed some light on this? On Tue, Nov 29, 2022 at 1:11 PM Max Nikulin wrote: > [...] User connected to another machine through ssh (e.g. from a laptop to a > desktop). In this case DISPLAY is different for the client and for the > server process. (gui-get-selection) should be executed for client's > DISPLAY. > In the past, I have regularly seen both varieties of this: where the user was logged into two machines, with an emacs server running on one, X displays on both, and wanted a new emacs frame on either one, depending on circumstances. As near as I can tell, there is no "right" choice here; the user needs to (be able to) provide input on which display to use. This is a fundamentally different case from "the user wants to use a non-graphical X11-based mechanism that emacs normally doesn't enable until emacs actually connects to a working X11 display", and I think it should be possible to get emacs to make that connection without necessarily popping up a window that the user doesn't want. I hope that helps, ~Chad P.S. Now that I've said it "out loud", I expect to learn that either the Wayland people now consider that a security hole and will disallow it, or that they already did so. --0000000000001c182605eea55d87 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Tue, Nov 29, 2022 at 1:11 PM Max N= ikulin <manikulin@gmail.com&g= t; wrote:
[...]<= br> Add to user notes content of X selection when emacs is started as
daemong with no frames and the user prefers to avoid distraction due to creation of a new frame.

In general, yo= u seem to assume that there's no way for emacs to create a new X11 fram= e object without it being immediately visible to the user. In my experience= , that's only true in the limited subset of cases where the user has ch= osen a window manager that enforces that choice. Further, that wasn't t= he default when I last looked -- but that was quite some time ago, and I do= n't know about the current options/defaults for common X11-based displa= y systems of today. Can anyone shed some light on this?

On Tue, Nov 29, 2022 at 1:11 PM= Max Nikulin <manikulin@gmail.com= > wrote:
User connected to another machine through ssh (e.g. from a laptop to a desktop). In this case DISPLAY is different for the client and for the
server process. (gui-get-selection) should be executed for client's DIS= PLAY.

In the past, I have regularly see= n both varieties of this: where the user was logged into two machines, with= an emacs server running on one, X displays on both, and wanted a new emacs= frame on either one, depending on circumstances. As near as I can tell, th= ere is no "right" choice here; the user needs to (be able to) pro= vide input on which display to use.=C2=A0

This is = a fundamentally different case from "the user wants to use a non-graph= ical X11-based mechanism that emacs normally doesn't enable until emacs= actually connects to a working X11 display", and I think it should be= possible to get emacs to make that connection without necessarily popping = up a window that the user doesn't want.

I hope= that helps,
~Chad
P.S. Now that I've said it "= ;out loud", I expect to learn that either the Wayland people now consi= der that a security hole and will disallow it, or that they already did so.= =C2=A0

--0000000000001c182605eea55d87--