From 9949a4e45fd41d29f59f1181435e0ccd14f8e9a4 Mon Sep 17 00:00:00 2001 From: Lucas Sta Maria Date: Wed, 17 Jan 2024 13:05:25 -0500 Subject: [PATCH] feat(emacs): add `download-file` interactive function Signed-off-by: Lucas Sta Maria --- .emacs.d/include/misc.el | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.emacs.d/include/misc.el b/.emacs.d/include/misc.el index f978a3e..17af85c 100644 --- a/.emacs.d/include/misc.el +++ b/.emacs.d/include/misc.el @@ -44,6 +44,15 @@ (url-copy-file (cdr f) (car f) t)) file-path-urls))))) + +(defun download-file (&optional url filepath) + "Download the file from URL to FILEPATH." + (interactive) + (let* ((url (or url + (read-string "url: "))) + (filepath (or filepath (read-file-name "filename: ")))) + (url-copy-file url filepath 1))) + ;; LSP (setq lsp-inlay-hint-enable t)