(fix): fix refs not showing in backlinks buffer (#1140)

This changes ref extraction to parse the ref using the org plain-links
syntax. This works for arbitrary `cite` links, and web links.

Link storage and ref lookup is now based on the path (e.g.
`//google.com`) or `author_year`.
This commit is contained in:
Jethro Kuan
2020-09-27 02:20:23 +08:00
committed by GitHub
parent fadb515a87
commit 273d0dffa6
3 changed files with 36 additions and 65 deletions

View File

@ -63,19 +63,6 @@ If FILE, set `org-roam-temp-file-name' to file and insert its contents."
(setq-local org-roam-file-name ,file))
,@body)))))
(defmacro org-roam--with-file (file &rest body)
"Execute BODY within a FILE.
Closes the file if the file is not yet visited."
(declare (indent 1) (debug t))
`(let* ((existing-buf (find-buffer-visiting ,file))
(buf (or existing-buf
(find-file-noselect file)))
res)
(with-current-buffer buf
(setq res ,@body))
(when existing-buf (kill-buffer existing-buf))
res))
(defun org-roam-message (format-string &rest args)
"Pass FORMAT-STRING and ARGS to `message' when `org-roam-verbose' is t."
(when org-roam-verbose