GNU bug report logs - #48865
[PATCH] Allow ‘ns-hide-emacs’ to bring only the selected frame forward

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Matt Beshara <m@HIDDEN>; Keywords: patch; merged with #48864; Done: Alan Third <alan@HIDDEN>; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
bug marked as fixed in version 28.1, send any further explanations to 48865 <at> debbugs.gnu.org and Matt Beshara <m@HIDDEN> Request was from Alan Third <alan@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 48865 <at> debbugs.gnu.org:


Received: (at 48865) by debbugs.gnu.org; 12 Jun 2021 09:16:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jun 12 05:16:12 2021
Received: from localhost ([127.0.0.1]:40354 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lrzkS-0001uz-36
	for submit <at> debbugs.gnu.org; Sat, 12 Jun 2021 05:16:12 -0400
Received: from outbound.soverin.net ([116.202.65.218]:44305)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <alan@HIDDEN>) id 1lrzkN-0001uC-CB
 for 48865 <at> debbugs.gnu.org; Sat, 12 Jun 2021 05:16:11 -0400
Received: from smtp.soverin.net (unknown [10.10.3.24])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
 (No client certificate requested)
 by outbound.soverin.net (Postfix) with ESMTPS id 98EB06027F;
 Sat, 12 Jun 2021 09:16:00 +0000 (UTC)
Received: from smtp.soverin.net (smtp.soverin.net [159.69.232.138]) by
 soverin.net
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=idiocy.org; s=soverin;
 t=1623489360; bh=9lx3Mnxffxf1bPeqLh0SssYh0U0y6cIgkf9X951wdVo=;
 h=Date:From:To:Cc:Subject:References:In-Reply-To:From;
 b=PwL1Xox7M2tL1pLqDa359cs1EHP/HGz6T29Dl6oeTn5O32hMpixywiG5mUX6LNBYo
 dt/2yMpxIWdvNHQq8j4y243TT5AuQJpnxE5W1MuSpmNukaCWgJ29K2ojgaLs+2BQ/X
 RDxRjP97p11imaz6kFJLtIi/DQJVWfMmuwNtNYFQn28FO2Wk5Ap13e/6qC3WhjNvGR
 C/LVbYARZ9HWrk8B4+tWYAjSCW4GjA4K/MnlqF2eobbX8YbgjXUXYBQ95ugaEsovrJ
 9AHZMuSw1d1l3Q2GrxxIVx33gijdIrBhSVKfmhulBGxmgZIZnY3KmBPciJt3u3AuyU
 /t3bxgS78DRRg==
Received: from alan by faroe.holly.idiocy.org with local (Exim 4.94.2)
 (envelope-from <alan@HIDDEN>)
 id 1lrzkE-001kJ2-9Z; Sat, 12 Jun 2021 10:15:58 +0100
Date: Sat, 12 Jun 2021 10:15:58 +0100
From: Alan Third <alan@HIDDEN>
To: Matt Beshara <m@HIDDEN>
Subject: Re: bug#48865: [PATCH] =?utf-8?Q?Allow_?=
 =?utf-8?Q?=E2=80=98ns-hide-emacs?= =?utf-8?B?4oCZ?= to bring only the
 selected frame forward
Message-ID: <YMR7Tj6DmtKcWAvr@HIDDEN>
Mail-Followup-To: Alan Third <alan@HIDDEN>, Matt Beshara <m@HIDDEN>,
 48865 <at> debbugs.gnu.org
References: <m24keby3ak.fsf@HIDDEN> <YMOb7WPOs5eCmOlb@HIDDEN>
 <m25yykas4e.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <m25yykas4e.fsf@HIDDEN>
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 48865
Cc: 48865 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

On Sat, Jun 12, 2021 at 09:39:13AM +1000, Matt Beshara wrote:
> 
> Alan Third <alan@HIDDEN> writes:
> 
> Hi Alan,
> I’ve attached an updated patch.
> Is the commit message OK?

Near enough. I've made a few small changes and will push it. I take it
you've done the copyright paperwork?

-- 
Alan Third




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#48865; Package emacs. Full text available.

