From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Peter Oliver Newsgroups: gmane.emacs.devel Subject: Re: GUI X-FreeDesktop integration Date: Wed, 26 May 2021 13:14:23 +0100 (BST) Message-ID: <573eb311-e0f6-2216-4298-458ae8ab827b@froglet.home.mavit.org.uk> References: <7f52af92-4fb5-74b4-232a-eabfa315ac0@froglet.home.mavit.org.uk> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="-1463811583-1993280558-1622031264=:3555" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13921"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed May 26 14:19:55 2021 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 1llsVu-0003Ju-T9 for ged-emacs-devel@m.gmane-mx.org; Wed, 26 May 2021 14:19:54 +0200 Original-Received: from localhost ([::1]:51722 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1llsVt-0001cb-KP for ged-emacs-devel@m.gmane-mx.org; Wed, 26 May 2021 08:19:53 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35718) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1llsQh-0007BV-No for emacs-devel@gnu.org; Wed, 26 May 2021 08:14:31 -0400 Original-Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:35508) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1llsQe-0000gs-PL for emacs-devel@gnu.org; Wed, 26 May 2021 08:14:30 -0400 Original-Received: by mail-wm1-x330.google.com with SMTP id z19-20020a7bc7d30000b029017521c1fb75so393664wmk.0 for ; Wed, 26 May 2021 05:14:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mavit.org.uk; s=google; h=date:from:to:subject:in-reply-to:message-id:references:mime-version; bh=T/ubDFCdYTSlZVUtSEgPuzR9dTQEbmKBABpKLcL/4Yk=; b=djXNCOcJ30Zb1I4rieRq7IE+9P37eUEB+eMxuD1bMpFx1I4UrWAehaH3IhSXUASW+M D97jIWbrETrreX/Fm4KTbyPYVEqt5HrCLSjf9nd0/GmcmBqwok5hoNOHF/psM2cesECy kE/PI4UeO4E+8JHEZV/xGLbkrTtwPffIkY/hg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:in-reply-to:message-id :references:mime-version; bh=T/ubDFCdYTSlZVUtSEgPuzR9dTQEbmKBABpKLcL/4Yk=; b=R4cr7VcNIzHjoYYJHCYOiA8pgs/wm64XjdKFmVkpD2vjqXAerwj1TEMETNjSr/2wF+ JJlpRGiJ3+15x15Af45NBSUijKUU9kQPrB5/6g5WP3PVK8GCDU3p0ewpmufr8H13hGTR Yyn+2yK1tG1XaH5uJ/KKCMqamxTOBzGhEfHVnjlFsA3C627LhMMQy7na+C1yPvpPgHKJ 9SY7PKsjPr+qKdYEuB2PWBJimYXkJPoaHwPjgfKi7prJa+4Ack7moc7eyGEkAfpDspr4 l5QTKx0ooDozAUy0siKYCN9R0OPHpUb0h+vkrHksY3Xysvd93DxzmUymWwDx5U4y/vnI ks9Q== X-Gm-Message-State: AOAM531+oV2fE4mQImT8oPqm6Gq6fJZARZkYgsRy/sHKePHCL8KSp26Y EobCk0UvOIM92kpPD2P+u69UuFSPH4nA2g== X-Google-Smtp-Source: ABdhPJwYe1/r/o78hN3IoCds/ONGv3sJZeNAnZFoT805ex/TWwrGkStlrprnZJmWpYE8kdEU2LbW1Q== X-Received: by 2002:a1c:7fd0:: with SMTP id a199mr28586201wmd.161.1622031266093; Wed, 26 May 2021 05:14:26 -0700 (PDT) Original-Received: from froglet.home.mavit.org.uk (cpc118948-dudl14-2-0-cust32.16-1.cable.virginm.net. [82.37.201.33]) by smtp.gmail.com with ESMTPSA id y20sm7096116wmi.0.2021.05.26.05.14.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 May 2021 05:14:25 -0700 (PDT) Original-Received: from froglet.home.mavit.org.uk (localhost [127.0.0.1]) by froglet.home.mavit.org.uk (8.16.1/8.15.2) with ESMTPS id 14QCEOh1020334 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT) for ; Wed, 26 May 2021 13:14:24 +0100 Original-Received: from localhost (mavit@localhost) by froglet.home.mavit.org.uk (8.16.1/8.16.1/Submit) with ESMTP id 14QCEN7D020331 for ; Wed, 26 May 2021 13:14:24 +0100 X-Authentication-Warning: froglet.home.mavit.org.uk: mavit owned process doing -bs In-Reply-To: <7f52af92-4fb5-74b4-232a-eabfa315ac0@froglet.home.mavit.org.uk> Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=p.d.oliver@mavit.org.uk; helo=mail-wm1-x330.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, 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:269914 Archived-At: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. ---1463811583-1993280558-1622031264=:3555 Content-Type: text/plain; charset=ISO-8859-7; format=flowed Content-Transfer-Encoding: 8BIT On Tue, 25 May 2021, Peter Oliver wrote: > On Sunday 16th May, Robin Tarsiger wrote: > >> In fact, the _least_ surprising from >> an XDG/FDO perspective would actually be to _only_ expose >> a "client+autolaunch" desktop entry and just call that the >> point of integration for Emacs. > > Agreed. Attached is a patch which achieves this. After a bit more testing, I discovered a snag. I believe that the default behaviour when opening a file from a desktopĒs file manager should be to open it in an existing GUI frame if one exists, or a new GUI frame if one does not. Clicking Emacs in a desktopĒs application launcher should open a new GUI frame. The trouble is that, if Emacs is running as a daemon with no frames, `emacsclient /path/to/foo` will create a new TTY frame rather than a GUI frame. Should this behaviour be changed so that a GUI frame is preferred if $DISPLAY is set? While weĒre here, should we report an error if there is no display and no TTY? -- Peter Oliver ---1463811583-1993280558-1622031264=:3555--