[DONE] Re: [ISSUE] org-fold does not support auto-reveal for some external package commands
Ihor Radchenko writes: > "Christopher M. Miles" writes: > >> I'm using package "consult" which has command "consult-org-heading" to >> search org headlines. It will >> auto jump to the selected headline and expand the jumped headline. After >> using org-fold, it does not >> auto jump to the headline now. >> >> The previous discussion here as reference >> https://github.com/minad/consult/issues/563. >> >> As @minad mentioned we need to wait for org-fold provide an official API to >> reveal content. Hope >> this can be added to org-fold plan. > > I reviewed the available API and realized that Org actually does provide > sufficient functionality to reveal search matches temporarily. (there > was a bug in that area, but I already fixed it) > > The basic idea is demonstrated in a simple function below: > > (defun test (pos) > (interactive "nEnter point to be revealed: ") > (read-char "Revealing point temporarily. Press any key...") > (save-excursion > (org-fold-save-outline-visibility nil > (goto-char pos) > (org-fold-show-set-visibility 'local) > (read-char "About to restore the previous fold state. Press any > key..."))) > (read-char "Now, reveal the point permanently. Press any key...") > (goto-char pos) > (org-fold-show-set-visibility 'local)) > > Hope it helps. > > Best, > Ihor Interesting, I tested and confirmed this works good. Thanks for demonstrating. I will figure out consult-org-heading command part. -- [ stardiviner ] I try to make every word tell the meaning that I want to express. Blog: https://stardiviner.github.io/ IRC(freenode): stardiviner, Matrix: stardiviner GPG: F09F650D7D674819892591401B5DF1C95AE89AC3 signature.asc Description: PGP signature
Re: [ISSUE] org-fold does not support auto-reveal for some external package commands
"Christopher M. Miles" writes: > I'm using package "consult" which has command "consult-org-heading" to search > org headlines. It will > auto jump to the selected headline and expand the jumped headline. After > using org-fold, it does not > auto jump to the headline now. > > The previous discussion here as reference > https://github.com/minad/consult/issues/563. > > As @minad mentioned we need to wait for org-fold provide an official API to > reveal content. Hope > this can be added to org-fold plan. I reviewed the available API and realized that Org actually does provide sufficient functionality to reveal search matches temporarily. (there was a bug in that area, but I already fixed it) The basic idea is demonstrated in a simple function below: (defun test (pos) (interactive "nEnter point to be revealed: ") (read-char "Revealing point temporarily. Press any key...") (save-excursion (org-fold-save-outline-visibility nil (goto-char pos) (org-fold-show-set-visibility 'local) (read-char "About to restore the previous fold state. Press any key..."))) (read-char "Now, reveal the point permanently. Press any key...") (goto-char pos) (org-fold-show-set-visibility 'local)) Hope it helps. Best, Ihor
[ISSUE] org-fold does not support auto-reveal for some external package commands
I'm using package "consult" which has command "consult-org-heading" to search org headlines. It will auto jump to the selected headline and expand the jumped headline. After using org-fold, it does not auto jump to the headline now. The previous discussion here as reference https://github.com/minad/consult/issues/563. As @minad mentioned we need to wait for org-fold provide an official API to reveal content. Hope this can be added to org-fold plan. Ihor Radchenko writes: > This is the final version of the patch. I am going to merge it this > weekend. If there are any comments, please send them ASAP. > > This version is basically the same as previous, but (1) Rebased onto > current main; (2) org-agenda.el can be native compiled; (3) Fixed some > edge cases with fontification. > > Best, > Ihor -- [ stardiviner ] I try to make every word tell the meaning that I want to express. Blog: https://stardiviner.github.io/ IRC(freenode): stardiviner, Matrix: stardiviner GPG: F09F650D7D674819892591401B5DF1C95AE89AC3 signature.asc Description: PGP signature