From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gerd =?UTF-8?Q?M=C3=B6llmann?= Newsgroups: gmane.emacs.bugs Subject: bug#69525: 30.0.50; MacOS: New warnings on stderr Date: Tue, 30 Jul 2024 08:00:35 +0200 Message-ID: References: <86a5nfnuxl.fsf@gnu.org> <86a5i32vea.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10064"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 69525@debbugs.gnu.org, alan@idiocy.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jul 30 08:02:07 2024 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 1sYfvz-0002UN-Fv for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 30 Jul 2024 08:02:07 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sYfvk-0000Nx-19; Tue, 30 Jul 2024 02:01:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sYfvh-0000Ni-RM for bug-gnu-emacs@gnu.org; Tue, 30 Jul 2024 02:01:50 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sYfvg-0005G5-Lx for bug-gnu-emacs@gnu.org; Tue, 30 Jul 2024 02:01:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=CrrC3z2qfyvfqCrXpx2xgZIvFwvZ7pdm998+hxWa0Hk=; b=HfbWwKyISLuHHIDXCzymeXLFm+450X4ECuzlv6I0kPTOauR77rdEntvhE8dnZX8Xs/X1uGWBB7W6bpS0vwem7zAAyZrCSUdrWRdRA67xn6E59/BRUnEa4aVc82HxZy8gsCNNWsu1FNuNJs8lkiKTLJbsQBVjqZ03P9jrVMRfH9/LqN98hbKz/U4kWKlLvffEBbNSg2oyYt3yJ+nG/GmGZ94sg8Ea+MCl4Sz1x3f+ICbPzQ1KQu/iyYk9MJyBt+iQvApRi19SE7kMKjdYU5MgN+Act6ofjLFZNm4o9+Fc+lM5YawZ9vUmmk1sa9KImyv8avSa7bzBp08O38y68YG7Tw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sYfvu-0002hx-0c for bug-gnu-emacs@gnu.org; Tue, 30 Jul 2024 02:02:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Gerd =?UTF-8?Q?M=C3=B6llmann?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 30 Jul 2024 06:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69525 X-GNU-PR-Package: emacs Original-Received: via spool by 69525-submit@debbugs.gnu.org id=B69525.172231932010401 (code B ref 69525); Tue, 30 Jul 2024 06:02:01 +0000 Original-Received: (at 69525) by debbugs.gnu.org; 30 Jul 2024 06:02:00 +0000 Original-Received: from localhost ([127.0.0.1]:46788 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sYfvs-0002hg-70 for submit@debbugs.gnu.org; Tue, 30 Jul 2024 02:02:00 -0400 Original-Received: from mail-ej1-f48.google.com ([209.85.218.48]:54449) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sYfvp-0002hT-Km for 69525@debbugs.gnu.org; Tue, 30 Jul 2024 02:01:59 -0400 Original-Received: by mail-ej1-f48.google.com with SMTP id a640c23a62f3a-a7a83a968ddso588984566b.0 for <69525@debbugs.gnu.org>; Mon, 29 Jul 2024 23:01:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722319238; x=1722924038; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=CrrC3z2qfyvfqCrXpx2xgZIvFwvZ7pdm998+hxWa0Hk=; b=lkAMIE1Xj1+LUC+498DK2JSebKdyUitRDcJMexMhwsBoXeoVYTtaqsp3MQV8nlqOKC DJIWtVDgOqQ9+rEK7ZnE3lJErWxV1xmMKs86yWy+RmDx6s/kJn7ZuZMz6V1PrwnfxDgm qcXvECpugMmZhON2LhPVKMLtdH0c7YFzCr6Z3r38nZSDGlB06/Ke6/UTWH1HwklHG/N7 5aZHLyZtPmO9AwuFMU6TkxAuSZ5n/a/CPDLvIZnOtKTwW2eULnmjXeaBEwCNYrrWvEjQ ized3BZ17pBO9sT69fddWDP7ijMbTbFUb9q7FN3Tyv13AO7788yU3/PiA1QAf4teaAbR +IUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722319238; x=1722924038; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=CrrC3z2qfyvfqCrXpx2xgZIvFwvZ7pdm998+hxWa0Hk=; b=lDwb5ztUPmbZAhpgB//LGNBBCGTFKuorsZxK762ExBUhjOPT0f+U4vWsF8cxzxs17a 44j7S7ExVuX6PPekbgX+iL7wsU3uLfVmE5alwSajS52/MkHH4gbEY6lSXQBuLi02dWMT q32jBSJt5vtCb7gMIgUs13OfxxqpiM9yyxmkWve8w2yhCk2MMtj+s/d694DPDoKiWHCA KXtfBT9IJ00zQFDX/TRfNuOc3IR/oS+bcliyWy1qFHjUYPJ88NPTRMKhlwwT4Jsdoy/B 62YFafVIyld5RDXUe9eWFKoSQIiLE5TAkiBsCsI27HRrnQ/PAALsalb5FSvC81bBbNG4 thmw== X-Gm-Message-State: AOJu0YzVS58Herg2XgLx6N92ctCKq5mdJ0ornHN+YJ4VHbnU37X4F0Se jVs+9wk5VPFzgoH8/5oQvSyiRSJEcd8qe7wRQZG9+fXz7YYiMz7b X-Google-Smtp-Source: AGHT+IF1cx8m+058xeKKfxlZ6ojaPsYDDeJywMgEroPc9ZNckExN/NviymTRZ8X3t/oLnbh+q7Liww== X-Received: by 2002:a17:907:9410:b0:a7a:8378:625c with SMTP id a640c23a62f3a-a7d40057806mr621862766b.36.1722319237623; Mon, 29 Jul 2024 23:00:37 -0700 (PDT) Original-Received: from pro2.fritz.box (p4fe3a334.dip0.t-ipconnect.de. [79.227.163.52]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7acab580b4sm592636566b.58.2024.07.29.23.00.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jul 2024 23:00:37 -0700 (PDT) In-Reply-To: <86a5i32vea.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 27 Jul 2024 09:37:01 +0300") 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:289544 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Eli Zaretskii writes: >> From: Gerd M=C3=B6llmann >> Cc: 69525@debbugs.gnu.org, Eli Zaretskii >> Date: Sat, 27 Jul 2024 05:56:30 +0200 >>=20 >> Alan Third writes: >>=20 >> > I would agree that Apple's documentation is abysmal. AFAICT most new >> > features are exclusively documented in WWDC talks, so if you're not >> > immersed in the Apple eco-system it can be very hard to keep track of >> > what's changed. I assume that's some sort of marketing ploy. >>=20 >> Yeah, could be. Although I wonder what advantage they expect from making >> such stuff effectively a secret :-/. > > Companies that develop proprietary software for macOS can probably > fund courses for their employees, or buy auxiliary documentation that > is not available for free, or ask Apple questions and get answers, > something that could be available only for those who have contracts > with Apple. Yeah, maybe :-/. Meanwhile, I think I pulled this off anyway by studying and mimicking what others did. At least it works for me on macOS 14.5 just like the old code did, at least for entering accented characters, which is the only thing I know how to use. I'll push that to master, if nobody objects. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-NS-Let-EmacsView-implement-NSTextInputClient.patch Content-Description: NSTextInputClient >From 65d5ace8e85111ecbd5035541ab24fdcfc065c7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerd=20M=C3=B6llmann?= Date: Tue, 30 Jul 2024 07:47:44 +0200 Subject: [PATCH] NS: Let EmacsView implement NSTextInputClient * src/nsterm.h (@interface EmacsView): Implement NSTextInputClient protocol. * src/nsterm.m: Implement required NSTextInputClient methods, forwarding to existing NSTextInput methods. --- src/nsterm.h | 4 ++-- src/nsterm.m | 37 ++++++++++++++++++++++++++++++++++++- 2 files changed, 38 insertions(+), 3 deletions(-) diff --git a/src/nsterm.h b/src/nsterm.h index 5d4810cba4a..f3dcb07a0f1 100644 --- a/src/nsterm.h +++ b/src/nsterm.h @@ -463,9 +463,9 @@ #define NSTRACE_UNSILENCE() @class EmacsLayer; #ifdef NS_IMPL_COCOA -@interface EmacsView : NSView +@interface EmacsView : NSView #else -@interface EmacsView : NSView +@interface EmacsView : NSView #endif { #ifdef NS_IMPL_COCOA diff --git a/src/nsterm.m b/src/nsterm.m index cd6ffabddde..c659ef40c73 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -7049,9 +7049,44 @@ In that case we use UCKeyTranslate (ns_get_shifted_character) [nsEvArray removeObject: theEvent]; } +/*********************************************************************** + NSTextInputClient + ***********************************************************************/ -/* implementation (called through [super interpretKeyEvents:]). */ +- (void) insertText: (id) string + replacementRange: (NSRange) replacementRange +{ + if ([string isKindOfClass:[NSAttributedString class]]) + string = [string string]; + [self unmarkText]; + [self insertText:string]; +} + +- (void) setMarkedText: (id) string + selectedRange: (NSRange) selectedRange + replacementRange: (NSRange) replacementRange +{ + [self setMarkedText: string selectedRange: selectedRange]; +} + +- (nullable NSAttributedString *) + attributedSubstringForProposedRange: (NSRange) range + actualRange: (nullable NSRangePointer) actualRange +{ + return nil; +} +- (NSRect) firstRectForCharacterRange: (NSRange) range + actualRange: (nullable NSRangePointer) actualRange +{ + return NSZeroRect; +} + +/*********************************************************************** + NSTextInput + ***********************************************************************/ + +/* implementation (called through [super interpretKeyEvents:]). */ /* : called when done composing; NOTE: also called when we delete over working text, followed -- 2.45.2 --=-=-=--