Closed mooseyboots closed 1 year ago
No, this is not available. I tried to implement something g similar (an icon when there is notes for a highlight); the approach I took at that time didn’t work out well. I haven’t tried a new approach since.
Id welcome a PR.
i got a rough version of this working, just not sure how it wd interact with the rest of your package, as i don't know the code at all (or how to use your package, as you can see from my other issues!)
here's what i did.
a function org-remark-highlights-text-get
to collect the text from a
note subtree, then feed it down through the functions to add as a text
help-echo
property.
provisos:
i'm not sure if there's a more robust way to get an org entry's text. at the moment i just check if our moving forward past org meta data took us to the next heading, in which case entry must be empty.
i also don't know your codebase at all.
updated to use (org-end-of-subtree)
to fetch subtree text.
Thank you. Before I review your PR, have you done the FSF paperwork?
https://github.com/nobiot/org-remark#contributing-and-feedback
Create issues, discussion, and/or pull requests in the GitHub repository. All welcome.
Org-remark is available on GNU ELPA and thus copyrighted by the Free Software Foundation (FSF). This means that anyone who is making a substantive code contribution will need to “assign the copyright for your contributions to the FSF so that they can be included in GNU Emacs” (Org Mode website).
Thank you.
i just set the process in motion now.
i also just thought to show you how i thought to add the text properties -- i don't mind if you just incorporate the code yourself if you dig it.
FSF copyright assignment is done.
Thank you! Let me have some time to review the PR — I’m a bit under the water at the moment…
Sorry, it's been a while. My head space is still very limited, and can't properly test the PR. I think it will need to be Nov/Dec 2022 earliest -- I have a big life event coming up in October.
I had a quick look. Two things to note:
The second point is something I'd like to spend some time on testing to ensure if my understanding is correct...
@nobiot no worries about the pace of things.
re 2, maybe you mean it does not work for a new highlight? because for a new highlight, the highlight is created before any annotation text is provided. for me it does work for annotations that are not new, i.e. if i reload the file with find-alternate-file
.
i added a commit: we fetch the text from the highlights list and update the overlay on save. but this is also not ideal, as it only runs when we save the main buffer. best would be to update when the notes file itself is changed/saved. but that's beyond me for today.
edit: an option would be to have a C-c C-c
command in the notes buffer, which would serve as a way of ending work on a note, akin to the same binding in org-capture
. then we'd have an event to do any updating needed, any housekeeping, optionally kill or hide the notes buffer, and return to the main buffer. but that wd require a minor mode in the notes buffer...
@mooseyboots, finally I took time to merge your PR. Thank you! Will update documentation and acknowledge your contribution. Cheers.
i added a commit: we fetch the text from the highlights list and update the overlay on save. but this is also not ideal, as it only runs when we save the main buffer. best would be to update when the notes file itself is changed/saved. but that's beyond me for today.
For now, I have removed this part of the code. Will think about a generic communication from the notes back to the source...
is this currently possible? e.g.
help-echo
text property on the mark holding note text (possibly an extract).