• Stars
    star
    1,055
  • Rank 43,716 (Top 0.9 %)
  • Language
    Emacs Lisp
  • Created about 11 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Drag and drop images to Emacs org-mode

org-download

MELPA MELPA Stable

This extension facilitates moving images from point A to point B.

Point A (the source) can be:

  1. An image inside your browser that you can drag to Emacs.
  2. An image on your file system that you can drag to Emacs.
  3. A local or remote image address in kill-ring. Use the org-download-yank command for this. Remember that you can use "0 w" in dired to get an address.
  4. A screenshot taken using gnome-screenshot, scrot, gm, xclip (on Linux), screencapture (on OS X) or , imagemagick/convert (on Windows). Use the org-download-screenshot command for this. Customize the backend with org-download-screenshot-method.

Point B (the target) is an Emacs org-mode buffer where the inline link will be inserted. Several customization options will determine where exactly on the file system the file will be stored.

They are: org-download-method:

  1. 'attach => use org-mode attachment machinery
  2. 'directory => construct the directory in two stages:
    1. first part of the folder name is:

      • either "." (current folder)

      • or org-download-image-dir (if it's not nil).

        org-download-image-dir becomes buffer-local when set, so each file can customize this value, e.g with:

            -*- mode: Org; org-download-image-dir: "~/Pictures/foo"; -*-
        

        To set it for all files at once, use this:

            (setq-default org-download-image-dir "~/Pictures/foo")
        
    2. second part is:

      • org-download-heading-lvl is nil => ""

      • org-download-heading-lvl is n => the name of current heading with level n.

        Level count starts with 0, i.e. * is 0, ** is 1, *** is 2 etc. org-download-heading-lvl becomes buffer-local when set, so each file can customize this value, e.g with:

            -*- mode: Org; org-download-heading-lvl: nil; -*-
        

org-download-timestamp: optionally add a timestamp to the file name.

Customize org-download-backend to choose between url-retrieve (the default) or wget or curl.

Set up

(require 'org-download)

;; Drag-and-drop to `dired`
(add-hook 'dired-mode-hook 'org-download-enable)

Pasting from the clipboard

If you have the image stored in the clipboard, use org-download-clipboard.

More Repositories

1

swiper

Ivy - a generic completion frontend for Emacs, Swiper - isearch with an overview, and more. Oh, man!
Emacs Lisp
2,284
star
2

hydra

make Emacs bindings that stick around
Emacs Lisp
1,818
star
3

avy

Jump to things in Emacs tree-style
Emacs Lisp
1,704
star
4

lispy

Short and sweet LISP editing
Emacs Lisp
1,195
star
5

ace-window

Quickly switch windows in Emacs
Emacs Lisp
968
star
6

oremacs

My Emacs config
Emacs Lisp
296
star
7

auto-yasnippet

quickly create disposable yasnippets
Emacs Lisp
243
star
8

pamparam

Simple and fast flashcards for Emacs
Emacs Lisp
228
star
9

ace-link

Quickly follow links in Emacs
Emacs Lisp
210
star
10

lpy

Minimal Python IDE for GNU Emacs
Emacs Lisp
185
star
11

define-word

Display the definition of word at point in Emacs
Emacs Lisp
154
star
12

tiny

Quickly generate linear ranges in Emacs
Emacs Lisp
143
star
13

worf

vi-like bindings for org-mode
Emacs Lisp
132
star
14

function-args

C++ completion for GNU Emacs
Emacs Lisp
120
star
15

orca

ORg CApture
Emacs Lisp
104
star
16

swiper-helm

Helm version of swiper
Emacs Lisp
79
star
17

helm-make

Select a Makefile target with helm.
Emacs Lisp
62
star
18

plain-org-wiki

Simple jump-to-org-files in a directory package
Emacs Lisp
53
star
19

make-it-so

Transform files with Makefile recipes
Emacs Lisp
47
star
20

org-fu

My org-capture and org-protocol setup
Emacs Lisp
37
star
21

cook

Makefile -> Cookbook.py
Python
36
star
22

whicher

Audit and install the programs that your Emacs config depends on
Emacs Lisp
23
star
23

eclipse-theme

Eclipse theme for Emacs
Emacs Lisp
21
star
24

orly

Additional Org-mode link types and completion for them
Emacs Lisp
18
star
25

helm-j-cheatsheet

Quick J reference for Emacs
Emacs Lisp
17
star
26

zoutline

Emacs library for outlines
Emacs Lisp
16
star
27

gtk-pomodoro-indicator

A simple pomodoro indicator for Unity/GTK tray
Python
16
star
28

elf-mode

Show symbol list when opening a binary file in Emacs
Emacs Lisp
13
star
29

matlab-mode

My fork of matlab-mode
Emacs Lisp
13
star
30

short-lambda

Clojure-style anonymous function literal for Elisp
Emacs Lisp
12
star
31

centimacro

Assign multiple macros as global key bindings in Emacs
Emacs Lisp
12
star
32

xlx

XML <-> LISP converter
Common Lisp
11
star
33

eltex

Write LaTeX in Emacs Lisp
Emacs Lisp
10
star
34

headlong

reckless completion for Emacs
Emacs Lisp
10
star
35

semimap

.Xmodmap that uses semicolon as a modifier
8
star
36

dired-guess

Associate file extensions with programs that can open them for dired
Emacs Lisp
8
star
37

cc-chainsaw

A few tricks to make c++-mode go
Emacs Lisp
7
star
38

ukrainian-holidays

Ukrainian holidays for Emacs calendar
Emacs Lisp
7
star
39

org-mode

http://orgmode.org/org-mode.git
Emacs Lisp
6
star
40

profile-dotemacs

My mirror of http://www.randomsample.de/profile-dotemacs.el
Emacs Lisp
6
star
41

abel

abbrevs for Elisp
Emacs Lisp
5
star
42

touchpad

Toggle touchpad on/off
Python
5
star
43

cedet

My mirror of CEDET (http://cedet.sourceforge.net/).
Emacs Lisp
5
star
44

abo-abo.github.io

HTML
4
star
45

ido-occasional

Use ido where you choose
Emacs Lisp
4
star
46

netherlands-holidays

Netherlands holidays for Emacs calendar
Emacs Lisp
4
star
47

latex-wrap

Wrap selection with a LaTeX environment
Emacs Lisp
4
star
48

simple-benchmark

My notes comparing several PL on a simple benchmark
C++
4
star
49

ciao

Emacs Lisp
4
star
50

xkb-indicator

GTK indicator that allows to run setxkbmap via a keybinding
Python
2
star
51

malk

a simple multi-collection completion demo
Emacs Lisp
1
star
52

soap

Smart Operator a posteriori
Emacs Lisp
1
star