summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Klein <roklein@roklein.de>2016-08-08 03:24:23 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2016-08-08 11:20:28 +0200
commit690f92f685631df6ffea9f179fa83441f8751b34 (patch)
tree9c6ff672e6376377c39241c6e3f5cb1d3c5cc719
parentbe2c32c43c301c02c2aa2ae742095c15d44614ec (diff)
downloadorg-mode-690f92f685631df6ffea9f179fa83441f8751b34.tar.gz
Update git, gitbare link definitions
* contrib/lisp/org-git-link.el ("git-link"): Update to use org-link-set-parameters.
-rw-r--r--contrib/lisp/org-git-link.el6
1 files changed, 2 insertions, 4 deletions
diff --git a/contrib/lisp/org-git-link.el b/contrib/lisp/org-git-link.el
index d3ba848..9d3ff32 100644
--- a/contrib/lisp/org-git-link.el
+++ b/contrib/lisp/org-git-link.el
@@ -69,7 +69,7 @@
;; org link functions
;; bare git link
-(org-add-link-type "gitbare" 'org-gitbare-open)
+(org-link-set-parameters "gitbare" :follow #'org-gitbare-open)
(defun org-gitbare-open (str)
(let* ((strlist (org-git-split-string str))
@@ -92,7 +92,7 @@
(setq buffer-read-only t)))
;; user friendly link
-(org-add-link-type "git" 'org-git-open)
+(org-link-set-parameters "git" :follow #'org-git-open :store #'org-git-store-link)
(defun org-git-open (str)
(let* ((strlist (org-git-split-string str))
@@ -190,8 +190,6 @@ than two double colons, str2 and/or str3 may be set the empty string."
:type "git"
:link (org-git-create-git-link file line))))))
-(add-hook 'org-store-link-functions 'org-git-store-link)
-
(defun org-git-insert-link-interactively (file searchstring &optional description)
(interactive "FFile: \nsSearch string: \nsDescription: ")
(insert (org-make-link-string (concat "git:" file "::" searchstring) description)))