Message received at 48865 <at> debbugs.gnu.org:


Received: (at 48865) by debbugs.gnu.org; 12 Jun 2021 01:37:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jun 11 21:37:39 2021
Received: from localhost ([127.0.0.1]:40131 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lrsag-0007el-AJ
	for submit <at> debbugs.gnu.org; Fri, 11 Jun 2021 21:37:39 -0400
Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:38329)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <m@HIDDEN>) id 1lrqkK-0004vm-UD
 for 48865 <at> debbugs.gnu.org; Fri, 11 Jun 2021 19:39:29 -0400
Received: from compute5.internal (compute5.nyi.internal [10.202.2.45])
 by mailout.west.internal (Postfix) with ESMTP id E96CD10C9;
 Fri, 11 Jun 2021 19:39:21 -0400 (EDT)
Received: from mailfrontend1 ([10.202.2.162])
 by compute5.internal (MEProxy); Fri, 11 Jun 2021 19:39:22 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mfa.pw; h=
 references:from:to:cc:subject:in-reply-to:date:message-id
 :mime-version:content-type; s=fm2; bh=id81XnC/L4QWDKPvGKPFoY03Wi
 iONDpcN94V9c3XM8c=; b=dXSxVcTeNqPGI3M15nI7gWfonsQjKueVCHfAVJuhff
 LUMQOXo5Fa924ubrOBKcxOiTzYbrITWJe4mWH10nabOz6CaiOdmVPwF4Vp9Kwwo0
 ez5JJI6hWjPCQjpajzHINxrPHGxZ3f02158k1w/KskqiGFy9w+SoUwM2H3P2Qit7
 IyJp9RDGiDsh6dQ9Urj/aQE38uRnA5gxi2q5Xw65dwG3/9RyMZVg5jjcB3avEZGC
 7dRvcB+7pn5lAm8DomxwcKhf0Ko2uSfXsyflK4nOm2Qjn7ngqERV0QYcnsQZL5lh
 KK/3KomMHl8X4cKYADbWiCzyh3VGHvsDXJaZwSruwB/Q==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-type:date:from:in-reply-to
 :message-id:mime-version:references:subject:to:x-me-proxy
 :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=id81Xn
 C/L4QWDKPvGKPFoY03WiiONDpcN94V9c3XM8c=; b=l3oDS5E8e6APYam3hSRY6H
 V4HsjtCBsPh5+bOXdLy0+uM984D8AVuyX1cP8V+EWGO/r9dkC7ffkMhr2zixPyA1
 J/n2PayaohZfn50/sKdWs4S+V9/mliC4IGcWyOUojV0fI9iq1S/Kdf6/hQ366Vaq
 jQeo4zM0ntjmT0tNjLrtPP1c3pXaA+HQp/UPSKD3f7NmMjW2F828M5I0qa44AE25
 RrJygW8aHvoWNeBrQya0/SD+8TFb3fLabhrYpvEul4a4NnSO9AeWPpO3qMo1Uook
 ihxTh4eniE1IiElfJ1hgEs6VRre4cYKoyKpYsSYYC8sA+VSr7jQspzQEs0kmvPJQ
 ==
X-ME-Sender: <xms:KfTDYIUkXba4woCj4A0WBDyKf3Jov2WAXmfxaiRuXZmWu5pES9ZojA>
 <xme:KfTDYMkmCp3rgaF1KciDTyde12-ZvvooEh87UR_PtFzw2VPCoZpDSFaBJkAqnE2qa
 uBdiu9D3-VGyNaVxQ>
X-ME-Received: <xmr:KfTDYMZx1wJ2nawrCoWo1L7iA0-CWwEUMlSCjxawcBCl1clzPfki-ta6OczamYeF6vE8-Gc19sxxuuLW6FXefCyG0DByb9uEc6Gy>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfeduledgudejucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne
 gfrhhlucfvnfffucdludehmdenucfjughrpehffgfhvffujgffkfggtgesghdtreertder
 jeenucfhrhhomhepofgrthhtuceuvghshhgrrhgruceomhesmhhfrgdrphifqeenucggtf
 frrghtthgvrhhnpeffheejheefhfdugeeiieduvefgtdeludehgfdujeehgfeltdeljeeu
 fefhudeltdenucffohhmrghinhepmhhfrgdrphifnecuvehluhhsthgvrhfuihiivgeptd
 enucfrrghrrghmpehmrghilhhfrhhomhepmhesmhhfrgdrphif
