emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Tim Cross <theophilusx@gmail.com>
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	[thread overview]
Message-ID: <8735oe72g1.fsf@gmail.com> (raw)
In-Reply-To: <87ee7yaksm.fsf@localhost>


Ihor Radchenko <yantar92@gmail.com> writes:

> Max Nikulin <manikulin@gmail.com> 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.


  reply	other threads:[~2021-11-02 20:01 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-31 19:18 [BUG] Org V 9.5 error when ~/.cache doesn't exist [9.5 (9.5-gd4e192 @ c:/Users/scott/.emacs.d/straight/build/org/)] Scott Otterson
2021-11-01 11:29 ` Ihor Radchenko
2021-11-01 15:44   ` [BUG] Org V 9.5 error when ~/.cache doesn't exist Max Nikulin
2021-11-01 16:30     ` Ihor Radchenko
2021-11-01 16:31       ` Ihor Radchenko
2021-11-02 10:55     ` Ihor Radchenko
2021-11-02 19:46       ` Tim Cross [this message]
2021-11-03 16:07       ` Max Nikulin
2021-11-05 13:27         ` Kaushal Modi
2021-11-05 13:29           ` Kaushal Modi
2021-11-05 13:32           ` Kaushal Modi
2021-11-05 13:50             ` Ihor Radchenko
2021-11-05 22:08               ` Kaushal Modi
2021-11-05 22:13               ` Tim Cross
2021-11-10  2:23       ` Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8735oe72g1.fsf@gmail.com \
    --to=theophilusx@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).