Update git, gitbare link definitions

* contrib/lisp/org-git-link.el ("git-link"):

Update to use org-link-set-parameters.
This commit is contained in:
Robert Klein 2016-08-08 03:24:23 +02:00 committed by Nicolas Goaziou
parent be2c32c43c
commit 690f92f685
1 changed files with 2 additions and 4 deletions

View File

@ -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)))