X-ME-Proxy: <xmx:KfTDYHXBXqGrtFZhdoYkonY0RQQuB_vFjPeXwG8mD-4NYEgMH9_KHA>
 <xmx:KfTDYClBR-FqaIvpJQ4OnWuysHQDCW8eMniLDSWGOstk9krYJxRkVg>
 <xmx:KfTDYMcwlBATGfr5tK9dG-RiJYTYme1H4YxJTTjbmrVCYZGtQhc4QA>
 <xmx:KfTDYJvBWsHPxX0_HY6cRCfKZHMbmq6s244tW861k86o0fCq7Bpt-g>
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri,
 11 Jun 2021 19:39:19 -0400 (EDT)
References: <m24keby3ak.fsf@HIDDEN> <YMOb7WPOs5eCmOlb@HIDDEN>
User-agent: mu4e 1.4.15; emacs 28.0.50
From: Matt Beshara <m@HIDDEN>
To: Alan Third <alan@HIDDEN>
Subject: Re: bug#48865: [PATCH] Allow =?utf-8?Q?=E2=80=98ns-hide-emacs?=
 =?utf-8?Q?=E2=80=99?= to bring only the selected frame forward
In-reply-to: <YMOb7WPOs5eCmOlb@HIDDEN>
Date: Sat, 12 Jun 2021 09:39:13 +1000
Message-ID: <m25yykas4e.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="==-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 48865
X-Mailman-Approved-At: Fri, 11 Jun 2021 21:37:37 -0400
Cc: 48865 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--==-=-=
Content-Type: multipart/mixed; boundary="=-=-="

--=-=-=
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: quoted-printable


Alan Third <alan@HIDDEN> writes:

Hi Alan,
I=E2=80=99ve attached an updated patch.
Is the commit message OK?

Matt

> On Sun, Jun 06, 2021 at 03:23:31PM +1000, Matt Beshara wrote:
>> Hi there,
>> I have attached a patch which adds a new capability to the=20
>> =E2=80=98ns-hide-emacs=E2=80=99
>> function in the NS port.  Specifically, it causes the=20
>> =E2=80=98ns-hide-emacs=E2=80=99
>> function to respond to being called with the argument=20
>> 'activate-front in a
>> similar way to how it responds when called with 'activate.  The=20
>> difference
>> is, instead of layering every Emacs frame in front of every=20
>> other
>> application=E2=80=99s windows, it only brings the selected frame=20
>> forward.  I have
>> uploaded a small video of the new functionality in action here:
>> https://mfa.pw/activate-front.mp4
>
> Hi, I don't see any problems with this.
>
>> Please let me know if any modifications would need to be made=20
>> to
>> this patch before it could be accepted.
>
> If you could fill out the commit message in line with=20
> CONTRIBUTE, that
> would be great.
>
> Thanks!


--=-=-=
Content-Type: text/x-patch; charset=utf-8
Content-Disposition: attachment; filename=activate-front-2.patch
Content-Transfer-Encoding: quoted-printable
Content-Description: activate-front-2.patch

From=206458bf34fd29dbc34ac0f91a087dbaaccc6c13a3 Mon Sep 17 00:00:00 2001
From: Matt Beshara <m@HIDDEN>
Date: Sun, 6 Jun 2021 13:06:47 +1000
Subject: [PATCH] * src/nsfns.m (Fns_hide_emacs): Allow activating only
 selected frame
MIME-Version: 1.0
Content-Type: text/plain; charset=3DUTF-8
Content-Transfer-Encoding: 8bit

Causes =E2=80=98ns-hide-emacs=E2=80=99 to layer the selected frame in front=
 of every other
