From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id AG31JN+EvWGiewAAgWs5BA (envelope-from ) for ; Sat, 18 Dec 2021 07:51:11 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id kHmKIN+EvWHqdgAAbx9fmQ (envelope-from ) for ; Sat, 18 Dec 2021 06:51:11 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 34F0A844 for ; Sat, 18 Dec 2021 07:51:11 +0100 (CET) Received: from localhost ([::1]:50484 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1myTYk-0000tC-9s for larch@yhetil.org; Sat, 18 Dec 2021 01:51:10 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52872) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myTUu-0000t2-16 for emacs-orgmode@gnu.org; Sat, 18 Dec 2021 01:47:12 -0500 Received: from ciao.gmane.io ([116.202.254.214]:51890) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myTUr-0001DN-QM for emacs-orgmode@gnu.org; Sat, 18 Dec 2021 01:47:11 -0500 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1myTUq-0006Wi-5Y for emacs-orgmode@gnu.org; Sat, 18 Dec 2021 07:47:08 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Lele Gaifax Subject: Re: org-persist cache for remote files Date: Sat, 18 Dec 2021 07:46:53 +0100 Organization: Nautilus Entertainments Message-ID: <87ilvmqujm.fsf@metapensiero.it> References: <87o87kb64s.fsf@yandex.com> <87tuhcfc3n.fsf@localhost> <87czo0nqw4.fsf@yandex.com> <87o87kchi2.fsf@localhost> <8735owawla.fsf@yandex.com> <87lf2oc9sv.fsf@localhost> <87ee8fncmw.fsf@yandex.com> <87fssvdfxj.fsf@localhost> <87wnk3c58c.fsf@metapensiero.it> <87bl1eilt6.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cancel-Lock: sha1:0iGtxTsXiEeddUEHjgRFsKj04R4= Received-SPF: pass client-ip=116.202.254.214; envelope-from=geo-emacs-orgmode@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1639810271; h=from:from:sender:sender: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: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=LOF0dcgm/RP79s2abRQjPThL4TE/hHXFwF1wO6KdQiw=; b=Kgt4fMLNM21OK02fg8Y+PC+9pI5z/9G6kCDunEnA38TK4sGKAcCjMhJGche4RfDl17MxOu 7hSaCsa3yVRoKIK+z84J/uCTQnopaG8GuEMI0FxvzYZ5/lW2apVR9uoKxZjA0U4uNLEfnV 4VsmvirF0eD/BnHn72zKIY38WdBB30nla//n/dzH62teYlQK4M7HXEhZIJYYzIjszWyxc5 CYiWIgRjeN24bJsWWUG8TcAd4miMJTDuaKsczIllPqL++iE5BfWbocM3OTxKYy9vrtXN+X lBq4ZXaIa49gjXLx+DBiwt5cLKRSQYDWUFLBFuel0xTu5Zo8p6aYz5omMxi+2g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1639810271; a=rsa-sha256; cv=none; b=Jv6leMHRnxCXLn/NTn6xtgCAHcMk0p8FMVh6yXk8XUOT5+/VaOjmYIDPshGLS8TARe7rbI OX79J1VXSEde7HZvIC/7mfZfTEbJo+7P0FdNnRjgcSpY1QBft5Ft8l2yp8DDNqPZEahEuk GEzVTqnQZV4LCQmecRcGjIleexiPIm82d8/HySIwDE0DDCF30smZlGd0y4jvd+4e8iIQ4l J6EwqVmoLPnaWO/AN4HGYtx7p4QNYMmz2YNIn0NIN6mJtzXmQQRWYvmjevewXDqi0b52N/ MMYZX/b9nQ+IBB45c31LqMpYT3FJixSeiZx6DetCvzFIeMgHEq4mlNWoBf7Ldg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.50 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 34F0A844 X-Spam-Score: -2.50 X-Migadu-Scanner: scn0.migadu.com X-TUID: I5mvxHEifJjz Ihor Radchenko writes: > Lele Gaifax writes: > >> I wonder if there is some mechanism I could use to either prevent caching >> of non-local documents or to avoid the check on existence in the >> org-persist-gc. > > I can easily make a change that always garbage-collect non-local > documents without trying to connect to remote server. This can be one > solution of your problem. However, I am not sure if it is the best > solution. > > May I know more about your use cases? Do you frequently open large > remote Org files? If you do, trashing their cache may not be optimal. I do not open remote Org files very often, but surely happens now and then, typically from my laptop to see/edit something I keep on my desktop PC. > Maybe we should better make this a user option? Yes, that's what I had in mind: when (say) org-persist-do-not-auto-gc-remotes is enabled, the cleanup procedure would ignore remote Org documents and a new explicit (interactive) org-persist-gc-remotes would take care of them. > Or we can go a different route and just not garbage collect remote files > until cache gets too large. Yes, a threshold would work too. Thanks a lot, ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia. lele@metapensiero.it | -- Fortunato Depero, 1929.