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

Dev/1.3.0 #71

Merged
merged 72 commits into from
Oct 6, 2023
Merged

Dev/1.3.0 #71

merged 72 commits into from
Oct 6, 2023

Conversation

nobiot
Copy link
Owner

@nobiot nobiot commented Aug 20, 2023

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.

Screenshot from 2023-08-20 05-25-07

Screenshot from 2023-08-20 07-34-58-5x3

nobiot added 30 commits August 1, 2023 14:41
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.
nobiot added 19 commits August 19, 2023 20:09
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).
nobiot added 5 commits August 22, 2023 22:31
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).
@nobiot nobiot merged commit cfaf02d into main Oct 6, 2023
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