mirror of
https://github.com/org-roam/org-roam
synced 2025-08-01 12:17:21 -05:00
(internal): org-roam-version save-excursion (#656)
Restore user's point in org-roam.el
This commit is contained in:
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."
|
||||
(interactive)
|
||||
(let ((version (with-current-buffer (find-file-noselect (locate-library "org-roam.el"))
|
||||
(save-match-data
|
||||
(goto-char (point-min))
|
||||
(if (re-search-forward "\\(?:;; Version: \\([^z-a]*?$\\)\\)" nil nil)
|
||||
(substring-no-properties (match-string 1))
|
||||
"N/A")))))
|
||||
(save-excursion
|
||||
(save-match-data
|
||||
(goto-char (point-min))
|
||||
(if (re-search-forward "\\(?:;; Version: \\([^z-a]*?$\\)\\)" nil nil)
|
||||
(substring-no-properties (match-string 1))
|
||||
"N/A"))))))
|
||||
(if (or message (called-interactively-p 'interactive))
|
||||
(message "%s" version)
|
||||
version)))
|
||||
|
Reference in New Issue
Block a user