(fix): fix update-tags to correct delete removed tags (#760)
see https://github.com/org-roam/org-roam/pull/759#discussion_r435704588
This commit is contained in:
parent
5d25c4552d
commit
fdaf07da43
1 changed files with 4 additions and 3 deletions
|
@ -332,12 +332,13 @@ connections, nil is returned."
|
|||
|
||||
(defun org-roam-db--update-tags ()
|
||||
"Update the tags of the current buffer into the cache."
|
||||
(when-let ((file (file-truename (buffer-file-name)))
|
||||
(tags (org-roam--extract-tags)))
|
||||
(let ((file (file-truename (buffer-file-name)))
|
||||
(tags (org-roam--extract-tags)))
|
||||
(org-roam-db-query [:delete :from tags
|
||||
:where (= file $s1)]
|
||||
file)
|
||||
(org-roam-db--insert-tags file tags)))
|
||||
(when tags
|
||||
(org-roam-db--insert-tags file tags))))
|
||||
|
||||
(defun org-roam-db--update-refs ()
|
||||
"Update the ref of the current buffer into the cache."
|
||||
|
|
Loading…
Reference in a new issue