diff options
author | Kyle Meyer <kyle@kyleam.com> | 2017-05-20 19:00:25 -0400 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2017-05-20 19:00:25 -0400 |
commit | ddf0063ce79036a086549b18f1e3c2b3eee1e276 (patch) | |
tree | 572f7441b165d705f367b4c81d45ebe1d336cd39 | |
parent | b9c5720618c0c95f52e58efe6b476dcbd4dbec02 (diff) | |
download | org-mode-ddf0063ce79036a086549b18f1e3c2b3eee1e276.tar.gz |
org-git-link.el: Silence byte-compiler
* contrib/lisp/org-git-link.el (org-git-open): Replace obsolete
string-to-int with string-to-number. Don't use goto-line
non-interactively.
-rw-r--r-- | contrib/lisp/org-git-link.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/contrib/lisp/org-git-link.el b/contrib/lisp/org-git-link.el index a7a6654..65f25b2 100644 --- a/contrib/lisp/org-git-link.el +++ b/contrib/lisp/org-git-link.el @@ -103,7 +103,11 @@ (gitdir (nth 0 dirlist)) (relpath (nth 1 dirlist))) (org-git-open-file-internal gitdir (concat commit ":" relpath)) - (when line (goto-line (string-to-int line))))) + (when line + (save-restriction + (widen) + (goto-char (point-min)) + (forward-line (1- (string-to-number line))))))) ;; Utility functions (file names etc) |