From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Thibaut Verron Newsgroups: gmane.emacs.devel Subject: Re: Modernize frame-title-format: "%b - GNU Emacs" Date: Thu, 27 Aug 2020 21:13:10 +0200 Message-ID: References: <35661e93-ed43-47a1-95fc-5638848b0c33@default> Reply-To: thibaut.verron@gmail.com Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000d1f4ee05ade0ba66" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1063"; mail-complaints-to="usenet@ciao.gmane.io" Cc: stefan@marxist.se, drew.adams@oracle.com, emacs-devel To: "Alfred M. Szmidt" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Aug 27 21:13:56 2020 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 1kBNLQ-0000B2-D2 for ged-emacs-devel@m.gmane-mx.org; Thu, 27 Aug 2020 21:13:56 +0200 Original-Received: from localhost ([::1]:48980 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kBNLP-0000IZ-7g for ged-emacs-devel@m.gmane-mx.org; Thu, 27 Aug 2020 15:13:55 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59580) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kBNKv-0008In-UV for emacs-devel@gnu.org; Thu, 27 Aug 2020 15:13:25 -0400 Original-Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:55135) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kBNKu-0007aH-BL; Thu, 27 Aug 2020 15:13:25 -0400 Original-Received: by mail-wm1-x334.google.com with SMTP id s13so6181273wmh.4; Thu, 27 Aug 2020 12:13:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc; bh=WFUMfarOBRNqnQ2Z8bdugQa6eV9ddAsLZBY3hKvcCOQ=; b=DXYLjoWQApF9EHbECbOXQ+c4umsLfSAYqKiJrvwQkp3GqSmN8sRIbYaqa1/J0UJGgv h8CiYS4vvSYadw2xtNmMdy3Y05IXZb7ZQXd0IUjCr3BA8sgbrFapF87SafWZIsy33tFo TsJ/qQuop0s0DtNBqRYbms7/viD7GBJR2Qbr2Q9e3l4JM9NgIDSkgDbX93SsBlMTEiLE /595hWkNiUnYQYiGaiM38MhSYOmna6bXz2aWY5OgsNpJ+KqhFhwaOcEQv6HLZBe59slJ 2Ffb3E1y2UX1Ml4knoSLC12EMkYcP8OBkPUys9RH4s342u9ylpCj3DXeL1wP1LUaZPaA Sj5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=WFUMfarOBRNqnQ2Z8bdugQa6eV9ddAsLZBY3hKvcCOQ=; b=c7EySp7OvkHdLGkUMYt4wBJBjsCoEbA5c+8asPdJYdd8QTGXV/c4+NqyLYQloi5h8r kU7UYsLmFzIoVQRWTAVafUFsy6h8EuxZnbvta7fXhJK7OUi/5VF0TySwG99OXYRpr5Nu /bDnSSrk8NBg9xeMllDgXPF0eT8SFJ3/sQb7kwtIAcD035KZ4+MhImi23UXSZjjKJTJ6 UwV5HJ+lBWlkPxI6FmyxXGuKPLRRn+1o4sqMuGAV7H+afCrpVGrQuyQGgrjQ5wTOsXdU aO4jygunqD9khHrOn4O7B5hYLme9GQKU6lt6H5TPmKcSxlH2TmKzPOjTCWZVxDRmp5nc XeHQ== X-Gm-Message-State: AOAM532Tg9f/3fcHfIfyOY45fDEoXjuvTQMQ/V97qhfkJ8Dy7Yro7XOa p8wycru6F8FKevQ5Dx6AtO/plJkJGzzyvWPGxoIaa/uaao8= X-Google-Smtp-Source: ABdhPJxf9HXhqU7BMqgJ4U8LsamHlpUWER9060czPLoNVm4nwrw2qg/8mA3ShzIy93uIaz61iwtje54XQ2PmdlkB+24= X-Received: by 2002:a7b:c197:: with SMTP id y23mr340034wmi.48.1598555602153; Thu, 27 Aug 2020 12:13:22 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=thibaut.verron@gmail.com; helo=mail-wm1-x334.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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.23 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" Xref: news.gmane.io gmane.emacs.devel:254334 Archived-At: --000000000000d1f4ee05ade0ba66 Content-Type: text/plain; charset="UTF-8" > > That assumes running emacs locally, what is being discussed is if you > are running Emacs remotley, i.e. over a remote X11 connection (e.g, > ssh -X). > > Oh, sorry, my bad. I'm surprised to discover that it's apparently the > remote > application's job to ensure that it has a proper title when run > remotely... > > Not sure how it could work other wise, who would be setting the title > if not the program it self? If it is remote or not isn't really > important here. > I'd assume that the program could give a frame name regardless, and someone on the local host (maybe ssh?) would use it to make a valid window name on the local host, e.g. transform "title" into "title on host". But I'm obviously not very familiar with how display servers work, so I trust that if it works this way, then there is good reason for it. > > For ssh connections at least, I guess that emacs could check if a ssh > variable > such as SSH_CONNECTION is set in the environment. But I'm not sure how > robust it would be. > > That would only work for SSH I think e.g., does GNU lsh set > SSH_CONNECTION? What about telnet and Kerberos? Are there other > ways, or protocols to do X11 forwarding? > I'd expect that most other protocols would be identifiable through such a setting, and that emacs would have to loop through all known such tests. As a bonus, it would also allow to make titles like "title on host [ssh]". --000000000000d1f4ee05ade0ba66 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
=C2=A0 =C2=A0 That assumes running emacs locally, what i= s being discussed is if you
=C2=A0 =C2=A0 are running Emacs remotley, i.e. over a remote X11 connection= (e.g,
=C2=A0 =C2=A0 ssh -X).

=C2=A0 =C2=A0Oh, sorry, my bad. I'm surprised to discover that it's= apparently the remote
=C2=A0 =C2=A0application's job to ensure that it has a proper title whe= n run remotely...

Not sure how it could work other wise, who would be setting the title
if not the program it self?=C2=A0 If it is remote or not isn't really important here.

I'd assume that the= program could give a frame name regardless, and someone=C2=A0
on= the local host (maybe ssh?) would use it to make a valid window name on th= e=C2=A0
local host,=C2=A0e.g. transform "title" into &q= uot;title on host".=C2=A0

But I'm obvious= ly not very familiar with how display servers work, so I trust that if it= =C2=A0
works this way, then there is good reason for it.
=C2=A0

=C2=A0 =C2=A0For ssh connections at least, I guess that emacs could check i= f a ssh variable
=C2=A0 =C2=A0such as SSH_CONNECTION is set in the environment. But I'm = not sure how
=C2=A0 =C2=A0robust it would be.

That would only work for SSH I think e.g., does GNU lsh set
SSH_CONNECTION?=C2=A0 What about telnet and Kerberos?=C2=A0 Are there other=
ways, or protocols to do X11 forwarding?

I'd expect that most other protocols would be identifiable through su= ch a setting,=C2=A0
and that emacs would have to loop through all= known such tests.=C2=A0

As a bonus, it would also= allow to make titles like "title on host [ssh]".
=C2= =A0
--000000000000d1f4ee05ade0ba66--