[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: master f8fed41 2/3: image-dired: Improve XDG compliance
From: |
Eli Zaretskii |
Subject: |
Re: master f8fed41 2/3: image-dired: Improve XDG compliance |
Date: |
Tue, 26 Oct 2021 19:00:47 +0300 |
> From: Stefan Kangas <stefan@marxist.se>
> Date: Tue, 26 Oct 2021 16:24:30 +0200
> Cc: Emacs developers <emacs-devel@gnu.org>
>
> Eli Zaretskii <eliz@gnu.org> 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?
- Re: Default for image-dired-main-image-directory, (continued)
- Re: Default for image-dired-main-image-directory, Ihor Radchenko, 2021/10/26
- Re: Default for image-dired-main-image-directory, Eli Zaretskii, 2021/10/26
- Re: Default for image-dired-main-image-directory, Stefan Kangas, 2021/10/26
- Re: Default for image-dired-main-image-directory, Ihor Radchenko, 2021/10/26
- Re: Default for image-dired-main-image-directory, Eli Zaretskii, 2021/10/26
- Re: Default for image-dired-main-image-directory, Stefan Kangas, 2021/10/26
- Re: Default for image-dired-main-image-directory, Eli Zaretskii, 2021/10/26
Re: master f8fed41 2/3: image-dired: Improve XDG compliance, Stefan Kangas, 2021/10/26
Re: master f8fed41 2/3: image-dired: Improve XDG compliance, Eli Zaretskii, 2021/10/26
- Re: master f8fed41 2/3: image-dired: Improve XDG compliance, Stefan Kangas, 2021/10/26
- Re: master f8fed41 2/3: image-dired: Improve XDG compliance, Eli Zaretskii, 2021/10/26
- Re: master f8fed41 2/3: image-dired: Improve XDG compliance, Eli Zaretskii, 2021/10/26
- Re: master f8fed41 2/3: image-dired: Improve XDG compliance, Stefan Monnier, 2021/10/26
- Re: master f8fed41 2/3: image-dired: Improve XDG compliance, Eli Zaretskii, 2021/10/26