Closed rnkn closed 3 years ago
Just found your package via Hacker News. Congrats on the frontpage spot!
Thanks! The level of publicity so uickly was unexpected.
I have a suggestion that might improve compatibility.
wget
is not present on non-Linux systems by default. You'll get better compatibility by usingcurl
. Or, if you wanted to be really clever, Emacs can retrieve things online itself using theurl
library (although I find it a bit inscrutable).
Good idea. This does put me in the totally unforeseen circumstance of wishing I had a "non-linux" (ahem) system handy to test with.
See lisp/gnus/mm-url.el
(M-x find-library RET mm-url RET
) for a way of handling multiple internal/external retrievers.
Either way, if you allow more than one retriever it should be customisable, and GNU Emacs should probably default to GNU Wget over a non-GNU program, if both are available.
With commit 5aaa6ee, the downloader will use 'curl' when 'wget' is unavailable.
Thanks. Looks like it's still using wget
due to copy pasta though?
Just to echo Basil, you could likely significantly cut down your lines of code by delegating fetching to the mm-url library, e.g. mm-url-insert-file-contents URL to a temp buffer, then write-file.
On 2021-01-19 07:53, Basil L. Contovounesios wrote:
Thanks. Looks like it's still using wget due to copy pasta though?
Is "copy pasta" a typo for something? I'm not up on all the jargon. The intent is to use wget if it's available; otherwise, curl if it's available; otherwise signal an error.
-- hkp://keys.gnupg.net CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0
By copy pasta I mean what's probably a copy-paste error. See pull request #5.
On 2021-01-19 08:13, Paul W. Rankin wrote:
Just to echo Basil, you could likely significantly cut down your lines of code by delegating fetching to the mm-url library,
When I read Basil's message, I took a first look at the package, and was immediately put off by its documentation. Here it is in its entirety:
;;; Commentary:
;; Some code is stolen from w3 and url packages. Some are moved from ;; nnweb.
;; TODO: Support POST, cookie.
It may be the best thing since ---------, but if it isn't 'discover-able' it might as well not exist. Without better documentation, I need to sit down and read the code first.
e.g. mm-url-insert-file-contents URL to a temp buffer, then write-file.
That's discouraging, because it sounds inefficient compared to using wget/curl to directly download to disk.
-- hkp://keys.gnupg.net CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0
It may be the best thing since ---------, but if it isn't 'discover-able' it might as well not exist. Without better documentation, I need to sit down and read the code first.
That's discouraging, because it sounds inefficient compared to using wget/curl to directly download to disk.
FTR, Basil's message never suggested depending on a Gnus sub-package (in fact, Basil would discourage that); it merely pointed to it as an example of precedent.
Hello!
Just found your package via Hacker News. Congrats on the frontpage spot!
I have a suggestion that might improve compatibility.
wget
is not present on non-Linux systems by default. You'll get better compatibility by usingcurl
. Or, if you wanted to be really clever, Emacs can retrieve things online itself using theurl
library (although I find it a bit inscrutable).