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

Not all highlights loaded when marginalia.org file does not show all the headlnies #22

Closed zhewy closed 2 years ago

zhewy commented 2 years ago

Describe the bug creating a highlight of a file requiring differnt encoding will cause issues with reload of highlights.

To Reproduce

  1. refer to files test files.zip
  2. if file open of asdf.org, expect highlights of words "ipsum is" and "‘Rautāwhiri’" (as setup per marginalia.org)
  3. it doesn't.
  4. to fix, open up marganalia file, the go back to text file buffer, toggle org-remark-mode. highligts then become visible. if try and kill buffer marginalia again, prompts to save particular encoding. once selected, bug can be reproduced again.
zhewy commented 2 years ago

maybe another variant on the same problem: asdf.zip

  1. if i open reading.org directly, the highlights don't load "properly".
  2. if i first open marginalia.org and then open reading.org right afterwards, highlights also don't load "properly".
  3. if i open marginalia.org, then expand the headings, then open reading.org file - the highlights load as expected
nobiot commented 2 years ago

Thank you for reporting this issue.

I'm struggling to reproduce the issue; I can simply visit the asdf.org and get this (I didn't visit marginalia.org before). How can you have different encoding setup for different files?

I just have this in my customizing: current-language-environment "UTF-8".

image

zhewy commented 2 years ago

perhaps it's not to do with encoding after all.. i've been getting this behaviour on other 'standard' encoded files.

work-around is to have marginalia.org and expanded (as below)..

my experience when opening the same asdf.org: image

if` i expand marginalia.org to show as follows and toggle org-remark-mode on/off: image

emacs version:

nobiot commented 2 years ago

I see. Thank you. I can reproduce the issue.

Try the new commit #97239d7 -- if you don't use Git, it should be synced with ELPA-devel at some point soon. I'd appreciate your testing it.

I'll wait for your response before I bump the version for ELPA. Let me know.

zhewy commented 2 years ago

commit #97239d7 fixes issue. thank you for all your work!!