Fix bug in org-git-link.el.

Patch by David Maus
This commit is contained in:
Carsten Dominik 2010-02-20 20:34:39 +01:00
parent 91f5139273
commit 6a5f6deaac
2 changed files with 11 additions and 5 deletions

View File

@ -1,3 +1,8 @@
2010-02-20 Carsten Dominik <carsten.dominik@gmail.com>
* lisp/org-git-link.el (org-git-store-link): Check if there is a
file name associated with the buffer.
2010-02-04 Carsten Dominik <carsten.dominik@gmail.com>
* lisp/org-export-generic.el (org-export-generic): Provide.

View File

@ -175,11 +175,12 @@
(defun org-git-store-link ()
"Store git link to current file."
(let ((file (abbreviate-file-name (buffer-file-name))))
(when (org-git-gitrepos-p file)
(org-store-link-props
:type "git"
:link (org-git-create-git-link file)))))
(when (buffer-file-name)
(let ((file (abbreviate-file-name (buffer-file-name))))
(when (org-git-gitrepos-p file)
(org-store-link-props
:type "git"
:link (org-git-create-git-link file))))))
(add-hook 'org-store-link-functions 'org-git-store-link)