abo-abo / org-download

Drag and drop images to Emacs org-mode
1.08k stars 79 forks source link

org-download-yank yields "Not a URL" with dired `0 w` #172

Open cpbotha opened 3 years ago

cpbotha commented 3 years ago

Documentation mentions: 'A local or remote image address in kill-ring. Use the org-download-yank command for this. Remember that you can use "0 w" in dired to get an address.'

When I try this, org-download errors out with "Not a URL"

Looking at the code of org-download-yank, this is down to something like:

(url-type (url-generic-parse-url "/tmp/somefile.txt"))

eval'ing to nil.

Could it be that dired 0 w (dired-copy-filename-as-kill with zero prefix arg) used to return fully-formed file://... urls and now just returns the bare filename, or is there some other reason?

I'm working around this for now by commenting out the (unless (url-type... two lines in org-download-yank.

yitang commented 1 year ago

having the same issue here.