> (defun bongo-insert-and-download (url local-file)
>   "Download a file from URL, save it and insert it as LOCAL-FILE."
>   (interactive
>    (let ((url (read-string "Download URL: ")))
>      (list url (read-file-name "Save local file: "
>                                temporary-file-directory
>                                nil nil
>                                (file-name-nondirectory url)))))
>   (url-retrieve url 'bongo-url-retrieved-callback (list local-file))
>   (bongo-insert-file local-file))
>
> (defun bongo-url-retrieved-callback (status file-name)
>   (if status
>       (error "Error downloading %s" (file-name-nondirectory file-name))
>     (write-file file-name)
>     (message "Finished downloading %s" (file-name-nondirectory file-name)))
>   (kill-buffer (current-buffer)))

I noticed now that this does not save files correctly. I downloaded a
few ogg vorbis files and they played with ogg123 but not with vlc. I
don't have time right now to fix this bug, but I'll get back to this
later unless somebody else knows whats wrong.



_______________________________________________
bongo-devel mailing list
bongo-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/bongo-devel

Reply via email to