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 yK4JAk/yvWFAHAAAgWs5BA (envelope-from ) for ; Sat, 18 Dec 2021 15:38:07 +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 +EcxOU7yvWHAMgAAbx9fmQ (envelope-from ) for ; Sat, 18 Dec 2021 14:38:06 +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 B6016924F for ; Sat, 18 Dec 2021 15:38:06 +0100 (CET) Received: from localhost ([::1]:58064 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1myaqb-00083v-U5 for larch@yhetil.org; Sat, 18 Dec 2021 09:38:05 -0500 Received: from eggs.gnu.org ([209.51.188.92]:39694) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myapb-000821-QC for emacs-orgmode@gnu.org; Sat, 18 Dec 2021 09:37:05 -0500 Received: from ciao.gmane.io ([116.202.254.214]:38940) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myapW-0003Wx-4S for emacs-orgmode@gnu.org; Sat, 18 Dec 2021 09:37:03 -0500 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1myapT-0008Gi-G1 for emacs-orgmode@gnu.org; Sat, 18 Dec 2021 15:36:55 +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 15:36:47 +0100 Organization: Nautilus Entertainments Message-ID: <87ee6aq8sg.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> <87ilvmqujm.fsf@metapensiero.it> <87y24i2dv1.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:q8zX6IeeC4wbNog0LLFFs8j7450= 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=1639838286; 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=/aSMXWnE3NBvzLZlczrEfrQNxhkm5N30IyVIH0J6mN4=; b=rQNMsPwAEt2zzaIypi0LLAjErbXJTqksgo14t4PSPMtPCiCkbWK+lIQn9L7rpwOABaBqCQ 0jMbIX+z2Qmsyr6RL/KyRMNyx15ciRVx23rFG4bq64J1d9uPsftxb46+NqkG3oSO9P7oFM 3IRoEieuSsGQMHAbs3hEBMz2yX4onoVLDA7l2/hL7+LJ7Ur+NgAyQlpAcKTnN5kTPPq/3d G2kmTM/8edumqfWkUk8ikm7QlDidJT1UU9DaP6H6blC8eupz9pPwu7tDGknlawo/IFBBaP fzu0UXsEC0DwjsXoOIDBiDfi/n09bOQKKm0QpKc+CxwXRl9E16p033nMsPa8RQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1639838286; a=rsa-sha256; cv=none; b=M/I6GxcExLxGB4ROXJum9g3GoE1aUEIYtIcbUwBkgpEEGP6pjCz8Vw1zHWh2PvaiDyqCjh WtMC9wyh8x9eTLpm2yNLigtyW5KstLiK23mfEzT44fWGt4/Q+P7jo/bz/jkdHBNv1XYN94 uTzKmgOA2xVKSvAhDrVGWs1ai0vifN2nnsZ9SoWY+ZuhXxG0KNpR/DUwNXf7E7ytYSqhh9 yjWEYDsNcVW7mtur4tOax6I0EWqLLOGve2D+sisoTsWWZexneYlEP0ka7pKT2JwmpMfjUf S0mFwYELDeRVlloUhw1R+OAlaLWxjOvbXD6xB/HgNkYRp9uRe0k+z0czWSxBIg== 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.51 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: B6016924F X-Spam-Score: -2.51 X-Migadu-Scanner: scn0.migadu.com X-TUID: sRyjry+g9Ekj Ihor Radchenko writes: > Lele Gaifax writes: > >>> 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. > > Can you test the attached 2 patches? They do not seem to break local > files, but I do not have remote file caches to test on. Yes, I'll be able to do some test in a couple of hours. Thank you! In the meanwhile, here below some notes: > ... > Subject: [PATCH] org-persist.el: Customise persistence of data for remote > files > > * lisp/org-persist.el (org-persist-remote-files): New defcustom > defining strategy for persisting data associated with remote files. > Separate strategy is necessary to avoid unexpected password promtps > while garbage collecting the cache: remote files may require server > login. > ... s/promtps/prompts > ... > +(defcustom org-persist-remote-files 100 > + "Whether to keep persistent data for remote files. > + > +When this variable is nil, never save persitent data associated with > +remote files. When `t', always keep the data. When > +`check-existance', contact remote server containing the file and only > +keep the data when the file exists on the server. s/check-existance/check-existence Also, shouldn't the doc mention the meaning of the numberp, expecially since that's the default? > +Note that the last option `check-existance' may cause Emacs to show > +password prompts to log in." Thanks again, bye, 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.