[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 17:28:18 +0300 |
> From: Stefan Kangas <stefan@marxist.se>
> Date: Tue, 26 Oct 2021 16:01:50 +0200
> Cc: Emacs developers <emacs-devel@gnu.org>
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> > XDG is also prone to fashion changes. What will we do when it goes
> > out of fashion, and we have dozens of xdg-user-dir calls in our
> > application code? change all of them to some latest desktop fashion?
>
> Yes, that's what we should do in that case.
I'm quite astonished to read this, coming from an active Emacs
developer. It's basically an antithesis of good maintainability.
> Such work will be much
> easier if we have already adapted our code to use the xdg
> specification: if you move xdg.el to "lisp/obsolete" the byte-compiler
> will warn about any places where we use it. But we have no easy way
> to find strings like "~/pics", and therefore can't easily update them.
I didn't propose to have hard-coded strings like "~/pics", not at
all. I proposed to have a couple of higher-level APIs that will hide
system-dependent stuff, including hard-coded strings if some systems
need that. xdg.el will then be one layer lower, and application code
will not call it directly.
> In other words, if we expect the standard to change very soon, it is
> already a step forward to update hardcoded strings like "~/pics" like
> I did in image-dired.el.
These "semi-standards" change quite frequently, and we should be
prepared for the next change in advance, even if we don't know when
will that happen.
> However, I don't really see any reason to expect a replacement to the
> XDG Base Directory Specification (XDG BDS) any time soon. As Philip
> points out, it has only become more ubiquitous over the almost 20
> years since its inception, and no replacement is on the horizon.
> Therefore, this all seems very academic to me, and I think the points
> below about other platforms are more immediately relevant.
Good maintainability is not an academic subject, it is pretty much in
our face here.
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 <=
- 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