weirdNox / org-noter

Emacs document annotator, using Org-mode
GNU General Public License v3.0
1.07k stars 101 forks source link

org-noter does not work with spacemacs well #57

Open fu123456 opened 5 years ago

fu123456 commented 5 years ago

My system is Manjaro (linux) system, Emacs27, Spacemacs. When I have installed this package, it does not work. I have opened a PDF file, and run 'org-noter', but emacs show a white extra window that does no have any content. I want to know whether this package works with spacemacs?

weirdNox commented 5 years ago

There is an open issue that was created by someone using Spacemacs about not being able to create a session. Could you see if it is related to your problem? I downloaded the full Spacemacs package this week to try it out and it worked out of the box, so I can't reproduce at the moment :/

fu123456 commented 5 years ago

Moreover, I have a error: ad-Advice-select-window: Wrong type argument: window-live-p, nil This package is powerful and is my requirement. But I can not work it. I use manjaro system, i3wm, spacemacs.

fu123456 commented 5 years ago

For the demo https://www.youtube.com/watch?v=Un0ZRXTzufo How do you emacs config about org-noter? Can you share with me?

weirdNox commented 5 years ago

It's almost out of the box, with very minimal configuration. In the demo I just have the package installed, go to a heading and run the command org-noter, which does everything else :)

If you are able to reproduce the problem, could you enable debug mode by running toggle-debug-on-error and then trigger the error? If you are able to do that, please post the full backtrace here so I can see where the problem is happening.

It seems you have some advice defined on window selection that is triggering the error; that could be a problem with some other package you have installed, or even your configuration. You could try commenting parts out of your configuration in order to see when the error stops so you would know what's causing it.

vv111y commented 5 years ago

I have almost same setup for the desktop: manjaro, i3, spacemacs, except emacs 26.1 It works flawlessly on that.

fu123456 commented 5 years ago

I run toggle-debug-on-error, and it gives me following error message: Error during redisplay: (run-hook-with-args org-noter--handle-delete-frame #<frame Emacs Org-noter - Notes for page 1 0x55a951510a90>) signaled (error "Root heading not found")

fu123456 commented 5 years ago

In addition, I also use pdf-tools plugin, and run org-noter-create-skeleton in pdf buffer, but it does not any correspond.

vv111y commented 5 years ago

If you feel comfortable with editing source code, can you try my hack here?

fu123456 commented 5 years ago

Now, org-noter does work well for me. vlf-mode (add hook to pdf-view-mode) seems to disturb org-noter.

agzam commented 5 years ago

org-noter works fine in Spacemacs, it has its own quirks but I wouldn't say "it doesn't work well". I'm using it with pdf-tools (Spacemacs' pdf layer). Here are my settings:

(use-package org-noter
    :config
    (setq org-noter-always-create-frame nil
          org-noter-insert-note-no-questions t
          org-noter-separate-notes-from-heading t
          org-noter-auto-save-last-location t)

    (defun org-noter-init-pdf-view ()
      (pdf-view-fit-page-to-window)
      (pdf-view-auto-slice-minor-mode)
      (run-at-time "0.5 sec" nil #'org-noter))

    (add-hook 'pdf-view-mode-hook 'org-noter-init-pdf-view))

Note the last bit inside the hook function (for starting org-noter automatically), without the timeout - it doesn't work as expected

vv111y commented 5 years ago

@agzam That looks nice, I'm going to try it.