From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Third Newsgroups: gmane.emacs.devel Subject: Re: src/nsterm.m: fix window tabbing on macOS Date: Mon, 10 May 2021 20:53:52 +0100 Message-ID: References: <9cdf9d6dc55ccd4894d758d3237b0be2@purelymail.com> <03FB7137-A02D-4B94-AF1F-8B7E84DEF5DB@bydasein.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9819"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: "Paul W. Rankin" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon May 10 21:54:52 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 1lgBzQ-0002QN-5C for ged-emacs-devel@m.gmane-mx.org; Mon, 10 May 2021 21:54:52 +0200 Original-Received: from localhost ([::1]:42078 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lgBzO-0004je-Fa for ged-emacs-devel@m.gmane-mx.org; Mon, 10 May 2021 15:54:50 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46540) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgByi-00043L-LR for emacs-devel@gnu.org; Mon, 10 May 2021 15:54:08 -0400 Original-Received: from outbound.soverin.net ([2a01:4f8:fff0:2d:8::218]:44799) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgByc-0005xC-Ab for emacs-devel@gnu.org; Mon, 10 May 2021 15:54:07 -0400 Original-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 3C9C3601F3; Mon, 10 May 2021 19:53:56 +0000 (UTC) Original-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=1620676435; bh=A4zzZvod2fK72uiKtJ8d6S9SkD+vf96xAG3U27lB1M4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TpfkHoz/QqZfGyI8Gsxcd/DzIzwhjCWrO5IMpzKjro72FIRl0UV6GT18PBDyUipx4 wDOj5vMNPNJrZStTW2aesIaVBwiP1RFQ885Im5vm0cFqaMTsnhEppbgAkNIMx+8Y7O +F52PreoVE1sV32BNIFxVFg1E2rk6kDrLufKFCA6AengyOkhXHKB9CuGo/ngGdLDL6 8eF/2xO79pYsCU7ns0QnXB4G4l6MmaXRB84SqGjbgBeJZsdq98dpHj5/XcJXwmNPUy IKwfjuKvVOJLeBQuqiB7YmHK7fdjbwUtzsOa7tE1mMvQe7U8IiPOLgTX5230eo4Q8n NOR+RMNK4GWlA== Original-Received: from alan by faroe.holly.idiocy.org with local (Exim 4.94) (envelope-from ) id 1lgByS-0002NO-0g; Mon, 10 May 2021 20:53:52 +0100 Mail-Followup-To: Alan Third , "Paul W. Rankin" , emacs-devel@gnu.org Content-Disposition: inline In-Reply-To: <03FB7137-A02D-4B94-AF1F-8B7E84DEF5DB@bydasein.com> Received-SPF: pass client-ip=2a01:4f8:fff0:2d:8::218; envelope-from=alan@idiocy.org; helo=outbound.soverin.net 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, SPF_HELO_PASS=-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:269130 Archived-At: On Sat, May 08, 2021 at 10:27:13PM +1000, Paul W. Rankin wrote: > > On 8 May 2021, at 9:21 pm, Alan Third wrote: > > > src/nsterm.m: use NSWindowTabbingModeAutomatic to respect user choice. > > > Tabbed window managers are now widely available for free systems. > > > > For the record the tabbing being enabled here is not Emacs's own > > tabbing, it's a macOS method of combining multiple OS windows into > > one. Emacs's tabbing has still to be implemented on the NS port (I've > > no interest as I think tabbed windows are an abomination that should > > be burnt on sight, but would happily let someone else implement it). > > I think all the more reason not to hobble the macOS window manager! But yes > it should be noted that tabs here are in the context of window management > (i.e. Emacs frames) not tab-bar-mode. A Linux counterpart would be > https://tools.suckless.org/tabbed/ I reckon this is probably OK, but I'll leave it a bit longer to see if anyone else has an opinion. > > Paul, is this still the absolute disaster it was when it first > > appeared where some random Emacs frames would get combined but not > > others, not to mention the crashes? Also there was no "user choice" as > > I recall, it just happened without any warning or input from the user, > > at random. > > > > Is it actually stable and usable now? > > I've been building Emacs with this change applied for several years now > across a few different macOS versions and I've never experienced a crash or > unexpected behaviour. But it depends on what you might be doing that I'm > not; can you provide a step-by-step? IIRC, it would just crash pretty much at random, and without much prompting, so you'd likely know if it was still a problem. Most likely the fullscreen crash fixes from a couple of years ago solved it. > The user choice I refer to resides in the odd place of System Preferences > > Dock > Prefer tabs when opening documents: [Always | In Full Screen Only | > Manually]. The behaviour I've experienced with each of these is: > > - Always: invoking `make-new-frame' will always create a frame in a new tab > - In Full Screen Only: invoking `make-new-frame' will create a frame in a > new tab only when `(frame-parameter nil 'fullscreen)' is non-nil > - Manually: `make-new-frame' will never create new tabs That location really doesn't much sense! Certainly explains why I've never seen it before. :) This is really my lastremaining concern, that it's such an obscure setting that we'll get a lot of bug reports about Emacs-doing-tabs when-I-don't-want-it-to. I'm not sure there's a good solution to that other than perhaps putting a note in the NS port documentation (which afaict nobody ever reads anyway). BTW, is there an advantage to explicitly enabling the default setting over just removing the code that disables it? -- Alan Third