Skip to content

Update elfeed-enclosure-default-dir doc string#548

Open
Bargraph6 wants to merge 1 commit intoskeeto:masterfrom
Bargraph6:patch-1
Open

Update elfeed-enclosure-default-dir doc string#548
Bargraph6 wants to merge 1 commit intoskeeto:masterfrom
Bargraph6:patch-1

Conversation

@Bargraph6
Copy link

@Bargraph6 Bargraph6 commented Oct 5, 2025

The docstring for the elfeed-enclosure-default-dir variable mentions being able to set this to a function.

When I tried to do this with a lambda, or with the following example code, I got errors when trying to download an enclosure:

read-file-name: Wrong type argument: stringp, my-elfeed-enclosure-dir

Reading the code in elfeed-show.el, it looks like it only expects a string. However, my elisp is very weak, so I may just be making an obvious mistake here?1

example code

(defun my-elfeed-enclosure-dir (fname mime-type)
  "Return the directory for saving enclosures based on filename and mime-type."

  (mkdir "/home/my-user/elfeed/" t)
  "/home/my-user/elfeed/")

(setq elfeed-enclosure-default-dir #'my-elfeed-enclosure-dir)

Footnotes

  1. I did a search on github and didn't see anyone else setting this as a function

The doc string mentions setting this variable to a function, but the code expects a string. 

This change removes the mention  of setting this as a function
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

Successfully merging this pull request may close these issues.

1 participant