From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Adam Porter Newsgroups: gmane.emacs.bugs Subject: bug#69837: 29.2; vtable-update-object only works in visible windows Date: Sat, 16 Mar 2024 22:41:37 -0500 Message-ID: <1388eaa8-ae65-43f9-9438-d5bab59f20d8@alphapapa.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24981"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird To: 69837@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Mar 17 04:42:50 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1rlhQ9-0006IO-2G for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 17 Mar 2024 04:42:49 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rlhPn-0002Wa-Dr; Sat, 16 Mar 2024 23:42:27 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rlhPl-0002WR-Oj for bug-gnu-emacs@gnu.org; Sat, 16 Mar 2024 23:42:25 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rlhPl-0002h9-H2 for bug-gnu-emacs@gnu.org; Sat, 16 Mar 2024 23:42:25 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rlhQM-00013v-Em for bug-gnu-emacs@gnu.org; Sat, 16 Mar 2024 23:43:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Adam Porter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 17 Mar 2024 03:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 69837 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.17106469454036 (code B ref -1); Sun, 17 Mar 2024 03:43:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 17 Mar 2024 03:42:25 +0000 Original-Received: from localhost ([127.0.0.1]:57464 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rlhPl-000131-6E for submit@debbugs.gnu.org; Sat, 16 Mar 2024 23:42:25 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:53290) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rlhPh-00012r-UO for submit@debbugs.gnu.org; Sat, 16 Mar 2024 23:42:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rlhP6-0002UG-7D for bug-gnu-emacs@gnu.org; Sat, 16 Mar 2024 23:41:44 -0400 Original-Received: from weasel.tulip.relay.mailchannels.net ([23.83.218.247]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rlhP4-0002e0-Ht for bug-gnu-emacs@gnu.org; Sat, 16 Mar 2024 23:41:43 -0400 X-Sender-Id: dreamhost|x-authsender|adam@alphapapa.net Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 24A6E76231D for ; Sun, 17 Mar 2024 03:41:39 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a288.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id C659D762375 for ; Sun, 17 Mar 2024 03:41:38 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1710646898; a=rsa-sha256; cv=none; b=ryL07L7k7YYWlrphg8c1BZTdEKXQ20NayTAp4OoIs/ydsbP2bGV6ixzveNhULcjTWWcX4v ljsCrfLa43XkVRIOgE5MAZuDPw3IX8FZoFVqMMk0TcmpL6SnEAKzrPrLCWavjwJPlMpufA q3hGUVtGyMFyWCq7dtEKSmEVJFNDUWHwM6tQtAs2V0LlAEj82jBgZDCYPpWsMpmfAsOePB XwwW8Fjnd+1f8AEKvQpWRTDg27JebYSfMWdjftO50sQQI59srEzE2ihO0chz1V1rtGRM/v E2owC35W0k9cPIGBoSeisa+k7ZfzRnuu8sZeqy+/qCHnO5yayOKelf48abeHYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1710646898; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding:dkim-signature; bh=7Oae++3M3NZJijoAv7J78G/5dCiIUb5Y7tqz7ibnWpU=; b=fgW3D+6Kb5feS5EJgWPOIdizGrj3JW0qY0KOSFXWJbdje0CifE+8/RG0y0icSvyZEo8AH0 fQjCjTfNUgMzINWHntAMljKGtcQ2nUd74jrTy9S8c67PW+t6PHLSk0LBSqDk3+4pSw9Pj9 D0kUWnMVdv8JexKdRJRprZ23a7iMN0gaeXBTD4HkHYIZZ5zx7EF5/AzhDnRSNSfee2H2UQ 2vPxcpah04FBWJrxGah4NO2Z8sqMMwtV1Rj8C1ndXWCwgJOG0w/ar/ALECpD+mqEXdMRfx ifgvJQEn4Js4natckRD1oIMto8HeQYhMWYHl/yAKdwV+XpKh73/iLPklFwNYKQ== ARC-Authentication-Results: i=1; rspamd-76c7995f89-5f9ct; auth=pass smtp.auth=dreamhost smtp.mailfrom=adam@alphapapa.net X-Sender-Id: dreamhost|x-authsender|adam@alphapapa.net X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|adam@alphapapa.net X-MailChannels-Auth-Id: dreamhost X-Abiding-Reaction: 1d9fd58c42ad13fd_1710646899020_4180681564 X-MC-Loop-Signature: 1710646899020:72690220 X-MC-Ingress-Time: 1710646899019 Original-Received: from pdx1-sub0-mail-a288.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.119.164.55 (trex/6.9.2); Sun, 17 Mar 2024 03:41:39 +0000 Original-Received: from [10.28.0.130] (unknown [45.131.192.18]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: adam@alphapapa.net) by pdx1-sub0-mail-a288.dreamhost.com (Postfix) with ESMTPSA id 4Ty3gk3Zl7zDd for ; Sat, 16 Mar 2024 20:41:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alphapapa.net; s=dreamhost; t=1710646898; bh=7Oae++3M3NZJijoAv7J78G/5dCiIUb5Y7tqz7ibnWpU=; h=Date:To:From:Subject:Content-Type:Content-Transfer-Encoding; b=laOZRMhp1UZC/89EeUymIxK4zbk5OlHuJ/a+YMPn63e3XEjVcg6V0rcZQqgjv8bIm mNQqpkROSkzV6nqQSnJwJ4cZUOT7Ei65+D2QtwTQmi90ls+iTlUxyyAqG+hErZBqku XN4r8BVR8XszFs/XC8nLk/VZyZn+x0/27StffqnMHgj8JdLw4dfd0+0xd1Fuj6b5BP flHkNEIwDneoEbur1IFAaCG7R+/B+ODfnokVVG8IZADqFmF+R0sttZ4Lrabmfa7APm +qlzRm90yvWv9l7lDu8375EeVZE9wSL4m+32Uj7Mnds+EbIGhjgF2/Q1PD2y0FfDVn AgWwzV6b6ogrA== Content-Language: en-US Received-SPF: neutral client-ip=23.83.218.247; envelope-from=adam@alphapapa.net; helo=weasel.tulip.relay.mailchannels.net X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 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_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_NEUTRAL=0.779, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:281747 Archived-At: Hi, I've discovered that `vtable-update-object' only works in buffers that are in visible windows. When trying to update vtables in buffers that aren't, the object being updated or replaced fails to be found in the cache, apparently because `vtable--cache-key' uses `window-width' in its value (so maybe if, when the vtable buffer is not visible, the selected window happens to have the same width as the window in which the vtable buffer was previously displayed, it will work by chance). In my case, the vtable is being updated in the background from a timer, so its buffer may or may not be visible. It's preferable to call `vtable-update-object' to update two rows in it rather than reverting the whole table, because it can be relatively slow to revert the whole table when it's large. I'm not sure of the best way to fix this. Maybe the vtable's last-used window width could be cached and used for the cache key in case its buffer is not visible. I guess that would risk displaying the vtable sub-optimally if the next time it's displayed its window width is different, but that might be worth it; in that case, the user could always revert the table if necessary. I'm willing to work on a patch for this, but I'd appreciate any guidance, since I'm far from an expert on this library, and there are many nuances when it comes to buffers, windows, their attributes, etc. Thanks, Adam