org-noter icon indicating copy to clipboard operation
org-noter copied to clipboard

org-noter does not work with spacemacs well

Open fu123456 opened this issue 5 years ago • 11 comments

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?

fu123456 avatar Feb 14 '19 16:02 fu123456

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 :/

weirdNox avatar Feb 14 '19 18:02 weirdNox

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 avatar Feb 14 '19 19:02 fu123456

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

fu123456 avatar Feb 14 '19 19:02 fu123456

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.

weirdNox avatar Feb 14 '19 23:02 weirdNox

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

vv111y avatar Feb 15 '19 00:02 vv111y

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 avatar Feb 15 '19 03:02 fu123456

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

fu123456 avatar Feb 15 '19 05:02 fu123456

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

vv111y avatar Feb 15 '19 15:02 vv111y

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

fu123456 avatar Feb 17 '19 17:02 fu123456

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

agzam avatar Jul 07 '19 21:07 agzam

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

vv111y avatar Jul 20 '19 01:07 vv111y