From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: shr using `make-xwidget' incorrectly Date: Thu, 11 Nov 2021 13:33:02 +0100 Message-ID: <87ee7m6fep.fsf@gnus.org> 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> <87a6ibz38z.fsf@yahoo.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9217"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Nov 11 13:33:46 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 1ml9H0-0002Cl-3K for ged-emacs-devel@m.gmane-mx.org; Thu, 11 Nov 2021 13:33:46 +0100 Original-Received: from localhost ([::1]:59302 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ml9Gz-00089f-4I for ged-emacs-devel@m.gmane-mx.org; Thu, 11 Nov 2021 07:33:45 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:45656) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ml9GQ-0007Tv-2z for emacs-devel@gnu.org; Thu, 11 Nov 2021 07:33:10 -0500 Original-Received: from [2a01:4f9:2b:f0f::2] (port=43508 helo=quimby.gnus.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ml9GO-0007Wz-1m for emacs-devel@gnu.org; Thu, 11 Nov 2021 07:33:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=zScVlWARlMkAUlTnZ7KRa4j+V9QZcWQQBeVoB/5VdFg=; b=GU6qlJ/xK9OYhpH9h/mYYMSCkN +iBcVb/s7OqeRfSeHMdcilxovEXRkGAxnirWaBIzYv3PWj8hu1Q/CVRU/Lt9EbFkBIdaKnP/a4YJU y2+p/zl+7/HrvjdnEWVB39bhqO+1RznpiXjCAB9m2XRGulM+3n0unwLQwGPWY+HliqRg=; Original-Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ml9GI-0005ft-Ug; Thu, 11 Nov 2021 13:33:05 +0100 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAGFBMVEWDe3BYU0yll4K9 oXnauo3gvo7gwZT///+NHmO0AAAAAWJLR0QHFmGI6wAAAAd0SU1FB+ULCwwJAYVT5DoAAAG3SURB VDjLdZNNbqQwEIXd0WQPMxdApJV1NEazjgabA6SrvI4S7PsfYV65yuBoOg+1G/zh+sddxsFBF9fr Mo5uVGB6mEWTvDiOPqjWZfWLX+yhA00ciO+CWErJ94Cw9A2476MHEe6aFZKVBCDAyBCWgr/EEXc3 M4VbpRCecjbAQZ4D4YrIAuF+GrBXQyo7fqVwc67msZoOH0DRDpYsPzG16o6uhRE5fMgJDYoJoKSS iaRYCmJAEsFegDY1JTY0XckR9uVSEGEYLMIt58Qpa1TNBJmrCD+1iCfQm5Bh9DwRa+aBu7LX5xps /toP2U+v0+Oru/4HYlj9n7/TY64Z9uDlYXIf8/S87j5sEsZqCYbg5zeAp3fnniP62wDvbnqar9f9 uiy18c0U0W/v/fzjw/38tZuPoYKIRqF1exfVoPWz9qacKZ6AD2G37ImogRhqYdE6VJq2OtTD2SCZ AjFHp3O1XyzxA+h+THXumPpwq9c21tJPBTUcOioLk3Q7ANcia7Ig5wk5j0+A61TVuRq00dBWTu0C zFAd86ZbAzYEGKkOBJsdU52LdqLbly+Vws3K/kUba8/vaBjHf0usLVcfdy2oAAAAJXRFWHRkYXRl OmNyZWF0ZQAyMDIxLTExLTExVDEyOjA5OjAwKzAwOjAwgbmcCQAAACV0RVh0ZGF0ZTptb2RpZnkA MjAyMS0xMS0xMVQxMjowOTowMCswMDowMPDkJLUAAAAASUVORK5CYII= X-Now-Playing: Hype Williams's _Junt-Deez Ruins You See_: "Infinity" In-Reply-To: <87a6ibz38z.fsf@yahoo.com> (Po Lu's message of "Thu, 11 Nov 2021 13:10:36 +0800") X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a01:4f9:2b:f0f::2 (failed) Received-SPF: pass client-ip=2a01:4f9:2b:f0f::2; envelope-from=larsi@gnus.org; helo=quimby.gnus.org X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 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, RCVD_IN_DNSWL_MED=-2.3, RDNS_NONE=0.793, 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:279253 Archived-At: Po Lu 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. Yes, indeed. (And I was wondering why the xwidgets were still playing video when I hit "back" in the eww history, and landed on a page with a video again -- but they'd been updating the whole time, even if they'd not been on screen, I understand now.) > 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. Oh, sure. I don't expect anybody to be doing exactly that with videos, for instance, but I think it's a reasonable expectation that a mode that inserts a video into the buffer shouldn't have to do ... a lot of work to remove the video, either. I mean, if that's feasible, it would be nice. > 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. That describes animated images quite well. :-) (OK, the animation itself is controlled from Lisp land, but there's a bunch of caches and megabytes of data...) Hm... looking at the code in `image-animate-timeout', it may suffer from some of the same issues... -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no