From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id iI8lJwqZgWE1WQEAgWs5BA (envelope-from ) for ; Tue, 02 Nov 2021 21:01:14 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id KAabIgqZgWEHfAAAbx9fmQ (envelope-from ) for ; Tue, 02 Nov 2021 20:01:14 +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 DAE5A2A280 for ; Tue, 2 Nov 2021 21:01:13 +0100 (CET) Received: from localhost ([::1]:59006 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mhzy5-0000cy-2x for larch@yhetil.org; Tue, 02 Nov 2021 16:01:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36844) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mhzxa-0000ch-NO for emacs-orgmode@gnu.org; Tue, 02 Nov 2021 16:00:42 -0400 Received: from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d]:42910) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mhzxZ-0001Yz-4e for emacs-orgmode@gnu.org; Tue, 02 Nov 2021 16:00:42 -0400 Received: by mail-pl1-x62d.google.com with SMTP id u17so506511plg.9 for ; Tue, 02 Nov 2021 13:00:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=references:user-agent:from:to:subject:date:in-reply-to:message-id :mime-version; bh=j4yhLWSS4meniStCtJv8Tlboq8RXUPbrbiptG5EZjqI=; b=mUvLJ3e+aq5AD3TWd1V8Ooz3fGJ4F2hnN2tNnOLEbIzBJwIvPfVv8YbnU1+cueAFDP FKl5Rph+qGMSAUsbt8HbT+u+hanvb3A2JR2ZszyEEZKJEvXdGj0bL4Gf3+THTkt/YN0p r4GynKhL7kWXD6yeV6eTKxcBog8276DUEloUoAlqay1B01q1SbF5+Aakw4KwDZhzdCx5 SB6F4Vgwh//0X74ihQRTTItS7YyqXo7JQptBlIWOuy46igcKclbzBga/ch3xV9YeevhP tNT1Gkg5mKcutYr5ZCtLpEAA7nf+r5nk+kFzOKGedciZKiHQgjV0nWbj7U30zT6Nv2wk KVAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:references:user-agent:from:to:subject:date :in-reply-to:message-id:mime-version; bh=j4yhLWSS4meniStCtJv8Tlboq8RXUPbrbiptG5EZjqI=; b=kTlvaYrr1BjSWPmPrcsrI7d+kOIjVnAWTIOxJX9VXSPsjR4jvusz9Um1jYcZc5bdOY gZCg87OfjKqy+R1NzozM84wNPekautF0CYL448+RKwa+lrvBhTxdwTHHxBs7wHK56uS0 vb9aLE9bs/Z6x41d8PWXKmeLw4YLzdBHQaARYOStUUVDg9IhLob7vUbB+IpMpfMucgUm KJQSVHm97tis86dC+DYLcylA97ZkxE1b7E+exz85RRiQJyjqVF6yFOmozynXsvR5lj5I 7eNHCIpRBlqPq8JExIOsRkehE4DE3jZjDycVtHqxgKv3681zBZ+g0fVtydjM0l+Oi3ok kf6g== X-Gm-Message-State: AOAM532GLHcHX0aZ6Mnw62IgEl2YmT1bs5c4iVvyLccz4mfk1kOyBRXP NW4DHjCfQ+fegwhxRRXkg7yscD3Huuk= X-Google-Smtp-Source: ABdhPJw3L1zFYbU0v7cfH5n+Ef2EZQ8zmw1Y7JfWJfGj3lfoEM0fMuiU860CfNUwkWnDoHXpIJuPKQ== X-Received: by 2002:a17:90b:3509:: with SMTP id ls9mr9450164pjb.99.1635883238999; Tue, 02 Nov 2021 13:00:38 -0700 (PDT) Received: from dingbat (2001-44b8-31f2-bb00-748c-ba10-246a-b2e5.static.ipv6.internode.on.net. [2001:44b8:31f2:bb00:748c:ba10:246a:b2e5]) by smtp.gmail.com with ESMTPSA id l1sm16660694pgt.39.2021.11.02.13.00.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Nov 2021 13:00:38 -0700 (PDT) References: <877ddsazc9.fsf@localhost> <87ee7yaksm.fsf@localhost> User-agent: mu4e 1.7.4; emacs 28.0.60 From: Tim Cross To: emacs-orgmode@gnu.org Subject: Re: [BUG] Org V 9.5 error when ~/.cache doesn't exist Date: Wed, 03 Nov 2021 06:46:39 +1100 In-reply-to: <87ee7yaksm.fsf@localhost> Message-ID: <8735oe72g1.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::62d; envelope-from=theophilusx@gmail.com; helo=mail-pl1-x62d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1635883274; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=j4yhLWSS4meniStCtJv8Tlboq8RXUPbrbiptG5EZjqI=; b=qPsso8tBOQI+pdHvivf9IzpkC7+zI8JwBR6nEvzwzYDKXugLaZXXZjoF3H5aD5bUw8hRC8 V4i6LAOzbMZi0pIJf2111td+7K7XKsyJCXYwMuZaNmeWNeOExCqqq3YcN1Ya8TtNg5fRGP 5q6PzDjZKTdSpmYCzIa/Sy6yf+QdxNnT3YLxVw1acJqU4ulwCLtpJJbZtkjicFVL3Fb2fO zwWw4/YMP0ZUCJqABh+cZ17M6Ty0MZRWIeftaGLfVKR0N07QlTfBMTkGKLmv1yDuDgZxyY 5WcNNgOKlWf1lYRRVknqm614iPN/NiCCoKbpn8tRNpsiQtKuVgvQDbbaljAlPA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1635883274; a=rsa-sha256; cv=none; b=Pff3eof4fHrYcBIPsHEKpD7kVfW26bDtFyeVIRqVr4rKJA+8LjiFKRn8TQ8gv/26XXpMgd qNssp117F9KePw4CMQXd5sZxTG1P5zXA8WQPci1N265Xa70wxJh9GERbArlmad84y2Guse XQk25MpRTbp2fcCnQgyY74yzFl63nrAY++sD/6Vg1wUaYhgsOGc+0CM9K+uF/YsUKFy1CY L1PGzbtHxlzmoagxdMNlfXPDLITKNv/DKZBsvnBTxWQQBR/eUK29iEsUi0Oa3SyLOzogs0 SgqanV4wsrfTmhdaLHKg226GUzLOa3mr4jbxqscp7QLAN0PczuLKWAd85k6A9A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=mUvLJ3e+; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -3.12 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=mUvLJ3e+; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: DAE5A2A280 X-Spam-Score: -3.12 X-Migadu-Scanner: scn0.migadu.com X-TUID: jAYdgMm46JEV Ihor Radchenko writes: > Max Nikulin writes: > >> Ihor, your fix affects linux as well. .cache directory may be missed in >> fresh accounts. E.g. I just have created a new test container (my old >> one has emacs-25): > > After second thought, I am not sure anymore if using XDG is a good idea. > Emacs itself only recently started supporting XDG and the support is > somewhat limited. Similar to the described case with non-existing .cache > directory, Emacs ignores non-existing .config/emacs folder for init.el. > Emacs never creates .config directory. > > So, I can see several options for Org: > 1. Just move to back usual usage of user-emacs-directory and store the > cache there > 2. Use the same approach with Emacs: if $XDG_CACHE_DIR/org-persist > exists and user-emacs-directory/org-persist does not, use the XDG > dir. Otherwise fall back to user-emacs-directory > 3. Same as 2, but only require existing $XDG_CACHE_DIR and create > $XDG_CACHE_DIR/org-persist dir if possible. > 4. Same as 3, but create $XDG_CACHE_DIR if possible. It is similar to > other XDG-complient software (at least, that's what I saw in > qutebrowser code). > I think the key is to be consistent with user expectations. If the user's init.el is under XDG layout, then use that, otherwise use user-emacs-dir. This is slightly different to your No. 2, as I suspect in the first run of org, it could be possible that init.el is under XDG layout, but there is no org-persist yet. Most important requirement would be that the location is a custom variable, allowing easy customisation for those who want to set it explicitly.