-
Notifications
You must be signed in to change notification settings - Fork 23
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
Dev/1.3.0 #71
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Trim spaces etc. and take the first 40 char. If longer, add an ellisis at the end.
Likely to be v1.3. It involves a lot of refactoring to enable the new pen type `line` while keeping the default `range` pen type in tact.
The `org-remark-create` macro has been changed to include the line-highlight pen. This means that if the user creates pens in their init file and compile it, they would need to recompile it.
Adapt the way Olivetti does it.
Changing from the range-highlight to line-highlight and vice versa must not be possible. This would break the begin end properties.
Problem: changing to the same line-highlight does not trigger sync but this causes the icon for notes not being updated. Force tiggering the update save for :change:operation. The line-icons do not get updated because :change: to the same pen does not involve buffer modificaiton and thus the sync does not get triggered to update icons.
In addition to the default features to load, variable org-remark-default-feature-modes is also added to enable the extensions automatically. Initially we have org-remark-icon and org-remark-line.
`get-buffer-window` may not return when the buffer is already created. This happens when the user opens the file (find-file, recentf-file, etc.). In this case, delay calling the overlay-put functions to `window-size-change-function`.
Window margins are not set until there is a line-highlights Limitations: when line-highlights exist, disabling `org-remark-line-mode` does not remove the overlays and next/prev can still find them; however, remove/delete no longer work on them.
This commit also adds the facility (abnormal hook) for future extensions.
The comment is created via a call to `org-remark-create` macro. The call is done within the library, so we would need to wait for it to be loaded. This is too late, so adding a dummy `defun` with the autoload cookie to register it. The actual implementation is added when the library is later loaded (likely together with `org-remark` itself as it is likely to be deferred).
`org-remark-remove` and `org-remark-delete` now have new functionality. No breaking change to existing behavior or function's signature (except an additional optional argument to the latter function). Housekeeping can now use the new user option `org-remark-notes-auto-delete` to automatically delete entries for which there are no notes. This way, the marginal notes file can be kept with less clutter (with less "orphan" headlines).
This function is to be set to org-remark-find-dwim-functions. Before the chagne, it was added as globa. This patch changes it to local buffer specific.
`org-remark-open` now opens the marginal notes file for the current buffer if ponit is not on any highlight.
org-remark-view, org-remark-view-[next|prev] should not open the marginal notes buffer when there is no highlights under cursor or in the current (narrowed part of) buffer.
For margin width, etc. we only need positive integer (= natural number).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I will add more detail here later.
The main feature to be added is
org-remark-line
that enables the new type of highlights: line-highlight for the entire line. It is technically a overlay added to the beginning of a line and has no length -- i.e. its start and end are identical on the beginning position of the line it relates to.The highlight overlay then displays an "icon" (string or SVG image) on the margin (left or right as customized) to indicate the line has a highlight and/or annotation.
Below are some preview images from the current state of the dev branch.