From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Handle sharing Cocoa xwidgets more gracefully Date: Tue, 04 Oct 2022 16:34:18 +0800 Message-ID: <878rlwyol1.fsf@yahoo.com> References: <87zgec1lik.fsf@yahoo.com> <5FE28BCB-F5B8-4C37-868A-53DA70638C71@daum.net> <871qro1fa7.fsf@yahoo.com> <6185E1EB-BA35-4553-B97F-990EE3AB7CA9@daum.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17967"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) Cc: Emacs developers To: Sungbin Jo Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Oct 04 10:50:54 2022 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 1ofdde-0004Wa-EA for ged-emacs-devel@m.gmane-mx.org; Tue, 04 Oct 2022 10:50:54 +0200 Original-Received: from localhost ([::1]:40758 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ofddd-0006Ar-CH for ged-emacs-devel@m.gmane-mx.org; Tue, 04 Oct 2022 04:50:53 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37148) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ofdNr-000265-Ea for emacs-devel@gnu.org; Tue, 04 Oct 2022 04:34:36 -0400 Original-Received: from sonic311-23.consmr.mail.ne1.yahoo.com ([66.163.188.204]:42029) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ofdNn-00088Q-Te for emacs-devel@gnu.org; Tue, 04 Oct 2022 04:34:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1664872467; bh=OceVMdVF03PP47nDusHtE0501rssodNiDQdVmMUFc2U=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=rHoQl2TQG/wcDCUPLi41ElDLH8fk7wz2C3feNDrA9i0foQEiRdDnvJ+b9Krwv/V8YYQkc7CpgoxwIPABiGWrW7gQrbpqqLA+Fs9H9Mwos92kWXO2oCnKhJdXXUJLwF4dVBwW6c5JN/VyloiB4CZ7uaRbXN87OwdBrKnWiQ37LBxQfxOhjYYUJDL70XOdRLCL8wWbX5oehItbDIlUZzru6b+6dTQ05I90Y/PGJGNBHwccrArBRlQdj4RvAgQRJK8FRD1ZgkHJeIhkEkTp3WlbDKZIdasWPpdVZKOtHnwHYJjvj7E0o8PXsLlTJPEZdaOoUB3L79wpoPMGDzafygYVbw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1664872467; bh=GU83oH2jdHL4pcYahtYi54cbm+BjWIWUy3oAp4PFpz8=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=mjU2agGfbJ9T7VpDk1euxmm/8iGgOMfZzqG0oslOJYacdwEIJpEuAZE5VLVUV/ut/lDwvDv20jyA5HbboKyMF2YlDWsjVcd3b1xMLlAM/u3ym7cBAD7KIylsVmRVjAC4mO/MIjVYQiP3JWVym8BSHCHE929HSd2i1spxFmYWIFypIBQI9iRVktfEjqsHU2IfgkcALH18C0nZIf2Ab6yOXM9GXu3bmhU8Sanu4wxs1z1vQwUCbZUDDMKAQTGhoBr8m35hubCal5MBpbX6qvnIK72drro9QpXNAPejW6ZLYCkZnPgwc9rJ6fIzE8HTK2ciWZs51/mufam+MRfJvMj46g== X-YMail-OSG: ucPM9YgVM1mpy7fkkWobF2H7fVb9uzO9bL0EKFrrtgFrUBcJ_hwvNmSqqkw4yzs BZorbjWsBuiVclVyuSMb_JRoOE1EJxKJedxnDT3WPTlp6s25Afzvv28ZpPEOj52s0ENFZNX.zb.9 pZ8LABzHAvcPDH2ZqngLS6jS2cUwyf9TDXPwHb77FJc8QrAlZgIBBeTYC_qMswIww_DjLq3v3GBt .lPSCAk_SHX4DZh9iHcAMOWjqxiStQSXO1R13DsIl4S1ux0xSPc4BOk7bSABTlFNW_dxYBFnuITP 0ZhYyB9f9iF.iFb6Dp.9RhxSh.QqYraLTarX.UpayBcmzVmPCt0ptsz.l6QtW_1DY8Mj2daFTxGt I8qWVuYveMmOAiX2wXY3UegZZLSkpXR2HdTnaXrYEVi48TnIP93pjwnNSRACGacFvJZnuhbEiELT 9.znJrYP4FteIsVQgOIXWjKx3c3njnQCKwYZ5brzUy72jZ8GtOYaEiXJz4lNJ4517y9mt1aippq8 4dWKBS3hpVLbSPk2.GRErUG_BdUaPH8Bm_fMrnFyS2oZsisadDXHkVh0FZ0jUEfTXkiFYrmtyJ4B 1QTA9CfmFeC1aYCu6axGUsRErt0a9F6Wd.XlfbFDOmwiaUrYYO6DqvtdeP5QVjSA4AVpuKUzcfcr 7dPObtzsAtpMv2Ym4ynqEdsq7_un0R9mLe8Le3DvUyFggjHou6WHVU6FDy3hjW6gc7IMykSKr4c5 mXaI8b5SxaJsEu41ZTg9cS7gvfO4YwepVPHuOojGkhLVQjBOcHDdrExbSxhoJWxbnbJjuXqb2Rmf LESlQCPjDW_EzjW7ThZA6jzuOXTZDbP8va9kRpuDDj X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic311.consmr.mail.ne1.yahoo.com with HTTP; Tue, 4 Oct 2022 08:34:27 +0000 Original-Received: by hermes--production-sg3-cf9dc7f8d-tskmz (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 25c6383cf307088ca271b2047ca34f90; Tue, 04 Oct 2022 08:34:25 +0000 (UTC) In-Reply-To: <6185E1EB-BA35-4553-B97F-990EE3AB7CA9@daum.net> (Sungbin Jo's message of "Tue, 4 Oct 2022 16:48:42 +0900") X-Mailer: WebService/1.1.20702 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.188.204; envelope-from=luangruo@yahoo.com; helo=sonic311-23.consmr.mail.ne1.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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.29 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:296861 Archived-At: Sungbin Jo writes: > Ah, I=E2=80=99ve only now realized the existence of =E2=80=98kill-xwidget= =E2=80=99, and can > reproduce the mentioned problem. I=E2=80=99ll probably be able to work on= a fix > soon. > > I do find it awkward that (if my understanding is correct) xwidget views > can only be created by displaying an xwidget, and can=E2=80=99t change the > xwidget it is showing, but the xwidget views get left over when the > xwidget is killed. Am I understanding this correctly, or is there a way > to create an empty xwidget view that is not connected to an xwidget at > all, and then connect the view to an xwidget separately (and possibly > change the xwidget)? I don't know how that part of the code works on Mac OS, but on X the routines that access the widgets in the `model' field of the xwidget view are conditioned behind the xwidget being live (!NILP (xw->buffer)). > Ah, thanks for the confirmation. I still feel that pointers (if they > exist) to information on how the end-users are expected to use the > xwidget system will be immensely helpful, so that I can gain a better > mental model and work on the implementation. (e.g., are xwidget views > something that the user is expected to play around with? I=E2=80=99m assu= ming > yes since they are exposed to elisp, but they don=E2=80=99t have any > documentation on info.) > > I=E2=80=99m currently just gleaming on the individual function names and > docstrings, guessing on how they should work. I couldn=E2=80=99t get xwid= gets > working properly on my Linux machine as well; as such I can=E2=80=99t > experiment on the =E2=80=98canonical=E2=80=99 implementation either. There is a significant amount of documentation on xwidgets in the Emacs Lisp reference manual. (But only if you look in the copy built in to Emacs 29.) Thanks for working on this feature.