New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
scroll-other-window doesn't work #55
Comments
|
That's a matter of |
|
I believe this should still be possible. My approach is as follows: However, I can't find a way to get PDFView's mode; I've tried (derived-mode-p) but PDFView doesn't seem to derive, and there seems to be no function like (doc-view-mode-p) for PDFView mode. Do you have any suggestions on moving forward on this? |
|
"Tory S. Anderson" notifications@github.com writes:
Sure, but it should not be fixed in pdf-tools. Maybe you want to open
That should be fixed sometime. You can use |
|
That this should not be done in PDF-Tools and that the scroll-other-window functions need to be improved is true, but this functionality is simply too useful for me to pass up, so I'm sharing the code I wrote to achieve this (I spend a lot of my time studying PDFs and taking notes in an adjoining window), which also works for other-window scrolling in info mode and any other mode you care to specify. Hopefully it will be useful to others. |
|
"Tory S. Anderson" notifications@github.com writes:
Why don't you open a feature-request for Emacs ? |
|
Where/how is feature-request for emacs done? |
|
"Tory S. Anderson" notifications@github.com writes:
M-x report-emacs-bug RET |
|
Using the function I made I see some curious behavior that I can't understand. Scrolling down from the other window works as expected, however, scrolling up makes invisible changes UNLESS a) I switch to the buffer, which causes it to update and show me where it is now (after however many scroll-ups I've done), or b) a page-break has occurred, when it shows me the correct other-window regardless. This behavior doesn't seem to occur with scroll-down, which displays every time. Any idea why this would be? is there some difference in implementation of scroll up vs. scroll down? |
|
Here's a fix that works for me in case anyone needs it. (defun my/scroll-other-window ()
(interactive)
(let* ((wind (other-window-for-scrolling))
(mode (with-selected-window wind major-mode)))
(if (eq mode 'pdf-view-mode)
(with-selected-window wind
(pdf-view-next-line-or-next-page 2))
(scroll-other-window 2))))
(defun my/scroll-other-window-down ()
(interactive)
(let* ((wind (other-window-for-scrolling))
(mode (with-selected-window wind major-mode)))
(if (eq mode 'pdf-view-mode)
(with-selected-window wind
(progn
(pdf-view-previous-line-or-previous-page 2)
(other-window 1)))
(scroll-other-window-down 2)))) |
|
I've found that the Gist posted by @politza works for my use case; I wanted to post this code with a couple other steps that I needed to polish off the integration, hoping this saves someone else some time: (require 'scroll-other-window)
(add-hook 'org-noter-notes-mode-hook #'sow-mode)
(setq org-noter--inhibit-location-change-handler t) |
When reading the PDF below and writing above, found that
scroll-other-window(C-M-v) will scroll down to the end of the page and then, rather than going to the next page, will just bounce to the top of the same page again.The text was updated successfully, but these errors were encountered: