X-Git-Url: http://47.100.26.94:8080/?a=blobdiff_plain;f=emacs.d%2Fconfig.org;h=c33ddb5168999dde652421166e3568bdd8d5dc76;hb=0b2dd81e437b0e7d55fa590964859b55a9bb0543;hp=8bb6d51e8fb8236ab14d04d19b69e8c981b664bf;hpb=e04c0fcc7bd57fb36ced8539e56db4ab652ff468;p=dotfiles.git diff --git a/emacs.d/config.org b/emacs.d/config.org index 8bb6d51..c33ddb5 100644 --- a/emacs.d/config.org +++ b/emacs.d/config.org @@ -1472,13 +1472,14 @@ brew install the-silver-searcher #+END_SRC ** url-download -Refer [[http://stackoverflow.com/questions/4448055/download-a-file-with-emacs-lisp][download-a-file-with-emacs-lisp]] +To download file in =elisp=, best is =url-copy-file=, here refer [[http://stackoverflow.com/questions/4448055/download-a-file-with-emacs-lisp][download-a-file-with-emacs-lisp]] using =url-retrieve-synchronously= wrapping +as a http download client tool #+BEGIN_SRC emacs-lisp :tangle yes :results silent (defun sd/download-file (&optional url download-dir download-name) (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) @@ -1603,6 +1604,7 @@ Disalble =ido= when new a directory or file in =dired= mode ;; call the function which you want to disable ido (mk-disable-ido 'dired-create-directory) (mk-disable-ido 'sd/dired-new-file) + (mk-disable-ido 'dired-goto-file) #+END_SRC ** Dired open with @@ -2879,6 +2881,11 @@ Search, replace and hightlight will in later paragraph #+BEGIN_SRC emacs-lisp :tangle yes :results silent (global-set-key (kbd "M-i") #'counsel-imenu) ;; (global-set-key (kbd "M-i") #'imenu) + + ;; define M-[ as C-M-a + ;; http://ergoemacs.org/emacs/emacs_key-translation-map.html + (define-key key-translation-map (kbd "M-[") (kbd "C-M-a")) + (define-key key-translation-map (kbd "M-]") (kbd "C-M-e")) #+END_SRC *** Go-to line