(internal): remove org-roam--get-title-or-slug function (#1284)

Every file has a title when saved into the database, so this function is
redundant in most cases (e.g. in org-roam-buffer, where backlinks are
fetched from the database).
This commit is contained in:
Jethro Kuan
2020-11-15 19:44:36 +08:00
committed by GitHub
parent baf0dd9d00
commit face683e00
5 changed files with 15 additions and 20 deletions

View File

@ -403,8 +403,8 @@ Return the number of rows inserted."
(puthash (car row) (cadr row) ht))
ht))
(defun org-roam-db--get-titles (file)
"Return the titles of FILE from the cache."
(defun org-roam-db--get-title (file)
"Return the main title of FILE from the cache."
(caar (org-roam-db-query [:select [title] :from titles
:where (= file $s1)
:limit 1]