all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: master f8fed41 2/3: image-dired: Improve XDG compliance
@ 2021-10-25 13:14 Eli Zaretskii
  2021-10-25 16:14 ` Philip Kaludercic
                   ` (2 more replies)
  0 siblings, 3 replies; 63+ messages in thread
From: Eli Zaretskii @ 2021-10-25 13:14 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: emacs-devel

I can't say I'm happy with creeping of XDG specifics into our
application code.  It's too platform-specific, so it gets in the way
of either adhering to platform-specific directories on each platform,
or having completely platform-independent identical directories on all
platforms.  Both of these alternatives could be useful, but XDG
provides neither: it only caters to a single platform, and leaves the
rest to manual coding.  Here's the result:

  (defcustom image-dired-main-image-directory
    (or (xdg-user-dir "PICTURES") "~/pics/")

Why "~/pics/"?  What platform behaves like that?  Probably none.

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?

To me, xdg.el was supposed to be a platform-specific layer on which to
base platform-independent abstractions.  Those abstractions should
have other platform-specific layers for other platforms, and the
abstractions should then be used in application code.  So when
fashions change on this or that platform, we need to change only the
code that implements the abstractions.  Our handling of XDG in
startup.el to find the user's Emacs home directory fits this
description; code like the above does not.

Can we agree not to use xdg.el in application code, and instead
develop those abstractions and start using them?  For example, how
about having a function user-pics-directory, which will return the
appropriate file name for the underlying platform?  Doing that will
not diminish our support for XDG (as long as it lasts), but will allow
us to have application code XDG-clean, so to speak.

OK?



^ permalink raw reply	[flat|nested] 63+ messages in thread

end of thread, other threads:[~2021-11-11 10:34 UTC | newest]

Thread overview: 63+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-25 13:14 master f8fed41 2/3: image-dired: Improve XDG compliance Eli Zaretskii
2021-10-25 16:14 ` Philip Kaludercic
2021-10-25 16:39   ` Eli Zaretskii
2021-10-25 17:52     ` Philip Kaludercic
2021-10-25 18:30       ` Eli Zaretskii
2021-10-26 10:24         ` Stefan Kangas
2021-10-26 13:09           ` Eli Zaretskii
2021-10-26 13:28             ` Stefan Kangas
2021-10-26 14:11               ` Eli Zaretskii
2021-10-26 14:35                 ` Stefan Kangas
2021-10-27  4:37                   ` Po Lu
2021-10-26 16:47         ` Philip Kaludercic
2021-10-26  2:07       ` Po Lu
2021-10-25 17:48   ` Stefan Monnier
2021-10-25 17:55     ` Philip Kaludercic
2021-10-25 17:58       ` Gregory Heytings
2021-10-25 18:04       ` Stefan Monnier
2021-10-26 10:25 ` Default for image-dired-main-image-directory Stefan Kangas
2021-10-26 13:12   ` Eli Zaretskii
2021-10-26 13:42     ` Ihor Radchenko
2021-10-26 14:15       ` Eli Zaretskii
2021-10-26 14:22         ` Stefan Kangas
2021-10-26 14:58         ` Ihor Radchenko
2021-10-26 16:15           ` Eli Zaretskii
2021-10-27 13:04             ` Ihor Radchenko
2021-10-27 13:26               ` Eli Zaretskii
2021-10-27 13:42                 ` Ihor Radchenko
2021-10-27 16:53                   ` XDG config dir [Was: Re: Default for image-dired-main-image-directory] Alexandre Garreau
2021-10-28  3:45                     ` Ihor Radchenko
2021-10-28  3:48                     ` Phil Sainty
2021-10-28  5:57                       ` Alexandre Garreau
2021-10-28  6:46                         ` Stefan Kangas
2021-10-26 14:14     ` Default for image-dired-main-image-directory Stefan Kangas
2021-10-26 15:37       ` Eli Zaretskii
2021-10-26 14:01 ` master f8fed41 2/3: image-dired: Improve XDG compliance Stefan Kangas
2021-10-26 14:19   ` Eli Zaretskii
2021-10-26 14:24     ` Stefan Kangas
2021-10-26 16:00       ` Eli Zaretskii
2021-10-26 16:13         ` Stefan Kangas
2021-10-26 16:21           ` Eli Zaretskii
2021-10-26 14:28   ` Eli Zaretskii
2021-10-26 14:45     ` Stefan Kangas
2021-10-26 16:12       ` Eli Zaretskii
2021-10-26 16:31         ` Eli Zaretskii
2021-10-26 19:17         ` Stefan Monnier
2021-10-26 19:28           ` Eli Zaretskii
2021-11-06  1:38           ` user-directory: New library to find user {conf,data,state,...} files Stefan Kangas
2021-11-06  1:52             ` Lars Ingebrigtsen
2021-11-06  2:56               ` user-directory: New library to find user {conf, data, state, ...} files Stefan Kangas
2021-11-06  3:11             ` Stefan Kangas
2021-11-07 19:31             ` Stefan Kangas
2021-11-07 19:52               ` Eli Zaretskii
2021-11-08  3:04                 ` Stefan Kangas
2021-11-08 12:19                   ` Eric S Fraga
2021-11-08 13:55                   ` Eli Zaretskii
2021-11-08 15:26                     ` Stefan Kangas
2021-11-08 18:31                       ` Eli Zaretskii
2021-11-09  7:05                         ` Stefan Kangas
2021-11-09 18:23                           ` Eli Zaretskii
2021-11-09 20:38                             ` Stefan Kangas
2021-11-11 10:34                               ` Eli Zaretskii
2021-11-08  3:35               ` Stefan Kangas
2021-11-08 15:40                 ` Stefan Kangas

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.