From: "Basil L. Contovounesios" <contovob@tcd.ie>
To: Stefan Kangas <stefan@marxist.se>
Cc: Lars Ingebrigtsen <larsi@gnus.org>,
Philip K <philip@warpmail.net>,
41030@debbugs.gnu.org
Subject: bug#41030: [PATCH] Make EWW respect XDG download directory by default
Date: Mon, 04 May 2020 00:28:13 +0100 [thread overview]
Message-ID: <87o8r4ha42.fsf@tcd.ie> (raw)
In-Reply-To: <874ksw1vjd.fsf@stefankangas.se> (Stefan Kangas's message of "Mon, 04 May 2020 00:52:06 +0200")
severity 41030 wishlist
quit
Stefan Kangas <stefan@marxist.se> writes:
> Philip K <philip@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
next prev parent reply other threads:[~2020-05-03 23:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-02 16:58 bug#41030: [PATCH] Make EWW respect XDG download directory by default Philip K
2020-05-03 22:52 ` Stefan Kangas
2020-05-03 23:28 ` Basil L. Contovounesios [this message]
2020-05-05 8:02 ` Lars Ingebrigtsen
2020-05-05 8:20 ` Philip K.
2020-07-17 13:09 ` Lars Ingebrigtsen
2020-07-29 5:14 ` Lars Ingebrigtsen
2020-05-05 21:32 ` Stefan Kangas
2020-05-06 0:04 ` Noam Postavsky
2020-05-06 0:17 ` Stefan Kangas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87o8r4ha42.fsf@tcd.ie \
--to=contovob@tcd.ie \
--cc=41030@debbugs.gnu.org \
--cc=larsi@gnus.org \
--cc=philip@warpmail.net \
--cc=stefan@marxist.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).