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.bugs Subject: bug#42904: [PATCH] Non-Unicode frame title crashes Emacs on macOS Date: Tue, 18 Aug 2020 19:28:26 +0200 (CEST) Message-ID: <20200818172824.GA90575@breton.holly.idiocy.org> References: <83lfidgtc7.fsf@gnu.org> <838sedgq2x.fsf@gnu.org> <02F52D43-7EAB-4E61-A567-E8CCD11D856B@acm.org> <20200817195610.GA70682@breton.holly.idiocy.org> <3F71EF82-A143-4E3A-AEF3-8A236091891D@acm.org> <20200818084306.GA89999@breton.holly.idiocy.org> <243A5DA8-2865-485D-A8A2-1F543B046BAA@acm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25776"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 42904@debbugs.gnu.org To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 18 19:29:10 2020 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 1k85Q5-0006Zj-M9 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 18 Aug 2020 19:29:09 +0200 Original-Received: from localhost ([::1]:44210 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k85Q4-00028J-H0 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 18 Aug 2020 13:29:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59350) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k85Py-000276-65 for bug-gnu-emacs@gnu.org; Tue, 18 Aug 2020 13:29:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53549) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k85Px-00067Y-Su for bug-gnu-emacs@gnu.org; Tue, 18 Aug 2020 13:29:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k85Px-0003Ky-Oi for bug-gnu-emacs@gnu.org; Tue, 18 Aug 2020 13:29:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 18 Aug 2020 17:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42904 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 42904-submit@debbugs.gnu.org id=B42904.159777171912800 (code B ref 42904); Tue, 18 Aug 2020 17:29:01 +0000 Original-Received: (at 42904) by debbugs.gnu.org; 18 Aug 2020 17:28:39 +0000 Original-Received: from localhost ([127.0.0.1]:36862 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k85Pb-0003KO-AI for submit@debbugs.gnu.org; Tue, 18 Aug 2020 13:28:39 -0400 Original-Received: from mailout-l3b-97.contactoffice.com ([212.3.242.97]:34466) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k85PY-0003K9-40 for 42904@debbugs.gnu.org; Tue, 18 Aug 2020 13:28:38 -0400 Original-Received: from smtpauth1.co-bxl (smtpauth1.co-bxl [10.2.0.15]) by mailout-l3b-97.contactoffice.com (Postfix) with ESMTP id A20DB55D; Tue, 18 Aug 2020 19:28:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1597771709; s=20200222-6h9o; d=idiocy.org; i=alan@idiocy.org; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:Content-Type:Content-Transfer-Encoding:In-Reply-To; l=1137; bh=Kr+a76xGp6z51Pq+s/RdUZgLecgvG6gYmbB2N8i6ALE=; b=Zqt8HSOH3HLQzVaAUNlcg4xMnT2RmL7+W5PqFjH15BaS1lEOhJ2Dt9ilrGgDcfZK bmZ4bD7LYgPDaIHi2i2hj02TSXsrS8l7br2EDE8YLSuMYDN+C9sunk3ML+6Q+wFYUfO Xxms7Z/gydQpKjiyPcqSt0EnDh2momPiQ1V2JxXoB065U6jb+afO9ovxUQhat6rA+vJ sPVZ5Igi5NyeDqB/Rj39iPWbqZCjhaaAzXFHq3182xgWjeI8ZaTD59DtmzzzX7P/kkH X9Z/EOURCrqlt4x9oz9nZpuCd9UM+c7tyEgxMhgMhtASiqsYm1T4+FBYX6XRd3qtU3M FQlX0DfUsw== Original-Received: by smtp.mailfence.com with ESMTPA ; Tue, 18 Aug 2020 19:28:25 +0200 (CEST) Original-Received: by breton.holly.idiocy.org (Postfix, from userid 501) id 5FB6820249DF17; Tue, 18 Aug 2020 18:28:24 +0100 (BST) Mail-Followup-To: Alan Third , Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , Eli Zaretskii , 42904@debbugs.gnu.org Content-Disposition: inline In-Reply-To: <243A5DA8-2865-485D-A8A2-1F543B046BAA@acm.org> X-ContactOffice-Account: com:241649512 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:185525 Archived-At: On Tue, Aug 18, 2020 at 01:48:10PM +0200, Mattias Engdegård wrote: > 18 aug. 2020 kl. 10.43 skrev Alan Third : > > Anyway, as I understand it the internal representation of NS strings > > are UTF-16, so the conversion through UTF-8 seems a bit of a waste if > > we can go direct. > > Maybe, but the conversion to UTF-16 then has to be done on the Emacs > side instead, probably less efficiently than in the NS libs. It's > probably a wash. > > Anyway, here is an alternative patch using your method. Tell us what > you think. Looks good to me. The only thought I have is that perhaps we should consider extending NSString to handle these lisp strings rather than making it a separate function? We could provide a method to convert to a lisp string as well, although that's not as complex. I believe using categories would do it without us having to create a new EmacsString class or similar. I don't know if this is worth it because I don't know if we really need these clean conversions elsewhere, but the neatness of newStr = [NSString withLispObject:str]; appeals. :) -- Alan Third