From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.bugs Subject: bug#71732: 30.0.50; [FR] xdg: provide an ability to create XDG directory, if it does not exist Date: Sun, 23 Jun 2024 09:40:49 +0000 Message-ID: <87pls8uhcu.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40407"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , =?UTF-8?Q?Bj=C3=B6rn?= Bidar To: 71732@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jun 23 11:40:21 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sLJhs-000ADU-O9 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 23 Jun 2024 11:40:20 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sLJhc-00082a-9j; Sun, 23 Jun 2024 05:40:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sLJha-00082N-Sr for bug-gnu-emacs@gnu.org; Sun, 23 Jun 2024 05:40:02 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sLJha-0002uS-Ju; Sun, 23 Jun 2024 05:40:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sLJha-0000vJ-Js; Sun, 23 Jun 2024 05:40:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: eliz@gnu.org, bjorn.bidar@thaodan.de, bug-gnu-emacs@gnu.org Resent-Date: Sun, 23 Jun 2024 09:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 71732 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org X-Debbugs-Original-Xcc: Eli Zaretskii , =?UTF-8?Q?Bj=C3=B6rn?= Bidar Original-Received: via spool by submit@debbugs.gnu.org id=B.17191355553431 (code B ref -1); Sun, 23 Jun 2024 09:40:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 23 Jun 2024 09:39:15 +0000 Original-Received: from localhost ([127.0.0.1]:51720 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sLJgp-0000tH-6F for submit@debbugs.gnu.org; Sun, 23 Jun 2024 05:39:15 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:49296) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sLJgn-0000t4-H7 for submit@debbugs.gnu.org; Sun, 23 Jun 2024 05:39:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sLJgm-0007xU-U9 for bug-gnu-emacs@gnu.org; Sun, 23 Jun 2024 05:39:12 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sLJgk-0002qp-GD for bug-gnu-emacs@gnu.org; Sun, 23 Jun 2024 05:39:12 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id A16D7240103 for ; Sun, 23 Jun 2024 11:39:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1719135546; bh=e9XeT/ymDqOi45OL+z2IqNejxxNEJ8HgtL5semve2Ks=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:From; b=enZ6FV5WmkmgMCVaYMcAZP2X+nAQcBFNZvXIiWxnoXDOj62ENl5GPNy4FlBlswS5w 2qpyEa0GJLG+7zgvwtpT3Nc6yoRJWfhZrRDTWeN5HoiF6VX2DKE3/OxHRZyM2s3BC3 Uo3CKRXYLiwsiNC+hayAu1aYHA4h+KZ1fsQqZAHtvCatZ8gjrA/GIW364i4x89GXI7 ha+34Df/adv7IIkWa6ETTcZknP0W3Qjk9L3XUbdOwBv7xcvGXkXfH2S9BHuiCwbgS1 2PAaTP41sClmkwFzbg3GlIL32hKYwfLtho5SSFGx2TaRuypj10E+Mw+QQoeuEvcT11 KKya2HwLUUjGg== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4W6Qyy1GSdz6tyn for ; Sun, 23 Jun 2024 11:39:06 +0200 (CEST) Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:287769 Archived-At: Follow-up from "Please document the caching and its user options" https://yhetil.org/emacs-devel/86le35rwyp.fsf@gnu.org/ 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 . Support Org development at , or support my work at