(internal): org-roam-version save-excursion (#656)
Restore user's point in org-roam.el
This commit is contained in:
parent
055669817a
commit
74f12ee8aa
1 changed files with 6 additions and 5 deletions
11
org-roam.el
11
org-roam.el
|
@ -1025,11 +1025,12 @@ Otherwise, behave as if called interactively."
|
||||||
Interactively, or when MESSAGE is non-nil, show in the echo area."
|
Interactively, or when MESSAGE is non-nil, show in the echo area."
|
||||||
(interactive)
|
(interactive)
|
||||||
(let ((version (with-current-buffer (find-file-noselect (locate-library "org-roam.el"))
|
(let ((version (with-current-buffer (find-file-noselect (locate-library "org-roam.el"))
|
||||||
(save-match-data
|
(save-excursion
|
||||||
(goto-char (point-min))
|
(save-match-data
|
||||||
(if (re-search-forward "\\(?:;; Version: \\([^z-a]*?$\\)\\)" nil nil)
|
(goto-char (point-min))
|
||||||
(substring-no-properties (match-string 1))
|
(if (re-search-forward "\\(?:;; Version: \\([^z-a]*?$\\)\\)" nil nil)
|
||||||
"N/A")))))
|
(substring-no-properties (match-string 1))
|
||||||
|
"N/A"))))))
|
||||||
(if (or message (called-interactively-p 'interactive))
|
(if (or message (called-interactively-p 'interactive))
|
||||||
(message "%s" version)
|
(message "%s" version)
|
||||||
version)))
|
version)))
|
||||||
|
|
Loading…
Reference in a new issue