Skip to content
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

Make selection-style configurable #73

Closed
wants to merge 3 commits into from

Conversation

hrdl-github
Copy link

@hrdl-github hrdl-github commented Jan 19, 2022

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 hrdl-github changed the title Makes 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. Make selection-style configurable Jan 19, 2022
@vedang vedang added the pending review Maintainer needs to review the changes label Jan 25, 2022
@vedang
Copy link
Owner

vedang commented Jan 25, 2022

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 vedang added this to the v1.1.0 milestone Jan 25, 2022
@hrdl-github
Copy link
Author

Sure. Thanks for taking over maintainership of this project!

@andersjohansson
Copy link
Contributor

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.

@vedang vedang added the new feature implementation This is a substantial code change and / or implements significant new functionality label Oct 3, 2022
@hrdl-github
Copy link
Author

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.

@vedang
Copy link
Owner

vedang commented Jan 12, 2023

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

@hrdl-github
Copy link
Author

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

@vedang
Copy link
Owner

vedang commented Jan 12, 2023

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

@vedang
Copy link
Owner

vedang commented Jan 15, 2023

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.

@hrdl-github
Copy link
Author

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

@vedang vedang closed this in 8ddf4c7 Jan 16, 2023
@vedang
Copy link
Owner

vedang commented Jan 16, 2023

Thanks, squashed and merged

vedang added a commit that referenced this pull request Jan 17, 2023
Thanks to the stellar work by @hrdl-github in #73, we can now change
the default unit of selection from `glyph` to `word`. This speeds up
selection significantly.

Look at the documentation of `pdf-view-selection-style` for more
information.

Closes: #87
@vedang vedang mentioned this pull request Jan 17, 2023
aikrahguzar pushed a commit to aikrahguzar/pdf-tools that referenced this pull request Apr 25, 2023
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`.

Closes: vedang#73
aikrahguzar pushed a commit to aikrahguzar/pdf-tools that referenced this pull request Apr 25, 2023
Thanks to the stellar work by @hrdl-github in vedang#73, we can now change
the default unit of selection from `glyph` to `word`. This speeds up
selection significantly.

Look at the documentation of `pdf-view-selection-style` for more
information.

Closes: vedang#87
aikrahguzar pushed a commit to aikrahguzar/pdf-tools that referenced this pull request Apr 25, 2023
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`.

Closes: vedang#73
aikrahguzar pushed a commit to aikrahguzar/pdf-tools that referenced this pull request Apr 25, 2023
Thanks to the stellar work by @hrdl-github in vedang#73, we can now change
the default unit of selection from `glyph` to `word`. This speeds up
selection significantly.

Look at the documentation of `pdf-view-selection-style` for more
information.

Closes: vedang#87
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature implementation This is a substantial code change and / or implements significant new functionality pending review Maintainer needs to review the changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants