emacs - make download wrap directory completing
authorPeng Li <seudut@gmail.com>
Tue, 13 Sep 2016 16:09:12 +0000 (00:09 +0800)
committerPeng Li <seudut@gmail.com>
Tue, 13 Sep 2016 16:09:12 +0000 (00:09 +0800)
emacs.d/config.org

index 5fd431a..c33ddb5 100644 (file)
@@ -1479,7 +1479,7 @@ as a http download client tool
     (interactive)
     (let ((url (or url
                    (read-string "Enter download URL: ")))
-          (download-dir (or (read-string "Save to (~/Downloads): ") "~/Downloads")))
+          (download-dir (read-directory-name "Save to (~/Downloads): " "~/Downloads" "~/Downloads" 'confirm' nil)))
       (let ((download-buffer (url-retrieve-synchronously url)))
         (save-excursion
           (set-buffer download-buffer)