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

Add keyboard navigation minor mode #39

Open
wants to merge 30 commits into
base: master
Choose a base branch
from
Open

Conversation

orgtre
Copy link
Contributor

@orgtre orgtre commented Aug 17, 2021

Introduces standard-Emacs-like concepts of point, mark, region, and cursor into
pdf-tools and uses these to implement keyboard-based navigation, selection, and
annotation in pdf files.

orgtre and others added 6 commits August 17, 2021 13:34
Introduces standard-Emacs-like concepts of point, mark, region, and cursor into
pdf-tools and uses these to implement keyboard-based navigation, selection, and
annotation in pdf files.
Use pdf-view-midnight-colors as cursor rather than pdf-keynav-cursor
This adds the commands 'pdf-keynav-annot-add-text-left/right' and a variable
'pdf-keynav-annot-text-margin' to control where the text annotations are placed
in the margins. A function 'pdf-keynav-annot-delete-closest-text' is also added
and command 'pdf-keynav-annot-delete' is modified to incorporate it. Furthermore,
an error in 'pdf-keynav-annot-activate' has been fixed, plus custom types have
been adjusted and various formatting fixed.
- Remove some unused variables
- string-reverse is obsolete, use reverse
- use let instead of assigning to free variables
@andersjohansson
Copy link
Contributor

This is brilliant and really well-thought out! It is of course annoying that navigation (especially character-by-character with C-f etc.) feels slow, but otherwise this does really allow a totally keyboard-centric usage of pdf-tools.

I did some cleanup of the code here: orgtre#2

@orgtre
Copy link
Contributor Author

orgtre commented Dec 1, 2021

Thanks! I merged the cleanup. The only way I can come up with to make it faster is to co-opt the mouse pointer as cursor. This has some obvious drawbacks as that's not what the mouse pointer is for and I've not managed to work the positioning out properly yet, but a proof-of-concept is in the "pointer-as-cursor" branch. Any other ideas are welcome.

@vedang
Copy link
Owner

vedang commented Dec 30, 2021

This is great @orgtre! This particular feature has been on my todo list for a while. Sorry for ignoring the PR for a bit, but I plan to review the code and test it out over the weekend. I'll get back with thoughts and feedback (if any) in the next week.

@vedang vedang added the new feature implementation This is a substantial code change and / or implements significant new functionality label Dec 31, 2021
@vedang vedang added this to the v1.1.0 milestone Jan 6, 2022
@vedang vedang added the pending review Maintainer needs to review the changes label Oct 5, 2022
@vedang
Copy link
Owner

vedang commented Jan 17, 2023

I am picking up the review of this giant set of changes this week, looking forward to finally testing it out. Where possible, I will squash / update the commits myself instead of getting back with review comments -- because this is such a big change across so many commits.

I'll get back here with questions / doubts, if any. Thank you!

@orgtre
Copy link
Contributor Author

orgtre commented Jan 17, 2023

Wow great! Feel free to do what you want. Let me know if there is anything I can do. Thanks for your work (the last 8 hours were huge for pdf tools)!

@asymmetric
Copy link

Has there been any progress on this?

@vedang
Copy link
Owner

vedang commented Apr 16, 2023 via email

@vedang vedang mentioned this pull request Jul 13, 2023
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.

None yet

5 participants