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

prompt for 'org-remark-hidden value:' on saving buffer #28

Closed mooseyboots closed 2 years ago

mooseyboots commented 2 years ago

hi, i'm new to org-remark, and i'm puzzled by this prompt i get on saving.

i can't see in your code where such a prompt is given, nor can i understand how to even provide it with a value that it will accept.

looks like it is coming from somewhere in org-remark-highlight-save.

not sure if i need to set things up a little more for it to work right?

nobiot commented 2 years ago

Could you tell me exact steps to reproduce the issue? I have never seen such a prompt. And what does it look like? Also does issue occur when you have only org-remark with no other configuration and package?

mooseyboots commented 2 years ago

dang, that's bad news. i was hoping had just missed a step of set up and was being prompted to do it.

it appears as a minibuffer prompt, text as mentioned in the title:

org-remark-hidden value: 

looks like the prompt is from org-set-property, which your org-remark-notes-set-properties calls.

if you have a minimal setup that gets org-remark running it'd be helpful, starting from emacs -Q and manually trying to add everything needed is painful. (running -mark fails with a complaint about org-collect-properties even tho org is loaded.)

looks like i actually get two different/related errors:

if i open an org file with no notes, add a note with -mark open it with -open, add some text to the note, switch back to the org file, save it, no problems. but if i run -toggle [hiding the highlighting] after switching back to the org file, then trivially edit the file and save, i get:

Debugger entered--Lisp error: (wrong-type-argument sequencep t)
  org-set-property("org-remark-hidden" t)
  org-remark-notes-set-properties(143 149 (org-remark-hidden t org-remark-face org-remark-highlighter org-remark-id "1d216083" "org-remark-label" "nil" face nil "org-remark-link" "[[file:my-file.org::7]]"))
  org-remark-highlight-save("/path/to/file/my-file.org" 143 149 (org-remark-hidden t org-remark-face org-remark-highlighter org-remark-id "1d216083" "org-remark-label" "nil" face nil "org-remark-link" "[[file:my-file.org::7]]"))
  org-remark-save()
  run-hooks(after-save-hook)
  basic-save-buffer(t)
  save-buffer(1)
  funcall-interactively(save-buffer 1)
  call-interactively(save-buffer nil nil)
  command-execute(save-buffer)

if i then run -toggle again [showing the highlighting] and save, i get the prompt. if i enter nothing in the prompt, just hit RET, i get

org-remark-notes-set-properties: Wrong type argument: sequencep, org-remark-highlighter

i don't know how your code works at all, nor these bits of org, so i'm in the dark.

nobiot commented 2 years ago

Thank you. I can reproduce it now. It's a defect in the way -toggle function works. If you avoid it for now, the error should not happen. I will need to spend more time looking into it for a fix -- tried, but could not get it done. Still working out a way.

nobiot commented 2 years ago

The latest commit should fix the issue. The ELPA repository should also be updated soon. Let me know if the issue persists (feel free to re-open. Thank you for reporting the issue. Toggle never worked properly before your report.

mooseyboots commented 2 years ago

glad it got sorted. I'll try out the elpa version when it updates.

On May 14, 2022 9:55:10 AM GMT+02:00, Noboru Ota @.***> wrote:

The latest commit should fix the issue. The ELPA repository should also be updated soon. Let me know if the issue persists (feel free to re-open. Thank you for reporting the issue. Toggle never worked properly before your report.

-- Reply to this email directly or view it on GitHub: https://github.com/nobiot/org-remark/issues/28#issuecomment-1126666019 You are receiving this because you authored the thread.

Message ID: @.***>

nobiot commented 2 years ago

Thanks. Should be version 1.0.5.