From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Sungbin Jo Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Handle sharing Cocoa xwidgets more gracefully Date: Tue, 4 Oct 2022 16:48:42 +0900 Message-ID: <6185E1EB-BA35-4553-B97F-990EE3AB7CA9@daum.net> References: <87zgec1lik.fsf@yahoo.com> <5FE28BCB-F5B8-4C37-868A-53DA70638C71@daum.net> <871qro1fa7.fsf@yahoo.com> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.200.92\)) 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="37494"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Emacs developers To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Oct 04 10:14:57 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 1ofd4q-0009Yi-Gk for ged-emacs-devel@m.gmane-mx.org; Tue, 04 Oct 2022 10:14:56 +0200 Original-Received: from localhost ([::1]:60808 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ofd4p-0002Jk-Cx for ged-emacs-devel@m.gmane-mx.org; Tue, 04 Oct 2022 04:14:55 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34292) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ofcfw-0005sX-IQ for emacs-devel@gnu.org; Tue, 04 Oct 2022 03:49:25 -0400 Original-Received: from mail-smail-vm103.daum.net ([211.231.106.178]:51127 helo=mail-smail-vm103.hanmail.net) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ofcft-0005ET-SY for emacs-devel@gnu.org; Tue, 04 Oct 2022 03:49:12 -0400 Original-Received: from mail-hmail-smtp3 ([10.194.31.36]) by mail-smail-vm103.hanmail.net (8.13.8/8.9.1) with SMTP id 2947mrmc031268; Tue, 4 Oct 2022 16:48:53 +0900 X-Kakaomail-MID: CsIfJAAAJzUAAAGDofgSrAAD/PY= X-Hermes-Message-Id: q94Gmr1Xw644844312 X-Originating-IP: 147.46.174.125 Original-Received: from mail-qpsmtp-vm2 ([10.61.241.125]) by hermes of mail-hmail-smtp3 (10.194.31.36) with ESMTP id q94Gmr1Xw644844312; Tue, 04 Oct 2022 16:48:53 +0900 (KST) Original-Received: from [147.46.174.125] (HELO smtpclient.apple) (147.46.174.125) by (8.12.9/8.9.1) with ESMTPA; Tue, 04 Oct 2022 16:48:53 +0900 Authentication-Results: mail-qpsmtp-vm2; auth=pass (plain) smtp.auth=goranmoomin@daum.net In-Reply-To: <871qro1fa7.fsf@yahoo.com> X-Mailer: Apple Mail (2.3731.200.92) X-HM-UT: FhzuMO7fDyYG0/ZbRbn0gTOPNRA+bHyTw3HQj6tM3jc= Received-SPF: pass client-ip=211.231.106.178; envelope-from=goranmoomin@daum.net; helo=mail-smail-vm103.hanmail.net X-Spam_score_int: -5 X-Spam_score: -0.6 X-Spam_bar: / X-Spam_report: (-0.6 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_VALIDITY_RPBL=1.31, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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:296853 Archived-At: 2022. 10. 4. =EC=98=A4=EC=A0=84 11:41, Po Lu = =EC=9E=91=EC=84=B1: > Sungbin Jo writes: >=20 >> Are you mentioning the case when the xwidget view is deleted via >> =E2=80=98delete-xwidget-view=E2=80=99? If that=E2=80=99s the case, = the patch on bug#58271 will >> automatically recreate the xwidget view. Can the xwidget itself get >> deleted when a referencing xwidget view still exists in a buffer? >=20 > Yes, the xwidget will be marked as "killed", and the xwidget views > created for killed xwidgets should be empty and not reference the = native > widget. 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 found that documentation on various parts of xwidgets were very = light; >> while the functions related to xwidget views are exposed in elisp, = seems >> like documentation on them were non-existent. I=E2=80=99m still = having a hard >> time understanding on how the xwidget system is designed to interact >> (e.g. it seems from the code that one window cannot contain two = xwidget >> views pointing the same xwidget =E2=80=93 is this a bug or is it = working as >> designed?); do you have any pointers on this? >=20 > That's a known limitation of the current xwidget code, which I intend = to > resolve at some point. 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 = assuming 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 = xwidgets 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. Sorry if this feels like an entitled request, my English skills aren=E2=80= =99t the best and that=E2=80=99s not the case here. Thanks.