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.bugs Subject: bug#49195: Starting Emacs if required from emacsclient.desktop Date: Wed, 23 Jun 2021 20:59:31 +0100 (BST) Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="-1463811583-1700850915-1624478371=:3518" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22828"; mail-complaints-to="usenet@ciao.gmane.io" To: 49195@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jun 23 22:00:36 2021 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 1lw936-0005iv-1o for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 23 Jun 2021 22:00:36 +0200 Original-Received: from localhost ([::1]:37474 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lw934-0006e8-Vd for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 23 Jun 2021 16:00:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37490) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lw92a-0006dw-AB for bug-gnu-emacs@gnu.org; Wed, 23 Jun 2021 16:00:07 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58582) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lw92Y-0003Zn-CO for bug-gnu-emacs@gnu.org; Wed, 23 Jun 2021 16:00:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lw92Y-00044b-3C for bug-gnu-emacs@gnu.org; Wed, 23 Jun 2021 16:00:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Peter Oliver Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 23 Jun 2021 20:00:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 49195 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.162447838715611 (code B ref -1); Wed, 23 Jun 2021 20:00:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 23 Jun 2021 19:59:47 +0000 Original-Received: from localhost ([127.0.0.1]:41895 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lw92J-00043j-0Q for submit@debbugs.gnu.org; Wed, 23 Jun 2021 15:59:47 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:53204) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lw92H-00043c-Vw for submit@debbugs.gnu.org; Wed, 23 Jun 2021 15:59:46 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37102) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lw92H-0006cE-MT for bug-gnu-emacs@gnu.org; Wed, 23 Jun 2021 15:59:45 -0400 Original-Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]:56259) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lw929-00038e-Ki for bug-gnu-emacs@gnu.org; Wed, 23 Jun 2021 15:59:43 -0400 Original-Received: by mail-wm1-x331.google.com with SMTP id c84so2409238wme.5 for ; Wed, 23 Jun 2021 12:59:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mavit.org.uk; s=google; h=date:from:to:subject:message-id:mime-version; bh=ZCt+09dg4lOzFBZkbF4xC+1CguAXS9CKwQTfXvDtTyU=; b=QyxOedQYLxBxZRiEqranjvIspdT8RB2yiGRzoolflxUBRrpvPXxUGGp0zXDeRIWY0S kchfBHZRD/Axg1knx1MB88KkXDz7oQnOrRLu8lTdih4P8SpX0jUM9hAUYiRX2jgEH1j1 S8Ldg/4tP+vwsqCniP7QxahxwwFixLm/4lmHQ= 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:message-id:mime-version; bh=ZCt+09dg4lOzFBZkbF4xC+1CguAXS9CKwQTfXvDtTyU=; b=dINqvL/izcUVorSWEYJ6LSszDc1nzQYow1ZIltCmKQ+E6kWzu4KUSiujW+77BVRvl5 MpxxwxZ57D8/tiZlXHGq8NKrJSsf6YH8fPQSaT1AWPYxewM/bFbQ2MaXgwkSldC5NuJV +tBdXvrHK9dlcR7BDlC0xvGnovk/EobIiGxPoeLbsK9WibUu79TP4ucAQb5ZArLmE/Kx 98r0xeMhXwKkWb1dofXrD+oqvEZpdbZGsIe8I8KWVdSgXAWeonm67V6A8MJY2PdxC63t mngP6yMpyQAAh7euhwk+Px17PJYH5RuVwvCsq9W1Z3tYqXcwg6mjLHjbWWmLtD7pXZpj /gIg== X-Gm-Message-State: AOAM531S34Kgda8HXnzRQfTLi9oK0OyxIntv0YyDSy2SvZSBEJBNVPEh 0VDVheJhie8xx+kRhkeSxPrayQELmPpFnw== X-Google-Smtp-Source: ABdhPJwmEuok0FK3QaCtsTACS8dPGnM2x53Ip1AlxRXyJjg0x3IyYgwEG+GfF34NiTN5rs0Z4zWAoQ== X-Received: by 2002:a1c:59c9:: with SMTP id n192mr1593648wmb.81.1624478374065; Wed, 23 Jun 2021 12:59:34 -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 f19sm989231wre.48.2021.06.23.12.59.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Jun 2021 12:59:33 -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 15NJxVSI018448 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT) for ; Wed, 23 Jun 2021 20:59:31 +0100 Original-Received: from localhost (mavit@localhost) by froglet.home.mavit.org.uk (8.16.1/8.16.1/Submit) with ESMTP id 15NJxVuw018445 for ; Wed, 23 Jun 2021 20:59:31 +0100 X-Authentication-Warning: froglet.home.mavit.org.uk: mavit owned process doing -bs Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=p.d.oliver@mavit.org.uk; helo=mail-wm1-x331.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: 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:208912 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-1700850915-1624478371=:3518 Content-Type: text/plain; format=flowed; charset=ISO-8859-7 Content-Transfer-Encoding: 8BIT At present, we provide emacs.desktop (which starts a new instance of Emacs), and emacsclient.desktop (which connects to an existing instance of Emacs). This is problematic if a users wants to associate a particular file type with Emacs in their desktop file manager, because they canąt know in advance which will be correct. Attached is a patch which enhances emacsclient.desktop so that it will start a new instance of Emacs if none is found to be running. Users who like to reuse an existing Emacs can then always use emacsclient.desktop. There was some discussion of how far to go with this on emacs-devel recently, but, if I understand correctly, the parts in this patch were not controversial. -- Peter Oliver ---1463811583-1700850915-1624478371=:3518 Content-Type: text/plain; charset=US-ASCII; name=0001-From-.desktop-files-reuse-a-frame-or-start-a-new-Ema.patch Content-Transfer-Encoding: BASE64 Content-ID: <29bf9f6-705-eab7-d927-c8fd7b90bcb@froglet.home.mavit.org.uk> Content-Description: Content-Disposition: attachment; filename=0001-From-.desktop-files-reuse-a-frame-or-start-a-new-Ema.patch RnJvbSAzNzRjMmIyMDJkZDgyNzY1MDZlYWYyZWQ1MWVkYzk0NmJlZWJlZmNk IE1vbiBTZXAgMTcgMDA6MDA6MDAgMjAwMQ0KRnJvbTogUGV0ZXIgT2xpdmVy IDxnaXRAbWF2aXQub3JnLnVrPg0KRGF0ZTogVHVlLCA4IEp1biAyMDIxIDE2 OjA0OjE3ICswMTAwDQpTdWJqZWN0OiBbUEFUQ0hdIEZyb20gLmRlc2t0b3Ag ZmlsZXMsIHJldXNlIGEgZnJhbWUgb3Igc3RhcnQgYSBuZXcgRW1hY3MgYXMN CiByZXF1aXJlZA0KDQoqIGRvYy9lbWFjcy9taXNjLnRleGk6IChVc2luZyBF bWFjcyBhcyBhIFNlcnZlcikgRXhwbGFpbiBlbWFjc2NsaWVudC5kZXNrdG9w Lg0KKiBldGMvTkVXUzogKEVtYWNzIFNlcnZlcik6IEV4cGxhaW4gZW1hY3Nj bGllbnQuZGVza3RvcC4NCiogZW1hY3MtbWFpbC5kZXNrdG9wLCBldGMvZW1h Y3NjbGllbnQuZGVza3RvcDogQXV0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