[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bongo-devel] Re: Insert commands
From: |
Daniel Jensen |
Subject: |
[bongo-devel] Re: Insert commands |
Date: |
Fri, 02 Mar 2007 19:26:24 +0100 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.93 (gnu/linux) |
> (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.