feat(wip): introducing `org-remark-reveal-p'
This is still a WIP but at present, the feature works like this. Feedback welcome.
Goal
I want org-remark-next/prev commands to be able to find "hidden" highlights. In Emacs, there are mainly two ways parts of the current buffer can be hidden: (1) Narrowed (eg narrowed to a heading, to a defun), or (2) Folded (eg via folding an outline in Org, Markdown, or Outline modes).
Current behaviour
I have introduced the following:
- A new local variable:
org-remark-reveal-p - A new set of commands:
org-remark-reveal-activate-locally&org-remark-reveal-deactivate-locally
Use the commands to activate/deactivate org-remark-reveal-p.
When org-remark-reveal-p is non-nil, org-remark-next/prev will reveal hidden highlights in the folded (2) parts. When the buffer is narrowed (1), the next/prev commands will NOT find highlights outside the currently visible parts.
Feedback welcome.
The current ways to control the local variable org-remark-reveal-p is not very user-friendly. Perhaps something like Transient should be used, but I don't know how it works in detail. And I have a hesitation to add a new prerequisite, so I think it should be useable without it (and can be used when the user already has Transient).