summaryrefslogtreecommitdiff
path: root/lisp/pdf-info.el
AgeCommit message (Collapse)Author
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-30Revert "`pdf-info-renderpage`: Use the width of the page as passed in."Vedang Manerikar
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.
2021-05-30`pdf-info-renderpage`: Use the width of the page as passed in.Vedang Manerikar
`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.
2019-11-26Fix typosDamien Cassou
Typos found with codespell.
2019-02-19Support high-resolution displaysNathaniel Nicandro
2018-09-25Avoid race-condition when quitting the serverAndreas Politz
2017-09-14Escape the pdffile properlyAndreas Politz
2017-09-14Fix languageAndreas Politz
2017-09-14Don't force pdf-info-epdfinfo-program to exist when customizing itAndreas Politz
2017-09-14Adds some commentsAndreas Politz
2017-09-14Look for epdfinfo in the Emacs's bin directoryAndreas Politz
2017-09-13Improve the epdfinfo checkAndreas Politz
Render a empty page. This should expose problems with linked libraries.
2017-09-13Clean up epdfinfo detectionAndreas Politz
2017-09-12Fix missing defcustom typesAndreas Politz
2017-08-20Fixes whitespaceAndreas Politz
2017-08-09Utilize a system installation of epdfinfoAndreas Politz
2017-07-21Fix directory namethblt
2017-07-20Remove pointless fallback casethblt
2017-07-20Use function in cl namespace instead of adding extra depthblt
2017-07-20Add missing dependencythblt
2017-07-20Support Git clone installationthblt
Let the default value of 'pdf-info-epdfinfo-program' automatically determine if PDF Tools is installed as a Melpa package (where the epdfinfo binary is in ./build) or as a Git clone (where it's found at ../server/)
2017-03-01Delete trailing whitespaceAndreas Politz
2017-01-27Add support for interactive PDF decryptionAndreas Politz
2017-01-19Fix typoAndreas Politz
2017-01-19Add option to log server error messagesAndreas Politz
2016-10-18Fix some spelling errorsBrady Trainor
2016-02-28Set pdf-info-epdfinfo-program for WindowsLars Ljung
2015-11-26correct "it's/its" grammar in docstringsMatt Price
2015-06-12New macro for composing server queries.Andreas Politz
* lisp/pdf-info.el (pdf-info-compose-queries): ...
2015-06-12Allow one more nil argument.Andreas Politz
* lisp/pdf-info.el (pdf-info-charlayout): Let edges-or-pos default to the whole page.
2015-06-12Simplified valid page ranges.Andreas Politz
* lisp/pdf-info.el (pdf-info-normalize-page-range): Remove unused t as allowed page.
2015-06-12Expand filenames for the server.Andreas Politz
* lisp/pdf-info.el (pdf-info--normalize-file-or-buffer): Use expand-file-name on the result.
2015-06-12Removed some duplicate code.Andreas Politz
* lisp/pdf-info.el (pdf-info--normalize-file-or-buffer): Check major-mode once.
2015-06-12Made tq processing iterative.Andreas Politz
* lisp/pdf-info.el (tq-process-buffer): Use a iterative algorithm, which may avoid problems with many requests (max eval depth).
2015-06-12Extended asynchronous callback.Andreas Politz
* lisp/pdf-info.el (pdf-info-asynchronous): Allow for arguments to be passed. (pdf-info-query): Handle them.
2015-06-12Added a noop command to the server.Andreas Politz
* server/epdfinfo.c (cmd_ping): Pong. * lisp/pdf-info.el (pdf-info-ping): Handle it.
2015-06-11Simplify pdf-info interface.Andreas Politz
* lisp/pdf-tools.el: Add let-alist as requirement. * lisp/pdf-occur.el (pdf-occur-add-matches, pdf-occur-start-search): Use new interface. * lisp/pdf-isearch.el (pdf-isearch-search-page): Use new interface. * lisp/pdf-info.el (pdf-info-query--transform-action, pdf-info-query--transform-response): Prefer alists over trees or positional lists, where appropriate. (pdf-info-search-string,pdf-info-search-regexp,pdf-info-pagelinks pdf-info-charlayout,pdf-info-pagelinks, pdf-info-outline, pdf-info-synctex-forward-search, pdf-info-synctex-backward-search): Updated documentation. * test/pdf-info.ert: Require let-alist, use new interface. * Makefile (bytecompile, test): Use cask. * Cask (depends-on): Add let-alist. * lisp/pdf-outline.el: Use new interface. * lisp/pdf-links.el: Use new interface. * lisp/pdf-cache.el: Use new interface. * lisp/pdf-sync.el: Use new interface.
2015-06-07Unified rendering commands in the server.Andreas Politz
* server/epdfinfo.c (cmd_renderpage): Incorporated cmd_renderpage_x commands into cmd_renderpage. * lisp/pdf-view.el (pdf-view-extract-region-image): Use new rendering capabilities. * lisp/pdf-info.el (pdf-info-renderpage): Adhere to and provide new command protocol. (pdf-info-renderpage-text-regions): Use pdf-info-renderpage. (pdf-info-renderpage-highlight): Use pdf-info-renderpage.
2015-06-02Merge pull request #94 from oscarfv/recolorpolitza
Recolor
2015-05-24Start server in an existing directoryAndreas Politz
* lisp/pdf-info.el (pdf-info-check-epdfinfo): Let default-directory be ~. (pdf-info-process-assert-running): Ditto.
2015-05-14Merge branch 'master' into optionsoscar
Conflicts: lisp/pdf-info.el server/epdfinfo.c server/epdfinfo.h
2015-05-05Added navigation by and display of pagelabels.Andreas Politz
* server/epdfinfo.c: New command pagelabels. * lisp/pdf-view.el (pdf-view-goto-label): New command for going to the page corresponding to it's label. (pdf-view-mode-map): Bind it to `M-g l' . * lisp/pdf-outline.el (pdf-outline-display-labels): New option for displaying labels instead of page numbers. (pdf-outline-insert-outline, pdf-outline-insert-outline, pdf-outline-imenu-create-item, pdf-outline-imenu-create-index-flat, pdf-outline-imenu-create-index-tree, pdf-outline-imenu-create-index-tree-1): Handle it. * lisp/pdf-info.el (pdf-info-pagelabels): New command returning a list of pagelabels. (pdf-info-query--transform-response): Handle it. * NEWS: Add news items.
2015-04-12Added option for log truncation.Andreas Politz
* lisp/pdf-info.el (pdf-info-log-entry-max): New option. (pdf-info-query--log): Use it.
2015-04-10Improve feedback if epdfinfo is not in working.Andreas Politz
* lisp/pdf-info.el (pdf-info-check-epdfinfo): New function: Send a simple command and check for errors. (pdf-info-process-assert-running): Use it. * test/pdf-info.ert (pdf-info-check-epdfinfo): Test it.
2015-04-01Improved command handling, cont'dAndreas Politz
* server/epdfinfo.h (DEC_CMD, DEC_CMD2, DEC_DOPT): Macros for declaring commands and options. * server/epdfinfo.c (command_arg_parse_arg): Removed unused ARG_QUADRILATERAL. (command_arg_print, command_arg_type_size): New function. (document_options): New array holding document options. (cmd_getoptions, cmd_setoptions): Use above array. (commands): Use Macros. * lisp/pdf-info.el (pdf-info-query--transform-response): setoptions: Return new options.
2015-03-31Started options branch.Andreas Politz
* server/epdfinfo.h : Add option structs. * server/epdfinfo.c (image_render_page): Use struct as argument. (cmd_getoptions, cmd_setoptions): New commands. * lisp/pdf-info.el (pdf-info-query--transform-response, pdf-info-getoptions, pdf-info-setoptions): Handle new commands.
2015-03-30Fix potential problem.Andreas Politz
* lisp/pdf-info.el (pdf-info-quit): Rebind pdf-info-asynchronous to original value if not timeout is nil.
2015-03-30Fix a bug regarding pdf-info-asynchronous.Andreas Politz
* lisp/pdf-info.el (pdf-info-features, pdf-info-regexp-compile-flags): Always let-bind it when querying internally.
2015-03-30Improved server quitting.Andreas Politz
* lisp/pdf-info.el (pdf-info-running-p, pdf-info-kill): New functions. (pdf-info-quit): Added timeout argument.