mirror of
https://github.com/protesilaos/denote.git
synced 2026-09-15 09:46:24 -04:00
Make sure backlinks get correct 'denote-directory' path
The backlinks buffer will now get the correct path when it is generated inside a silo. This is related to issue 129 reported by hapst3r on the GitHub mirror: <https://github.com/protesilaos/denote/issues/129>. This change is necessary because .dir-locals do not work for buffers, so we must get the value from the file that calls 'denote-link-backlinks'.
This commit is contained in:
parent
0c79c1a699
commit
828af23060
|
|
@ -2851,9 +2851,10 @@ ALIST is not used in favour of using
|
|||
(file-type (denote-filetype-heuristics file))
|
||||
(id (denote-retrieve-filename-identifier file))
|
||||
(buf (format "*denote-backlinks to %s*" id))
|
||||
(xref-alist (xref--analyze (funcall fetcher))))
|
||||
(xref-alist (xref--analyze (funcall fetcher)))
|
||||
(dir (denote-directory)))
|
||||
(with-current-buffer (get-buffer-create buf)
|
||||
(setq-local default-directory (denote-directory))
|
||||
(setq-local default-directory dir)
|
||||
(erase-buffer)
|
||||
(setq overlay-arrow-position nil)
|
||||
(denote-backlinks-mode)
|
||||
|
|
|
|||
Loading…
Reference in a new issue