pdf-tools icon indicating copy to clipboard operation
pdf-tools copied to clipboard

Make selection-style configurable

Open hrdl-github opened this issue 3 years ago • 3 comments

Make selection-style configurable via pdf-view-selection-style. A default value of word might be desirable, as selection is usually intended to select entire words is perceptually faster than glyph-based selection.

This affects selections and highlights, but not search. Limitation: the selection type is fixed for all currently selected regions. Selecting multiple regions with different selection styles at the same time would require storing the selection style for every region and replacing the protocol for cmd_addannot with a more flexible one, e.g. the keyword-based one used by cmd_renderpage.

hrdl-github avatar Jan 19 '22 22:01 hrdl-github

Thanks for this PR @lennonhill . I'm a bit busy in Jan and Feb, I'll try and make time for this as early as possible. I'm adding this to the 1.1.0 milestone release, planned in Apr.

vedang avatar Jan 25 '22 08:01 vedang

Sure. Thanks for taking over maintainership of this project!

hrdl-github avatar Jan 25 '22 10:01 hrdl-github

Just tested this out and wanted to say that this is a great idea! Using word makes selecting and annotating text so much smoother, and I can’t really think of a situation where I would need to select by glyph.

andersjohansson avatar Feb 15 '22 16:02 andersjohansson

I'm moving away from pdf-tools. I'd love to see this one getting merged while I'm still around to fix anything that requires fixing. No pressure though, thanks for putting in the effort to maintain this project.

hrdl-github avatar Jan 12 '23 13:01 hrdl-github

Hey @hrdl-github ,

I'll keep some time aside on the weekend and get it done. Thanks for the message and heads-up.

I'm sorry to see you go. Would be great if you can write up feedback on vedang dot manerikar at google's email service

vedang avatar Jan 12 '23 16:01 vedang

Thanks. What kind of feedback do you have in mind? Feedback on pdf-tools or why I leave?

hrdl-github avatar Jan 12 '23 16:01 hrdl-github

Feedback on why you leave, where you are going, pdf-tools in general.

vedang avatar Jan 12 '23 17:01 vedang

Initial review and testing went great. There are some minor changes and commit squashing that I can do.

I want to test it a little bit more and review it once again tomorrow. I don't see any changes required at the moment, but will confirm this tomorrow.

vedang avatar Jan 15 '23 18:01 vedang

Thanks. Feel free to squash and to make any changes you'd like.

hrdl-github avatar Jan 15 '23 19:01 hrdl-github

Thanks, squashed and merged

vedang avatar Jan 16 '23 18:01 vedang