mirror of
https://github.com/org-roam/org-roam
synced 2025-08-03 12:27:23 -05:00
(fix): don't run title-change-hooks on new files (#1076)
This commit is contained in:
@ -1550,7 +1550,8 @@ respectively."
|
|||||||
"Detect a title change, and run `org-roam-title-change-hook'."
|
"Detect a title change, and run `org-roam-title-change-hook'."
|
||||||
(let ((new-title (car (org-roam--extract-titles)))
|
(let ((new-title (car (org-roam--extract-titles)))
|
||||||
(old-title org-roam-current-title))
|
(old-title org-roam-current-title))
|
||||||
(unless (string-equal old-title new-title)
|
(unless (or (eq old-title nil)
|
||||||
|
(string-equal old-title new-title))
|
||||||
(run-hook-with-args 'org-roam-title-change-hook old-title new-title)
|
(run-hook-with-args 'org-roam-title-change-hook old-title new-title)
|
||||||
(setq-local org-roam-current-title new-title))))
|
(setq-local org-roam-current-title new-title))))
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user