README.md (2539B)
1 # org-download 2 3 [](https://melpa.org/#/org-download) 4 [](https://stable.melpa.org/#/org-download) 5 6 This extension facilitates moving images from point **A** to point **B**. 7 8 Point **A** (*the source*) can be: 9 10 1. An image inside your browser that you can drag to Emacs. 11 2. An image on your file system that you can drag to Emacs. 12 3. A local or remote image address in kill-ring. 13 Use the `org-download-yank` command for this. 14 Remember that you can use "0 w" in `dired` to get an address. 15 4. A screenshot taken using `gnome-screenshot`, `scrot`, `gm`, `xclip` 16 (on Linux), `screencapture` (on OS X) or , `imagemagick/convert` 17 (on Windows). Use the `org-download-screenshot` command for this. 18 Customize the backend with `org-download-screenshot-method`. 19 20 Point **B** (*the target*) is an Emacs `org-mode` buffer where the inline 21 link will be inserted. Several customization options will determine 22 where exactly on the file system the file will be stored. 23 24 They are: 25 `org-download-method`: 26 27 1. 'attach => use `org-mode` attachment machinery 28 2. 'directory => construct the directory in two stages: 29 1. first part of the folder name is: 30 * either "." (current folder) 31 * or `org-download-image-dir` (if it's not nil). 32 33 `org-download-image-dir` becomes buffer-local when set, 34 so each file can customize this value, e.g with: 35 36 -*- mode: Org; org-download-image-dir: "~/Pictures/foo"; -*- 37 38 To set it for all files at once, use this: 39 40 (setq-default org-download-image-dir "~/Pictures/foo") 41 42 43 2. second part is: 44 * `org-download-heading-lvl` is nil => "" 45 * `org-download-heading-lvl` is n => the name of current 46 heading with level n. 47 48 Level count starts with 0, 49 i.e. * is 0, ** is 1, *** is 2 etc. 50 `org-download-heading-lvl` becomes buffer-local when set, 51 so each file can customize this value, e.g with: 52 53 -*- mode: Org; org-download-heading-lvl: nil; -*- 54 55 `org-download-timestamp`: 56 optionally add a timestamp to the file name. 57 58 Customize `org-download-backend` to choose between `url-retrieve` 59 (the default) or `wget` or `curl`. 60 61 ## Set up 62 63 ```elisp 64 (require 'org-download) 65 66 ;; Drag-and-drop to `dired` 67 (add-hook 'dired-mode-hook 'org-download-enable) 68 ``` 69 70 ## Pasting from the clipboard 71 If you have the image stored in the clipboard, use `org-download-clipboard`.