feat(wip): introducing `org-remark-reveal-p' #90
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
org-remark-reveal-p
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), thenext/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).