| Age | Commit message (Collapse) | Author |
|
Relates to: #64
|
|
A parameter `event' is required at least for emacs 29.0.
Add `_event' to pacitify compiling warning.
|
|
The correct possessive with it is "its", not "it's".
Closes: politza#689
|
|
NonGNU ELPA updates based on the package version number.
Unfortunately, 1.0.0snapshot is considered older than 1.0, so I don't
expect this to update anything in NonGNU ELPA, but it is a step in the
right direction.
|
|
Users might have changed `org-preview-latex-default-process` from it's
default of value 'dvipng. However, `pdf-tools` can only work with png
files, so bind it locally to ensure that `pdf-tools` can do the right
thing.
Author: Visuwesh <visuwesh@tutanota.com>
Squashed Commit. Closes: #58
|
|
`l` and `r` are the conventional bindings for history navigation.
The previous key-bindings `B` and `N` are kept as-is for people who
were used to it.
This is a breaking change because `r` was previously bound to
`revert-buffer`. However, `g` is also bound to `revert-buffer` and is
the conventional binding for `revert` so this should be okay.
Fixes: #43
|
|
When `pdf-view-auto-slice-minor-mode` is turned off, remove slicing
and re-display the window.
Fixes: #44
|
|
- Add / Fix docstrings for functions.
- Make punctuation changes as suggested by `checkdoc`
This commit makes changes in a subset of files of `pdf-tools`. Some of
the major files are still pending changes, and will be addressed in a
later commit.
Partially Fixes: #64
|
|
- Remove :group arguments from `defcustom` declarations
- `defcustom` picks up `defgroup` names from the same file, so
specifying the group is not necessary
- Ensure that all function-names are properly quoted using #'
- Add an explicit header-option setting lexical-binding to t
- Ensure that cl-check-type uses `satisfies` for filenames
- Replace all `defadvice` with `advice-add`
- Replace `(list ...)` patterns with `\`(...)` patterns
Fixes: #62
Fixes: #32
Partially Fixes: #24
|
|
Emacs had made some change to the easy-menu system, that is,
`easy-menu-define` lowers the menu-bar key automatically.
Ref:
https://lists.gnu.org/archive/html/bug-gnu-emacs/2021-09/msg02038.html
Closes #50
Signed-off-by: Shuguang Sun <shuguang79@qq.com>
|
|
If `pdf-view-themed-minor-mode' is active, use theme background for tooltip arrow (background) instead of white.
|
|
Prefixes for temporary files are derived from either the file name
associated with the pdf-view buffer, or the buffer name if it is not
visiting a file. If the buffer name contains '/' characters, then it is
not a valid file name.
Clean up non-alphanumeric characters in the buffer name before using
it as a temp file prefix.
|
|
This removes the positial arguemnt triplet from the define-minor-mode
calls, because they are obsolete since Emacs<21. See the following
paragraph in the help section of define-minor-mode.
For backward compatibility with the Emacs<21 calling convention, the
keywords of define-minor-mode can also be preceded by the obsolete
triplet INIT-VALUE LIGHTER KEYMAP.
|
|
This is to avoid repeatedly scaling the displayed image width when
applying highlighting. Fixes #19. Closes #22.
As it turns out, it wasn't only `isearch` and `occur` which were
broken, but everything that includes highlighting: selection and jump
to annotation (`C-c C-a l SPC`) as well.
The behavior was caused by passing the value of
`(pdf-view-image-size)` into the highlight functions
(`pdf-info-renderpage-text-regions` and
`pdf-info-renderpage-highlight`) and using the result as it is,
without re-adjusting the displayed image width as it's done when
displaying raw pages without any highlighted elements, see [this
line](https://github.com/vedang/pdf-tools/blob/df2eea87aa84711024b48b2184b1c1ca1b2d0e7b/lisp/pdf-view.el#L935)
This caused the image width to be multiplied with the
`frame-scale-factor` in `pdf-info-renderpage` and the width of the
returned raw image to be interpreted by `create-image` as the
requested width of the image as seen in the buffer.
Fixed by passing the width explicitly in every call to
`pdf-view-create-image`, except for [this
one](https://github.com/vedang/pdf-tools/blob/df2eea87aa84711024b48b2184b1c1ca1b2d0e7b/lisp/pdf-annot.el#L1365),
which seems to be responsible for latex fragment rendering.
|
|
Closes #21
|
|
This reverts commit 8b2debaba240d20ac5f30a9ba076eb532a2396c7, which
was introduced in an attempt to fix #13. I am now tracking this issue
under #19.
@iostapyshyn has confirmed that this change breaks scaling and is not
the correct fix.
|
|
`pdf-view-image-size` passes in the width of the current page to
`pdf-info-renderpage` during an isearch. Use this as-is, instead of
multiplying it with the `pdf-util-frame-scale-factor`.
This is a potential fix for the bug raised by PR #13.
I'm not sure if this was a bug earlier as well, but was masked since
the code-path did not execute for `png` images.
I will treat this as a temporary change until I can better understand
the original reasons behind putting it in. Since I don't have access
to a Mac running `emacs-mac` , I have tested it by hard-coding
`pdf-util-frame-scale-factor` to 2 on my local setup, and everything
seems to be working correctly.
|
|
Fixes the long-standing issue of displaying pdf contents
in proper resolution on retina Macs using vanilla (not a fork) emacs
[1], [2]
This commit squashes changes contributed by @iostapyshyn. It
introduces the following changes:
- Use `frame-scale-factor` to detect HiDPI displays in preference to
other methods. `frame-scale-factor` is a new function introduced in
Vanilla Emacs to return the scale factor of the backing store.
- Allow scaling for `png` type images as well (if
`pdf-view-use-scaling` is `t`), since this works well and I'm not
sure why it was originally disabled.
1: politza/pdf-tools#51
2: hlissner/doom-emacs#4989
Closes #13
|
|
|
|
Fixes the following compilation warnings:
Warning (comp): pdf-util.el:113:36: Warning: reference to free variable ‘image-mode-winprops-alist’
Warning (comp): pdf-util.el:114:39: Warning: assignment to free variable ‘image-mode-winprops-alist’
|
|
This commit gives the user the option to disable the action of
`fill-column` (or customize it to whatever they want) in pdf-outline
buffers. This is useful because outlines frequently contain long
lines, and breaking up the lines destroys the formatting and integrity
of the outline.
Closes politza/pdf-tools#602, politza/pdf-tools#593
|
|
|
|
Modes like evil or xah-fly-keys don’t always use C-n/C-p for
navigation, so adding remapping bindings like `[remap next-line]` to
the `pdf-view-mode-map` will let PDF Tools work as expected no matter
what keys the user usually has bound to next-line/previous-line.
Some other entries in the map already use key remapping for things
like `goto-line`, so this PR just adds some more common remaps to keep
a consistent user experience. Also, re-aligned the commands with
whitespace since some of the new names messed up the old alignment
|
|
|
|
|
|
We are now directly requiring these macros from pdf-macs.el, so we
should not be using `declare-function` anymore.
Closes politza/pdf-tools#626, politza/pdf-tools#625
|
|
|
|
Also, use `pdf-util-assert-pdf-buffer` instead of
`pdf-tools-assert-pdf-buffer`.
|
|
Note that this mode does not keep updated with theme changes; it only applies
the colors of the current theme. Hook into `enable-theme` and `disable-theme`
for that.
|
|
Extends the work done in 2ece508 and 91630c2 to ensure that typos are
correctly fixed. Also renames the custom variable
`pdf-misc-print-program` to `pdf-misc-print-program-executable` to
avoid confusion with the function of the same name.
|
|
I think this typo was missed.
|
|
In emacs27 `image-set-window-vscroll` changed from
taking lines to taking pixels. This has introduced
a bug with usages of `pdf-util-required-vscroll`,
which returns lines. Usages of that function are calling
`image-set-window-vscroll`, so this change is to move
`pdf-util-required-vscroll` to using pixels as well
(only for <=emacs27)
|
|
There are places with code similar to the following:
(save-selected-window
(select-window window)
…)
For the purposes of this commit, this is roughly equivalent to:
(let ((old-window (selected-window)))
(select-window window)
…
(select-window old-window 'norecord))
That is, when ‘save-selected-window’ restores the state, it passes
‘norecord’ argument to ‘select-window’ function. As a result, when
selected window is initially changed ‘buffer-list-update-hook’ is
called however it is not invoked when selected window is restored.
This confuses any code using that hook to track selected window.
To address this issue, change calls such as the above to use
‘norecord’ argument. This way, ‘buffer-list-update-hook’ is called
neither when the new window is temporarily selected nor when old
window is restored.
For reference, this is indeed what documentation of ‘select-window’
says should be done:
> Run ‘buffer-list-update-hook’ unless NORECORD is non-nil. Note that
> applications […] often select a window temporarily […] to simplify
> coding. As a rule, such selections should not be recorded and
> therefore will not pollute ‘buffer-list-update-hook’. Selections
> that "really count" are those causing a visible change in the next
> redisplay of WINDOW’s frame and should always be recorded.
Fixes: https://github.com/mina86/auto-dim-other-buffers.el/issues/26
|
|
image-mode keeps it's own copy of hscroll and during redisplay it will
grab that value and use it. If you don't update image-mode's hscroll,
but directly set the window's hscroll you will (after triggering a redisplay)
find your pdf scrolled all the way to the left margin. Quite unfortunate
if you happen to be zoomed in. This fixes that by using image-mode's
method for updating hscroll
|
|
|
|
|
|
Typos found with codespell.
|
|
Introduces a variable pdf-view-have-image-mode-pixel-vscroll which should be non-nil, if image-mode scrolls vertically pixel-wise.
|
|
This fixes politza#511.
|
|
|
|
|
|
|
|
Adds a function for returning the label of the current page
|
|
`t` is not a valid keymap. I looked through the other minor-mode
definitions and didn't see any other such uses.
Found that this was causing me problems, see Wilfred/helpful#114.
|
|
|
|
This fixes an issue where the page of a PDF being shown in the
`selected-window` would be reset if the PDF was different than the
PDF of the `current-buffer`.
|
|
This is useful when you have two installers on the same machine (e.g.
pacman and nix-shell) and you want to choose between one of them.
|
|
|
|
|
|
|