From 9ff57c8fd162e89d262998c5be4e80947dba2f40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C5=82awomir=20=C5=BBak?= Date: Sat, 29 Aug 2020 20:16:13 +0200 Subject: [PATCH] (fix): don't run title-change-hooks on new files (#1076) --- org-roam.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/org-roam.el b/org-roam.el index 2dadd02..cb1507b 100644 --- a/org-roam.el +++ b/org-roam.el @@ -1550,7 +1550,8 @@ respectively." "Detect a title change, and run `org-roam-title-change-hook'." (let ((new-title (car (org-roam--extract-titles))) (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) (setq-local org-roam-current-title new-title))))