From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Anders Lindgren Newsgroups: gmane.emacs.devel Subject: Re: Mac OS Sierra tab feature breaks C-x 5 2 Date: Sun, 16 Jul 2017 20:43:25 +0200 Message-ID: References: <191BFCA3-3C5B-4A75-8985-A958E638ADCE@gmail.com> <20170706174204.GA19121@breton.holly.idiocy.org> <20170706221637.GA19607@breton.holly.idiocy.org> <20170710195220.GA21900@breton.holly.idiocy.org> <20170712182321.GA23391@breton.holly.idiocy.org> <20170713202234.GA23777@breton.holly.idiocy.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="f403045dea945be424055473a84a" X-Trace: blaine.gmane.org 1500230656 24092 195.159.176.226 (16 Jul 2017 18:44:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 16 Jul 2017 18:44:16 +0000 (UTC) Cc: Paul Michael Reilly , Jean-Christophe Helary , Emacs-Devel devel To: Alan Third Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jul 16 20:44:10 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dWoWR-0005ZH-0I for ged-emacs-devel@m.gmane.org; Sun, 16 Jul 2017 20:44:03 +0200 Original-Received: from localhost ([::1]:46503 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dWoWW-0000UI-CD for ged-emacs-devel@m.gmane.org; Sun, 16 Jul 2017 14:44:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37099) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dWoVt-0000Ti-LA for emacs-devel@gnu.org; Sun, 16 Jul 2017 14:43:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dWoVs-0002Hy-Hn for emacs-devel@gnu.org; Sun, 16 Jul 2017 14:43:29 -0400 Original-Received: from mail-ua0-x235.google.com ([2607:f8b0:400c:c08::235]:36059) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dWoVs-0002HK-BN for emacs-devel@gnu.org; Sun, 16 Jul 2017 14:43:28 -0400 Original-Received: by mail-ua0-x235.google.com with SMTP id 35so28407528uax.3 for ; Sun, 16 Jul 2017 11:43:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=vutDHuBA5U1T5m5uZHQKQ5ORZ9fOoIMmgx+SowVcT14=; b=ayS0/b0wIesu+OhcNUlVI+9NSkf1TSxuLHBojzUfATML/bywPTx7Ayzp8TRNjqzjJq roKg3+u9XHQRC1HKPuwzroAhGd57OpO9IAdYtVtc5g3bn+ByuLgqHm7eDHhhORSdTzb5 5tq1CqMPNJQ+FWpN88wTBSPILXWe8i/O37OWAmdOMqZeDPFdrjiZ+MWT8GZMDhUjJdue Cy9grfTW14Bfthz1zcyoVS5RrydGeORCV3UVBJ6kJGgES4xvkFO4GBazUftmRgcEXRU1 DcJvm8saVeM9AzSwhg1ozxgPWS3GeX10ctxW/rXYCVZINKK59UaJgPzXDAKcuRvzpoh9 sVDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=vutDHuBA5U1T5m5uZHQKQ5ORZ9fOoIMmgx+SowVcT14=; b=ufVvAixZUW8e+eE54OmvMEswl62fh8rXltvtyMm2Ck6GzDFZmH6cb/VsBsSWjb/owz V384Z6zc8by1oF9/ea7T6HSug933dEjPDrizGFnn6DGT+n6K/TNRnRmeyjn/1WGA9l+K NucP+O+iX14Rvgl4EcEfTKjS0XxiojDVz9ZsqpLPpYDzdwECfeY5EetxkVl0j+bgxrF0 nbYvZYSWjtenKq7qemGxlxqFQSQn5/Z5cd92un7GReJbCnos3/SQQizBGrsJDb2VPlHd nfmHOQ4wShCtKmDHwOreDaQXkj83WzlGVpsA4E012MPQI00+s0olYZuSCYeDQEfldW+6 Paew== X-Gm-Message-State: AIVw1112GcwZDtqnZWpE3FuS+V3RK8NfQ/TWxhQF2Yv3g8300tVr7nIN vaoF42MfnEP1RvUix84BKj2gSnvgyg== X-Received: by 10.176.70.138 with SMTP id r10mr11008883uaa.53.1500230606118; Sun, 16 Jul 2017 11:43:26 -0700 (PDT) Original-Received: by 10.31.210.2 with HTTP; Sun, 16 Jul 2017 11:43:25 -0700 (PDT) In-Reply-To: <20170713202234.GA23777@breton.holly.idiocy.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400c:c08::235 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:216749 Archived-At: --f403045dea945be424055473a84a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Jul 13, 2017 at 10:22 PM, Alan Third wrote: > On Wed, Jul 12, 2017 at 11:20:57PM +0200, Anders Lindgren wrote: > > The end result would look like: > > > > NS_SILENCE_MISSING_METHOD_WARNING_BEGIN > > if ([win respondsToSelector: @selector(setTabbingMode:)]) > > [win setTabbingMode: NSWindowTabbingModeDisallowed]; > > NS_SILENCE_MISSING_METHOD_WARNING_END > > I like this option, but after a lot of messing about I=E2=80=99m pretty s= ure > that gcc doesn=E2=80=99t let you silence this warning. > Unfortunately, I came to the same conclusion. So, unless we don=E2=80=99t care about gcc warnings for the NS build, we co= uld > try using performSelector: > > [win performSelector: @selector(setTabbingMode:) > withObject: (id)NSWindowTabbingModeDisallowed]; > Which only supports one parameter, so works here but not necessarily > anywhere else we might want to try this. > It doesn't feel right, as it bypasses all type checking even when building on modern systems. And, as you mentioned, it only supports one parameter. I tried to figure out if gcc or clang was used when building on 10.6.8, but ran out of time (and won't have the chance to do it again anytime soon). I did conclude that it comes with both a real "gcc" and a real "clang", so presumably gcc is used. (Surprisingly, more modern versions of macOS seems to map the command "gcc" to "clang".) A warning-free build is a must on modern system (which use clang). It would be nice on older system, I guess, but it would be hard to enforce. (We could even lobby to add the option to future gcc versions, for the benefit of GNUStep, but it would not help the situation on older macOS versions.) Or back to the first suggestion and fake the methods when they=E2=80=99re n= ot > there. But that doesn=E2=80=99t help get rid of the need for multiple > binaries. > Not an appealing solution. My gut feeling is to go with the NS_SILENCE_MISSING_METHOD_WARNING_BEGIN solution, as it work on modern macOS systems, it retains type checking, and it give us a single location to describe the situation and to modify the macro, if there should be a need for it in the future. -- Anders --f403045dea945be424055473a84a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Thu, Jul 13, 2017 at 10:22 PM, Alan Third <alan@idiocy.org> wrote:
On Wed, Jul 12, 2017 at 11:20:57PM +0200, Anders Lindgren wrot= e:
> The end result would look like: >
> =C2=A0 =C2=A0 =C2=A0 NS_SILENCE_MISSING_METHOD_WARNING_BEGIN
>=C2=A0 =C2=A0 =C2=A0 =C2=A0if ([win respondsToSelector: @selector(setTa= bbingMode:)])
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0[win setTabbingMode: NSWindowTabbingM= odeDisallowed];
>=C2=A0 =C2=A0 =C2=A0 =C2=A0NS_SILENCE_MISSING_METHOD_WARNING_END
I like this option, but after a lot of messing about I=E2=80=99m pre= tty sure
that gcc doesn=E2=80=99t let you silence this warning.

