summaryrefslogtreecommitdiff
path: root/lisp/pdf-annot.el
AgeCommit message (Collapse)Author
2022-05-01Use org-mode as the default mode for annotation editsVedang Manerikar
This makes it simpler / more Emacs-y to take notes in annotations that can then be exported.
2022-01-03Minor language correction: it's -> itsVedang Manerikar
The correct possessive with it is "its", not "it's". Closes: politza#689
2022-01-02Ensure usage of 'dvipng in `pdf-annot-print-annotation-latex`Vedang Manerikar
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
2021-12-31Fix checkdoc errors in pdf-tools lisp codeVedang Manerikar
- 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
2021-12-31Indentation and code-quality fixesVedang Manerikar
- 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
2021-05-31define-minor-mode: Remove support for obsolete pos argumentsThomas Hisch
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.
2021-05-31Explicitly pass width through `pdf-view-create-image`Illia Ostapyshyn
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.
2021-05-11Fix: minor issues as found by package-lint and checkdocVedang Manerikar
2021-02-21Fix typosJonas Bernoulli
2021-02-20Don’t record temporary window selection changesMichal Nazarewicz
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
2019-06-28Avoid running hooks in a not yet completely set up bufferAndreas Politz
2018-10-27Fix indentationAndreas Politz
2018-10-27Add documentationAndreas Politz
2018-10-27Merge pull request #433 from anpandey/masterpolitza
Customizable annotation list format
2018-10-26Disable list highlight by defaultAnkit Pandey
2018-10-26Rename `comments' to `contents'Ankit Pandey
2018-10-22Insert contents before setting up the major-modeAndreas Politz
2018-10-18Add option for highlighting with annotation colorAnkit Pandey
Introduces `pdf-annot-list-highlight-type', which when enabled highlights the "type" column in the annotation list with the color of the annotation.
2018-10-18Allow pdf annotation list to be customizedAnkit Pandey
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.
2018-09-24Improved handling of default annotation propertiesAndreas Politz
2018-09-24Remove dependency on seq.elAndreas Politz
2018-09-24Fix inaccessible highlight annotations in other viewersAndreas Politz
2018-08-23Fix sorting of annotations by pageAndreas Politz
2017-09-12Fix missing defcustom typesAndreas Politz
2017-08-09Fix incorrect offset in pdf-annot-at-positionAndreas Politz
2017-03-01Delete trailing whitespaceAndreas Politz
2016-12-07Simplify image creation with org-modeAndreas Politz
2016-10-18Fix some spelling errorsBrady Trainor
2016-05-25Fix wrong format specifierAndreas Politz
2016-02-03Fix completing-read issueAndreas Politz
2015-06-07Fix regression.Andreas Politz
* lisp/pdf-annot.el (pdf-annot-add-markup-annotation): Use unscaled values for edges.
2015-02-12Improved highlighting.Andreas Politz
* 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.
2015-02-05Use yellow as default color for markups, because pank prefers it.Andreas Politz
* lisp/pdf-annot.el (pdf-annot-add-markup-annotation): Use "#ffff00" fall back color.
2015-02-04Use a reasonable default color for markups.Andreas Politz
* lisp/pdf-annot.el (pdf-annot-add-markup-annotation): Fallback to red as a last resort.
2015-02-04Make savehist save pdf-annot-color-history.Andreas Politz
* 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.
2015-01-02Handle recent changes in org.Andreas Politz
* 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.
2014-12-06Make pdf-tools compatible with Emacs 24.3Andreas Politz
* 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
2014-12-04Fix improper creation of annotations.Andreas Politz
* lisp/pdf-annot.el (pdf-annot-add-annotation): Pass the new annotation through pdf-annot-create.
2014-11-30Tiny fix.Andreas Politz
* lisp/pdf-annot.el (pdf-annot-list-operation-function): Remove unsupported complete operation.
2014-11-28Handle nil value.Andreas Politz
* lisp/pdf-annot.el (pdf-annot-list-display-annotation-from-id): Do nothing if id is nil.
2014-11-28Fixed a bug when running pdf-annot-inhibit-modification-hooks.Andreas Politz
* lisp/pdf-annot.el (pdf-annot-run-modified-hooks): Use cl-member with car.
2014-11-28Added two functions.Andreas Politz
* 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.
2014-11-27List also file annotation.Andreas Politz
2014-11-27Fix compiler warning.Andreas Politz
2014-11-27Use poppler-name strike-out everywhere, instead strikeout.Andreas Politz
2014-11-27Use color history when reading a color.Andreas Politz
2014-11-27Moved defcustom.Andreas Politz
2014-11-27List only certain annotations.Andreas Politz
* 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.
2014-11-26Use proper values when signaling an error.Andreas Politz
2014-11-26Fixed typo.Andreas Politz