#1 Note editing failure when first note not first page and point on file-level property drawer

Отворени
отворен преди 3 години от virtualprocessor · 3 коментара

When I

  1. set the noter document in a file level property drawer,
  2. have the first headline with a note not be page 1 of a PDF,
  3. have point on the property drawer,
  4. and then call M-x org-noter,

the note buffer fails to open, only the PDF opens in a buffer, and emacs throws the following in the debug log:

Debugger entered--Lisp error: (outline-before-first-heading)
  org-narrow-to-subtree()
  (save-excursion (goto-char (org-element-property :contents-begin ast)) (org-show-entry) (org-narrow-to-subtree) (org-cycle-hide-drawers 'all))
  (progn (save-excursion (goto-char (org-element-property :contents-begin ast)) (org-show-entry) (org-narrow-to-subtree) (org-cycle-hide-drawers 'all)))
  (if (and ast (not (org-noter--no-heading-p))) (progn (save-excursion (goto-char (org-element-property :contents-begin ast)) (org-show-entry) (org-narrow-to-subtree) (org-cycle-hide-drawers 'all))))
  org-noter--narrow-to-root((section (:begin 1 :end 74 :contents-begin 1 :contents-end 74 :robust-begin 1 :robust-end 72 :post-blank 0 :post-affiliated 1 :mode first-section :granularity greater-element :cached t :parent (org-data (:begin 1 :contents-begin 1 :contents-end 324 :end 324 :robust-begin 73 :robust-end 322 :post-blank 0 :post-affiliated 1 :path "/home/etest/testnoter.org" :mode org-data :NOTER_DOCUMENT "/home/etest/Downloads/1705.02136.pdf" :CATEGORY "testnoter" :granularity greater-element) #1 (headline (:raw-value "An" :begin 74 :end 118 :pre-blank 0 :contents-begin 79 :contents-end 118 :robust-begin 112 :robust-end 116 :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 74 :NOTER_PAGE "2" :title (...) :mode nil :granularity greater-element ...) (section (:begin 79 :end 118 :contents-begin 79 :contents-end 118 :robust-begin 79 :robust-end 116 :post-blank 0 :post-affiliated 79 :mode section :granularity greater-element :cached t :parent #31) (property-drawer ...) (paragraph ...))) (headline (:raw-value "Quick note" :begin 118 :end 175 :pre-blank 0 :contents-begin 131 :contents-end 175 :robust-begin 164 :robust-end 173 :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 118 :NOTER_PAGE "2" :title "Quick note" :mode nil :granularity greater-element ...) (section (:begin 131 :end 175 :contents-begin 131 :contents-end 175 :robust-begin 131 :robust-end 173 :post-blank 0 :post-affiliated 131 :mode section :granularity greater-element :cached t :parent #32 :org-element--cache-sync-key ...) (property-drawer ...) (paragraph ...))) (headline (:raw-value "ANother noter" :begin 175 :end 225 :pre-blank 0 :contents-begin 191 :contents-end 225 :robust-begin nil :robust-end nil :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 175 :NOTER_PAGE "5" :title "ANother noter" :mode nil :granularity greater-element ...) (section (:begin 191 :end 225 :contents-begin 191 :contents-end 225 :robust-begin 191 :robust-end 223 :post-blank 0 :post-affiliated 191 :mode section :granularity greater-element :cached t :parent #33 :org-element--cache-sync-key ...) (property-drawer ...))) (headline (:raw-value "A test pager" :begin 225 :end 275 :pre-blank 0 :contents-begin 240 :contents-end 274 :robust-begin nil :robust-end nil :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 1 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 225 :NOTER_PAGE "8" :title "A test pager" :mode nil :granularity greater-element ...) (section (:begin 240 :end 275 :contents-begin 240 :contents-end 274 :robust-begin 240 :robust-end 272 :post-blank 1 :post-affiliated 240 :mode section :granularity greater-element :cached t :parent #34 :org-element--cache-sync-key ...) (property-drawer ...))) (headline (:raw-value "A noter test" :begin 275 :end 324 :pre-blank 0 :contents-begin 290 :contents-end 324 :robust-begin nil :robust-end nil :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 275 :NOTER_PAGE "9" :title "A noter test" :mode nil :granularity greater-element ...) (section (:begin 290 :end 324 :contents-begin 290 :contents-end 324 :robust-begin 290 :robust-end 322 :post-blank 0 :post-affiliated 290 :mode section :granularity greater-element :cached t :parent #35 :org-element--cache-sync-key ...) (property-drawer ...)))) :org-element--cache-sync-key nil) (property-drawer (:begin 1 :end 74 :contents-begin 14 :contents-end 68 :post-blank 0 :post-affiliated 1 :mode top-comment :granularity element :cached t :parent #1 :org-element--cache-sync-key (61 . 1)))))
  (if org-noter-disable-narrowing nil (org-noter--narrow-to-root (org-noter--parse-root session)))
  (save-current-buffer (set-buffer notes-buffer) (if org-noter-disable-narrowing nil (org-noter--narrow-to-root (org-noter--parse-root session))) (setq notes-window (org-noter--get-notes-window 'start)) (org-noter--set-notes-scroll notes-window))
  (let* ((doc-buffer (progn (or (progn (and (memq ... cl-struct-org-noter--session-tags) t)) (signal 'wrong-type-argument (list 'org-noter--session session))) (aref session 3))) (doc-window (selected-window)) (notes-buffer (progn (or (progn (and (memq ... cl-struct-org-noter--session-tags) t)) (signal 'wrong-type-argument (list 'org-noter--session session))) (aref session 4))) (window-location (progn (or (progn (and (memq ... cl-struct-org-noter--session-tags) t)) (signal 'wrong-type-argument (list 'org-noter--session session))) (aref session 14))) notes-window) (set-window-buffer doc-window doc-buffer) (save-current-buffer (set-buffer notes-buffer) (if org-noter-disable-narrowing nil (org-noter--narrow-to-root (org-noter--parse-root session))) (setq notes-window (org-noter--get-notes-window 'start)) (org-noter--set-notes-scroll notes-window)) (if org-noter-swap-window (progn (let* ((--cl-swap-windows-- #'(lambda ... "Swap the buffers of WINDOW1 and WINDOW2." ...))) (let ((frame (window-frame notes-window))) (if (and (frame-live-p frame) (not ...)) (progn (select-frame-set-input-focus ...))) (if (and (window-live-p notes-window) (not ...)) (progn (funcall --cl-swap-windows-- notes-window doc-window))))) (if (eq window-location 'horizontal-split) (enlarge-window (- (ceiling (* ... ...)) (window-total-width)) t) (enlarge-window (- (ceiling (* ... ...)) (window-total-height)))))) (if org-noter-swap-window (set-window-dedicated-p notes-window t) (set-window-dedicated-p doc-window t)))
  (progn (select-frame (progn (or (progn (and (memq (type-of session) cl-struct-org-noter--session-tags) t)) (signal 'wrong-type-argument (list 'org-noter--session session))) (aref session 2)) 'norecord) (delete-other-windows) (let* ((doc-buffer (progn (or (progn (and ... t)) (signal 'wrong-type-argument (list ... session))) (aref session 3))) (doc-window (selected-window)) (notes-buffer (progn (or (progn (and ... t)) (signal 'wrong-type-argument (list ... session))) (aref session 4))) (window-location (progn (or (progn (and ... t)) (signal 'wrong-type-argument (list ... session))) (aref session 14))) notes-window) (set-window-buffer doc-window doc-buffer) (save-current-buffer (set-buffer notes-buffer) (if org-noter-disable-narrowing nil (org-noter--narrow-to-root (org-noter--parse-root session))) (setq notes-window (org-noter--get-notes-window 'start)) (org-noter--set-notes-scroll notes-window)) (if org-noter-swap-window (progn (let* ((--cl-swap-windows-- #'...)) (let ((frame ...)) (if (and ... ...) (progn ...)) (if (and ... ...) (progn ...)))) (if (eq window-location 'horizontal-split) (enlarge-window (- (ceiling ...) (window-total-width)) t) (enlarge-window (- (ceiling ...) (window-total-height)))))) (if org-noter-swap-window (set-window-dedicated-p notes-window t) (set-window-dedicated-p doc-window t))))
  (unwind-protect (progn (select-frame (progn (or (progn (and (memq ... cl-struct-org-noter--session-tags) t)) (signal 'wrong-type-argument (list 'org-noter--session session))) (aref session 2)) 'norecord) (delete-other-windows) (let* ((doc-buffer (progn (or (progn ...) (signal ... ...)) (aref session 3))) (doc-window (selected-window)) (notes-buffer (progn (or (progn ...) (signal ... ...)) (aref session 4))) (window-location (progn (or (progn ...) (signal ... ...)) (aref session 14))) notes-window) (set-window-buffer doc-window doc-buffer) (save-current-buffer (set-buffer notes-buffer) (if org-noter-disable-narrowing nil (org-noter--narrow-to-root (org-noter--parse-root session))) (setq notes-window (org-noter--get-notes-window 'start)) (org-noter--set-notes-scroll notes-window)) (if org-noter-swap-window (progn (let* ((--cl-swap-windows-- ...)) (let (...) (if ... ...) (if ... ...))) (if (eq window-location 'horizontal-split) (enlarge-window (- ... ...) t) (enlarge-window (- ... ...))))) (if org-noter-swap-window (set-window-dedicated-p notes-window t) (set-window-dedicated-p doc-window t)))) (if (frame-live-p old-frame) (progn (select-frame old-frame 'norecord))) (if (buffer-live-p old-buffer) (progn (set-buffer old-buffer))))
  (let ((old-frame (selected-frame)) (old-buffer (current-buffer))) (unwind-protect (progn (select-frame (progn (or (progn (and ... t)) (signal 'wrong-type-argument (list ... session))) (aref session 2)) 'norecord) (delete-other-windows) (let* ((doc-buffer (progn (or ... ...) (aref session 3))) (doc-window (selected-window)) (notes-buffer (progn (or ... ...) (aref session 4))) (window-location (progn (or ... ...) (aref session 14))) notes-window) (set-window-buffer doc-window doc-buffer) (save-current-buffer (set-buffer notes-buffer) (if org-noter-disable-narrowing nil (org-noter--narrow-to-root (org-noter--parse-root session))) (setq notes-window (org-noter--get-notes-window 'start)) (org-noter--set-notes-scroll notes-window)) (if org-noter-swap-window (progn (let* (...) (let ... ... ...)) (if (eq window-location ...) (enlarge-window ... t) (enlarge-window ...)))) (if org-noter-swap-window (set-window-dedicated-p notes-window t) (set-window-dedicated-p doc-window t)))) (if (frame-live-p old-frame) (progn (select-frame old-frame 'norecord))) (if (buffer-live-p old-buffer) (progn (set-buffer old-buffer)))))
  (progn (let ((old-frame (selected-frame)) (old-buffer (current-buffer))) (unwind-protect (progn (select-frame (progn (or (progn ...) (signal ... ...)) (aref session 2)) 'norecord) (delete-other-windows) (let* ((doc-buffer (progn ... ...)) (doc-window (selected-window)) (notes-buffer (progn ... ...)) (window-location (progn ... ...)) notes-window) (set-window-buffer doc-window doc-buffer) (save-current-buffer (set-buffer notes-buffer) (if org-noter-disable-narrowing nil (org-noter--narrow-to-root ...)) (setq notes-window (org-noter--get-notes-window ...)) (org-noter--set-notes-scroll notes-window)) (if org-noter-swap-window (progn (let* ... ...) (if ... ... ...))) (if org-noter-swap-window (set-window-dedicated-p notes-window t) (set-window-dedicated-p doc-window t)))) (if (frame-live-p old-frame) (progn (select-frame old-frame 'norecord))) (if (buffer-live-p old-buffer) (progn (set-buffer old-buffer))))))
  (if (org-noter--valid-session session) (progn (let ((old-frame (selected-frame)) (old-buffer (current-buffer))) (unwind-protect (progn (select-frame (progn (or ... ...) (aref session 2)) 'norecord) (delete-other-windows) (let* ((doc-buffer ...) (doc-window ...) (notes-buffer ...) (window-location ...) notes-window) (set-window-buffer doc-window doc-buffer) (save-current-buffer (set-buffer notes-buffer) (if org-noter-disable-narrowing nil ...) (setq notes-window ...) (org-noter--set-notes-scroll notes-window)) (if org-noter-swap-window (progn ... ...)) (if org-noter-swap-window (set-window-dedicated-p notes-window t) (set-window-dedicated-p doc-window t)))) (if (frame-live-p old-frame) (progn (select-frame old-frame 'norecord))) (if (buffer-live-p old-buffer) (progn (set-buffer old-buffer)))))))
  org-noter--setup-windows(#s(org-noter--session :id 536251518523202269 :frame #<frame Emacs Org-noter - 1705.02136.pdf 0x564d1b1c9058> :doc-buffer #<buffer Org-noter: 1705.02136.pdf> :notes-buffer #<buffer Notes of 1705.02136.pdf> :ast (section (:begin 1 :end 74 :contents-begin 1 :contents-end 74 :robust-begin 1 :robust-end 72 :post-blank 0 :post-affiliated 1 :mode first-section :granularity greater-element :cached t :parent (org-data (:begin 1 :contents-begin 1 :contents-end 324 :end 324 :robust-begin 73 :robust-end 322 :post-blank 0 :post-affiliated 1 :path "/home/etest/testnoter.org" :mode org-data :NOTER_DOCUMENT "/home/etest/Downloads/1705.02136.pdf" :CATEGORY "testnoter" :granularity greater-element) #2 (headline (:raw-value "An" :begin 74 :end 118 :pre-blank 0 :contents-begin 79 :contents-end 118 :robust-begin 112 :robust-end 116 :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 74 :NOTER_PAGE "2" :title (...) :mode nil :granularity greater-element :parent #28 :cached t :org-element--cache-sync-key (61 . 74)) (section (:begin 79 :end 118 :contents-begin 79 :contents-end 118 :robust-begin 79 :robust-end 116 :post-blank 0 :post-affiliated 79 :mode section :granularity greater-element :cached t :parent #32) (property-drawer ...) (paragraph ...))) (headline (:raw-value "Quick note" :begin 118 :end 175 :pre-blank 0 :contents-begin 131 :contents-end 175 :robust-begin 164 :robust-end 173 :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 118 :NOTER_PAGE "2" :title "Quick note" :mode nil :granularity greater-element :org-element--cache-sync-key (61 . 102) :cached t :parent #28) (section (:begin 131 :end 175 :contents-begin 131 :contents-end 175 :robust-begin 131 :robust-end 173 :post-blank 0 :post-affiliated 131 :mode section :granularity greater-element :cached t :parent #33 :org-element--cache-sync-key ...) (property-drawer ...) (paragraph ...))) (headline (:raw-value "ANother noter" :begin 175 :end 225 :pre-blank 0 :contents-begin 191 :contents-end 225 :robust-begin nil :robust-end nil :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 175 :NOTER_PAGE "5" :title "ANother noter" :mode nil :granularity greater-element :cached t :parent #28 :org-element--cache-sync-key (61 . 175)) (section (:begin 191 :end 225 :contents-begin 191 :contents-end 225 :robust-begin 191 :robust-end 223 :post-blank 0 :post-affiliated 191 :mode section :granularity greater-element :cached t :parent #34 :org-element--cache-sync-key ...) (property-drawer ...))) (headline (:raw-value "A test pager" :begin 225 :end 275 :pre-blank 0 :contents-begin 240 :contents-end 274 :robust-begin nil :robust-end nil :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 1 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 225 :NOTER_PAGE "8" :title "A test pager" :mode nil :granularity greater-element :cached t :parent #28 :org-element--cache-sync-key (61 . 225)) (section (:begin 240 :end 275 :contents-begin 240 :contents-end 274 :robust-begin 240 :robust-end 272 :post-blank 1 :post-affiliated 240 :mode section :granularity greater-element :cached t :parent #35 :org-element--cache-sync-key ...) (property-drawer ...))) (headline (:raw-value "A noter test" :begin 275 :end 324 :pre-blank 0 :contents-begin 290 :contents-end 324 :robust-begin nil :robust-end nil :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 275 :NOTER_PAGE "9" :title "A noter test" :mode nil :granularity greater-element :org-element--cache-sync-key (61 . 275) :cached t :parent #28) (section (:begin 290 :end 324 :contents-begin 290 :contents-end 324 :robust-begin 290 :robust-end 322 :post-blank 0 :post-affiliated 290 :mode section :granularity greater-element :cached t :parent #36 :org-element--cache-sync-key ...) (property-drawer ...)))) :org-element--cache-sync-key nil) (property-drawer (:begin 1 :end 74 :contents-begin 14 :contents-end 68 :post-blank 0 :post-affiliated 1 :mode top-comment :granularity element :cached t :parent #2 :org-element--cache-sync-key (61 . 1)))) :modified-tick 77 :doc-mode pdf-view-mode :display-name "1705.02136.pdf" :notes-file-path "/home/etest/testnoter.org" :property-text "/home/etest/Downloads/1705.02136.pdf" :level 0 :num-notes-in-view nil :window-behavior (start scroll) :window-location horizontal-split :doc-split-fraction (0.5 . 0.5) :auto-save-last-location nil :hide-other t :closest-tipping-point 0.3))
  (closure ((starting-point . 1) (target-location) (session . #s(org-noter--session :id 536251518523202269 :frame #<frame Emacs Org-noter - 1705.02136.pdf 0x564d1b1c9058> :doc-buffer #<buffer Org-noter: 1705.02136.pdf> :notes-buffer #<buffer Notes of 1705.02136.pdf> :ast (section (:begin 1 :end 74 :contents-begin 1 :contents-end 74 :robust-begin 1 :robust-end 72 :post-blank 0 :post-affiliated 1 :mode first-section :granularity greater-element :cached t :parent (org-data ... #7 ... ... ... ... ...) :org-element--cache-sync-key nil) (property-drawer (:begin 1 :end 74 :contents-begin 14 :contents-end 68 :post-blank 0 :post-affiliated 1 :mode top-comment :granularity element :cached t :parent #7 :org-element--cache-sync-key ...))) :modified-tick 77 :doc-mode pdf-view-mode :display-name "1705.02136.pdf" :notes-file-path "/home/etest/testnoter.org" :property-text "/home/etest/Downloads/1705.02136.pdf" :level 0 :num-notes-in-view nil :window-behavior (start scroll) :window-location horizontal-split :doc-split-fraction (0.5 . 0.5) :auto-save-last-location nil :hide-other t :closest-tipping-point 0.3)) (notes-buffer . #<buffer Notes of 1705.02136.pdf>) (document-buffer . #<buffer Org-noter: 1705.02136.pdf>) (document-buffer-name . "Org-noter: 1705.02136.pdf") (document-major-mode . pdf-view-mode) (document-path . "/home/etest/Downloads/1705.02136.pdf") (document . #<buffer 1705.02136.pdf>) (frame-name . "Emacs Org-noter - 1705.02136.pdf") (display-name . "1705.02136.pdf") (raw-value-not-empty) (notes-file-path . "/home/etest/testnoter.org") (document-property-value . "/home/etest/Downloads/1705.02136.pdf") (ast section (:begin 1 :end 74 :contents-begin 1 :contents-end 74 :robust-begin 1 :robust-end 72 :post-blank 0 :post-affiliated 1 :mode first-section :granularity greater-element :cached t :parent (org-data (:begin 1 :contents-begin 1 :contents-end 324 :end 324 :robust-begin 73 :robust-end 322 :post-blank 0 :post-affiliated 1 :path "/home/etest/testnoter.org" :mode org-data :NOTER_DOCUMENT "/home/etest/Downloads/1705.02136.pdf" :CATEGORY "testnoter" :granularity greater-element) #18 (headline (:raw-value "An" :begin 74 :end 118 :pre-blank 0 :contents-begin 79 :contents-end 118 :robust-begin 112 :robust-end 116 :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 74 :NOTER_PAGE "2" :title ... :mode nil :granularity greater-element ...) (section ... ... ...)) (headline (:raw-value "Quick note" :begin 118 :end 175 :pre-blank 0 :contents-begin 131 :contents-end 175 :robust-begin 164 :robust-end 173 :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 118 :NOTER_PAGE "2" :title "Quick note" :mode nil :granularity greater-element ...) (section ... ... ...)) (headline (:raw-value "ANother noter" :begin 175 :end 225 :pre-blank 0 :contents-begin 191 :contents-end 225 :robust-begin nil :robust-end nil :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 175 :NOTER_PAGE "5" :title "ANother noter" :mode nil :granularity greater-element ...) (section ... ...)) (headline (:raw-value "A test pager" :begin 225 :end 275 :pre-blank 0 :contents-begin 240 :contents-end 274 :robust-begin nil :robust-end nil :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 1 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 225 :NOTER_PAGE "8" :title "A test pager" :mode nil :granularity greater-element ...) (section ... ...)) (headline (:raw-value "A noter test" :begin 275 :end 324 :pre-blank 0 :contents-begin 290 :contents-end 324 :robust-begin nil :robust-end nil :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 275 :NOTER_PAGE "9" :title "A noter test" :mode nil :granularity greater-element ...) (section ... ...))) :org-element--cache-sync-key nil) (property-drawer (:begin 1 :end 74 :contents-begin 14 :contents-end 68 :post-blank 0 :post-affiliated 1 :mode top-comment :granularity element :cached t :parent #18 :org-element--cache-sync-key (61 . 1)))) cl-struct-org-noter--session-tags nov-file-name nov-documents-index t) nil (org-noter--setup-windows session) (save-current-buffer (set-buffer document-buffer) (let ((org-noter--inhibit-location-change-handler t)) (if target-location (progn (org-noter--doc-goto-location target-location)))) (org-noter--doc-location-change-handler)))()
  apply((closure ((starting-point . 1) (target-location) (session . #s(org-noter--session :id 536251518523202269 :frame #<frame Emacs Org-noter - 1705.02136.pdf 0x564d1b1c9058> :doc-buffer #<buffer Org-noter: 1705.02136.pdf> :notes-buffer #<buffer Notes of 1705.02136.pdf> :ast (section (:begin 1 :end 74 :contents-begin 1 :contents-end 74 :robust-begin 1 :robust-end 72 :post-blank 0 :post-affiliated 1 :mode first-section :granularity greater-element :cached t :parent (org-data ... #8 ... ... ... ... ...) :org-element--cache-sync-key nil) (property-drawer (:begin 1 :end 74 :contents-begin 14 :contents-end 68 :post-blank 0 :post-affiliated 1 :mode top-comment :granularity element :cached t :parent #8 :org-element--cache-sync-key ...))) :modified-tick 77 :doc-mode pdf-view-mode :display-name "1705.02136.pdf" :notes-file-path "/home/etest/testnoter.org" :property-text "/home/etest/Downloads/1705.02136.pdf" :level 0 :num-notes-in-view nil :window-behavior (start scroll) :window-location horizontal-split :doc-split-fraction (0.5 . 0.5) :auto-save-last-location nil :hide-other t :closest-tipping-point 0.3)) (notes-buffer . #<buffer Notes of 1705.02136.pdf>) (document-buffer . #<buffer Org-noter: 1705.02136.pdf>) (document-buffer-name . "Org-noter: 1705.02136.pdf") (document-major-mode . pdf-view-mode) (document-path . "/home/etest/Downloads/1705.02136.pdf") (document . #<buffer 1705.02136.pdf>) (frame-name . "Emacs Org-noter - 1705.02136.pdf") (display-name . "1705.02136.pdf") (raw-value-not-empty) (notes-file-path . "/home/etest/testnoter.org") (document-property-value . "/home/etest/Downloads/1705.02136.pdf") (ast section (:begin 1 :end 74 :contents-begin 1 :contents-end 74 :robust-begin 1 :robust-end 72 :post-blank 0 :post-affiliated 1 :mode first-section :granularity greater-element :cached t :parent (org-data (:begin 1 :contents-begin 1 :contents-end 324 :end 324 :robust-begin 73 :robust-end 322 :post-blank 0 :post-affiliated 1 :path "/home/etest/testnoter.org" :mode org-data :NOTER_DOCUMENT "/home/etest/Downloads/1705.02136.pdf" :CATEGORY "testnoter" :granularity greater-element) #19 (headline (:raw-value "An" :begin 74 :end 118 :pre-blank 0 :contents-begin 79 :contents-end 118 :robust-begin 112 :robust-end 116 :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 74 :NOTER_PAGE "2" :title ... :mode nil :granularity greater-element :parent #45 :cached t :org-element--cache-sync-key ...) (section ... ... ...)) (headline (:raw-value "Quick note" :begin 118 :end 175 :pre-blank 0 :contents-begin 131 :contents-end 175 :robust-begin 164 :robust-end 173 :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 118 :NOTER_PAGE "2" :title "Quick note" :mode nil :granularity greater-element :org-element--cache-sync-key ... :cached t :parent #45) (section ... ... ...)) (headline (:raw-value "ANother noter" :begin 175 :end 225 :pre-blank 0 :contents-begin 191 :contents-end 225 :robust-begin nil :robust-end nil :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 175 :NOTER_PAGE "5" :title "ANother noter" :mode nil :granularity greater-element :cached t :parent #45 :org-element--cache-sync-key ...) (section ... ...)) (headline (:raw-value "A test pager" :begin 225 :end 275 :pre-blank 0 :contents-begin 240 :contents-end 274 :robust-begin nil :robust-end nil :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 1 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 225 :NOTER_PAGE "8" :title "A test pager" :mode nil :granularity greater-element :cached t :parent #45 :org-element--cache-sync-key ...) (section ... ...)) (headline (:raw-value "A noter test" :begin 275 :end 324 :pre-blank 0 :contents-begin 290 :contents-end 324 :robust-begin nil :robust-end nil :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 275 :NOTER_PAGE "9" :title "A noter test" :mode nil :granularity greater-element :org-element--cache-sync-key ... :cached t :parent #45) (section ... ...))) :org-element--cache-sync-key nil) (property-drawer (:begin 1 :end 74 :contents-begin 14 :contents-end 68 :post-blank 0 :post-affiliated 1 :mode top-comment :granularity element :cached t :parent #19 :org-element--cache-sync-key (61 . 1)))) cl-struct-org-noter--session-tags nov-file-name nov-documents-index t) nil (org-noter--setup-windows session) (save-current-buffer (set-buffer document-buffer) (let ((org-noter--inhibit-location-change-handler t)) (if target-location (progn (org-noter--doc-goto-location target-location)))) (org-noter--doc-location-change-handler))) nil)
  timer-event-handler([t 0 0 50000 nil (closure ((starting-point . 1) (target-location) (session . #s(org-noter--session :id 536251518523202269 :frame #<frame Emacs Org-noter - 1705.02136.pdf 0x564d1b1c9058> :doc-buffer #<buffer Org-noter: 1705.02136.pdf> :notes-buffer #<buffer Notes of 1705.02136.pdf> :ast (section (:begin 1 :end 74 :contents-begin 1 :contents-end 74 :robust-begin 1 :robust-end 72 :post-blank 0 :post-affiliated 1 :mode first-section :granularity greater-element :cached t :parent ... :org-element--cache-sync-key nil) (property-drawer ...)) :modified-tick 77 :doc-mode pdf-view-mode :display-name "1705.02136.pdf" :notes-file-path "/home/etest/testnoter.org" :property-text "/home/etest/Downloads/1705.02136.pdf" :level 0 :num-notes-in-view nil :window-behavior (start scroll) :window-location horizontal-split :doc-split-fraction (0.5 . 0.5) :auto-save-last-location nil :hide-other t :closest-tipping-point 0.3)) (notes-buffer . #<buffer Notes of 1705.02136.pdf>) (document-buffer . #<buffer Org-noter: 1705.02136.pdf>) (document-buffer-name . "Org-noter: 1705.02136.pdf") (document-major-mode . pdf-view-mode) (document-path . "/home/etest/Downloads/1705.02136.pdf") (document . #<buffer 1705.02136.pdf>) (frame-name . "Emacs Org-noter - 1705.02136.pdf") (display-name . "1705.02136.pdf") (raw-value-not-empty) (notes-file-path . "/home/etest/testnoter.org") (document-property-value . "/home/etest/Downloads/1705.02136.pdf") (ast section (:begin 1 :end 74 :contents-begin 1 :contents-end 74 :robust-begin 1 :robust-end 72 :post-blank 0 :post-affiliated 1 :mode first-section :granularity greater-element :cached t :parent (org-data (:begin 1 :contents-begin 1 :contents-end 324 :end 324 :robust-begin 73 :robust-end 322 :post-blank 0 :post-affiliated 1 :path "/home/etest/testnoter.org" :mode org-data :NOTER_DOCUMENT "/home/etest/Downloads/1705.02136.pdf" :CATEGORY "testnoter" :granularity greater-element) #20 (headline ... ...) (headline ... ...) (headline ... ...) (headline ... ...) (headline ... ...)) :org-element--cache-sync-key nil) (property-drawer (:begin 1 :end 74 :contents-begin 14 :contents-end 68 :post-blank 0 :post-affiliated 1 :mode top-comment :granularity element :cached t :parent #20 :org-element--cache-sync-key (61 . 1)))) cl-struct-org-noter--session-tags nov-file-name nov-documents-index t) nil (org-noter--setup-windows session) (save-current-buffer (set-buffer document-buffer) (let ((org-noter--inhibit-location-change-handler t)) (if target-location (progn (org-noter--doc-goto-location target-location)))) (org-noter--doc-location-change-handler))) nil idle 0 nil])

Here is an example of an org file which gives this problem:

:PROPERTIES:
:NOTER_DOCUMENT: /home/etest/Downloads/1705.02136.pdf
:END:
* An
:PROPERTIES:
:NOTER_PAGE: 2
:END:
Test
* Quick note
:PROPERTIES:
:NOTER_PAGE: 2
:END:
Note here
* ANother noter
:PROPERTIES:
:NOTER_PAGE: 5
:END:
* A test pager
:PROPERTIES:
:NOTER_PAGE: 8
:END:

* A noter test
:PROPERTIES:
:NOTER_PAGE: 9
:END:

(the PDF is arbitrary, I tried with a few different PDFs and they all yielded the same failure)

Editing the first headline's NOTER_PAGE to be 1 instead of 2 allows the note to load correctly. If point is on a headline of any page number then org-noter successfully opens but will only show the headline where point was and its contents, and will not show any other headlines.

The expected behavior is that calling M-x org-noter should open the PDF on the left and the org document on the right, showing all top level headlines (if any), no matter where point was and no matter what pages are included in the headlines (if any).

This can be reproduced in an Ubuntu 21.10 VM with emacs and org-mode freshly compiled from git.

When I 1. set the noter document in a file level property drawer, 2. have the first headline with a note not be page 1 of a PDF, 3. have point on the property drawer, 4. and then call M-x org-noter, the note buffer fails to open, only the PDF opens in a buffer, and emacs throws the following in the debug log: ``` Debugger entered--Lisp error: (outline-before-first-heading) org-narrow-to-subtree() (save-excursion (goto-char (org-element-property :contents-begin ast)) (org-show-entry) (org-narrow-to-subtree) (org-cycle-hide-drawers 'all)) (progn (save-excursion (goto-char (org-element-property :contents-begin ast)) (org-show-entry) (org-narrow-to-subtree) (org-cycle-hide-drawers 'all))) (if (and ast (not (org-noter--no-heading-p))) (progn (save-excursion (goto-char (org-element-property :contents-begin ast)) (org-show-entry) (org-narrow-to-subtree) (org-cycle-hide-drawers 'all)))) org-noter--narrow-to-root((section (:begin 1 :end 74 :contents-begin 1 :contents-end 74 :robust-begin 1 :robust-end 72 :post-blank 0 :post-affiliated 1 :mode first-section :granularity greater-element :cached t :parent (org-data (:begin 1 :contents-begin 1 :contents-end 324 :end 324 :robust-begin 73 :robust-end 322 :post-blank 0 :post-affiliated 1 :path "/home/etest/testnoter.org" :mode org-data :NOTER_DOCUMENT "/home/etest/Downloads/1705.02136.pdf" :CATEGORY "testnoter" :granularity greater-element) #1 (headline (:raw-value "An" :begin 74 :end 118 :pre-blank 0 :contents-begin 79 :contents-end 118 :robust-begin 112 :robust-end 116 :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 74 :NOTER_PAGE "2" :title (...) :mode nil :granularity greater-element ...) (section (:begin 79 :end 118 :contents-begin 79 :contents-end 118 :robust-begin 79 :robust-end 116 :post-blank 0 :post-affiliated 79 :mode section :granularity greater-element :cached t :parent #31) (property-drawer ...) (paragraph ...))) (headline (:raw-value "Quick note" :begin 118 :end 175 :pre-blank 0 :contents-begin 131 :contents-end 175 :robust-begin 164 :robust-end 173 :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 118 :NOTER_PAGE "2" :title "Quick note" :mode nil :granularity greater-element ...) (section (:begin 131 :end 175 :contents-begin 131 :contents-end 175 :robust-begin 131 :robust-end 173 :post-blank 0 :post-affiliated 131 :mode section :granularity greater-element :cached t :parent #32 :org-element--cache-sync-key ...) (property-drawer ...) (paragraph ...))) (headline (:raw-value "ANother noter" :begin 175 :end 225 :pre-blank 0 :contents-begin 191 :contents-end 225 :robust-begin nil :robust-end nil :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 175 :NOTER_PAGE "5" :title "ANother noter" :mode nil :granularity greater-element ...) (section (:begin 191 :end 225 :contents-begin 191 :contents-end 225 :robust-begin 191 :robust-end 223 :post-blank 0 :post-affiliated 191 :mode section :granularity greater-element :cached t :parent #33 :org-element--cache-sync-key ...) (property-drawer ...))) (headline (:raw-value "A test pager" :begin 225 :end 275 :pre-blank 0 :contents-begin 240 :contents-end 274 :robust-begin nil :robust-end nil :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 1 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 225 :NOTER_PAGE "8" :title "A test pager" :mode nil :granularity greater-element ...) (section (:begin 240 :end 275 :contents-begin 240 :contents-end 274 :robust-begin 240 :robust-end 272 :post-blank 1 :post-affiliated 240 :mode section :granularity greater-element :cached t :parent #34 :org-element--cache-sync-key ...) (property-drawer ...))) (headline (:raw-value "A noter test" :begin 275 :end 324 :pre-blank 0 :contents-begin 290 :contents-end 324 :robust-begin nil :robust-end nil :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 275 :NOTER_PAGE "9" :title "A noter test" :mode nil :granularity greater-element ...) (section (:begin 290 :end 324 :contents-begin 290 :contents-end 324 :robust-begin 290 :robust-end 322 :post-blank 0 :post-affiliated 290 :mode section :granularity greater-element :cached t :parent #35 :org-element--cache-sync-key ...) (property-drawer ...)))) :org-element--cache-sync-key nil) (property-drawer (:begin 1 :end 74 :contents-begin 14 :contents-end 68 :post-blank 0 :post-affiliated 1 :mode top-comment :granularity element :cached t :parent #1 :org-element--cache-sync-key (61 . 1))))) (if org-noter-disable-narrowing nil (org-noter--narrow-to-root (org-noter--parse-root session))) (save-current-buffer (set-buffer notes-buffer) (if org-noter-disable-narrowing nil (org-noter--narrow-to-root (org-noter--parse-root session))) (setq notes-window (org-noter--get-notes-window 'start)) (org-noter--set-notes-scroll notes-window)) (let* ((doc-buffer (progn (or (progn (and (memq ... cl-struct-org-noter--session-tags) t)) (signal 'wrong-type-argument (list 'org-noter--session session))) (aref session 3))) (doc-window (selected-window)) (notes-buffer (progn (or (progn (and (memq ... cl-struct-org-noter--session-tags) t)) (signal 'wrong-type-argument (list 'org-noter--session session))) (aref session 4))) (window-location (progn (or (progn (and (memq ... cl-struct-org-noter--session-tags) t)) (signal 'wrong-type-argument (list 'org-noter--session session))) (aref session 14))) notes-window) (set-window-buffer doc-window doc-buffer) (save-current-buffer (set-buffer notes-buffer) (if org-noter-disable-narrowing nil (org-noter--narrow-to-root (org-noter--parse-root session))) (setq notes-window (org-noter--get-notes-window 'start)) (org-noter--set-notes-scroll notes-window)) (if org-noter-swap-window (progn (let* ((--cl-swap-windows-- #'(lambda ... "Swap the buffers of WINDOW1 and WINDOW2." ...))) (let ((frame (window-frame notes-window))) (if (and (frame-live-p frame) (not ...)) (progn (select-frame-set-input-focus ...))) (if (and (window-live-p notes-window) (not ...)) (progn (funcall --cl-swap-windows-- notes-window doc-window))))) (if (eq window-location 'horizontal-split) (enlarge-window (- (ceiling (* ... ...)) (window-total-width)) t) (enlarge-window (- (ceiling (* ... ...)) (window-total-height)))))) (if org-noter-swap-window (set-window-dedicated-p notes-window t) (set-window-dedicated-p doc-window t))) (progn (select-frame (progn (or (progn (and (memq (type-of session) cl-struct-org-noter--session-tags) t)) (signal 'wrong-type-argument (list 'org-noter--session session))) (aref session 2)) 'norecord) (delete-other-windows) (let* ((doc-buffer (progn (or (progn (and ... t)) (signal 'wrong-type-argument (list ... session))) (aref session 3))) (doc-window (selected-window)) (notes-buffer (progn (or (progn (and ... t)) (signal 'wrong-type-argument (list ... session))) (aref session 4))) (window-location (progn (or (progn (and ... t)) (signal 'wrong-type-argument (list ... session))) (aref session 14))) notes-window) (set-window-buffer doc-window doc-buffer) (save-current-buffer (set-buffer notes-buffer) (if org-noter-disable-narrowing nil (org-noter--narrow-to-root (org-noter--parse-root session))) (setq notes-window (org-noter--get-notes-window 'start)) (org-noter--set-notes-scroll notes-window)) (if org-noter-swap-window (progn (let* ((--cl-swap-windows-- #'...)) (let ((frame ...)) (if (and ... ...) (progn ...)) (if (and ... ...) (progn ...)))) (if (eq window-location 'horizontal-split) (enlarge-window (- (ceiling ...) (window-total-width)) t) (enlarge-window (- (ceiling ...) (window-total-height)))))) (if org-noter-swap-window (set-window-dedicated-p notes-window t) (set-window-dedicated-p doc-window t)))) (unwind-protect (progn (select-frame (progn (or (progn (and (memq ... cl-struct-org-noter--session-tags) t)) (signal 'wrong-type-argument (list 'org-noter--session session))) (aref session 2)) 'norecord) (delete-other-windows) (let* ((doc-buffer (progn (or (progn ...) (signal ... ...)) (aref session 3))) (doc-window (selected-window)) (notes-buffer (progn (or (progn ...) (signal ... ...)) (aref session 4))) (window-location (progn (or (progn ...) (signal ... ...)) (aref session 14))) notes-window) (set-window-buffer doc-window doc-buffer) (save-current-buffer (set-buffer notes-buffer) (if org-noter-disable-narrowing nil (org-noter--narrow-to-root (org-noter--parse-root session))) (setq notes-window (org-noter--get-notes-window 'start)) (org-noter--set-notes-scroll notes-window)) (if org-noter-swap-window (progn (let* ((--cl-swap-windows-- ...)) (let (...) (if ... ...) (if ... ...))) (if (eq window-location 'horizontal-split) (enlarge-window (- ... ...) t) (enlarge-window (- ... ...))))) (if org-noter-swap-window (set-window-dedicated-p notes-window t) (set-window-dedicated-p doc-window t)))) (if (frame-live-p old-frame) (progn (select-frame old-frame 'norecord))) (if (buffer-live-p old-buffer) (progn (set-buffer old-buffer)))) (let ((old-frame (selected-frame)) (old-buffer (current-buffer))) (unwind-protect (progn (select-frame (progn (or (progn (and ... t)) (signal 'wrong-type-argument (list ... session))) (aref session 2)) 'norecord) (delete-other-windows) (let* ((doc-buffer (progn (or ... ...) (aref session 3))) (doc-window (selected-window)) (notes-buffer (progn (or ... ...) (aref session 4))) (window-location (progn (or ... ...) (aref session 14))) notes-window) (set-window-buffer doc-window doc-buffer) (save-current-buffer (set-buffer notes-buffer) (if org-noter-disable-narrowing nil (org-noter--narrow-to-root (org-noter--parse-root session))) (setq notes-window (org-noter--get-notes-window 'start)) (org-noter--set-notes-scroll notes-window)) (if org-noter-swap-window (progn (let* (...) (let ... ... ...)) (if (eq window-location ...) (enlarge-window ... t) (enlarge-window ...)))) (if org-noter-swap-window (set-window-dedicated-p notes-window t) (set-window-dedicated-p doc-window t)))) (if (frame-live-p old-frame) (progn (select-frame old-frame 'norecord))) (if (buffer-live-p old-buffer) (progn (set-buffer old-buffer))))) (progn (let ((old-frame (selected-frame)) (old-buffer (current-buffer))) (unwind-protect (progn (select-frame (progn (or (progn ...) (signal ... ...)) (aref session 2)) 'norecord) (delete-other-windows) (let* ((doc-buffer (progn ... ...)) (doc-window (selected-window)) (notes-buffer (progn ... ...)) (window-location (progn ... ...)) notes-window) (set-window-buffer doc-window doc-buffer) (save-current-buffer (set-buffer notes-buffer) (if org-noter-disable-narrowing nil (org-noter--narrow-to-root ...)) (setq notes-window (org-noter--get-notes-window ...)) (org-noter--set-notes-scroll notes-window)) (if org-noter-swap-window (progn (let* ... ...) (if ... ... ...))) (if org-noter-swap-window (set-window-dedicated-p notes-window t) (set-window-dedicated-p doc-window t)))) (if (frame-live-p old-frame) (progn (select-frame old-frame 'norecord))) (if (buffer-live-p old-buffer) (progn (set-buffer old-buffer)))))) (if (org-noter--valid-session session) (progn (let ((old-frame (selected-frame)) (old-buffer (current-buffer))) (unwind-protect (progn (select-frame (progn (or ... ...) (aref session 2)) 'norecord) (delete-other-windows) (let* ((doc-buffer ...) (doc-window ...) (notes-buffer ...) (window-location ...) notes-window) (set-window-buffer doc-window doc-buffer) (save-current-buffer (set-buffer notes-buffer) (if org-noter-disable-narrowing nil ...) (setq notes-window ...) (org-noter--set-notes-scroll notes-window)) (if org-noter-swap-window (progn ... ...)) (if org-noter-swap-window (set-window-dedicated-p notes-window t) (set-window-dedicated-p doc-window t)))) (if (frame-live-p old-frame) (progn (select-frame old-frame 'norecord))) (if (buffer-live-p old-buffer) (progn (set-buffer old-buffer))))))) org-noter--setup-windows(#s(org-noter--session :id 536251518523202269 :frame #<frame Emacs Org-noter - 1705.02136.pdf 0x564d1b1c9058> :doc-buffer #<buffer Org-noter: 1705.02136.pdf> :notes-buffer #<buffer Notes of 1705.02136.pdf> :ast (section (:begin 1 :end 74 :contents-begin 1 :contents-end 74 :robust-begin 1 :robust-end 72 :post-blank 0 :post-affiliated 1 :mode first-section :granularity greater-element :cached t :parent (org-data (:begin 1 :contents-begin 1 :contents-end 324 :end 324 :robust-begin 73 :robust-end 322 :post-blank 0 :post-affiliated 1 :path "/home/etest/testnoter.org" :mode org-data :NOTER_DOCUMENT "/home/etest/Downloads/1705.02136.pdf" :CATEGORY "testnoter" :granularity greater-element) #2 (headline (:raw-value "An" :begin 74 :end 118 :pre-blank 0 :contents-begin 79 :contents-end 118 :robust-begin 112 :robust-end 116 :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 74 :NOTER_PAGE "2" :title (...) :mode nil :granularity greater-element :parent #28 :cached t :org-element--cache-sync-key (61 . 74)) (section (:begin 79 :end 118 :contents-begin 79 :contents-end 118 :robust-begin 79 :robust-end 116 :post-blank 0 :post-affiliated 79 :mode section :granularity greater-element :cached t :parent #32) (property-drawer ...) (paragraph ...))) (headline (:raw-value "Quick note" :begin 118 :end 175 :pre-blank 0 :contents-begin 131 :contents-end 175 :robust-begin 164 :robust-end 173 :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 118 :NOTER_PAGE "2" :title "Quick note" :mode nil :granularity greater-element :org-element--cache-sync-key (61 . 102) :cached t :parent #28) (section (:begin 131 :end 175 :contents-begin 131 :contents-end 175 :robust-begin 131 :robust-end 173 :post-blank 0 :post-affiliated 131 :mode section :granularity greater-element :cached t :parent #33 :org-element--cache-sync-key ...) (property-drawer ...) (paragraph ...))) (headline (:raw-value "ANother noter" :begin 175 :end 225 :pre-blank 0 :contents-begin 191 :contents-end 225 :robust-begin nil :robust-end nil :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 175 :NOTER_PAGE "5" :title "ANother noter" :mode nil :granularity greater-element :cached t :parent #28 :org-element--cache-sync-key (61 . 175)) (section (:begin 191 :end 225 :contents-begin 191 :contents-end 225 :robust-begin 191 :robust-end 223 :post-blank 0 :post-affiliated 191 :mode section :granularity greater-element :cached t :parent #34 :org-element--cache-sync-key ...) (property-drawer ...))) (headline (:raw-value "A test pager" :begin 225 :end 275 :pre-blank 0 :contents-begin 240 :contents-end 274 :robust-begin nil :robust-end nil :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 1 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 225 :NOTER_PAGE "8" :title "A test pager" :mode nil :granularity greater-element :cached t :parent #28 :org-element--cache-sync-key (61 . 225)) (section (:begin 240 :end 275 :contents-begin 240 :contents-end 274 :robust-begin 240 :robust-end 272 :post-blank 1 :post-affiliated 240 :mode section :granularity greater-element :cached t :parent #35 :org-element--cache-sync-key ...) (property-drawer ...))) (headline (:raw-value "A noter test" :begin 275 :end 324 :pre-blank 0 :contents-begin 290 :contents-end 324 :robust-begin nil :robust-end nil :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 275 :NOTER_PAGE "9" :title "A noter test" :mode nil :granularity greater-element :org-element--cache-sync-key (61 . 275) :cached t :parent #28) (section (:begin 290 :end 324 :contents-begin 290 :contents-end 324 :robust-begin 290 :robust-end 322 :post-blank 0 :post-affiliated 290 :mode section :granularity greater-element :cached t :parent #36 :org-element--cache-sync-key ...) (property-drawer ...)))) :org-element--cache-sync-key nil) (property-drawer (:begin 1 :end 74 :contents-begin 14 :contents-end 68 :post-blank 0 :post-affiliated 1 :mode top-comment :granularity element :cached t :parent #2 :org-element--cache-sync-key (61 . 1)))) :modified-tick 77 :doc-mode pdf-view-mode :display-name "1705.02136.pdf" :notes-file-path "/home/etest/testnoter.org" :property-text "/home/etest/Downloads/1705.02136.pdf" :level 0 :num-notes-in-view nil :window-behavior (start scroll) :window-location horizontal-split :doc-split-fraction (0.5 . 0.5) :auto-save-last-location nil :hide-other t :closest-tipping-point 0.3)) (closure ((starting-point . 1) (target-location) (session . #s(org-noter--session :id 536251518523202269 :frame #<frame Emacs Org-noter - 1705.02136.pdf 0x564d1b1c9058> :doc-buffer #<buffer Org-noter: 1705.02136.pdf> :notes-buffer #<buffer Notes of 1705.02136.pdf> :ast (section (:begin 1 :end 74 :contents-begin 1 :contents-end 74 :robust-begin 1 :robust-end 72 :post-blank 0 :post-affiliated 1 :mode first-section :granularity greater-element :cached t :parent (org-data ... #7 ... ... ... ... ...) :org-element--cache-sync-key nil) (property-drawer (:begin 1 :end 74 :contents-begin 14 :contents-end 68 :post-blank 0 :post-affiliated 1 :mode top-comment :granularity element :cached t :parent #7 :org-element--cache-sync-key ...))) :modified-tick 77 :doc-mode pdf-view-mode :display-name "1705.02136.pdf" :notes-file-path "/home/etest/testnoter.org" :property-text "/home/etest/Downloads/1705.02136.pdf" :level 0 :num-notes-in-view nil :window-behavior (start scroll) :window-location horizontal-split :doc-split-fraction (0.5 . 0.5) :auto-save-last-location nil :hide-other t :closest-tipping-point 0.3)) (notes-buffer . #<buffer Notes of 1705.02136.pdf>) (document-buffer . #<buffer Org-noter: 1705.02136.pdf>) (document-buffer-name . "Org-noter: 1705.02136.pdf") (document-major-mode . pdf-view-mode) (document-path . "/home/etest/Downloads/1705.02136.pdf") (document . #<buffer 1705.02136.pdf>) (frame-name . "Emacs Org-noter - 1705.02136.pdf") (display-name . "1705.02136.pdf") (raw-value-not-empty) (notes-file-path . "/home/etest/testnoter.org") (document-property-value . "/home/etest/Downloads/1705.02136.pdf") (ast section (:begin 1 :end 74 :contents-begin 1 :contents-end 74 :robust-begin 1 :robust-end 72 :post-blank 0 :post-affiliated 1 :mode first-section :granularity greater-element :cached t :parent (org-data (:begin 1 :contents-begin 1 :contents-end 324 :end 324 :robust-begin 73 :robust-end 322 :post-blank 0 :post-affiliated 1 :path "/home/etest/testnoter.org" :mode org-data :NOTER_DOCUMENT "/home/etest/Downloads/1705.02136.pdf" :CATEGORY "testnoter" :granularity greater-element) #18 (headline (:raw-value "An" :begin 74 :end 118 :pre-blank 0 :contents-begin 79 :contents-end 118 :robust-begin 112 :robust-end 116 :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 74 :NOTER_PAGE "2" :title ... :mode nil :granularity greater-element ...) (section ... ... ...)) (headline (:raw-value "Quick note" :begin 118 :end 175 :pre-blank 0 :contents-begin 131 :contents-end 175 :robust-begin 164 :robust-end 173 :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 118 :NOTER_PAGE "2" :title "Quick note" :mode nil :granularity greater-element ...) (section ... ... ...)) (headline (:raw-value "ANother noter" :begin 175 :end 225 :pre-blank 0 :contents-begin 191 :contents-end 225 :robust-begin nil :robust-end nil :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 175 :NOTER_PAGE "5" :title "ANother noter" :mode nil :granularity greater-element ...) (section ... ...)) (headline (:raw-value "A test pager" :begin 225 :end 275 :pre-blank 0 :contents-begin 240 :contents-end 274 :robust-begin nil :robust-end nil :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 1 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 225 :NOTER_PAGE "8" :title "A test pager" :mode nil :granularity greater-element ...) (section ... ...)) (headline (:raw-value "A noter test" :begin 275 :end 324 :pre-blank 0 :contents-begin 290 :contents-end 324 :robust-begin nil :robust-end nil :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 275 :NOTER_PAGE "9" :title "A noter test" :mode nil :granularity greater-element ...) (section ... ...))) :org-element--cache-sync-key nil) (property-drawer (:begin 1 :end 74 :contents-begin 14 :contents-end 68 :post-blank 0 :post-affiliated 1 :mode top-comment :granularity element :cached t :parent #18 :org-element--cache-sync-key (61 . 1)))) cl-struct-org-noter--session-tags nov-file-name nov-documents-index t) nil (org-noter--setup-windows session) (save-current-buffer (set-buffer document-buffer) (let ((org-noter--inhibit-location-change-handler t)) (if target-location (progn (org-noter--doc-goto-location target-location)))) (org-noter--doc-location-change-handler)))() apply((closure ((starting-point . 1) (target-location) (session . #s(org-noter--session :id 536251518523202269 :frame #<frame Emacs Org-noter - 1705.02136.pdf 0x564d1b1c9058> :doc-buffer #<buffer Org-noter: 1705.02136.pdf> :notes-buffer #<buffer Notes of 1705.02136.pdf> :ast (section (:begin 1 :end 74 :contents-begin 1 :contents-end 74 :robust-begin 1 :robust-end 72 :post-blank 0 :post-affiliated 1 :mode first-section :granularity greater-element :cached t :parent (org-data ... #8 ... ... ... ... ...) :org-element--cache-sync-key nil) (property-drawer (:begin 1 :end 74 :contents-begin 14 :contents-end 68 :post-blank 0 :post-affiliated 1 :mode top-comment :granularity element :cached t :parent #8 :org-element--cache-sync-key ...))) :modified-tick 77 :doc-mode pdf-view-mode :display-name "1705.02136.pdf" :notes-file-path "/home/etest/testnoter.org" :property-text "/home/etest/Downloads/1705.02136.pdf" :level 0 :num-notes-in-view nil :window-behavior (start scroll) :window-location horizontal-split :doc-split-fraction (0.5 . 0.5) :auto-save-last-location nil :hide-other t :closest-tipping-point 0.3)) (notes-buffer . #<buffer Notes of 1705.02136.pdf>) (document-buffer . #<buffer Org-noter: 1705.02136.pdf>) (document-buffer-name . "Org-noter: 1705.02136.pdf") (document-major-mode . pdf-view-mode) (document-path . "/home/etest/Downloads/1705.02136.pdf") (document . #<buffer 1705.02136.pdf>) (frame-name . "Emacs Org-noter - 1705.02136.pdf") (display-name . "1705.02136.pdf") (raw-value-not-empty) (notes-file-path . "/home/etest/testnoter.org") (document-property-value . "/home/etest/Downloads/1705.02136.pdf") (ast section (:begin 1 :end 74 :contents-begin 1 :contents-end 74 :robust-begin 1 :robust-end 72 :post-blank 0 :post-affiliated 1 :mode first-section :granularity greater-element :cached t :parent (org-data (:begin 1 :contents-begin 1 :contents-end 324 :end 324 :robust-begin 73 :robust-end 322 :post-blank 0 :post-affiliated 1 :path "/home/etest/testnoter.org" :mode org-data :NOTER_DOCUMENT "/home/etest/Downloads/1705.02136.pdf" :CATEGORY "testnoter" :granularity greater-element) #19 (headline (:raw-value "An" :begin 74 :end 118 :pre-blank 0 :contents-begin 79 :contents-end 118 :robust-begin 112 :robust-end 116 :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 74 :NOTER_PAGE "2" :title ... :mode nil :granularity greater-element :parent #45 :cached t :org-element--cache-sync-key ...) (section ... ... ...)) (headline (:raw-value "Quick note" :begin 118 :end 175 :pre-blank 0 :contents-begin 131 :contents-end 175 :robust-begin 164 :robust-end 173 :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 118 :NOTER_PAGE "2" :title "Quick note" :mode nil :granularity greater-element :org-element--cache-sync-key ... :cached t :parent #45) (section ... ... ...)) (headline (:raw-value "ANother noter" :begin 175 :end 225 :pre-blank 0 :contents-begin 191 :contents-end 225 :robust-begin nil :robust-end nil :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 175 :NOTER_PAGE "5" :title "ANother noter" :mode nil :granularity greater-element :cached t :parent #45 :org-element--cache-sync-key ...) (section ... ...)) (headline (:raw-value "A test pager" :begin 225 :end 275 :pre-blank 0 :contents-begin 240 :contents-end 274 :robust-begin nil :robust-end nil :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 1 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 225 :NOTER_PAGE "8" :title "A test pager" :mode nil :granularity greater-element :cached t :parent #45 :org-element--cache-sync-key ...) (section ... ...)) (headline (:raw-value "A noter test" :begin 275 :end 324 :pre-blank 0 :contents-begin 290 :contents-end 324 :robust-begin nil :robust-end nil :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 275 :NOTER_PAGE "9" :title "A noter test" :mode nil :granularity greater-element :org-element--cache-sync-key ... :cached t :parent #45) (section ... ...))) :org-element--cache-sync-key nil) (property-drawer (:begin 1 :end 74 :contents-begin 14 :contents-end 68 :post-blank 0 :post-affiliated 1 :mode top-comment :granularity element :cached t :parent #19 :org-element--cache-sync-key (61 . 1)))) cl-struct-org-noter--session-tags nov-file-name nov-documents-index t) nil (org-noter--setup-windows session) (save-current-buffer (set-buffer document-buffer) (let ((org-noter--inhibit-location-change-handler t)) (if target-location (progn (org-noter--doc-goto-location target-location)))) (org-noter--doc-location-change-handler))) nil) timer-event-handler([t 0 0 50000 nil (closure ((starting-point . 1) (target-location) (session . #s(org-noter--session :id 536251518523202269 :frame #<frame Emacs Org-noter - 1705.02136.pdf 0x564d1b1c9058> :doc-buffer #<buffer Org-noter: 1705.02136.pdf> :notes-buffer #<buffer Notes of 1705.02136.pdf> :ast (section (:begin 1 :end 74 :contents-begin 1 :contents-end 74 :robust-begin 1 :robust-end 72 :post-blank 0 :post-affiliated 1 :mode first-section :granularity greater-element :cached t :parent ... :org-element--cache-sync-key nil) (property-drawer ...)) :modified-tick 77 :doc-mode pdf-view-mode :display-name "1705.02136.pdf" :notes-file-path "/home/etest/testnoter.org" :property-text "/home/etest/Downloads/1705.02136.pdf" :level 0 :num-notes-in-view nil :window-behavior (start scroll) :window-location horizontal-split :doc-split-fraction (0.5 . 0.5) :auto-save-last-location nil :hide-other t :closest-tipping-point 0.3)) (notes-buffer . #<buffer Notes of 1705.02136.pdf>) (document-buffer . #<buffer Org-noter: 1705.02136.pdf>) (document-buffer-name . "Org-noter: 1705.02136.pdf") (document-major-mode . pdf-view-mode) (document-path . "/home/etest/Downloads/1705.02136.pdf") (document . #<buffer 1705.02136.pdf>) (frame-name . "Emacs Org-noter - 1705.02136.pdf") (display-name . "1705.02136.pdf") (raw-value-not-empty) (notes-file-path . "/home/etest/testnoter.org") (document-property-value . "/home/etest/Downloads/1705.02136.pdf") (ast section (:begin 1 :end 74 :contents-begin 1 :contents-end 74 :robust-begin 1 :robust-end 72 :post-blank 0 :post-affiliated 1 :mode first-section :granularity greater-element :cached t :parent (org-data (:begin 1 :contents-begin 1 :contents-end 324 :end 324 :robust-begin 73 :robust-end 322 :post-blank 0 :post-affiliated 1 :path "/home/etest/testnoter.org" :mode org-data :NOTER_DOCUMENT "/home/etest/Downloads/1705.02136.pdf" :CATEGORY "testnoter" :granularity greater-element) #20 (headline ... ...) (headline ... ...) (headline ... ...) (headline ... ...) (headline ... ...)) :org-element--cache-sync-key nil) (property-drawer (:begin 1 :end 74 :contents-begin 14 :contents-end 68 :post-blank 0 :post-affiliated 1 :mode top-comment :granularity element :cached t :parent #20 :org-element--cache-sync-key (61 . 1)))) cl-struct-org-noter--session-tags nov-file-name nov-documents-index t) nil (org-noter--setup-windows session) (save-current-buffer (set-buffer document-buffer) (let ((org-noter--inhibit-location-change-handler t)) (if target-location (progn (org-noter--doc-goto-location target-location)))) (org-noter--doc-location-change-handler))) nil idle 0 nil]) ``` Here is an example of an org file which gives this problem: ``` :PROPERTIES: :NOTER_DOCUMENT: /home/etest/Downloads/1705.02136.pdf :END: * An :PROPERTIES: :NOTER_PAGE: 2 :END: Test * Quick note :PROPERTIES: :NOTER_PAGE: 2 :END: Note here * ANother noter :PROPERTIES: :NOTER_PAGE: 5 :END: * A test pager :PROPERTIES: :NOTER_PAGE: 8 :END: * A noter test :PROPERTIES: :NOTER_PAGE: 9 :END: ``` (the PDF is arbitrary, I tried with a few different PDFs and they all yielded the same failure) Editing the first headline's NOTER_PAGE to be 1 instead of 2 allows the note to load correctly. If point is on a headline of any page number then org-noter successfully opens but will only show the headline where point was and its contents, and will not show any other headlines. The expected behavior is that calling M-x org-noter should open the PDF on the left and the org document on the right, showing all top level headlines (if any), no matter where point was and no matter what pages are included in the headlines (if any). This can be reproduced in an Ubuntu 21.10 VM with emacs and org-mode freshly compiled from git.
c1-g повторно отвори преди 3 години
c1-g коментира преди 3 години
Притежател

Hi, I could not reproduce the issue that you've described above.

Are you sure you're up-to-date?

Below, I tested the example of your org file with another pdf file. (Notice that my pointer was at the heading called "An" which was on page 2 and it opened as expected.)

Screencast

The document opened on the right because I have org-noter-swap-window on.

Hi, I could not reproduce the issue that you've described above. Are you sure you're up-to-date? Below, I tested the example of your org file with another pdf file. (Notice that my pointer was at the heading called "An" which was on page 2 and it opened as expected.) ![Screencast](https://z.zz.fo/s8b3J.gif) The document opened on the right because I have `org-noter-swap-window` on.
virtualprocessor коментира преди 3 години
Участник

Thanks for taking a look at this. To double check on the Ubuntu VM I wiped out all my previous build directories, installed emacs, org-mode and your package all fresh from git, and tried again with the test org file and a random PDF. I can confirm I can still replicate the behavior I described above (complete failure when point is at the top and there is no page 1 property, success if point is at top and there is a page 1 property, and removal of all other headlines when point is on a headline).

For the example situation where point is on the headline "An", org-noter at least opens successfully but the only headline visible is "An", all others are removed from view (unlike in your gif where all headlines are visible, which is the behavior I desire). I have attached a screenshot of this.

Thanks for taking a look at this. To double check on the Ubuntu VM I wiped out all my previous build directories, installed emacs, org-mode and your package all fresh from git, and tried again with the test org file and a random PDF. I can confirm I can still replicate the behavior I described above (complete failure when point is at the top and there is no page 1 property, success if point is at top and there is a page 1 property, and removal of all other headlines when point is on a headline). For the example situation where point is on the headline "An", org-noter at least opens successfully but the only headline visible is "An", all others are removed from view (unlike in your gif where all headlines are visible, which is the behavior I desire). I have attached a screenshot of this.
c1-g коментира преди 2 години
Притежател

Maybe your org-noter-hide-other is non-nil. Try putting (setq org-noter-hide-other nil) in your config file.

Maybe your `org-noter-hide-other` is non-nil. Try putting `(setq org-noter-hide-other nil)` in your config file.
Впишете се за да се присъедините към разговора.
Няма етикет
Няма етап
Няма изпълнител
2 участника
Зареждане...
Отказ
Запис
Все още няма съдържание.