[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Handle sharing Cocoa xwidgets more gracefully

From: Sungbin Jo
Subject: Re: [PATCH] Handle sharing Cocoa xwidgets more gracefully
Date: Tue, 4 Oct 2022 16:48:42 +0900

2022. 10. 4. 오전 11:41, Po Lu <luangruo@yahoo.com> 작성:

> Sungbin Jo <goranmoomin@daum.net> writes:
>> Are you mentioning the case when the xwidget view is deleted via
>> ‘delete-xwidget-view’? If that’s 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?
> 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’ve only now realized the existence of ‘kill-xwidget’, and can
reproduce the mentioned problem. I’ll probably be able to work on a fix

I do find it awkward that (if my understanding is correct) xwidget views
can only be created by displaying an xwidget, and can’t 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’m 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 – is this a bug or is it working as
>> designed?); do you have any pointers on this?
> 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’m assuming
yes since they are exposed to elisp, but they don’t have any
documentation on info.)

I’m currently just gleaming on the individual function names and
docstrings, guessing on how they should work. I couldn’t get xwidgets
working properly on my Linux machine as well; as such I can’t
experiment on the ‘canonical’ implementation either.

Sorry if this feels like an entitled request, my English skills aren’t
the best and that’s not the case here.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]