| Age | Commit message (Collapse) | Author |
|
This makes it simpler / more Emacs-y to take notes in annotations that
can then be exported.
|
|
The correct possessive with it is "its", not "it's".
Closes: politza#689
|
|
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
|
|
- 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
|
|
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.
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
Customizable annotation list format
|
|
|
|
|
|
|
|
Introduces `pdf-annot-list-highlight-type', which when enabled highlights the
"type" column in the annotation list with the color of the annotation.
|
|
Introduces a new customization variable, `pdf-annot-list-format', which is an
alist of columns and associated widths that should appear in the annotation
list.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* lisp/pdf-annot.el (pdf-annot-add-markup-annotation): Use unscaled values for edges.
|
|
* server/epdfinfo.c (cmd_renderpage_highlight): Properly handle the
arguments.
* lisp/pdf-info.el (pdf-info-renderpage-highlight): Likewise.
* lisp/pdf-annot.el (pdf-annot-show-annotation): Use slightly better
looking colors.
|
|
* lisp/pdf-annot.el (pdf-annot-add-markup-annotation): Use "#ffff00"
fall back color.
|
|
* lisp/pdf-annot.el (pdf-annot-add-markup-annotation): Fallback to red
as a last resort.
|
|
* lisp/pdf-annot.el (pdf-annot-minor-mode): Manually add the variable
to savehist's variables. Otherwise it may never happen, if the user
uses solely mouse commands.
|
|
* lisp/pdf-annot.el (pdf-annot-print-annotation-latex): Call the org
code in a temp buffer, to avoid errors with the read-only PDF
buffer.
|
|
* lisp/pdf-view.el (pdf-view-mode): Set major-mode before setting up winprops.
(pdf-view-new-window-function): Check winprops for image.
(pdf-view-desired-image-size): Use compatibility macro
pdf-util-window-pixel-width.
* lisp/pdf-util.el: (pdf-util-window-pixel-width): Compatibility macro
for window-width in pixel.
(image-mode-winprops): Use implementation from 24.4 if current
buffer is in pdf-view-mode.
* lisp/pdf-annot.el (pdf-annot-print-annotation-latex): Don't use
org-create-formula-image, since it is not available in 24.3.
* README.org: Qualify needed Emacs version to be 24.3
|
|
* lisp/pdf-annot.el (pdf-annot-add-annotation): Pass the new
annotation through pdf-annot-create.
|
|
* lisp/pdf-annot.el (pdf-annot-list-operation-function): Remove
unsupported complete operation.
|
|
* lisp/pdf-annot.el (pdf-annot-list-display-annotation-from-id): Do nothing if id is nil.
|
|
* lisp/pdf-annot.el (pdf-annot-run-modified-hooks): Use cl-member with car.
|
|
* lisp/pdf-annot.el (pdf-annot-put): New function for getting
display-relevant edges. New function for getting the type.
(pdf-annot-equal, pdf-annot-delete, pdf-annot-create-hotspots
pdf-annot-show-annotation, pdf-annot-add-annotation
pdf-annot-compare-annotations, pdf-annot-list-create-entry
pdf-annot-list-goto-annotation, pdf-annot-at-position): Use new functions.
|
|
|
|
|
|
|
|
|
|
|
|
* lisp/pdf-annot.el (pdf-annot-annotation-types): Change strike-out to strikeout.
(pdf-annot-list-listed-types): New option determining which types are listed.
|
|
|
|
|