org-remark
org-remark copied to clipboard
Support taking annotations and marginalia in EWW buffers.
EWW buffers are not associated with a file, which causes buffer-file-name to return nil.
This change extracts the functionality to find the source filename into a separate function. Earlier, org-remark used buffer-file-name to find the source filename.
This allows us to handle eww-mode within the new function (and potentially more such modes in the future).
We also add org-remark-auto-on to the eww-after-render-hook to make sure that existing annotations are loaded.
The end result is that it is now possible to annotate web-pages inside EWW.
Function introduced:
org-remark-source-find-file-name- All direct calls tobuffer-file-nameare now replaced by this function.
Functions changed:
org-remark-global-tracking-mode-org-remark-auto-onruns on EWW render completion.org-remark-highlight-get-title- This function can also extract the highlight title from the EWW URL now.
How I've tested the changes:
- Does taking notes work in eww buffers?
- Tested for archived urls (of the
file://type) - Tested for normal urls - Does taking notes work for different types of web-pages? - URLs that end in a '/' (need special handling) - URLs that end in '.html'
- Does reloading the EWW page maintain the notes? - Tested for archived urls - Tested for normal urls
- Does different kinds of highlighting work correctly?
- Tested
org-remark-mark- Testedorg-remark-mark-yellow- Testedorg-remark-mark-red-line - Does remark functionality work?
- Tested
org-remark-view-next- Testedorg-remark-view-prev- Testedorg-remark-view- Testedorg-remark-save- Testedorg-remark-open- Testedorg-remark-toggle - Check what happens when existing notes are modified - Tested for archived urls - Tested for normal urls
- Check what happens when new notes are added to an existing annotated web-page - Tested for archived urls - Tested for normal urls
More testing:
Ensured that all the above functions are working on normal files as well (i.e. no regressions)
I would like to merge it but sorry just very briefly, two things:
- Have you done FSF paperwork for copyright assignment, or willing to do so?
- How do you think about the change of the web page? It will dislocate the location of highlights
- I am willing to do the FSF paperwork. I sent them an email 2 days ago but have not heard back from them
- I did not think about changes on the web-page. Yes that will dislocate the location of the highlights and there will not be an automatic way to clean the highlights up.
- I did not think about changes on the web-page. Yes that will dislocate the location of the highlights and there will not be an automatic way to clean the highlights up.
Suggestion: to make automatically a local copy when annotations are made.
Suggestion: maybe if visiting a page that already has annotations, to offer the user to load the saved version or the updated version. A prompt for an automatic ediff, showing differences, could be nice.
@vedang I realise it's been an awful a lot of time since you initially created this PR (Thank you!). Is there any change to move it forward? I do not see your name as part in FSF -- have you had a chance to proceed with the paperwork by any chance?
@nobiot : I have completed FSF paperwork in May and received a PDF regarding the same from the FSF. Should I attach it here or maybe privately send it to you? I am not sure if anything else is needed, I didn't look into it since the FSF email said that all necessary work was complete.
I will also rebase my changes on top of the latest master and push them back, so that this PR becomes mergeable.
@vedang thank you for your quick reply and confirmation about the FSF paperwork. That is enough for me :). Merged. Thank you also for additional work to rebase your PR; much appreciated.
I’ll add a new section to acknowledge your (and others’) contributions somewhere in the documentation.