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: shr using `make-xwidget' incorrectly Date: Thu, 11 Nov 2021 13:10:36 +0800 Message-ID: <87a6ibz38z.fsf@yahoo.com> References: <87sfw31mok.fsf.ref@yahoo.com> <87sfw31mok.fsf@yahoo.com> <87fss3e5kc.fsf@gnus.org> <87czn71hwi.fsf@yahoo.com> <8735o3e4u9.fsf@gnus.org> <87tugjz4dl.fsf@yahoo.com> <87o86rb88a.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36401"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (gnu/linux) Cc: emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Nov 11 06:11:36 2021 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 1ml2N6-0009M0-3i for ged-emacs-devel@m.gmane-mx.org; Thu, 11 Nov 2021 06:11:36 +0100 Original-Received: from localhost ([::1]:46306 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ml2N5-0001u5-3k for ged-emacs-devel@m.gmane-mx.org; Thu, 11 Nov 2021 00:11:35 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:41238) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ml2ML-000197-0t for emacs-devel@gnu.org; Thu, 11 Nov 2021 00:10:49 -0500 Original-Received: from sonic306-20.consmr.mail.ne1.yahoo.com ([66.163.189.82]:33125) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ml2MI-00064I-Rs for emacs-devel@gnu.org; Thu, 11 Nov 2021 00:10:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1636607444; bh=K48+oFVJOqjGVWTcw1L9WYMkqO7EmLO7RzePnX4IYPA=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=fEvVw2V9z1ADaWY3tKjhBthy2BvzP6HTcX+tRDoiZf6o0ckcEK6wKUB5bGINHUsDN6xsbD1RgX7TESIGmJHJr23UXa1QbVOEbnupcY7mmhisQf7EawwKI/SRf1U8cKk+lfOvs6rzfrveDDxSsviVxqwc6IkWgZiAWBYCw1J/CaPdBrGbwGhDjBZCrlxmuEAeb+PQroAKk/gs3aXqwckGhK6S5ROdyX17Xp0uAzZF2pImLtI184oJ9CprEJMk/erA7tdbiAnOsSDPCGDugUElMtHLLGLSMgHvCYrqG/9PdqWSF2S5BeF7eKe63FpzHwM/9DjYLObsc5m0c0KI5g1Bdg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1636607444; bh=C4h83R2uf8XiQEk8xxb/d/pBWWGQJrc4tU/+OGPvzNA=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=lVLaHYrqYqXbXi71oV+NPH1MNAQqyku2XPim8t/p5JeR/SJvLAXm7kTj9Jwp+MhCdffpJ0Hu66WtLdlGE28gBEZS6CE83ONGOP7fYD1hz0UoeZLDytvcX+/AgBDCSYrpoBPbF6NGRSPz/1CEXLlW68WoRV0g02S7W1lxG6y8+v8eTrl4qkmnEahgNEFMM8rP1n38/YankSqOlR3YdKBcyTMy9IxzSYQLqQIzPlgogSw2YH39np26dTbREVzwUepDzpWpuDr8XQOxuKPAhoe9/ynZZiikDLuHrXIczQdOFknWdeUnL8ycfKwcug4hhu1U+NXQnt0MyTgpurFWQYrJOA== X-YMail-OSG: zEb7eAUVM1lum0nooL7ah.9bmizD7d.NCNmhqpFL2PXYjKDBGA.HM_TG5RvyUrY HEFrZdU8KyHkH9rpGt7B8Rj6xooHK6SuL4xUKffn_68U.dX3ykU7ViZ1UGxENFllrDIfvoPSmff1 nrAt_7nC5C.JHZ4IN5R_8YqDVM5PPoZ5Rxgr2bTi7NA4Y8Qa0eDPkGG9hJgPA0sReMoQfQnW.w.n 0hOvwK6IoCgFDyIOODsW3iOXn09.4yCFO9QJ9BXHPKv70YTXeJPiAOAyumYbWIhvu8c7.IJ5hUSj gLaMdvPr_mSrD4X3NchtNWkGd9KuN5Xn_6Z_DVt0qsk6yrMfUlFfV5YeiamxAzvqbk03WiQKwrKH lg9ZYcIoN11fhko25qsLplaiyZSUmyoftfljekWqEIOTPGZbREtlavISFKG_QBeZx5uGTBZj9zZv EW8NQbIaKjMSXGoKkT92k30TmVmloTUmtMdmmaQ8f.10OoRvh9D78Ws2uNnLhFfoby_qqUT9s7V3 Lt1fLwIQ9K3YnqSZ7yLdflaIUnC4tGgifL7eN7b0qZqFiyV3k50QTHqDlUR.UVoXgo.7QQyKWaZa .9H9YRRoLet3ODD.FHWSXX0TpZJGxsoEYc7uCjGJE4RxNAZx3fjdGyw9qfs8yg2DCPirS.pcCo5o EFJcWhnJOICdLKuU5TqWUSNk_yuoiVfT1QRjHOezSKXmoXPm6mY9xToYjtbR2ADxNtXy6Qh_Gl_F ZJBW.Cc5lxBtq_.9qHqV9qU9YSHNsQ2DWys1JStpLXDcKwHNKhUYESQ4d3LstHjTtjPyacto_nF1 ZBHyahcv9bayCocCRqyYRqIBjRUjkFtlWHTlw6ghwy X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.ne1.yahoo.com with HTTP; Thu, 11 Nov 2021 05:10:44 +0000 Original-Received: by kubenode504.mail-prod1.omega.sg3.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 76b38e67bc753d04a01102943446811f; Thu, 11 Nov 2021 05:10:39 +0000 (UTC) In-Reply-To: <87o86rb88a.fsf@gnus.org> (Lars Ingebrigtsen's message of "Thu, 11 Nov 2021 05:56:53 +0100") X-Mailer: WebService/1.1.19306 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.189.82; envelope-from=luangruo@yahoo.com; helo=sonic306-20.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, RCVD_IN_MSPIKE_H2=-0.001, 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:279223 Archived-At: Lars Ingebrigtsen writes: > The same is true for overlays -- you can use `overlays-in' to find all > the overlays in the buffer, even if they aren't otherwise available. I > think modelling xwidget behaviour on overlays makes a lot of sense from > an UI point of view. Hmm, I will try to think of a reasonable way to implement this. But IMO, it should be optional -- the existing behavior makes sense for many use-cases. > I'm not sure what you mean here. Are you saying that a widget in a > buffer might just spontaneously disappear? No, that killing a widget might take an unreasonable amount of time and be surprising to be implemented like evaporating overlays are. Imagine if the erasure of a few characters took upwards of 1 second, deleting dozens of on-disk cache files. That is a situation that might result from implementing evaporation of xwidgets like with overlays. > I don't think the functions that use xwidgets should have to know about > any of this stuff. Imagine if you'd have to jump through these hoops to > display images? Better comparison: imagine if `struct image' was a Lisp object (and not an internal structure created on the basis of an image spec), held tens of megabytes of memory, a lot of non-replicable state, an entire language interpreter, and control over many cache files on-disk. Then would it still be reasonable to delete `struct image's as part of some routine pruning operation such as flushing the image cache, or the erasure of a few characters in a buffer? I think not. Thanks. But I will try my best to find an acceptable solution to this problem.