| Age | Commit message (Collapse) | Author |
|
autobuild: Update gentoo packages
|
|
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
|
|
Replace obsolete outline commands with their newer versions
---------
Authored-by: Ramon Diaz-Uriarte (@rdiaz02)
|
|
|
|
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.
|
|
Opening a pdf e-mail attachment from within Emacs can show a pdf-view buffer,
where (buffer-file-name) returns nil.
|
|
|
|
Somehow, this had been missed.
|
|
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!
|
|
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
|
|
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.
|
|
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
|
|
This is consistent with other Emacs packages such as org-capture, VC,
Magit, etc.
Closes: #192
|
|
|
|
Make it possible to set `pdf-view-selection-style` from Easy Menu.
Closes: #190
|
|
When poppler changes on the system, epdfinfo needs to be recompiled.
Mention this in the README.
|
|
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
|
|
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
|
|
The current href style was not working on Github, which is really
irritating. This commit fixes the issue.
Closes: #198
|
|
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
|
|
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
|
|
The currently used "medium" one has been deprecated, as mentioned
here:
https://discuss.circleci.com/t/macos-resource-deprecation-update/46891
|
|
Setting `pixel-scroll-precision-mode` to nil is not sufficient to disable
the mode locally.
Updates: #124
|
|
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
|
|
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.
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
|
|
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
|
|
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.
|
|
Try and collect as much information as possible from the reporter, for helping with debugging.
|
|
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
|
|
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
|
|
Closes: #170
|
|
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
|
|
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
|
|
Simplify the instructions and ask users to use `make` where possible!
Closes: #160
|
|
Also, simplify the config script for finding gnu-sed.
Relates to: #160
|
|
This ensures that all operating systems currently mentioned in the
README are covered in the autobuild script
Relates to: #160
|
|
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
|
|
Relates to: #26
|
|
Relates to: #26
|
|
`window-body-width` is available for us to use in Emacs 26.3
Relates to: #26
|
|
Rely on the functions that come built into Emacs.
Relates to: #26
|
|
This is no longer necessary, since we are dropping support for Emacs
24.3
Relates to: #26
|
|
This is dead-code for supporting Emacs <26.3
Relates to: #26
|
|
Renames: NEWS, TODO and README files.
README was a symlink to README.org, removes the symlink in favor of
simply keeping the Org file.
|