application=E2=80=99s windows, and give that frame keyboard focus, when cal=
led with
'activate-front.
=2D--
 src/nsfns.m | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/src/nsfns.m b/src/nsfns.m
index 98801d8526..454a6fdab6 100644
=2D-- a/src/nsfns.m
+++ b/src/nsfns.m
@@ -1953,8 +1953,11 @@ Frames are listed from topmost (first) to bottommost=
 (last).  */)
        doc: /* If ON is non-nil, the entire Emacs application is hidden.
 Otherwise if Emacs is hidden, it is unhidden.
 If ON is equal to `activate', Emacs is unhidden and becomes
=2Dthe active application.  */)
=2D     (Lisp_Object on)
+the active application.
+If ON is equal to `activate-front', Emacs is unhidden and
+becomes the active application, but only the selected frame
+is layered in front of the windows of other applications.  */)
+  (Lisp_Object on)
 {
   check_window_system (NULL);
   if (EQ (on, intern ("activate")))
@@ -1962,6 +1965,12 @@ Frames are listed from topmost (first) to bottommost=
 (last).  */)
       [NSApp unhide: NSApp];
       [NSApp activateIgnoringOtherApps: YES];
     }
+  else if (EQ (on, intern ("activate-front")))
+    {
+      [NSApp unhide: NSApp];
+      [[NSRunningApplication currentApplication]
+        activateWithOptions: NSApplicationActivateIgnoringOtherApps];
+    }
   else if (NILP (on))
     [NSApp unhide: NSApp];
   else
=2D-=20
2.24.3 (Apple Git-128)


--=-=-=--

--==-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iH8EARYKACcWIQQAspJWbe9M+a9rgYVIIu8JuyI3CgUCYMP0JAkcbUBtZmEucHcA
CgkQSCLvCbsiNwoVKQD9EJ6+aJCTzc6OfaVl4PlaiOKExoPk0H2iEgDcGDWOMsIA
/1ycyMutOUp6sCneZ0Z4/6HPjMnehJizPF0ImQ3+OJUC
=KH4B
-----END PGP SIGNATURE-----
--==-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#48865; Package emacs. Full text available.

Message received at 48865 <at> debbugs.gnu.org:


Received: (at 48865) by debbugs.gnu.org; 11 Jun 2021 17:23:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jun 11 13:23:08 2021
Received: from localhost ([127.0.0.1]:39891 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lrks8-00027g-9N
	for submit <at> debbugs.gnu.org; Fri, 11 Jun 2021 13:23:08 -0400
Received: from outbound.soverin.net ([116.202.65.218]:55647)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <alan@HIDDEN>) id 1lrks3-00026u-8R
 for 48865 <at> debbugs.gnu.org; Fri, 11 Jun 2021 13:23:07 -0400
Received: from smtp.soverin.net (unknown [10.10.3.28])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
 (No client certificate requested)
 by outbound.soverin.net (Postfix) with ESMTPS id 8D99E6062D;
 Fri, 11 Jun 2021 17:22:56 +0000 (UTC)
Received: from smtp.soverin.net (smtp.soverin.net [159.69.232.142]) by
 soverin.net
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=idiocy.org; s=soverin;
 t=1623432176; bh=OAdTX1SPa8liuvv9HTz5IV3WAUPWpZhT+MaXjUlXR/U=;
 h=Date:From:To:Cc:Subject:References:In-Reply-To:From;
 b=NTKsSLWKEfoW2Tc5nf+LE3zeOp2Kud5psKwfn9NlrMKevqp5hm0CSPKZmHqQHmUlv
 t4Vh3gfF+BThavGM6dvhUqfPNoxnV3csRncpI/0RKWjgoT+xEvk3mgkSl+7KpBZsKl
 q4uKwyE47S9yfwBeeLWT3TRc0tPeMS3MAprQ+7KzekHxvpMuZXTuP9Ox8XETMrhgMl
 v+a49E1H8fyBMx/uRha0hurJhq5Lx9s2aolI4zbnTyk+qot+9l9o+v7ZiAeSVxSGV7
 Xn6HpwBrpcgitRxylXjlL+mcAQod08NE7lYImP1TlwsOZKUnA2w3Z4owAUoL+MiOnk
 WyR3YwQtwGsYg==
Received: from alan by faroe.holly.idiocy.org with local (Exim 4.94.2)
 (envelope-from <alan@HIDDEN>)
 id 1lrkrt-001gHO-ER; Fri, 11 Jun 2021 18:22:53 +0100
Date: Fri, 11 Jun 2021 18:22:53 +0100
From: Alan Third <alan@HIDDEN>
To: Matt Beshara <m@HIDDEN>
Subject: Re: bug#48865: [PATCH] =?utf-8?Q?Allow_?=
 =?utf-8?Q?=E2=80=98ns-hide-emacs?= =?utf-8?B?4oCZ?= to bring only the
 selected frame forward
Message-ID: <YMOb7WPOs5eCmOlb@HIDDEN>
Mail-Followup-To: Alan Third <alan@HIDDEN>, Matt Beshara <m@HIDDEN>,
 48865 <at> debbugs.gnu.org
References: <m24keby3ak.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <m24keby3ak.fsf@HIDDEN>
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 48865
Cc: 48865 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Sun, Jun 06, 2021 at 03:23:31PM +1000, Matt Beshara wrote:
> Hi there,
> I have attached a patch which adds a new capability to the ‘ns-hide-emacs’
> function in the NS port.  Specifically, it causes the ‘ns-hide-emacs’
> function to respond to being called with the argument 'activate-front in a
> similar way to how it responds when called with 'activate.  The difference
> is, instead of layering every Emacs frame in front of every other
> application’s windows, it only brings the selected frame forward.  I have
> uploaded a small video of the new functionality in action here:
> https://mfa.pw/activate-front.mp4

Hi, I don't see any problems with this.

> Please let me know if any modifications would need to be made to
> this patch before it could be accepted.

If you could fill out the commit message in line with CONTRIBUTE, that
would be great.

Thanks!
-- 
Alan Third




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#48865; Package emacs. Full text available.
Forcibly Merged 48864 48865. Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 6 Jun 2021 08:42:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 06 04:42:24 2021
Received: from localhost ([127.0.0.1]:50587 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lpoMR-0002Rf-Id
	for submit <at> debbugs.gnu.org; Sun, 06 Jun 2021 04:42:23 -0400
Received: from lists.gnu.org ([209.51.188.17]:41566)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <m@HIDDEN>) id 1lplG7-0005vK-Hl
 for submit <at> debbugs.gnu.org; Sun, 06 Jun 2021 01:23:40 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:37800)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <m@HIDDEN>) id 1lplG7-00030W-Au
 for bug-gnu-emacs@HIDDEN; Sun, 06 Jun 2021 01:23:39 -0400
Received: from wout3-smtp.messagingengine.com ([64.147.123.19]:46577)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <m@HIDDEN>) id 1lplG5-00050l-C0
 for bug-gnu-emacs@HIDDEN; Sun, 06 Jun 2021 01:23:39 -0400
Received: from compute2.internal (compute2.nyi.internal [10.202.2.42])
 by mailout.west.internal (Postfix) with ESMTP id AA4C51B22
 for <bug-gnu-emacs@HIDDEN>; Sun,  6 Jun 2021 01:23:35 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute2.internal (MEProxy); Sun, 06 Jun 2021 01:23:35 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mfa.pw; h=from
 :to:subject:date:message-id:mime-version:content-type; s=fm2;
 bh=+dLFTLwDWMvD9+siA76Rq9FjAfOHeHuvUgpUn91KSWk=; b=LvSGebYXlpEF
 HkNkFyLrkpVOONejHX1MtwofvXpfSZa9QvOgvdWECPWIEklbnyRrNuBd00henbId
 YW/FHvBZf4y08YMf8Cl9Cpd+Xu78V5pInjqUwhm7bTshyqu7Fb4hnLFO/C3JTZIy
 4LO5kesKpNHwds5KLe6G+JGiwtCf9ww4b4wGg1eegKXNei52F4DxVGqqKlwbiAFt
 CCvLJO3lB/bVbF5KayMmTIJaq5gtIeodXO/eXKFZ26loeBGM2+iOg19/8NSJgTb3
 htdj9hEDPkCTXYqb9s2NMoHXzE26c04cvjvhUkOwTMeeoJAV8B+1tIJWR7TYueZA
 m7D4rlSUBw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=content-type:date:from:message-id
 :mime-version:subject:to:x-me-proxy:x-me-proxy:x-me-sender
 :x-me-sender:x-sasl-enc; s=fm3; bh=+dLFTLwDWMvD9+siA76Rq9FjAfOHe
 HuvUgpUn91KSWk=; b=IqHFY5bbNwCGEBq4lBZpNgP6EidJNi7HObaIlB1T9O0F4
 SRVNiI7cOmP0+hPbfDnEC3UGK9YA5zrW63IbQ8D7T1f6+cnNSfAJfjK6Qal+3ieU
 cp7vddi8MAa4cdrDjS5s9RVdXxXZBr6XBr19NiSe6MridtTCwp3rp0cTRACBXCdD
 gjtHUJ0cCVT7puX+MfXZe5g5XcQvYQ75QkduiTaacfwwGUcvl8PaKbhIQuIFhz42
 KePVbZ8K0VQIz+sOnlpml0FTNSnpNtuOJM0fQxAXk2XcFZ1cY0Q2Hww/rfsxKFnk
 hcB0eFrsWY6HPoCEPOV293/yGIqsyreoIoQkuf/PQ==
X-ME-Sender: <xms:11u8YBcoyafjUfWY0LA8Mx9UoaxaNtFNG8Zp6F5XmhHLlMQDt6rBNw>
 <xme:11u8YPPX1FlInbWBWx6lfCk61Q6Hv6rtRGUjro_NYqgfzqAbNiQOlpzsxsdOFStvp
 PpNMUyFrrPpSpUfrQ>
X-ME-Received: <xmr:11u8YKicCD8ikj9ZVZkMhIcEU4MpB6nXOwAlIUBCDKa603VoZGdeYRxMdhjPL3he15TrRDmSYuJD0mQxaMoFq5eA5rr--fx2_NU>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfedtgedgleeiucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucgfrhhlucfvnfffucdlfedtmdenucfjughrpegfhf
 fvufffkfggtgesghdtreertderjeenucfhrhhomhepofgrthhtuceuvghshhgrrhgruceo
 mhesmhhfrgdrphifqeenucggtffrrghtthgvrhhnpeffkefhfefhjefhkeeludegvefgue
 fhuefgteelfeekfeeguefhheekudfhtedujeenucffohhmrghinhepmhhfrgdrphifnecu
 vehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhesmhhfrg
 drphif
X-ME-Proxy: <xmx:11u8YK8PLfP0ra7FFaqb6AC9Cmyu-FKV22JBmo-KeEWmJHsriUQMzQ>
 <xmx:11u8YNur3nnt-PYeSBJgAZ5MhC4gzyeIdTX0FPUTJD6M5gtp7Pv_Nw>
 <xmx:11u8YJGKAMulbRg8ojQGvhcbwGB22zqWBCCYB-axnUfKgxUtuYnrEQ>
 <xmx:11u8YC72clm6fATh2_1zj-LixYI-eypv88aQo-eCZ9HZ4LmEfAaQTw>
Received: by mail.messagingengine.com (Postfix) with ESMTPA for
 <bug-gnu-emacs@HIDDEN>; Sun, 6 Jun 2021 01:23:34 -0400 (EDT)
User-agent: mu4e 1.4.15; emacs 28.0.50
From: Matt Beshara <m@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: [PATCH] Allow =?utf-8?Q?=E2=80=98ns-hide-emacs=E2=80=99?= to bring
 only the selected frame forward
Date: Sun, 06 Jun 2021 15:23:31 +1000
Message-ID: <m24keby3ak.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="==-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
Received-SPF: pass client-ip=64.147.123.19; envelope-from=m@HIDDEN;
 helo=wout3-smtp.messagingengine.com
X-Spam_score_int: -27
X-Spam_score: -2.8
X-Spam_bar: --
X-Spam_report: (-2.8 / 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_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001,
 SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.6 (-)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Sun, 06 Jun 2021 04:42:21 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.6 (--)

--==-=-=
Content-Type: multipart/mixed; boundary="=-=-="

--=-=-=
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: quoted-printable

Hi there,
I have attached a patch which adds a new capability to the=20
=E2=80=98ns-hide-emacs=E2=80=99 function in the NS port.  Specifically, it =
causes=20
the =E2=80=98ns-hide-emacs=E2=80=99 function to respond to being called wit=
h the=20
argument 'activate-front in a similar way to how it responds when=20
called with 'activate.  The difference is, instead of layering=20
every Emacs frame in front of every other application=E2=80=99s windows,=20
it only brings the selected frame forward.  I have uploaded a=20
small video of the new functionality in action here:=20
https://mfa.pw/activate-front.mp4

Please let me know if any modifications would need to be made to
this patch before it could be accepted.

Thanks for your time,
Matt


--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment; filename=activate-front.patch
Content-Transfer-Encoding: quoted-printable
Content-Description: activate-front.patch

From=20e595e37fa7ea503020e8acfe82324cff7751bf3d Mon Sep 17 00:00:00 2001
From: Matt Beshara <m@HIDDEN>
Date: Sun, 6 Jun 2021 13:06:47 +1000
Subject: [PATCH] =3D?UTF-8?q?Allow=3D20=3DE2=3D80=3D98ns-hide-emacs=3DE2=3D=
80=3D99=3D20to=3D20?=3D
 =3D?UTF-8?q?bring=3D20only=3D20the=3D20selected=3D20frame=3D20forward?=3D
MIME-Version: 1.0
Content-Type: text/plain; charset=3DUTF-8
Content-Transfer-Encoding: 8bit

=2D--
 src/nsfns.m | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/src/nsfns.m b/src/nsfns.m
index d14f7b51ea..f6ad1f7b9d 100644
=2D-- a/src/nsfns.m
+++ b/src/nsfns.m
@@ -1953,8 +1953,11 @@ Frames are listed from topmost (first) to bottommost=
 (last).  */)
        doc: /* If ON is non-nil, the entire Emacs application is hidden.
 Otherwise if Emacs is hidden, it is unhidden.
 If ON is equal to `activate', Emacs is unhidden and becomes
