summaryrefslogtreecommitdiff
path: root/lisp/pdf-isearch.el
AgeCommit message (Collapse)Author
2025-12-31feat: integrate pdf-view-roll-minor-mode with existing featuresVedang Manerikar
Update all pdf-tools features to work correctly when pdf-view-roll-minor-mode is active: - pdf-isearch: Search across all displayed pages simultaneously - pdf-links: Link selection works with multiple visible pages - pdf-annot: Annotations work on correct page, add pdf-annot-edit command for avy-style annotation editing - pdf-sync: SyncTeX jumps work with continuous scroll mode - pdf-view: Display and navigation functions updated for multi-page - pdf-util: Coordinate transformation updates for visible pages - pdf-cache: Simplify prefetch (remove timer indirection) - pdf-occur: Minor compatibility updates The mode is experimental. Some features may not interact perfectly with roll mode. Enable with M-x pdf-view-roll-minor-mode. API changes: - pdf-view-active-region now includes page information - isearch results include page data for multi-page display Co-authored-by: Daniel Nicolai <dalanicolai@gmail.com> Co-authored-by: Rahguzar <aikrahguzar@zohomail.eu> Co-authored-by: Ihor Radchenko <yantar92@gmail.com> Co-authored-by: NightMachinery <feraidoonmehri@gmail.com>
2023-01-16Make selection style configurable by introducing a new variablelennonhill
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
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-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.
2017-09-08Silence compiler warnings about obsolete functionsAndreas Politz
2017-08-20Fixes whitespaceAndreas Politz
2017-08-11Declare function pdf-sync-backward-searchAndreas Politz
2017-08-10Add a command performing a sync-backward to isearchAndreas Politz
2017-03-01Delete trailing whitespaceAndreas Politz
2016-10-18Fix some spelling errorsBrady Trainor
2015-12-24Fixes isearch when using Emacs 25Andreas Politz
2015-11-26correct "it's/its" grammar in docstringsMatt Price
2015-07-09Fix isearch issue with recent EmacsAndreas Politz
* lisp/pdf-isearch.el (pdf-isearch-minor-mode): Disable character-fold-search.
2015-06-12Fix regression.Andreas Politz
* lisp/pdf-isearch.el (pdf-isearch-find-next-matching-page): Use new pdf-info interface.
2015-06-12Minor fix.Andreas Politz
* lisp/pdf-isearch.el (pdf-isearch-hl-matches): Check mode using derived-mode-p.
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-05-07Fixed a bug in Isearch related to themesAndreas Politz
* lisp/pdf-isearch.el (pdf-isearch-hl-matches): Keep the scope of pdf-info-asynchronous local.
2015-04-06Delete debug code.Andreas Politz
* lisp/pdf-isearch.el (pdf-isearch-search-fun-default):
2015-04-06Clean-up isearch maps.Andreas Politz
* lisp/pdf-isearch.el (pdf-isearch-minor-mode-map): Remove superfluous bindings and use remap for pdf-occur. * lisp/pdf-isearch.el (pdf-isearch-active-mode-map): Just scroll with M-v etc.
2015-04-06Be more precise when determining next Isearch match.Andreas Politz
* lisp/pdf-isearch.el (pdf-isearch-closest-match): Recognize horizontally growing edges.
2015-04-06Implemented Word-Isearch.Andreas Politz
* pdf-isearch.el (pdf-isearch-hyphenation-character): New option. (pdf-isearch-search-fun-function): New variable similar to isearch-search-fun-function. (pdf-isearch-current-parameter): Add isearch-word. (pdf-isearch-search-fun): New function similar to isearch-search-fun. (pdf-isearch-word-search-regexp): New function similar to word-search-regexp.
2015-03-31Bugfix.Andreas Politz
* lisp/pdf-isearch.el (pdf-isearch-empty-match-p): Don't treat no matches as empty.
2015-03-30Make compiler happy.Andreas Politz
* lisp/pdf-occur.el (pdf-isearch): Declare function pdf-occur. * lisp/pdf-isearch.el (pdf-occur): Require pdf-isearch.
2015-03-30* lisp/pdf-occur.el: New and improved asynchronous, multiple file occur.Andreas Politz
* lisp/pdf-isearch.el:(pdf-isearch-occur): New command. * lisp/tablist.el (tablist-generate-sorter): New macro * lisp/pdf-tools.el (pdf-tools-modes, pdf-tools-enabled-modes): Added occur global mode.
2015-03-30Simplified isearch integration regarding bingings.Andreas Politz
* lisp/pdf-isearch.el (pdf-isearch-active-mode-map, (pdf-isearch-active-mode): Use isearch-mode-map as parent map of pdf-isearch-active-mode-map and use it when isearching in a PDF buffer.
2015-03-30Added isearch regexp support.Andreas Politz
* lisp/pdf-isearch.el: A single match is now represented as a list of edges. * lisp/pdf-links.el (pdf-links-isearch-link): (pdf-links-isearch-link-filter-matches): Adapt to multiple edges per match.
2015-03-28Removed dead code.Andreas Politz
* lisp/pdf-isearch.el (pdf-isearch-cache-images): Removed unused variable. (pdf-isearch-hl-matches): Removed unused cacheing code.
2015-01-11Made Keywords: section standard conform.Andreas Politz
* lisp/*.el: Use standard keywords.
2015-01-09Fixed use of false variable.Andreas Politz
* lisp/pdf-isearch.el (pdf-isearch-message): Message msg, not fmt.
2014-12-01Changed search response and regexp search.Andreas Politz
* src/epdfinfo.c (cmd_search_regexp): Merge rectangles directly. Changed response order. (cmd_search_string): Changed response order. * lisp/pdf-info.el (pdf-info-query--transform-response): Handle new response order. (pdf-info-search-string): Changed the signature to make it comparable to other functions, i.e file-or-buffer should be the final argument. (pdf-info-search-regexp): Dito. * lisp/pdf-occur.el (pdf-occur): Apply new signature. * lisp/pdf-isearch.el (pdf-isearch-search-page,pdf-isearch-find-next-matching-page): Apply new signature.
2014-11-30Renamed function.Andreas Politz
* lisp/pdf-info.el (pdf-info-search-string, pdf-info-search-regexp, pdf-info-pagelinks): Renamed pdf-info-search and pdf-info-re-search. * lisp/pdf-occur.el (pdf-occur): Use new names. * lisp/pdf-isearch.el (pdf-isearch-search-page, pdf-isearch-find-next-matching-page): Use new names.
2014-11-26Merged branch renderpages.Andreas Politz
2014-11-24*** empty log message ***Andreas Politz
2014-11-24*** empty log message ***Andreas Politz
2014-11-18*** empty log message ***Andreas Politz
2014-11-16*** empty log message ***Andreas Politz
2014-11-15*** empty log message ***Andreas Politz
2014-11-15*** empty log message ***Andreas Politz
2014-11-14*** empty log message ***Andreas Politz
2014-11-14*** empty log message ***Andreas Politz
2014-11-14*** empty log message ***Andreas Politz
2014-11-12*** empty log message ***Andreas Politz
2014-11-12*** empty log message ***Andreas Politz
2014-11-07Removed some unused codeAndreas Politz
* lisp/pdf-isearch.el: Remove unused variable pdf-isearch-suspended-p. (pdf-isearch-minor-mode): Removed unused isearch-done advice.
2014-11-02Updated copyright.Andreas Politz
2013-11-21Disabled multibyte conversionAndreas Politz
2013-10-27*** empty log message ***Andreas Politz
2013-10-26Improve documentation.Andreas Politz
2013-10-26Added more documentation and a help command.Andreas Politz