org-download

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

commit 919d44b42c615cd87886b3fa2d434bf03dcde80a
parent 501920e273b32f96dfbafcf769d330296a612847
Author: Oleh Krehel <ohwoeowho@gmail.com>
Date:   Mon, 14 Mar 2016 18:36:58 +0100

org-download.el (org-download-edit): New command

Fixes #28

Diffstat:
Morg-download.el | 14++++++++++++++
1 file changed, 14 insertions(+), 0 deletions(-)

diff --git a/org-download.el b/org-download.el @@ -348,6 +348,20 @@ It's inserted before the image link and is used to annotate it.") (when (eq org-download-method 'attach) (org-attach-sync))) +(defcustom org-download-edit-cmd "gimp %s" + "Command for editing an image link.") + +(defun org-download-edit () + "Open the image at point for editing." + (interactive) + (let ((context (org-element-context))) + (if (not (eq (car-safe context) 'link)) + (user-error "not on a link") + (start-process-shell-command + "org-download-edit" + "org-download-edit" + (format org-download-edit-cmd (plist-get (cadr context) :path)))))) + (defun org-download--delete (beg end &optional times) "Delete inline image links and the files they point to between BEG and END.