emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master f8fed41 2/3: image-dired: Improve XDG compliance


From: Stefan Kangas
Subject: Re: master f8fed41 2/3: image-dired: Improve XDG compliance
Date: Tue, 26 Oct 2021 18:13:41 +0200

Eli Zaretskii <eliz@gnu.org> writes:

> 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.

That looks like a nightmare, yes.

> 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'm not seeing any other volunteers, so let me have a crack at it.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]