summaryrefslogtreecommitdiffhomepage
path: root/org
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2012-03-19 21:00:15 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2012-03-19 21:00:15 +0100
commitae47601667e0d71344eae767c60f6d20ee69f999 (patch)
tree5acc69219c512828d803a79ae0f773b0058ea6fd /org
parent32dd24dc84fb3ddd6ec1943a7c82042a423b7c4e (diff)
downloadelibs-ae47601667e0d71344eae767c60f6d20ee69f999.tar.gz
elibs-ae47601667e0d71344eae767c60f6d20ee69f999.tar.bz2
Little tweak
Diffstat (limited to 'org')
-rw-r--r--org/jao-org-utils.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/org/jao-org-utils.el b/org/jao-org-utils.el
index ea87ec5..aa41143 100644
--- a/org/jao-org-utils.el
+++ b/org/jao-org-utils.el
@@ -1,13 +1,14 @@
(require 'org)
;;; links
-(defun jao-org-link-at-point ()
+(defun jao-org-link-at-point (&optional copy)
(when (thing-at-point-looking-at "\\[\\[\\([^]]+\\)\\]\\[[^]]+\\]\\]")
+ (when copy (kill-ring-save (match-beginning 1) (match-end 1)))
(match-string-no-properties 1)))
(defun jao-org-copy-link-at-point ()
(interactive)
- (message "%s" (or (jao-org-link-at-point) "No link at point")))
+ (message "%s" (or (jao-org-link-at-point t) "No link at point")))
(defun jao-org-insert-link (url title)
(insert (format "[[%s][%s]]" url title)))