From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: master f8fed41 2/3: image-dired: Improve XDG compliance Date: Tue, 26 Oct 2021 19:00:47 +0300 Message-ID: <83pmrrydw0.fsf@gnu.org> References: <83sfwp1c27.fsf@gnu.org> <83tuh3yil6.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30512"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Stefan Kangas Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Oct 26 18:07:58 2021 Return-path: Envelope-to: ged-emacs-devel@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 1mfOzV-0007gp-Jr for ged-emacs-devel@m.gmane-mx.org; Tue, 26 Oct 2021 18:07:57 +0200 Original-Received: from localhost ([::1]:55852 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mfOzU-0007Xc-Ez for ged-emacs-devel@m.gmane-mx.org; Tue, 26 Oct 2021 12:07:56 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56158) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mfOsh-0007oi-M0 for emacs-devel@gnu.org; Tue, 26 Oct 2021 12:00:56 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:60604) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mfOsh-0000k2-5Z; Tue, 26 Oct 2021 12:00:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=VBimFy7DNiVKEjoPpjkkYuTitotBjTsf0txGclFEfOQ=; b=dF7TP3KLX4sE JnV98koFF5DbgM5lUSCbWsYBVF+BcmUXveHTY5RwS7vr7EH0pHHljw01VGza2x/PgxQ0tBrP5cedA IsGmHlg2kKwIatSqlumlSch6c12zhiO9y879pRLiy95pMZpYl3QRb0yR7Mspga5gORi4hx/T5g6Yq cGINKKnWHWiPm9iM9dGBMPM/+rtfsR6JDkQKO5CCmvdFIWVXASDRxWF+f2QwlyKpJYvXpaHHwcsLH SzgAGhrZ7EBiqVqIJ6sPzcwZQeY3l/4zUWOzuoc6htY5+UecirMFmIbNVL5ljJI1FIbKR+0S34DpU bZwJgYegBZkp7OEOC5DXNQ==; Original-Received: from [87.69.77.57] (port=4422 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mfOsf-0004Y2-1v; Tue, 26 Oct 2021 12:00:54 -0400 In-Reply-To: (message from Stefan Kangas on Tue, 26 Oct 2021 16:24:30 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:277881 Archived-At: > From: Stefan Kangas > Date: Tue, 26 Oct 2021 16:24:30 +0200 > Cc: Emacs developers > > Eli Zaretskii writes: > > > I'm against seeing more and more > > xdg-FOO stuff in the application code. That's not why we agreed to > > include it in Emacs. > > I don't see why: as I explained, this will make implementing your idea > easier, not harder. Right? No. What will happen is we will see the proliferation of the likes of this: (cond ((eq system-type 'windows-nt (or (w32-read-registry 'HKCU "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders" "Personal") "~/../My Documents" "~/../../Documents")) ((eq system-type 'darwin "~/Documents")) (t (xdg-documents-directory))) and similarly for other standard directories, in our application code. I really hope this is not what we want to see there. My idea was to hide all this platform-specific ugliness under a standard API, such as (user-std-directory 'DOCUMENTS) or maybe a set of APIs like (user-documents-directory), (user-music-directory), etc. I thought it will be a no-brainer that using the latter will be both cleaner, more readable, and easier in maintenance; am I the only one who thinks so?