Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add default enclosure path directory #538

Open
ispringle opened this issue Dec 17, 2024 · 0 comments
Open

Add default enclosure path directory #538

ispringle opened this issue Dec 17, 2024 · 0 comments

Comments

@ispringle
Copy link

ispringle commented Dec 17, 2024

Currently when you save an enclosure the default path is where ever you're current wording directory is. I pretty regularly will pull up elfeed and not be in the directory I'd like to save enclosures to, which leads to switching directories or rewriting the path when I save enclosures. It'd be nice if there was something like elfeed-default-enclosure-directory that elfeed could use in elfeed--request-enclosure-path and `elfeed--request-enclosure-dir.

Right now I'm overwriting this function in my :config block of the use-package statement, but I think it'd be good for everyone if this was available.

Here's what I'm doing

(defvar elfeed-default-enclosure-directory "~/Podcasts/")
(defun elfeed--request-enclosure-path (fname _path)
    "Ask the user where to save FNAME (default is PATH/FNAME)."
    (let ((fpath (expand-file-name
                  (read-file-name "Save as: " elfeed-default-enclosure-directory nil nil fname) elfeed-default-enclosure-directoryo)))
      (if (file-directory-p fpath)
          (expand-file-name fname fpath)
        fpath)))

It'd be trivial to update that path value to:

(when elfeed-default-enclosure-directory
            elfeed-default-enclosure-directory
            path)

I'd be happy to create the PR, just not sure of procedures or if an issue has to exist first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant