Skip to content

Add default enclosure path directory #538

@ispringle

Description

@ispringle

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions