Subject: bug#71732: 30.0.50; [FR] xdg: provide an ability to create XDG directory, if it does not exist

From: Ihor Radchenko <[email-masked]>
Date: Sun, 23 Jun 2024 09:40:49 +0000

Follow-up from "Please document the caching and its user options"
https://yhetil.org/emacs-devel/[email-masked]/

Currently `xdg-cache-home`, and other functions in xdg.el only return
the path, but never create any directories.

However, to follow XDG spec, XDG directories must follow certain
rules. In particular:

    If, when attempting to write a file, the destination directory is
    non-existent an attempt should be made to create it with permission
    0700. If the destination directory exists already the permissions
    should not be changed.
  https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html

May you please add a functionality to xdg.el to create the directory
with right permissions, so that xdg.el users do not need to know these
technical details of the spec?

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>