If I call org-sparse-tree, I'm able to move through the highlighted matches with next-error (=M-g n=). If I then turn off the sparse tree highlighting via =C-c C-c=, switch to a different org buffer and run org-sparse-tree again, the correct matches are highlighted, but I'm no longer able to navigate between them with next-error/previous-error: I get the message "progn: No more matches" even when there are clearly more matches.

Running emacs -Q in some simple dummy org files, I was able to reproduce this in both the latest version of org mode from git and my built-in version (9.7.25).

Thanks!

Emacs : GNU Emacs 30.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.43, cairo version 1.18.4) Package: Org mode version 9.8-pre (release_9.7.34-429-g69b891 @ /home/pjaml/src/org-mode/lisp/)

current state:
==============
(setq
org-yank-image-file-name-function 'org-yank-image-autogen-filename
org-persist-before-write-hook '(org-element--cache-persist-before-write) org-speed-command-hook '(org-speed-command-activate org-babel-speed-command-activate)
org-persist-after-read-hook '(org-element--cache-persist-after-read)
org-confirm-elisp-link-function 'yes-or-no-p
org-mode-hook '(#[nil ((add-hook 'change-major-mode-hook 'org-fold-show-all 'append 'local))
                   (org--rds reftex-docstruct-symbol org-attach-method
org--single-lines-list-is-paragraph org-element-greater-elements org-agenda-restrict-end org-agenda-restrict-begin org-agenda-restrict org-clock-history org-agenda-current-date org-with-time org-defdecode org-def org-read-date-inactive org-ans2 org-ans1 org-columns-current-fmt-compiled org-clock-current-task org-clock-effort org-agenda-skip-function org-agenda-skip-comment-trees org-agenda-archives-mode org-end-time-was-given org-time-was-given org-log-note-extra org-log-note-purpose org-log-post-message org-last-inserted-timestamp org-last-changed-timestamp
                    org-entry-property-inherited-from org-state
org-agenda-headline-snapshot-before-repeat org-agenda-buffer-name org-agenda-start-on-weekday org-agenda-buffer-tmp-name org-log-note-marker org-priority-regexp org-mode-abbrev-table org-element-cache-persistent org-element-cache-version buffer-face-mode-face org-tbl-menu org-org-menu org-struct-menu org-entities org-last-state org-id-track-globally
                    org-clock-start-time texmathp-why remember-data-file
org-agenda-tags-todo-honor-ignore-options calc-embedded-open-mode calc-embedded-open-formula calc-embedded-close-formula align-mode-rules-list
                    org-emphasis-alist org-emphasis-regexp-components
org-export-registered-backends org-modules crm-separator
                    org-babel-load-languages org-id-overriding-file-name
org-indent-indentation-per-level org-element--timestamp-regexp org-element-cache-map-continue-from org-element-paragraph-separate
                    org-agenda-buffer-name org-inlinetask-min-level t)
                   ]
                 #[nil
((add-hook 'change-major-mode-hook #'org-babel-show-result-all 'append 'local)) (org-src-window-setup *this* org-babel-confirm-evaluate-answer-no org-babel-tangle-uncomment-comments org-src-lang-modes org-edit-src-content-indentation org-babel-library-of-babel t)
                   ]
                 org-babel-result-hide-spec org-babel-hide-all-hashes)
org-confirm-shell-link-function 'yes-or-no-p
org-archive-hook '(org-attach-archive-delete-maybe)
org-metaup-hook '(org-babel-load-in-session-maybe)
org-occur-hook '(org-first-headline-recenter)
org-bibtex-headline-format-function 'org-bibtex-headline-format-default
org-link-parameters '(("attachment" :follow org-attach-follow :complete org-attach-complete-link
                        :preview org-attach-preview-file)
("id" :follow org-id-open :store org-id-store-link-maybe) ("eww" :follow org-eww-open :store org-eww-store-link) ("rmail" :follow org-rmail-open :store org-rmail-store-link) ("mhe" :follow org-mhe-open :store org-mhe-store-link) ("irc" :follow org-irc-visit :store org-irc-store-link :export
                        org-irc-export)
("info" :follow org-info-open :export org-info-export :store org-info-store-link :insert-description org-info-description-as-command) ("gnus" :follow org-gnus-open :store org-gnus-store-link) ("docview" :follow org-docview-open :export org-docview-export :store
                        org-docview-store-link)
("bibtex" :follow org-bibtex-open :store org-bibtex-store-link) ("bbdb" :follow org-bbdb-open :export org-bbdb-export :complete org-bbdb-complete-link :store org-bbdb-store-link)
                       ("w3m" :store org-w3m-store-link)
("doi" :follow org-link-doi-open :export org-link-doi-export) ("file+sys") ("file+emacs") ("shell" :follow org-link--open-shell)
                       ("news" :follow
#[(url arg) ((browse-url (concat scheme ":" url) arg))
                          ((scheme . "news"))]
                        )
                       ("mailto" :follow
#[(url arg) ((browse-url (concat scheme ":" url) arg))
                          ((scheme . "mailto"))]
                        )
                       ("https" :follow
#[(url arg) ((browse-url (concat scheme ":" url) arg))
                          ((scheme . "https"))]
                        )
                       ("http" :follow
#[(url arg) ((browse-url (concat scheme ":" url) arg))
                          ((scheme . "http"))]
                        )
                       ("ftp" :follow
#[(url arg) ((browse-url (concat scheme ":" url) arg)) ((scheme . "ftp"))]
                        )
("shortdoc" :follow org-link--open-shortdoc :store org-link--store-shortdoc :complete org-link--complete-shortdoc) ("help" :follow org-link--open-help :store org-link--store-help) ("file" :complete org-link-complete-file :preview org-link-preview-file)
                       ("elisp" :follow org-link--open-elisp))
org-persist-directory "/tmp/org-persist-E2l9Pt"
org-cycle-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand)
org-agenda-before-write-hook '(org-agenda-add-entry-text)
org-metadown-hook '(org-babel-pop-to-session-maybe)
org-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand)
org-sort-function 'string-collate-lessp
org--warnings nil
org-babel-pre-tangle-hook '(save-buffer)
org-export-before-parsing-hook '(org-attach-expand-links)
org-link-shell-confirm-function 'yes-or-no-p
org-fold-core-isearch-open-function 'org-fold--isearch-reveal
outline-isearch-open-invisible-function 'outline-isearch-open-invisible
org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer)
org-agenda-loop-over-headlines-in-active-region nil
org-link-elisp-confirm-function 'yes-or-no-p
org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-show-empty-lines
                  org-cycle-optimize-window-after-visibility-change
                  org-cycle-display-link-previews)
org-persist-before-read-hook '(org-element--cache-persist-before-read)
)

Reply via email to