From f8349ae7575e599f375de1be6be2d0d5de4e6cbf Mon Sep 17 00:00:00 2001 From: Mikhail Rudenko Date: Thu, 6 Feb 2020 00:32:10 +0300 Subject: [PATCH 1/2] Fix location autosave when using org-pdftools integration --- org-noter.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org-noter.el b/org-noter.el index 129d61c..3b0d877 100644 --- a/org-noter.el +++ b/org-noter.el @@ -1320,7 +1320,7 @@ With a prefix ARG, remove start location." (org-noter--with-valid-session (let ((inhibit-read-only t) (ast (org-noter--parse-root)) - (location (org-noter--doc-approx-location 'interactive))) + (location (org-noter--doc-approx-location (when (called-interactively-p 'any) 'interactive)))) (with-current-buffer (org-noter--session-notes-buffer session) (org-with-wide-buffer (goto-char (org-element-property :begin ast)) From 54686970e278acbfd8b2a1c058b516a727019564 Mon Sep 17 00:00:00 2001 From: Mikhail Rudenko Date: Sun, 5 Dec 2021 21:45:48 +0300 Subject: [PATCH 2/2] try to find notes file via org-roam-bibtex --- org-noter.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/org-noter.el b/org-noter.el index 3b0d877..81ea525 100644 --- a/org-noter.el +++ b/org-noter.el @@ -38,6 +38,7 @@ (require 'org) (require 'org-element) (require 'cl-lib) +(require 'org-roam-bibtex nil t) (declare-function doc-view-goto-page "doc-view") (declare-function image-display-size "image-mode") @@ -57,6 +58,7 @@ (declare-function pdf-view-active-region-text "ext:pdf-view") (declare-function pdf-view-goto-page "ext:pdf-view") (declare-function pdf-view-mode "ext:pdf-view") +(declare-function orb-find-note-file "ext:orb-utils") (defvar nov-documents-index) (defvar nov-file-name) @@ -2207,6 +2209,11 @@ notes file, even if it finds one." (when (org-noter--check-if-document-is-annotated-on-file document-path file) (push file notes-files-annotating))))) + (when (fboundp #'orb-find-note-file) + (when-let ((file-name (orb-find-note-file document-base))) + (push file-name notes-files) + (push file-name notes-files-annotating))) + (setq search-names (nreverse search-names)) (when (or arg (not notes-files-annotating))