=2Dthe active application.  */)
=2D     (Lisp_Object on)
+the active application.
+If ON is equal to `activate-front', Emacs is unhidden and
+becomes the active application, but only the selected frame
+is layered in front of the windows of other applications.  */)
+  (Lisp_Object on)
 {
   check_window_system (NULL);
   if (EQ (on, intern ("activate")))
@@ -1962,6 +1965,12 @@ Frames are listed from topmost (first) to bottommost=
 (last).  */)
       [NSApp unhide: NSApp];
       [NSApp activateIgnoringOtherApps: YES];
     }
+  else if (EQ (on, intern ("activate-front")))
+    {
+      [NSApp unhide: NSApp];
+      [[NSRunningApplication currentApplication]
+        activateWithOptions: NSApplicationActivateIgnoringOtherApps];
+    }
   else if (NILP (on))
     [NSApp unhide: NSApp];
   else
=2D-=20
2.24.3 (Apple Git-128)


--=-=-=--

--==-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iH8EARYKACcWIQQAspJWbe9M+a9rgYVIIu8JuyI3CgUCYLxb0wkcbUBtZmEucHcA
CgkQSCLvCbsiNwovFwD/eLHYGtXkoFqog05ZlBwR/ajXGq6L+HHL7o3vWX/5aXQB
AMFow9ID6jUBHTuXFSIjGbEGCC0NnFwRtfy35rHuuxkK
=GfP2
-----END PGP SIGNATURE-----
--==-=-=--




Acknowledgement sent to Matt Beshara <m@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#48865; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 12 Jun 2021 09:45:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.