From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id kD+lKzMZgWFpJAAAgWs5BA (envelope-from ) for ; Tue, 02 Nov 2021 11:55:47 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id AP1OJzMZgWE3EAAA1q6Kng (envelope-from ) for ; Tue, 02 Nov 2021 10:55:47 +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 062861497C for ; Tue, 2 Nov 2021 11:55:47 +0100 (CET) Received: from localhost ([::1]:46248 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mhrSD-0001Cy-5b for larch@yhetil.org; Tue, 02 Nov 2021 06:55:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39572) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mhrR4-0007k9-OG for emacs-orgmode@gnu.org; Tue, 02 Nov 2021 06:54:34 -0400 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]:34793) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mhrR1-00064l-Qp for emacs-orgmode@gnu.org; Tue, 02 Nov 2021 06:54:34 -0400 Received: by mail-ed1-x52f.google.com with SMTP id g10so74155620edj.1 for ; Tue, 02 Nov 2021 03:54:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=vzNnry3gpBbeVX9m9tcHDBhbXFtsezrigLJvsnUZV5c=; b=Pj5HMX1QwIc2dcQkSZZII7Tfa0ON/Vf78SW4b3OYHh/loVYZzbJlW80otODl6M/xP+ LCqyQmDMa6s9z3mwlWlqbsYn5oGZKGPTJTigkUIzT0u5n/22KnMnuY5Rc4J2PEPrDkZL bN5QNujv3k+cJxQSqi2YtagH2ysWDv2jg9hNytS8A0d8dfHDj2ceIOyRVLwVJXU4Ij62 ipvVDMyIf9mEcHLqfmdx3WzQ5jL0trOnxbZ5M91M9/XEmnBTmXOuG0McTnddLENDClWO j4r5v3JZ986UaP+trU1Z2H5b9m6dqfC1MlZCH7D388UgRFSUozE5LPntIgkj54xfky0s rilw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=vzNnry3gpBbeVX9m9tcHDBhbXFtsezrigLJvsnUZV5c=; b=LhrYBaiZGdnfzo09ZpSWYJo1Y/IultXlK9+Kc4Q5laEO8+3YO1X4J81K+Qts4FqBE3 MS1QAbceElvKhCMAaLABwsFwJEjH74KJUuvWnR/Hjrn7hRlndqu54u3I1LBS8yyqk8vL 3Jnx5cnro3LTuON36eKTQLYD/QD9EH8CwIkVqwYZHFY+ZR/BsY+Dbc6I5Rz40dhr50ND zUZIEDsmana6bHIRqedSp/uPGfbLYivZHIU6TJo7mGXq6KzLxSqVdDEYpaZFc4iAchRJ 0W63ZG/79DDusDWE5yS0TwcTDRsgqdSyud8+5YVSPkTTyqkwGRHO1viSWXczn1qTYf/Y e+lg== X-Gm-Message-State: AOAM530foE1swl2ccLTeyIaU+V0dCrLBQLgeqHn8o3PyXRkx6eOmhqZK ojc5WcVSHNxyQ6+4zLHcY8w= X-Google-Smtp-Source: ABdhPJw+pNYB+btNsAWRgcyj5TmRj4k0SD2/lS0BspXbOrIMrSqSt+FjShhFF/xXmAPTfTz3r+kN+g== X-Received: by 2002:a05:6402:35cb:: with SMTP id z11mr1475465edc.188.1635850468707; Tue, 02 Nov 2021 03:54:28 -0700 (PDT) Received: from localhost ([91.210.107.150]) by smtp.gmail.com with ESMTPSA id h7sm10263823edt.37.2021.11.02.03.54.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Nov 2021 03:54:28 -0700 (PDT) From: Ihor Radchenko To: Max Nikulin Subject: Re: [BUG] Org V 9.5 error when ~/.cache doesn't exist In-Reply-To: References: <877ddsazc9.fsf@localhost> Date: Tue, 02 Nov 2021 18:55:53 +0800 Message-ID: <87ee7yaksm.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::52f; envelope-from=yantar92@gmail.com; helo=mail-ed1-x52f.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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_ENVFROM_END_DIGIT=0.25, 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: , Cc: emacs-orgmode@gnu.org 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=1635850547; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=vzNnry3gpBbeVX9m9tcHDBhbXFtsezrigLJvsnUZV5c=; b=XEOJZ6u3Huw/+GqVHF4adqzkcujtDakcMSJ0N3/gsYwU6Y8ljsqsDlBaMd05sApWzqwjn8 2Iup5KsoMqXBHbggu3iuEq21+DLRAZ+819wbJlbTdysvNlizxavIpErsIKoUl/fYUl7jY9 k6ceuU1b6TUhnevC+K1PGCprcIX2jSPR8yTQ7jIU59P6zbzPHac+1o0KT6pkM2ammx7EJn 3TQw2Mf2SVCa+s3cH79dBF+AIofGibpUtt7y6Czx4r7Ol1++BC5oiY4cOD3LeBB2Lbfhsf 1CCN4/PWtrgWHc72U4s4JXI+Kwt5RKElj8A5ZMasCqOUu1IXqkr0ON48bfexxg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1635850547; a=rsa-sha256; cv=none; b=BO3yG/EjIOefL2029sY8Fj2QIPZNRoQ1cMja65MoEpaIA/a+hF8HL9E00d7S1H7fV3UrTL ndLJl47nTov6lkmI8vpqV1M1sZGXu+bXmH0EIDaYLFQgPui0gOTCZdel/P26V5moinZ8TY fr+eWE09ECMAQb0PX8nAjctxb9kJuvCrW/a51LMM/EHJhoctj7nju5r6IaNmy8qbgRoLNX OnWnO2aqqmocfKs5NqH2OATP2ry8agrx5jbziCj/7fX7LSSHiRHZ5fImG1vJwzCn/K7PL8 oUxwFM5jQneTUsPClnn2gaZ6SyyrvKFVR90xLKZPxo4n/QKmFy6wQR1mAf78zw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Pj5HMX1Q; 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: -2.62 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Pj5HMX1Q; 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: 062861497C X-Spam-Score: -2.62 X-Migadu-Scanner: scn0.migadu.com X-TUID: 4abUfJFm3/C4 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). WDYT? Best, Ihor