From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jim Porter Newsgroups: gmane.emacs.bugs Subject: bug#646: emacsclient with no args to behave like -a Date: Thu, 26 Aug 2021 22:06:18 -0700 Message-ID: <67399b53-e649-bd25-bdb4-107bfb95c0f6@gmail.com> References: <4287a62c0808040310m6d817102lb3bdf4982e6451d7@mail.gmail.com> <878s0nr2af.fsf@gnus.org> <87k0k7plq7.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13045"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "J. Pablo =?UTF-8?Q?Fern=C3=A1ndez?=" , 646@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Aug 27 07:07:28 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 1mJU5Q-0003Bn-1K for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 27 Aug 2021 07:07:28 +0200 Original-Received: from localhost ([::1]:33172 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mJU5O-0007C8-C8 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 27 Aug 2021 01:07:26 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34392) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mJU51-00079K-Pv for bug-gnu-emacs@gnu.org; Fri, 27 Aug 2021 01:07:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39507) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mJU50-0005Zz-Am for bug-gnu-emacs@gnu.org; Fri, 27 Aug 2021 01:07:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mJU50-0001tB-1I for bug-gnu-emacs@gnu.org; Fri, 27 Aug 2021 01:07:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jim Porter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 27 Aug 2021 05:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 646 X-GNU-PR-Package: emacs Original-Received: via spool by 646-submit@debbugs.gnu.org id=B646.16300407877192 (code B ref 646); Fri, 27 Aug 2021 05:07:01 +0000 Original-Received: (at 646) by debbugs.gnu.org; 27 Aug 2021 05:06:27 +0000 Original-Received: from localhost ([127.0.0.1]:51053 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJU4R-0001rv-AD for submit@debbugs.gnu.org; Fri, 27 Aug 2021 01:06:27 -0400 Original-Received: from mail-pj1-f44.google.com ([209.85.216.44]:44562) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJU4O-0001rh-DU for 646@debbugs.gnu.org; Fri, 27 Aug 2021 01:06:25 -0400 Original-Received: by mail-pj1-f44.google.com with SMTP id j4-20020a17090a734400b0018f6dd1ec97so3987581pjs.3 for <646@debbugs.gnu.org>; Thu, 26 Aug 2021 22:06:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=jpK7sVurwUCQHtIEQ/ZVKxFsvl6H5U8zOxixTaA/9BA=; b=biB7+6kVfIS8RLwMOGhOX3PoclQE7CZkpBQnmtWVlvlx5bHr3makmBzlBiiqYcuwqM X9hUVcrNsWHB9r1DzS2bPwcj/+qxXlRIk427eToLdy5HP/of/xiD0u+kIF8VcYtmgI1I cwWydGNZ2uFo6w1629JaP8PB8n9O7P5bNTo1wHfYxf/4X/9+IeraTZbFt6V+eGd3IgoF +4Jt0ZVl+3y9tLdlsmk1/ImYYp5Xz7VCC2c4QwxpYkpBH/OB2rmgXDBoMMxoWwZev/AS 9It5+pIE+h+nJHtQ/N1KB0cVRPZctgAYto7M1kdbPI6itULAhHQaoZ9QJoF5TCliH02b rImg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=jpK7sVurwUCQHtIEQ/ZVKxFsvl6H5U8zOxixTaA/9BA=; b=K5OVXg6DLmvaMKEujvbKskl0WKGQshTzrSkaf8eRQsyS8h7VTnxBf9Q5/vr7pfTAoA T2s6tiAvGoeVABTC252/ZjKGEv6tVaOT/TOIiF7e56J3zgaCWR+MaMwb7nXTpsUvUUwN lhc5C4CloGRLDz8QN9JWMOMxpL+KQ+B98IIoAw2X5VqbbAAvmQ9NuibLFJDYPfe5yiMC xZkOpFtVqv2Gih3XNaUN6wg4wRPYbhWbK7MURGk4NJQTGluKaCI735tjV9ZqB6dRHtMA VQ5KY8S6KMP/aT+Y5vDM8P8c/oPJoiqHbSDiHJJdx04gHF4Wf8B2hqWiFgUK/dcWe3UG kRpQ== X-Gm-Message-State: AOAM531gtCP51nG+Ybj5TC4dvStkvqwj/jTCC1poVcw3JksYKlOT5BNy ZMzFBZKj8j9Q1HTMmGxNWNu+ZD+87IQ= X-Google-Smtp-Source: ABdhPJzatxbwRuBVF7eVU1/syb2OPJhvkinA1d6llRXiaqwh66sRLt3fHDFBGsdyPAxNcf9pIjXQSQ== X-Received: by 2002:a17:90a:6ac2:: with SMTP id b2mr8655211pjm.36.1630040778638; Thu, 26 Aug 2021 22:06:18 -0700 (PDT) Original-Received: from [192.168.1.2] (cpe-76-168-148-233.socal.res.rr.com. [76.168.148.233]) by smtp.googlemail.com with ESMTPSA id x32sm455552pfu.65.2021.08.26.22.06.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 26 Aug 2021 22:06:18 -0700 (PDT) In-Reply-To: <87k0k7plq7.fsf@gnus.org> Content-Language: en-US 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:212792 Archived-At: On 8/26/2021 9:14 PM, Lars Ingebrigtsen wrote: > Jim Porter writes: > >> From my reading, this is the original reporter's preferred behavior: >> >> 1) If Emacs is not currently running >> a) `emacsclient file.txt' starts Emacs and opens file.txt >> b) `emacsclient' starts Emacs (as though running `emacs') >> 2) If Emacs is currently running >> a) `emacsclient file.txt' opens file.txt in the existing Emacs session >> b) `emacsclient' brings some frame in the existing Emacs session >> to the foreground > > That's not my reading. The bug reporter said "It would be nice if > emacsclient, when called with no arguments, would just run the alternate > editor." I.e., emulate the "-a" parameter when called with no > parameters. > > (He's also using Emacs as the alternate, but that's just a detail.) Indeed, it's not 100% clear, especially since this is from so long ago that I can't quite remember how emacsclient worked back then. However, I did a bit of archaeology and found the following passage in a blog post from around the same time: "First, I recommend using the W32 package. W32 has hacked the emacsclient in several useful ways. It will start Emacs if it isn't already running, it will call "raise-frame" on the Emacs window when started, and it permits starting emacsclient without a filename. "[1] The last bit confirms that Lennart's patched emacsclient *could* work as in (2b) above.[2] Whether that's what the original reporter wanted is another story (though it's how I interpret it)... [1] http://emacs-fu.blogspot.com/2009/03/windows-and-daemons.html [2] Unfortunately, I couldn't find the sources for Emacs+EmacsW32 to confirm this.