Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(wip): introducing `org-remark-reveal-p' #90

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

nobiot
Copy link
Owner

@nobiot nobiot commented Nov 2, 2024

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).

This is stilla WIP but at present, the feature works like this.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant