-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Some work on this package #19
Comments
This sounds great! Thanks a lot for your work on this package, and sorry for the very late reply. Unfortunately, I am currently very busy, and I don't have any time to work on this package. There is a request for merging the pdf-roll branch into pdf-tools here. I will not be able to work on it, but if you are interested, then maybe you can work on it. Feel free to start from the |
I can put sometime into getting this merged in near but not too near future. Hopefully this will pan out 🤞 I announced this on emacs-tangents here https://lists.gnu.org/archive/html/emacs-tangents/2023-06/msg00005.html but other than that I haven't done anything. Announcement on reddit would have been nice but I don't want to create an account there. |
Hi,
This has been a great package to use with
pdf-tools
. I was running into issues mostly with grey boxes appearing but also with some functionality inpdf-tools
not working. So I have done quite a bit of work on this package and also your fork ofpdf-tools
to resolve those issues. The current state can be seen on my fork of image-roll and the continuous-scroll branch of my fork of pdf-tools. Theimage-roll
fork is by now very close to a rewrite, but I wanted to ask if you wanted to upstream the changes here, in any case you might be able to use (or might already have done so) some of the ideas for your other projects which I haven't tried because I like pdf-tools too much.First the things that
pdf-tools
feature that work at least for me:pdf-sync
works both forward and backwards.pdf-links-action-perform
now shows links from all visible pages. I can't find a way to precompute labels so this comes at the expense of not using the cache. This might lead to bad performance on older machines but it is good enough for me.Things that don't work:
Text selection: it work on the first page but will cause jumps it tried on subsequent pages. I can't figure out how it works so I can't figure out what to change.Text selection now works on any displayed page. The only limitation is that it is not possible to have a selection that spans multiple pages.I-search: I might have broken it since you made some changes and it doesn't work anymore.I-search and pdf-occur should both work now. I am encountering this issue which I think is upstream but other than that everything seems fine.Now for the changes in how
image-roll
works,Page sizes are not computed at the start. Rather a page is displayed and using a combination of
pos-visible-in-window-p
andline-pixel-height
it is determined whether there is till space to display more pages.The use of
goto-char
and point movement commands can cause grey boxes. It is better to useset-window-point
andset-window-start
withno-force
argument non-nil.Margins are drawn separately from pages using overlays. This is so that we can leave the point on the position holding these overlays so Emacs doesn't recenter window during redisplay. Since, Emacs doesn't allow making line-height thinner than the height of the default dace so to allow for thin margins, the default face is locally remapped to one which has a font attribute with size 1. The point is left on the first such margin if it is visible.
Vscroll is clamped between 1 and height of the current page minus 1. This makes sure window-start doesn't change when shrinking/enlarging and changing window size.
Most of this work is done in a pre-redisplay function. This might be controversial but makes it easier to react to changes in window-size, page-size etc and I don't think this will cause more resource usage than
window-configuration-change-hook
.I am interested in hearing on what people using this package think of the changes. If someone is motivated I can most of the changes in the
pdf-tools
branch can be packaged into advices that are applied whenpdf-roll
is loaded and which do differet things depnding on the value ofpdf-view-roll-minor-mode
. This will make it easier for people to try the package without switching from the upstreampdf-tools
. There will be quite a few advices but I think it is manageable. Searching my branch I see about 30 uses ofimage-roll
orpdf-view-roll
in thepdf-tools
in files other thanpdf-roll
. From this I would guess that we make do with less than 15 advices, which is not great but also not terrible.The text was updated successfully, but these errors were encountered: