nobiot / org-remark

Highlight & annotate text, EWW, Info, and EPUB
https://nobiot.github.io/org-remark/
GNU General Public License v3.0
436 stars 22 forks source link

[feature request] make org-remark-open open the associated marginalia file if pointer not inside a highlight #72

Closed oatmealm closed 1 year ago

oatmealm commented 1 year ago

Thought it'd be useful if org-remark-open will open the default marginalia file associated with the file being currently edited.

nobiot commented 1 year ago

I like the idea of being able to open the marginalia file from the file I am editing. I often find myself wanting to do this.

Evaluating this seems to do the job: (find-file (org-remark-notes-get-file-name)).

I will see if I can find some time and add it to org-remark-open -- I think we will need to see if adding the feature in this function is the best way for the user interaction. I was originally thinking of having a separate function to open the file from within the *marginalia* buffer.

Your idea seems to be better than my original intuition.

oatmealm commented 1 year ago

I was indeed thinking if there's noting at point then simply open the default notes file associated.

nobiot commented 1 year ago

Sure. I got this in my local and have been testing. There are some issues I need to deal with that I had't anticipated.

oatmealm commented 1 year ago

I guess it should be a *dwim type of a function, that does either depending on the context... ?

nobiot commented 1 year ago

Yes, that's the idea and what I have in my local.

It's now part of the branch dev/1.3.0 (PR #71). v1.3.0 will come with a whole new type of highlights: line-highlights. So org-remark-open does "do-what-i-mean" (dwim) based on the context where the cursor is.

You can try out the v1.3.0 from the dev branch, if you like. I am probably a few weekends away from merging: I am doing documentation for the new features.

Your query has motivated me, so I might do a quick write-up and merge the dev branch to main sooner than "a few weekends". Thank you!

nobiot commented 1 year ago

Now this feature is merged to main and available in GNU-devel ELPA. I'll wait for a few weeks/months and then bump the version to make the new features available in GNU ELPA.

I'm closing this issue now; let me know if you have any issues, questions, etc. Thank you.