From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#45256: Viewing images over network using TRAMP (errors and unexpected prompts) Date: Wed, 16 Dec 2020 22:52:05 +0200 Organization: LINKOV.NET Message-ID: <87zh2djyc2.fsf@mail.linkov.net> References: <461b6a4f-9709-c71b-0ec3-f70d08674c9e@fastmail.com> <87360615l3.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="833"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: Mikhail P , 45256@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Dec 16 22:08:46 2020 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 1kpe2Q-00006x-2e for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 16 Dec 2020 22:08:46 +0100 Original-Received: from localhost ([::1]:35396 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kpe2P-0004fi-3d for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 16 Dec 2020 16:08:45 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46278) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kpdzn-00022Y-GS for bug-gnu-emacs@gnu.org; Wed, 16 Dec 2020 16:06:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50709) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kpdzn-0006W0-8M for bug-gnu-emacs@gnu.org; Wed, 16 Dec 2020 16:06:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kpdzn-00049S-2w for bug-gnu-emacs@gnu.org; Wed, 16 Dec 2020 16:06:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 16 Dec 2020 21:06:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45256 X-GNU-PR-Package: emacs Original-Received: via spool by 45256-submit@debbugs.gnu.org id=B45256.160815272015866 (code B ref 45256); Wed, 16 Dec 2020 21:06:03 +0000 Original-Received: (at 45256) by debbugs.gnu.org; 16 Dec 2020 21:05:20 +0000 Original-Received: from localhost ([127.0.0.1]:34015 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kpdz6-00047q-4S for submit@debbugs.gnu.org; Wed, 16 Dec 2020 16:05:20 -0500 Original-Received: from relay8-d.mail.gandi.net ([217.70.183.201]:45063) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kpdz0-00047A-VC for 45256@debbugs.gnu.org; Wed, 16 Dec 2020 16:05:16 -0500 X-Originating-IP: 91.129.99.98 Original-Received: from mail.gandi.net (m91-129-99-98.cust.tele2.ee [91.129.99.98]) (Authenticated sender: juri@linkov.net) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id 4CC3A1BF205; Wed, 16 Dec 2020 21:05:06 +0000 (UTC) In-Reply-To: <87360615l3.fsf@gmx.de> (Michael Albinus's message of "Wed, 16 Dec 2020 10:08:08 +0100") 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" Xref: news.gmane.io gmane.emacs.bugs:196225 Archived-At: > That is, two calls of timer-event-handler([t 0 1 0 nil image-fit-to-window ...]) > > image-fit-to-window calls remote file operations, > verify-visited-file-modtime the first time, file-readable-p the second > time. The first call of image-fit-to-window hasn't finished, when the > second call of image-fit-to-window happens one second later. That is > relevant, this situation happens only for slow remote connections (I had > a hard time to reconstruct the scenario). > > From my pov, image-fit-to-window must be hardened in order to avoid this > reentrant call. Maybe an internal lock at entry, which is honored by > every next call until the lock is removed. The simplest solution is just to increase the number of seconds in the user option 'image-auto-resize-on-window-resize' proportionally to network latency. Locking could be implemented as well. How would be better to do this? Maybe by using a buffer-local variable?