summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-03-14Merge pull request #255 from thanosapollo/#fix-gentoo-autobuildVedang Manerikar
autobuild: Update gentoo packages
2024-03-14Merge pull request #263 from jakanakaevangeli/decrypt-no-fileVedang Manerikar
Improvements to PDF decryption: - Support decryption of non-file-visiting pdf buffers, for example, when opening a pdf e-mail attachment from within Emacs - Don't retry with the same cached password upon decryption failure, to support re-opening a pdf file with a modified password - Don't error during 'revert-buffer' on encrypted documents
2024-03-14Fixes obsolete outline commands in PDF Outline (#265)Ramon Diaz-Uriarte
Replace obsolete outline commands with their newer versions --------- Authored-by: Ramon Diaz-Uriarte (@rdiaz02)
2024-03-09Support 'revert-buffer' on encrypted documentsMiha Rihtaršič
2024-03-09Don't retry with the same cached password upon decryption failureMiha Rihtaršič
Password cache may contain a stale password if a pdf file's password is modified. Re-read a new password without cache in this case, rather than retry with the same cached password 3 times and fail.
2024-03-08Support decryption of non-file-visiting pdf buffersMiha Rihtaršič
Opening a pdf e-mail attachment from within Emacs can show a pdf-view buffer, where (buffer-file-name) returns nil.
2024-02-26autobuild: Update gentoo packagesThanos Apollo
2023-06-11Add display-line-numbers-mode to the list of incompatible modesVedang Manerikar
Somehow, this had been missed.
2023-06-11[v2] Auto enable pdf-view-dark-minor-mode if the theme is darkVedang Manerikar
The first attempt at this workaround was c451c0e3db5b367d191bddf428e38fd8a21c0102 , which did not work because (my guess) `pdf-tools-enabled-modes` would be evaluated before the theme was loaded. This is attempt 2, which sets this value in the `pdf-view-mode` function itself. This is meant as a workaround for #166 (which see). Best guess about what is happening and why this workaround works comes from @d8660091 (lightly edited): > I'm using M2 and I can reproduce the issue with just the following > snippets I extracted from pdf-isearch-current-colors, which was > invoked during a pdf isearch: (add-hook 'pdf-tools-enabled-hook (lambda () (pdf-util-face-colors 'pdf-isearch-match nil) (pdf-util-face-colors 'pdf-isearch-lazy nil))) > And run `pdf-tools-install` > I tried adding `(sit-for 1)` before `(delete-frame f)`, the crash > was gone. > But I am still not sure what's really happening. > I think `pdf-view-dark-minor-mode` works because new frame is not > created and `delete-frame` doesn't happen. If anyone has an idea about what is happening here and what the correct way to fix it is, please get in touch via the linked issue!
2023-06-11Fix: Keep cursor on the same line when reopening list of annotsPedro Ribeiro Mendes Júnior
Check if the buffer of the list of annotations already exists. In that case, avoid calling `tabulated-list-print` because the call to that function makes the cursor move to the beginning of the buffer. Tested for: - the buffer of the list of annotations already exists; - a new note is created; - that buffer is reopened with the cursor on the same position as previous left; and the newly inserted note appears as expected. Closes: #211
2023-06-11Update NEWS with recent contributionsVedang Manerikar
The goal is to try and keep these updates as close to when I merge the changes as possible, since they become unmanageable if you wait until the day of the release. I want to acknowledge all the amazing people people who are contributing to `pdf-tools` and making it the powerhouse it is.
2023-06-11Allow creation of markup annotations without a text selectionAugusto Stoffel
This allows calling `pdf-info-addannot` from Lisp with a nil `markup-edges` argument, which was previously disallowed. In this case, the annotation covers exactly the selected region of the page, without attempting to match it to a certain text region. This means that you can now highlight an exact region! Just select the region by holding down the Meta key and dragging the mouse. Then invoke `pdf-annot-add-highlight-markup-annotation` (with `C-c C-a h`) and voila! Closes: #191
2023-06-11Use 'C-c C-k' to abandon edits of annotation contentsAugusto Stoffel
This is consistent with other Emacs packages such as org-capture, VC, Magit, etc. Closes: #192
2023-06-11Display a header line when editing annotation contentsAugusto Stoffel
2023-06-11Add command and submenu to switch between selection stylesAugusto Stoffel
Make it possible to set `pdf-view-selection-style` from Easy Menu. Closes: #190
2023-06-10Add an FAQ on re-compiling epdfinfoVedang Manerikar
When poppler changes on the system, epdfinfo needs to be recompiled. Mention this in the README.
2023-06-10Auto enable pdf-view-dark-minor-mode if the theme is darkVedang Manerikar
This is meant as a workaround for #166 (which see). Best guess about what is happening and why this workaround works comes from @d8660091 (lightly edited): > I'm using M2 and I can reproduce the issue with just the following > snippets I extracted from pdf-isearch-current-colors, which was > invoked during a pdf isearch: (add-hook 'pdf-tools-enabled-hook (lambda () (pdf-util-face-colors 'pdf-isearch-match nil) (pdf-util-face-colors 'pdf-isearch-lazy nil))) > And run `pdf-tools-install` > I tried adding `(sit-for 1)` before `(delete-frame f)`, the crash > was gone. > But I am still not sure what's really happening. > I think `pdf-view-dark-minor-mode` works because new frame is not > created and `delete-frame` doesn't happen. If anyone has an idea about what is happening here and what the correct way to fix it is, please get in touch via the linked issue! Closes: #166
2023-06-10Bump pdf-tools version to v1.1.0v1.1.0Vedang Manerikar
This is necessary because the extensive changes in `epdfinfo` do not get picked up by third party package management systems unless they enter Melpa Stable. This mismatch caused a number of issues, which I expect this bump will now fix. Thanks to @cyrilarnould and @barslmn for pointing this out. I am also using this bump to close long-open install issues. The idea here is that these issues are being lost. I would rather everyone upgrade to the latest versions of `pdf-tools` and `epdfinfo` and then re-report the issues if they still exist. Please note: as of this release, users are not expected to manually set anything on their machines during installation. (for example: `$PKG_CONFIG_PATH`). The installation should *just work*. If it does not, please open a ticket so that we can track it. Fixes: #213 Closes: #177 Closes: #216
2023-06-10Fix: href styles in README.orgVedang Manerikar
The current href style was not working on Github, which is really irritating. This commit fixes the issue. Closes: #198
2023-06-10Add hue contribution of background color to inverted midnight modeZach Kost-Smith
From the comments in the PR, @smithzvk explains the changes: > I was bugged that it didn't pick up the hue from the background, > however, so I made the all color a/b parameters start from the a/b > parameters of the BG color. This makes the PDF background (white) > map to your BG color and PDF foreground (black) map to your FG > color, which can be set to your theme background making it seem > pretty seamless. Note that if you set your BG and FG to a color > theme without zero saturation (a gray tone of some sort), then you > recover the original behavior. > > I also reinstated the cached transforms for background and the last > color computed. > > I also refactored the loop to move the switch statement outside of > the loop. It is more repetitive, but it was needed to get rid of > some warnings about potentially uninitialized variables. It should > also be faster as the branch was removed from the loop. > > I also ditched the gamma correction as it seemed to be doing the > wrong thing and I never had a theoretical reasoning for it. I can > get similar results if I just set my BG color to something like > gray5 instead of black. Barely a difference in background but the > hinting on the fonts is showing again. The root of my issue may > have always been some kind of display calibration issue. Closes: #197
2023-06-10Fix: high contrast render in midnight modeZero
Uses the Lightness values from the `pdf-view-midnight-colors` `fg` and `bg` to scale the inverted color's lightness. Band-aid till better method is found. Relates to: #69
2023-06-10Change the circleci macos resource classVedang Manerikar
The currently used "medium" one has been deprecated, as mentioned here: https://discuss.circleci.com/t/macos-resource-deprecation-update/46891
2023-04-04Ensure pixel-scroll-precision-mode deactivationDavide Masserut
Setting `pixel-scroll-precision-mode` to nil is not sufficient to disable the mode locally. Updates: #124
2023-03-22Add `cairo-devel` to Void Linux package listJoão Paulo da Cruz
In Void Linux most heading/development files are separated from the "main" packages and are stored on `${package-name}-devel`. The autobuild for Void fails because it tries to find `cairo-devel`, which contains `cairo`, respectives headers and other dependencies. This Pull Request adds `cairo-devel` to the `PACKAGES` variable
2023-01-17Change the default color inversion to maintain hueVedang Manerikar
This commit enables @smithzvk's work in #69 as the default in `pdf-tools`. It works well for all the PDFs I have tested with. The previous behaviour can be enabled by setting `pdf-view-midnight-invert` to `nil`, if required.
2023-01-17Add support for midnight mode with colorZach Kost-Smith
This inversion method attempts to maintain the color hue and saturation but inverts the lightness using the OKLab color space[^1]. [^1]: https://bottosson.github.io/posts/oklab/ * server/epdfinfo.c (image-recolor): Add feature to support the OKLab inversion method functionality * lisp/pdf-view.el (pdf-view-midnight-invert): Add new variable to invert the image color lightness while maintaining hue. (pdf-view-midnight-minor-mode): Account for above. * lisp/pdf-info.el (pdf-info-query--parse-response): Handle changes to :render/usecolors command Closes: #69 Closes: #169 Closes: politza/pdf-tools#698 Closes: politza/pdf-tools#608
2023-01-17Add a dedicated rotation command and keybindingVisuwesh
We need a dedicated command for rotation since when `pdf-tools` redisplays the image, the `:rotation` image-property is lost. Pdf-tools redisplays the images when changing pages, zooming in/out, setting the slice, etc. so this is essential to have. A variable is used simply because `pdf-tools` already uses a variable to keep track of the current scaling. * lisp/pdf-view.el (pdf-view--current-rotation): Add new variable to keep track of angle. (pdf-view-create-page): Account for above. (pdf-view-mode-map): Add the new command under "R". (pdf-view-rotate): Add new command. Fixes: #152 Closes: #165
2023-01-17Change the default selection-style to wordVedang Manerikar
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
2023-01-17Ask for a file name on save if buffer provides noneakater
When visiting a PDF file downloaded by `eww`, `buffer-file-name` returns nil so the file can't be saved. In such a case, we should ask the user for a file name instead of failing the operation. Closes: #178
2023-01-16Make selection style configurable by introducing a new variablelennonhill
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: #73
2023-01-15epdfinfo: Extract server code for selection_style validationlennonhill
2022-12-02autobuild: Update script for VoidVedang Manerikar
This commit is a squashed commit of PR #164 by @skyler544 Author: Skyler Mayfield <skyler544@gmail.com> Date: Fri Oct 21 12:00:46 2022 +0200 Closes: #164
2022-12-02Add bug report issue template details to the READMEVedang Manerikar
This lets me push the template to the wiki as well, which I think is useful. Also, note down tasks to help improving reporting in the TODO file.
2022-12-02Add an issue template for reporting bugsVedang Manerikar
Try and collect as much information as possible from the reporter, for helping with debugging.
2022-12-02pdf-annot: Fix: Render color only if it's defined.Vedang Manerikar
Free-text annotations do not have a color associated with them, which causes annotation listing to crash (since the default value of `pdf-annot-list-highlight-type` is now true). This bug was introduced in bb0b71f5bafd81d0b5647c4ec48fafa0bb6f6c21
2022-11-29Merge branch 'feature/emacs-26.3'v1.0.0Vedang Manerikar
Creating a merge commit in order to create a 1.0.0 tag. Note that this merge has breaking changes, as described in the NEWS section. * feature/emacs-26.3: autobuild: Recognize NetBSD and install packages via pkgin Bump the minimum Emacs version to 26.3! 🎉🤞 Extend docker testing framework to test against Emacs versions Update and cleanup the Install section Make sure pkg-config is correctly set in autobuild Add support for Alpine Linux to autobuild Render crisp images for HiDPI screens by default Remove Emacs 24.4 guards for cua-mode Remove compatibility function for image-mode-winprops Remove pdf-util-window-pixel-width, fallback to window-body-width Remove macro / function re-definitions Remove bugfix for imenu in Emacs 24.3 and below Remove guards in `pdf-virtual` tests and code. Explicitly declare documentation files as Org files Add a byteclean target in the Makefile
2022-11-25autobuild: Recognize NetBSD and install packages via pkginfeature/emacs-26.3Sunil Nimmagadda
Closes: #170
2022-11-25Bump the minimum Emacs version to 26.3! 🎉🤞Vedang Manerikar
All the code working around issues in Emacs 24 and Emacs 25 has been removed at this point! (or at least, as much of it as I could find) I've tested against Emacs 28 and it's working fine. I need many more automated tests to ensure that behaviour does not break across multiple Emacs versions / operating systems, but that is a topic for another day. This commit bumps the version of `pdf-tools` from `1.0.0snapshot` to `1.0.0`. I do not expect this to have any real change either on Melpa Stable or Non-GNU Elpa, since they already parse the version as 1.0.0. I am not creating a tag at the moment. I will do some more cleanup work and directly create a `1.1.0` post those changes. Closes: #26
2022-11-25Extend docker testing framework to test against Emacs versionsVedang Manerikar
Until this commit, docker-based local testing only checked whether the epdfinfo server compiled correctly. With this commit, local testing now also runs elisp tests against the different versions of Emacs we currently support. All versions of Emacs are run on Ubuntu at the moment, but going forward I expect that we will add more operating system variants to this matrix as well. As test coverage increases, this will help automate away a lot of the tests! Relates to: #130
2022-11-25Update and cleanup the Install sectionVedang Manerikar
Simplify the instructions and ask users to use `make` where possible! Closes: #160
2022-11-25Make sure pkg-config is correctly set in autobuildVedang Manerikar
Also, simplify the config script for finding gnu-sed. Relates to: #160
2022-11-25Add support for Alpine Linux to autobuildVedang Manerikar
This ensures that all operating systems currently mentioned in the README are covered in the autobuild script Relates to: #160
2022-11-25Render crisp images for HiDPI screens by defaultVedang Manerikar
Copying from the README: > `pdf-tools` version `1.1.0` release changed the default value of > `pdf-view-use-scaling` to `t` (previously, it was `nil`). This has > been done keeping in mind that most modern monitors are HiDPI > screens, so the default configuration should cater to this user. If > you are not using a HiDPI screen, you might have to change this > value to `nil` in your configuration. Closes: #133
2022-10-11Remove Emacs 24.4 guards for cua-modeVedang Manerikar
Relates to: #26
2022-10-10Remove compatibility function for image-mode-winpropsVedang Manerikar
Relates to: #26
2022-10-10Remove pdf-util-window-pixel-width, fallback to window-body-widthVedang Manerikar
`window-body-width` is available for us to use in Emacs 26.3 Relates to: #26
2022-10-10Remove macro / function re-definitionsVedang Manerikar
Rely on the functions that come built into Emacs. Relates to: #26
2022-10-10Remove bugfix for imenu in Emacs 24.3 and belowVedang Manerikar
This is no longer necessary, since we are dropping support for Emacs 24.3 Relates to: #26
2022-10-10Remove guards in `pdf-virtual` tests and code.Vedang Manerikar
This is dead-code for supporting Emacs <26.3 Relates to: #26
2022-10-10Explicitly declare documentation files as Org filesVedang Manerikar
Renames: NEWS, TODO and README files. README was a symlink to README.org, removes the symlink in favor of simply keeping the Org file.