GNU bug report logs -
#41030
[PATCH] Make EWW respect XDG download directory by default
Previous Next
Reported by: Philip K <philip <at> warpmail.net>
Date: Sat, 2 May 2020 17:00:02 UTC
Severity: wishlist
Tags: fixed, patch
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #11 received at 41030 <at> debbugs.gnu.org (full text, mbox):
severity 41030 wishlist
quit
Stefan Kangas <stefan <at> marxist.se> writes:
> Philip K <philip <at> warpmail.net> writes:
>
>> -(defcustom eww-download-directory "~/Downloads/"
>> +(defcustom eww-download-directory (or (xdg-user-dir "DOWNLOAD")
>> + "~/Downloads/")
>
> This makes sense conceptually. However, on my machine, evaluating
> (xdg-user-dir "DOWNLOAD") just returns $HOME. That's a worse default
> than "~/Downloads/", no?
>
> But I don't know enough about the XDG standard to propose a solution.
> Nor do I know if this is because my setup is particularly unusual.
It sounds like it could be specific to your environment; have a look at
'man 1 xdg-user-dirs-update'.
> Lars, what do you think?
I'm not Lars, but there's some precedent for this feature. In the
following thread that prompted the creation of xdg.el, Lars talked about
a general facility for determining the default download directory:
https://lists.gnu.org/archive/html/emacs-devel/2017-01/msg00607.html
In the following thread(s), using the external executable xdg-user-dirs
for eww-download-directory was discussed:
https://lists.gnu.org/archive/html/emacs-devel/2018-10/msg00599.html
https://lists.gnu.org/archive/html/emacs-devel/2018-11/msg00014.html
Some executive questions:
- Does it make sense and is it safe to eagerly load xdg.el on all
platforms and call xdg-user-dir while eww.el is being loaded? One
alternative being to define a symbolic constant such as 'xdg for
eww-download-directory that is translated to a call to xdg-user-dir on
demand rather than up front. This idea can be expanded to cover
non-XDG systems.
- Should we wait until there's a general utility for this?
- What do we do when xdg-user-dir returns ~/ but ~/Downloads/ also
exists, as in Stefan's case? Consider it a user misconfiguration?
Thanks,
--
Basil
This bug report was last modified 5 years and 17 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.