Unfortunately, I came to the same conclusion.

So,= unless we don=E2=80=99t care about gcc warnings for the NS build, we could=
try using performSelector:

=C2=A0 =C2=A0 [win performSelector: @selector(setTabbingMode:)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 withObject: (id)NSWin= dowTabbingModeDisallowed];
Which only supports one parameter, so works here but= not necessarily
anywhere else we might want to try this.


It doesn't feel right, = as it bypasses all type checking even when building on modern systems. And,= as you mentioned, it only supports one parameter.

I tried to figure out if gcc or clang was used when building on 10.6.8, bu= t ran out of time (and won't have the chance to do it again anytime soo= n). I did conclude that it comes with both a real "gcc" and a rea= l "clang", so presumably gcc is used. (Surprisingly, more modern = versions of macOS seems to map the command "gcc" to "clang&q= uot;.)

A warning-free build is a must on modern sy= stem (which use clang). It would be nice on older system, I guess, but it w= ould be hard to enforce. (We could even lobby to add the option to future g= cc versions, for the benefit of GNUStep, but it would not help the situatio= n on older macOS versions.)


Or back to the first suggestion and f= ake the methods when they=E2=80=99re not
there. But that doesn=E2=80=99t help get rid of the need for multiple
binaries.

Not an appealing solution.


My gut feeling is to go with the NS_S= ILENCE_MISSING_METHOD_WARNING_BEGIN solution, as it work on modern mac= OS systems, it retains type checking, and it give us a single location to d= escribe the situation and to modify the macro, if there should be a need fo= r it in the future.

=C2=A0 =C2=A0 -- Anders
<= div>
--f403045dea945be424055473a84a--