org-download

a fork of abo-abo's org-download
git clone https://git.trogloxene.org/org-download.git
Log | Files | Refs | README

commit f5fb2d046790cb258e93d3f203b7c5fc448a8391
parent f116f4ae8a9983022920495cc83ad84a6f77e2d1
Author: Oleh Krehel <ohwoeowho@gmail.com>
Date:   Tue, 13 Oct 2015 14:58:13 +0200

Use Cask and fix some compilation warnings

* Cask: New file.

* etc/elpa.el: New file.

* org-download.el: Add a version cookie. Require async during
  compilation. Require org. Fix looking-back.

Diffstat:
ACask | 9+++++++++
Aetc/elpa.el | 5+++++
Morg-download.el | 11+++++++----
3 files changed, 21 insertions(+), 4 deletions(-)

diff --git a/Cask b/Cask @@ -0,0 +1,9 @@ +(source gnu) +(source melpa) + +(package-file "org-download.el") + +(files "org-download.el") + +(development + (depends-on "async")) diff --git a/etc/elpa.el b/etc/elpa.el @@ -0,0 +1,5 @@ +(setq package-user-dir + (expand-file-name (format ".cask/%s/elpa" emacs-version))) +(package-initialize) +(add-to-list 'load-path default-directory) + diff --git a/org-download.el b/org-download.el @@ -3,9 +3,10 @@ ;; Copyright (C) 2014 Free Software Foundation, Inc. ;; Author: Oleh Krehel -;; Keywords: images, screenshots, download -;; Homepage: http://orgmode.org +;; URL: https://github.com/abo-abo/org-download +;; Version: 0.1.0 ;; Package-Requires: ((async "1.2")) +;; Keywords: images, screenshots, download ;; This file is not part of GNU Emacs. @@ -69,9 +70,11 @@ (eval-when-compile - (require 'cl)) + (require 'cl) + (require 'async)) (require 'url-parse) (require 'url-http) +(require 'org) (defgroup org-download nil "Image drag-and-drop for org-mode." @@ -288,7 +291,7 @@ The screenshot tool is determined by `org-download-screenshot-method'." (org-download--image link filename) (when (eq org-download-method 'attach) (org-attach-attach filename nil 'none)) - (if (looking-back "^[ \t]+") + (if (looking-back "^[ \t]+" (line-beginning-position)) (delete-region (match-beginning 0) (match-end 0)) (newline)) (insert