org-noter
org-noter copied to clipboard
Support for showing tooltip on both axis
This is a solution to #96
I am using the format (page . <horizontal axis> . <vertical axis>)
for the INTERLEAVE_PAGE_NOTE
/NOTER_PAGE
Work to be done:
- [x] Adding the function to allow showing tooltip in both axis ( this is basically a copy from https://github.com/politza/pdf-tools/pull/623. Until that gets pulled, i figured will have a copy of it here)
- [x] View tooltip in both axis
- [x] Add new precise note with both axis information when no other precise note is added
- Need to fix a bug with width calculation
- Only implementing the pdf-tools version of this
- [x] Allow adding precise note when there is another precise note.
- Need to refactor the comparison functions to account for this
- [x] Sorting based on width coordinate
- [x] ~~Move to using nth instead of
cadr
orcddr
to allow extensions like #48~~ - [x] The above is replaced with a set of
get-location-<position>
functions
@weirdNox the implementation for now provides support for [page, top and left] coordinates with precise notes while also providing backward compatibility with the [page top] format. The tooltip shows at the beginning of the precise note with the [page top left] format, as opposed showing on the left margin.
Let me know if you think there is anything additional I need to consider.
Thanks for this PR. Everything works great, but I had to add (require 'pdf-tools)
at the top of org-noter.el, otherwise, I'm getting Invalid function (pdf-view-current-overlay)
in pdf-util-tooltip-arrow-with-image-left
.
Added that to the PR. Thank you for pointing it out 👍
Where is the holdup for merging this PR? Seems to me that this is complete. It's a nice feature.
I need to investigate a better way to visualise the arrow. I hadn't been able to get around to it. See https://github.com/politza/pdf-tools/issues/582
I see this in the repo
(defun pdf-util-tooltip-in-window (text x y &optional window)
(let* ((we (window-inside-absolute-pixel-edges window))
(dx (round (+ x (nth 0 we))))
(dy (round (+ y (nth 1 we))))
(tooltip-frame-parameters
`((left . ,dx)
(top . ,dy)
,@tooltip-frame-parameters)))
(tooltip-show text)))
Maybe it was fixed, just the issue was not closed? Or am I misreading something?
@weirdNox, may I ask, are you still actively maintaining this repo? I use your library on a daily basis, and would like to make some changes to it (specifically, to address issue 143), I am trying to decide whether to clone your repo or @ahmed-shariff's, which appears to still be under active development?
@gcoladon Nope, he doesn't use this package himself anymore. As you can see, the lastest commit to this repo was 2 years ago and no pull requests gets reviewed at the moment. I decided to fork ahmed-shariff's repo to add some functions I want for the time being.
I'm wondering if anyone's interested in working on a shared fork.
In particular @c1-g's fork appears to be well ahead of the others, notably with overlay support for epubs. It does have many rough edges right now though.
I'd be happy to collaborate; I'm getting up to speed with elisp and I'm already reasonably productive.