;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\210\300\306!\210\300\307!\210\300\310!\210\300\311!\210\312\313\314\315\316\301%\210\317\320\321\322\316\313%\210\317\323\324\325\316\313%\210\326\327\330\331\332DD\333\316\313\334\335&\210\326\336\330\331\337DD\340\316\313\334\341&\207" [require pdf-tools pdf-view pdf-util pdf-info pdf-isearch tablist ibuf-ext dired let-alist custom-declare-group pdf-occur nil "Display matching lines of PDF documents." :group custom-declare-face pdf-occur-document-face ((default (:inherit font-lock-string-face))) "Face used to highlight documents in the list buffer." pdf-occur-page-face ((default (:inherit font-lock-type-face))) "Face used to highlight page numbers in the list buffer." custom-declare-variable pdf-occur-search-batch-size funcall function #[0 "\300\207" [16] 1] "Maximum number of pages searched in one query.\n\nLower numbers will make Emacs more responsive when searching at\nthe cost of slightly increased search time." :type integer pdf-occur-prefer-string-search #[0 "\300\207" [nil] 1] "If non-nil, reverse the meaning of the regexp-p prefix-arg." boolean] 8) #@42 The history variable for search strings. (defvar pdf-occur-history nil (#$ . 1238)) #@43 The total number of pages left to search. (defvar pdf-occur-search-pages-left nil (#$ . 1328)) #@223 The list of searched documents. Each element should be either the filename of a PDF document or a cons (FILENAME . PAGES), where PAGES is the list of pages to search. See `pdf-info-normalize-page-range' for it's format. (defvar pdf-occur-search-documents nil (#$ . 1430)) #@50 The number of matches in all searched documents. (defvar pdf-occur-number-of-matches 0 (#$ . 1710)) #@49 The currently used search string, resp. regexp. (defvar pdf-occur-search-string nil (#$ . 1816)) #@37 Non-nil, if searching for a regexp. (defvar pdf-occur-search-regexp-p nil (#$ . 1919)) #@46 The keymap used for `pdf-occur-buffer-mode'. (defvar pdf-occur-buffer-mode-map (byte-code "\301 \302\"\210\303\304\305#\210\303\306\307#\210\303\310\307#\210\303\311\312#\210\303\313\314#\210\303\315\316#\210\303\317\320#\210\303\321\322#\210\303\323\324#\210\207" [tablist-mode-map make-sparse-keymap set-keymap-parent define-key " " pdf-occur-goto-occurrence "" pdf-occur-view-occurrence " " "" next-error-follow-minor-mode "g" pdf-occur-revert-buffer-with-args "K" pdf-occur-abort-search "D" pdf-occur-tablist-do-delete "x" pdf-occur-tablist-do-flagged-delete "A" pdf-occur-tablist-gather-documents] 5) (#$ . 2012)) (defvar pdf-occur-buffer-mode-hook nil) (byte-code "\300\301N\204\f\302\300\301\303#\210\304\305!\204\302\305\306\307#\210\300\207" [pdf-occur-buffer-mode-hook variable-documentation put "Hook run after entering PDFOccur mode.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" boundp pdf-occur-buffer-mode-map definition-name pdf-occur-buffer-mode] 4) (defvar pdf-occur-buffer-mode-map (make-sparse-keymap)) (byte-code "\301\302N\204\303\301\302\304\305!#\210\306\307!\204\303\307\310\311#\210\312\313 !\210\307\302N\204-\303\307\302\304\314!#\210\306\300!\204B\303\300\310\311#\210\315\316\300\317\"\210!\210\300\302N\204P\303\300\302\304\320!#\210\303\311\321\322#\207" [pdf-occur-buffer-mode-abbrev-table pdf-occur-buffer-mode-map variable-documentation put purecopy "Keymap for `pdf-occur-buffer-mode'." boundp pdf-occur-buffer-mode-syntax-table definition-name pdf-occur-buffer-mode (lambda (def-tmp-var) (defvar pdf-occur-buffer-mode-syntax-table def-tmp-var)) make-syntax-table "Syntax table for `pdf-occur-buffer-mode'." (lambda (def-tmp-var) (defvar pdf-occur-buffer-mode-abbrev-table def-tmp-var)) define-abbrev-table nil "Abbrev table for `pdf-occur-buffer-mode'." derived-mode-parent tablist-mode] 5) #@986 Major mode for output from `pdf-occur`. \ Some useful keys are: \[pdf-occur-abort-search] - Abort the search. \[pdf-occur-revert-buffer-with-args] - Restart the search. \[universal-argument] \[pdf-occur-revert-buffer-with-args] - Restart search with different regexp. \[universal-argument] \[universal-argument] \[pdf-occur-revert-buffer-with-args] - Same, but do a plain string search. \[tablist-push-regexp-filter] - Filter matches by regexp on current or prefix-th column. \[tablist-pop-filter] - Remove last added filter. \[pdf-occur-tablist-do-delete] - Remove the current file from the search. \[pdf-occur-tablist-gather-documents] - Include marked files from displayed `dired'/`ibuffer' and `pdf-view-mode' buffers in the search. \{pdf-occur-buffer-mode-map} In addition to any hooks its parent mode `tablist-mode' might have run, this mode runs the hook `pdf-occur-buffer-mode-hook', as the final or penultimate step during initialization. (defalias 'pdf-occur-buffer-mode #[0 "\306\300!\210\307\310 \210\311\312\310\313N\203\314\311\313\310\313N#\210\315 !\204'\316 \317 \"\210\320\f!\211\2035\211\321 =\203;\322\f\323 \"\210\210\324 \325\"\204R $=\204R\326 \325$C#\210\327 !\210\330\f!\210 $\306\331!\210\332\306\333!\210\334p%\306\335!\210\336\306\337!\210\307\306\340!\210\341 )\342\343!\207" [delay-mode-hooks major-mode mode-name pdf-occur-buffer-mode-map pdf-occur-buffer-mode-syntax-table pdf-occur-buffer-mode-abbrev-table make-local-variable t tablist-mode pdf-occur-buffer-mode "PDFOccur" mode-class put keymap-parent set-keymap-parent current-local-map char-table-parent standard-syntax-table set-char-table-parent syntax-table abbrev-table-get :parents abbrev-table-put use-local-map set-syntax-table next-error-function pdf-occur-next-error revert-buffer-function pdf-occur-revert-buffer tabulated-list-sort-key nil tabulated-list-use-header-line tablist-operations-function #[385 "\301\267\202\302\207\303\304 )\207\305\207" [display-buffer-overriding-action #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (supported-operations 6 find-entry 8)) (find-entry) (display-buffer-same-window) pdf-occur-goto-occurrence nil] 4 "\n\n(fn OP &rest _)"] run-mode-hooks pdf-occur-buffer-mode-hook local-abbrev-table next-error-last-buffer] 5 (#$ . 3954) nil]) #@283 List lines matching STRING or PCRE. Interactively search for a regexp. Unless a prefix arg was given, in which case this functions performs a string search. If `pdf-occur-prefer-string-search' is non-nil, the meaning of the prefix-arg is inverted. (fn STRING &optional REGEXP-P) (defalias 'pdf-occur #[513 "\300 \210\301pC#\207" [pdf-util-assert-pdf-buffer pdf-occur-search] 6 (#$ . 6334) (byte-code "\300 \210\301\302 !\302 D\207" [pdf-util-assert-pdf-buffer pdf-occur-read-string pdf-occur-want-regexp-search-p] 2)]) #@114 Perform `pdf-occur' on multiple buffer. For a programmatic search of multiple documents see `pdf-occur-search'. (defalias 'pdf-occur-multi-command #[0 "\301 \210r\302q\210\303 \210\304\235\204\305\306!\210\307\310\311\312!\"\210\313\314!)\207" [ibuffer-filtering-qualifiers ibuffer "*Ibuffer*" pdf-occur-ibuffer-minor-mode (derived-mode . pdf-view-mode) ibuffer-filter-by-derived-mode pdf-view-mode message "%s" substitute-command-keys "Mark a bunch of PDF buffers and type \\[pdf-occur-ibuffer-do-occur]" sit-for 3] 4 (#$ . 6865) nil]) #@35 Restart the search. (fn &rest _) (defalias 'pdf-occur-revert-buffer #[128 "\306 \210\204 \307\310!\210 \204\307\311!\210G\312U\313\314\315\316\317\316\320\316\321\"\"\"\"^\322\203/\323\2020\312\324\325#\203F\314\326\327\330\331BBB\332B\"\202X\314\326\333\334BB\327\330\335BBB\336BB\"\337\266\340 \210\341 \f#\210\342 \210\343\211\207" [pdf-occur-search-documents pdf-occur-search-string tabulated-list-format tabulated-list-entries pdf-occur-search-regexp-p mode-line-process pdf-occur-assert-occur-buffer-p error "No documents to search" "Nothing to search for" 1 24 apply max mapcar length pdf-occur-abbrev-document car tablist-generate-sorter 0 < string-to-number vector "Page" 4 (:right-align t) (("Line" 0 t)) "Document" (t) (:right-align t) (("Line" 0 t)) nil tabulated-list-revert pdf-occur-start-search pdf-occur-update-header-line (:propertize ":run" face compilation-mode-line-run)] 12 (#$ . 7412)]) #@289 Restart the search with modified arguments. Interactively just restart the search, unless a prefix was given. In this case read a new search string. With `C-u C-u' as prefix additionally invert the current state of `pdf-occur-search-regexp-p'. (fn STRING &optional REGEXP-P DOCUMENTS) (defalias 'pdf-occur-revert-buffer-with-args #[769 "\211\203\f\303!\304 \207" [pdf-occur-search-string pdf-occur-search-regexp-p pdf-occur-search-documents pdf-occur-normalize-documents pdf-occur-revert-buffer] 5 (#$ . 8350) (byte-code "\303 \210\203\304\232\203 ?\202 \305!D\207\n D\207" [current-prefix-arg pdf-occur-search-regexp-p pdf-occur-search-string pdf-occur-assert-occur-buffer-p (16) pdf-occur-read-string] 3)]) #@71 Abort the current search. This immediately kills the search process. (defalias 'pdf-occur-abort-search #[0 "\300 \204 \301\302!\210\303 \210\304\305!\207" [pdf-occur-search-in-progress-p user-error "No search in progress" pdf-info-kill-local-server pdf-occur-search-finished t] 2 (#$ . 9085) nil]) #@219 Go to the occurrence at point. If EVENT is nil, use occurrence at current line. Select the PDF's window, unless NO-SELECT-WINDOW-P is non-nil. FIXME: EVENT not used at the moment. (fn &optional NO-SELECT-WINDOW-P) (defalias 'pdf-occur-goto-occurrence #[256 "\301\302\206`\303\"\262\211\205u\304\305\"\304\306\"\304\307\"\310!\203%\202.\311!\206.\312!\301\203<\313!\262\202D\314!\210\315 \262\316!r\317\320\"\216\321@\322\"\210\203[\323!\210\205p\324!\325\326\301\325#\210\327!)\262*\262\266\205\207" [pdf-isearch-batch-mode nil get-text-property tabulated-list-id plist-get :document :page :match-edges bufferp find-buffer-visiting find-file-noselect display-buffer pop-to-buffer selected-window internal--before-with-selected-window make-closure #[0 "\301\300!\207" [V0 internal--after-with-selected-window] 2] select-window norecord pdf-view-goto-page pdf-util-scale-relative-to-pixel t pdf-isearch-hl-matches pdf-isearch-focus-match-batch] 13 (#$ . 9392) nil]) #@103 View the occurrence at EVENT. If EVENT is nil, use occurrence at current line. (fn &optional EVENT) (defalias 'pdf-occur-view-occurrence #[256 "\300\301!\207" [pdf-occur-goto-occurrence t] 3 (#$ . 10404) (list last-nonmenu-event)]) #@149 Move to the Nth (default 1) next match in an PDF Occur mode buffer. Compatibility function for \[next-error] invocations. (fn &optional ARG RESET) (defalias 'pdf-occur-next-error #[512 "rp\301\211\211\302!\2052\205p=?\2052rq\210\203+\211\203'\211 \2021\303\2021\2051 )\266\204\203;p\202@\304\301\211\305#q\210o\203I\303\262\211\203Seb\210\202V\306 \210\307U\204\233m\203c\310y\210\211\203kS\262\311 \311\307Y\203ydS\202ze!U\203\205\312\313!\210\307Y\203\223Z^\202\230Z]y\266\314 \210\315p\303\"\211\203\253\316`\"\210\210\317 )\207" [next-error-function nil buffer-name t next-error-find-buffer #[0 "\301=\207" [major-mode pdf-occur-buffer-mode] 2] beginning-of-line 0 -1 line-number-at-pos error "No more matches" tablist-move-to-major-column get-buffer-window set-window-point pdf-occur-goto-occurrence] 8 (#$ . 10645) "p"]) (byte-code "\300\301\302\303\304DD\305\306\307\310\311\312\313& \207" [custom-declare-variable pdf-occur-global-minor-mode funcall function #[0 "\300\207" [nil] 1] "Non-nil if Pdf-Occur-Global minor mode is enabled.\nSee the `pdf-occur-global-minor-mode' command\nfor a description of this minor mode.\nSetting this variable directly does not take effect;\neither customize it (see the info node `Easy Customization')\nor call the function `pdf-occur-global-minor-mode'." :set custom-set-minor-mode :initialize custom-initialize-default :type boolean] 10) #@804 Enable integration of Pdf Occur with other modes. This is a minor mode. If called interactively, toggle the `Pdf-Occur-Global minor mode' mode. If the prefix argument is positive, enable the mode, and if it is zero or negative, disable the mode. If called from Lisp, toggle the mode if ARG is `toggle'. Enable the mode if ARG is nil, omitted, or is a positive number. Disable the mode if ARG is a negative number. To check whether the minor mode is enabled in the current buffer, evaluate `(default-value 'pdf-occur-global-minor-mode)'. The mode's hook is called both when the mode is enabled and when it is disabled. This global minor mode enables (or disables) `pdf-occur-ibuffer-minor-mode' and `pdf-occur-dired-minor-mode' in all current and future ibuffer/dired buffer. (fn &optional ARG) (defalias 'pdf-occur-global-minor-mode #[256 "\302 \303\301\304=\203\305\301!?\202!\247\203 \306W\203 \307\202!\310\"\210\311\300!\2038\312\301\"\305\301!\2038\301B \203@\306\202A\313\314 \211\203l\211@r\211q\210\315\316!\203Z\317!\210\202d\315\320!\203d\321!\210)A\266\202\202C\210 \203\322\323\317\"\210\322\324\321\"\266\202\212\325\323\317\"\210\325\324\321\"\266\326\327\305\301!\203\226\330\202\227\331\"\210\332\333!\203\277\334\301!\210\302 \203\257\211\302 \232\203\277\335\336\305\301!\203\273\337\202\274\340\341#\210\210\342 \210\305\301!\207" [global-minor-modes pdf-occur-global-minor-mode current-message set-default toggle default-value 1 nil t boundp delq -1 buffer-list derived-mode-p dired-mode pdf-occur-dired-minor-mode ibuffer-mode pdf-occur-ibuffer-minor-mode add-hook dired-mode-hook ibuffer-mode-hook remove-hook run-hooks pdf-occur-global-minor-mode-hook pdf-occur-global-minor-mode-on-hook pdf-occur-global-minor-mode-off-hook called-interactively-p any customize-mark-as-set message "Pdf-Occur-Global minor mode %sabled%s" "en" "dis" "" force-mode-line-update] 7 (#$ . 12083) (byte-code "\203\n\301!\202 \302C\207" [current-prefix-arg prefix-numeric-value toggle] 2)]) (defvar pdf-occur-global-minor-mode-hook nil) (byte-code "\301\302N\204\f\303\301\302\304#\210\303\301\305\306#\210\303\301\307\310C#\210\311\312\310\313\300!\205#\310\211%\207" [pdf-occur-global-minor-mode-map pdf-occur-global-minor-mode-hook variable-documentation put "Hook run after entering or leaving `pdf-occur-global-minor-mode'.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" custom-type hook standard-value nil add-minor-mode pdf-occur-global-minor-mode boundp] 6) #@48 Keymap used in `pdf-occur-ibuffer-minor-mode'. (defvar pdf-occur-ibuffer-minor-mode-map (byte-code "\300 \301\302\303#\210\207" [make-sparse-keymap define-key [remap ibuffer-do-occur] pdf-occur-ibuffer-do-occur] 5) (#$ . 14689)) #@125 Non-nil if Pdf-Occur-Ibuffer minor mode is enabled. Use the command `pdf-occur-ibuffer-minor-mode' to change this variable. (defvar pdf-occur-ibuffer-minor-mode nil (#$ . 14926)) (make-variable-buffer-local 'pdf-occur-ibuffer-minor-mode) #@832 Hack into ibuffer's do-occur binding. This is a minor mode. If called interactively, toggle the `Pdf-Occur-Ibuffer minor mode' mode. If the prefix argument is positive, enable the mode, and if it is zero or negative, disable the mode. If called from Lisp, toggle the mode if ARG is `toggle'. Enable the mode if ARG is nil, omitted, or is a positive number. Disable the mode if ARG is a negative number. To check whether the minor mode is enabled in the current buffer, evaluate `pdf-occur-ibuffer-minor-mode'. The mode's hook is called both when the mode is enabled and when it is disabled. This mode remaps `ibuffer-do-occur' to `pdf-occur-ibuffer-do-occur', which will start the PDF Tools version of `occur', if all marked buffer's are in `pdf-view-mode' and otherwise fallback to `ibuffer-do-occur'. (fn &optional ARG) (defalias 'pdf-occur-ibuffer-minor-mode #[256 "\302 \303=\203 ?\202\247\203\304W\203\305\202\306\307\301!\2031\310\300 \"\2031\300 B\311\312\203;\313\202<\314\"\210\315\316!\203^\302 \203P\211\302 \232\203^\317\320\203Z\321\202[\322\323#\210\210\324 \210\207" [pdf-occur-ibuffer-minor-mode local-minor-modes current-message toggle 1 nil t boundp delq run-hooks pdf-occur-ibuffer-minor-mode-hook pdf-occur-ibuffer-minor-mode-on-hook pdf-occur-ibuffer-minor-mode-off-hook called-interactively-p any message "Pdf-Occur-Ibuffer minor mode %sabled%s" "en" "dis" " in current buffer" force-mode-line-update] 6 (#$ . 15171) (byte-code "\203\n\301!\202 \302C\207" [current-prefix-arg prefix-numeric-value toggle] 2)]) (defvar pdf-occur-ibuffer-minor-mode-hook nil) (byte-code "\301\302N\204\f\303\301\302\304#\210\303\301\305\306#\210\303\301\307\310C#\210\311\312\310\313\300!\205#\310\211%\207" [pdf-occur-ibuffer-minor-mode-map pdf-occur-ibuffer-minor-mode-hook variable-documentation put "Hook run after entering or leaving `pdf-occur-ibuffer-minor-mode'.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" custom-type hook standard-value nil add-minor-mode pdf-occur-ibuffer-minor-mode boundp] 6) #@113 Uses `pdf-occur-search', if appropriate. I.e. all marked buffers are in PDFView mode. (fn &optional REGEXP-P) (defalias 'pdf-occur-ibuffer-do-occur #[256 "\300 \206 \301 \205 \301 C\302\303\"\211\204\304\305!\207\306!\307#\207" [ibuffer-get-marked-buffers ibuffer-current-buffer cl-every #[257 "r\211q\210\300\301!)\207" [derived-mode-p pdf-view-mode] 3 "\n\n(fn BUF)"] call-interactively ibuffer-do-occur pdf-occur-read-string pdf-occur-search] 8 (#$ . 17316) (byte-code "\300 C\207" [pdf-occur-want-regexp-search-p] 1)]) #@46 Keymap used in `pdf-occur-dired-minor-mode'. (defvar pdf-occur-dired-minor-mode-map (byte-code "\300 \301\302\303#\210\207" [make-sparse-keymap define-key [remap dired-do-search] pdf-occur-dired-do-search] 5) (#$ . 17857)) #@121 Non-nil if Pdf-Occur-Dired minor mode is enabled. Use the command `pdf-occur-dired-minor-mode' to change this variable. (defvar pdf-occur-dired-minor-mode nil (#$ . 18088)) (make-variable-buffer-local 'pdf-occur-dired-minor-mode) #@832 Hack into dired's `dired-do-search' binding. This is a minor mode. If called interactively, toggle the `Pdf-Occur-Dired minor mode' mode. If the prefix argument is positive, enable the mode, and if it is zero or negative, disable the mode. If called from Lisp, toggle the mode if ARG is `toggle'. Enable the mode if ARG is nil, omitted, or is a positive number. Disable the mode if ARG is a negative number. To check whether the minor mode is enabled in the current buffer, evaluate `pdf-occur-dired-minor-mode'. The mode's hook is called both when the mode is enabled and when it is disabled. This mode remaps `dired-do-search' to `pdf-occur-dired-do-search', which will start the PDF Tools version of `occur', if all marked buffer's are in `pdf-view-mode' and otherwise fallback to `dired-do-search'. (fn &optional ARG) (defalias 'pdf-occur-dired-minor-mode #[256 "\302 \303=\203 ?\202\247\203\304W\203\305\202\306\307\301!\2031\310\300 \"\2031\300 B\311\312\203;\313\202<\314\"\210\315\316!\203^\302 \203P\211\302 \232\203^\317\320\203Z\321\202[\322\323#\210\210\324 \210\207" [pdf-occur-dired-minor-mode local-minor-modes current-message toggle 1 nil t boundp delq run-hooks pdf-occur-dired-minor-mode-hook pdf-occur-dired-minor-mode-on-hook pdf-occur-dired-minor-mode-off-hook called-interactively-p any message "Pdf-Occur-Dired minor mode %sabled%s" "en" "dis" " in current buffer" force-mode-line-update] 6 (#$ . 18325) (byte-code "\203\n\301!\202 \302C\207" [current-prefix-arg prefix-numeric-value toggle] 2)]) (defvar pdf-occur-dired-minor-mode-hook nil) (byte-code "\301\302N\204\f\303\301\302\304#\210\303\301\305\306#\210\303\301\307\310C#\210\311\312\310\313\300!\205#\310\211%\207" [pdf-occur-dired-minor-mode-map pdf-occur-dired-minor-mode-hook variable-documentation put "Hook run after entering or leaving `pdf-occur-dired-minor-mode'.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" custom-type hook standard-value nil add-minor-mode pdf-occur-dired-minor-mode boundp] 6) #@90 Uses `pdf-occur-search', if appropriate. I.e. all marked files look like PDF documents. (defalias 'pdf-occur-dired-do-search #[0 "\300 \301\302\"\204 \303\304!\207\305 \306!\307#\207" [dired-get-marked-files cl-every #[257 "@\302\303\304#)\207" [pdf-tools-auto-mode-alist-entry inhibit-changing-match-data nil t string-match] 8 "\n\n(fn FILE)"] call-interactively dired-do-search pdf-occur-want-regexp-search-p pdf-occur-read-string pdf-occur-search] 7 (#$ . 20447) nil]) #@541 Search DOCUMENTS for STRING. DOCUMENTS should be a list of buffers (objects, not names), filenames or conses (BUFFER-OR-FILENAME . PAGES), where PAGES determines the scope of the search of the respective document. See `pdf-info-normalize-page-range' for it's format. STRING is either the string to search for or, if REGEXP-P is non-nil, a Perl compatible regular expression (PCRE). Display the occur buffer and start the search asynchronously. Returns the window where the buffer is displayed. (fn DOCUMENTS STRING &optional REGEXP-P) (defalias 'pdf-occur-search #[770 "\204\305\306!\210\203G\307U\203\305\310!\210r\311\312!q\210\313 \210\314\300!\210\315!\314\301!\210\314\302!\210\211\314\303!\210\307\314\304!\210\307\316 \210\317p!)\207" [pdf-occur-search-documents pdf-occur-search-string pdf-occur-search-regexp-p pdf-occur-search-pages-left pdf-occur-number-of-matches error "No documents to search" 0 "Not searching for the empty string" get-buffer-create "*PDF-Occur*" pdf-occur-buffer-mode make-local-variable pdf-occur-normalize-documents pdf-occur-revert-buffer display-buffer] 5 (#$ . 20939)]) (byte-code "\300\301\302\303\304$\210\305\301\304\"\207" [ad-add-advice tabulated-list-init-header (update-header nil t (advice lambda nil "We want our own headers, thank you." (when (derived-mode-p 'pdf-occur-buffer-mode) (save-current-buffer (with-no-warnings (pdf-occur-update-header-line)))))) after nil ad-activate] 5) #@184 Create a `tabulated-list-entries' entry for a search result. If match is nil, create a fake entry for documents w/o any matches linked with PAGE. (fn FILENAME PAGE &optional MATCH) (defalias 'pdf-occur-create-entry #[770 "\211@\206\301A\203\302\303\304\305\211%\202\306\307\310#\203+\306\311\312\"\307\313#\202,\314\306\315!\307\316#\317\320 \321\n\205B \322\f\205J\n\257\211G\323U\203\\\324\"\202b\324#D\207" [pdf-occur-search-documents "[No matches]" replace-regexp-in-string "\n" "\\n" t propertize face font-lock-warning-face format "%d" pdf-occur-page-face "" pdf-occur-abbrev-document pdf-occur-document-face :document :page :match-text :match-edges 1 vector] 16 (#$ . 22398)]) (defalias 'pdf-occur-update-header-line #[0 "\301 \210r\302\303 )\207" [header-line-format pdf-occur-assert-occur-buffer-p (:eval (concat (if (= (length pdf-occur-search-documents) 1) (format "%d match%s in document `%s'" pdf-occur-number-of-matches (if (/= 1 pdf-occur-number-of-matches) "es" #1="") (pdf-occur-abbrev-document (caar pdf-occur-search-documents))) (format "%d match%s in %d documents" pdf-occur-number-of-matches (if (/= 1 pdf-occur-number-of-matches) "es" #1#) (length pdf-occur-search-documents))) (if (pdf-occur-search-in-progress-p) (propertize (concat " [" (if (numberp pdf-occur-search-pages-left) (format "%d pages left" pdf-occur-search-pages-left) "Searching") "]") 'face 'compilation-mode-line-run)))) force-mode-line-update] 1]) #@26 (fn &optional ABORT-P) (defalias 'pdf-occur-search-finished #[256 "\305\211\203\n\306\202 \307\310\311\312\310\313\n\"\310\314 \"\315\316$\"\211\203*\nG\317V\203*\320!\210\210\321 \210\322 \210\323\203:\324\202>\325\326\f\"!\207" [pdf-occur-search-pages-left mode-line-process pdf-occur-search-documents tabulated-list-entries pdf-occur-number-of-matches 0 (:propertize ":aborted" face compilation-mode-line-fail) (:propertize ":exit" face compilation-mode-line-exit) mapcar #[257 "\300\301\"\207" [pdf-occur-create-entry 1] 4 "\n\n(fn DOC)"] cl-set-difference car #[257 "\300@\301\"\207" [plist-get :document] 4 "\n\n(fn ELT)"] :test equal 1 pdf-occur-insert-entries tablist-apply-filter pdf-occur-update-header-line pdf-isearch-message "Search aborted." format "Occur search finished with %d matches"] 8 (#$ . 23884)]) #@25 (fn FILENAME MATCHES) (defalias 'pdf-occur-add-matches #[514 "\300 \210\211\205<\301\211\2032\211@\211\302\236A\303\236A\304\236A\305 B#B\262\266A\266\202\202 \210\211\237\262\306!\262\207" [pdf-occur-assert-occur-buffer-p nil page text edges pdf-occur-create-entry pdf-occur-insert-entries] 14 (#$ . 24725)]) #@57 Insert tabulated-list ENTRIES at the end. (fn ENTRIES) (defalias 'pdf-occur-insert-entries #[257 "\303 \210\304m\205\no?\212db\210\211\203#\211@\305 \"\210A\266\202\202\210\306\307!\210)\211\203B\310 \211\203A\211@\311d\"\210A\266\202\202/\210\312\n\"\211)\207" [inhibit-read-only tabulated-list-printer tabulated-list-entries pdf-occur-assert-occur-buffer-p t apply set-buffer-modified-p nil get-buffer-window-list set-window-point append] 8 (#$ . 25062)]) (defalias 'pdf-occur-search-in-progress-p #[0 "\247\205\301V\207" [pdf-occur-search-pages-left 0] 2]) #@44 (fn DOCUMENTS STRING &optional REGEXP-P) (defalias 'pdf-occur-start-search #[770 "\303 \210\304\305\306\"\210\307\206\310\"\311\312\313#\314\315$\210\316\317\320\321\322\"\"\211\207" [pdf-occur-search-batch-size pdf-occur-number-of-matches pdf-occur-search-pages-left pdf-occur-assert-occur-buffer-p pdf-info-make-local-server nil t pdf-occur-create-batches 1 pdf-info-local-batch-query make-closure #[514 "\301\203 \302\300\303$\207\304\300#\207" [V0 V1 pdf-info-search-regexp nil pdf-info-search-string] 7 "\n\n(fn DOCUMENT PAGES)"] #[1028 "\203 \303\304\"\207\247\203A@ZTZ\305 \306\307\310\311&\205/\nG\\\312\"\210\313 \207" [pdf-occur-search-pages-left pdf-occur-search-documents pdf-occur-number-of-matches error "%s" cl-member :key car :test equal pdf-occur-add-matches pdf-occur-update-header-line] 11 "\n\n(fn STATUS RESPONSE DOCUMENT PAGES)"] #[514 "\300!\205r\211q\210\301\302=!)\207" [buffer-live-p pdf-occur-search-finished killed] 5 "\n\n(fn STATUS BUFFER)"] 0 apply + mapcar #[257 "\211A@AA@@ZT\207" [] 3 "\n\n(fn ELT)"]] 9 (#$ . 25649)]) #@64 Delete ARG documents from the search list. (fn &optional ARG) (defalias 'pdf-occur-tablist-do-delete #[256 "\302 \203 \303\304!\210\305!\306\307\310\"\311\312#\211\204\313\314!\210\315\316\317\307\320\"#\205?\321\322\323\"\"\321\322\324\" \"\325 \210\326 \210\327 \207" [pdf-occur-search-documents tabulated-list-entries pdf-occur-search-in-progress-p user-error "Can't delete while a search is in progress." tablist-get-marked-items cl-remove-duplicates mapcar #[257 "\300@\301\"\207" [plist-get :document] 4 "\n\n(fn ENTRY)"] :test equal error "No documents selected" tablist-yes-or-no-p Stop\ searching nil #[257 "\300\301!B\207" [nil vector] 4 "\n\n(fn D)"] cl-remove-if make-closure #[257 "\211@\300\235\207" [V0] 3 "\n\n(fn ELT)"] #[257 "\302@\303\"\300\235\205\302@\304\"\203 S\305\207" [V0 pdf-occur-number-of-matches plist-get :document :match-edges t] 4 "\n\n(fn ELT)"] tablist-revert pdf-occur-update-header-line tablist-move-to-major-column] 9 (#$ . 26747) "P"]) #@75 Stop searching all documents marked with a D. (fn &optional INTERACTIVE) (defalias 'pdf-occur-tablist-do-flagged-delete #[256 "\301\212eb\210\302\303 \304\305#)\203\306 \202\211?\206\307\310!)\207" [tablist-marker-char 68 re-search-forward tablist-marker-regexp nil t pdf-occur-tablist-do-delete message "(No deletions requested)"] 5 (#$ . 27750) "p"]) #@122 Gather marked documents in windows. Examine all dired/ibuffer windows and offer to put marked files in the search list. (defalias 'pdf-occur-tablist-gather-documents #[0 "\301\302\"\303\304 \211\203\205\211@\305!r\306\307\"\216\310@\311\"\210\312\313!\203E\314\303\211\211\315$\211G\316V\203A\211@\315=\203:\211A\262\317\303#\262\210\202|\312\320!\203k\301\321\322 \"\211\203g\211@\211\203`\211B\262A\266\202\202P\210\202|\312\323!\203|\321 \203|\321 B\262*\210A\266\202\202\210\324\325\326\327\330\"\331\332#\331\332$\333\"\262\211\204\240\334\335!\207\336\337\303\301\340\324\333\"\"#\205\302\317\341!\"\334\342G\343G!\344\345!$\207" [pdf-occur-search-documents mapcar car nil window-list internal--before-with-selected-window make-closure #[0 "\301\300!\207" [V0 internal--after-with-selected-window] 2] select-window norecord derived-mode-p dired-mode dired-get-marked-files t 1 append ibuffer-mode buffer-file-name ibuffer-get-marked-buffers pdf-view-mode cl-sort cl-set-difference cl-remove-duplicates cl-remove-if-not #[257 "@\302\303\304#)\207" [pdf-tools-auto-mode-alist-entry inhibit-changing-match-data nil t string-match] 8 "\n\n(fn FILE)"] :test file-equal-p string-lessp message "No marked, new PDF files found in windows" tablist-yes-or-no-p add #[257 "\300\301!B\207" [nil vector] 4 "\n\n(fn FILE)"] pdf-occur-normalize-documents "Added %d file%s to the list of searched documents%s" dired-plural-s substitute-command-keys " - Hit \\[pdf-occur-revert-buffer-with-args]"] 10 (#$ . 28118) nil]) #@27 (fn &optional REGEXP-P) (defalias 'pdf-occur-read-string #[256 "\301\302\303\203 \304\202\f\305\"\205\302\306\"\307Q\310\311$\207" [pdf-occur-search-string read-string format "List lines %s" "matching PCRE" "containing string" " (default %s)" ": " nil pdf-occur-history] 6 (#$ . 29682)]) (defalias 'pdf-occur-assert-occur-buffer-p #[0 "\300\301!?\205\n\302\303!\207" [derived-mode-p pdf-occur-buffer-mode error "Not in PDF occur buffer"] 2]) (defalias 'pdf-occur-want-regexp-search-p #[0 "\203 \206?\205 ?\207" [current-prefix-arg pdf-occur-prefer-string-search] 1]) #@23 (fn FILE-OR-BUFFER) (defalias 'pdf-occur-abbrev-document #[257 "\300!\203\n\301!\207\302!\211G\303V\203\207\207" [bufferp buffer-name file-name-nondirectory 0] 4 (#$ . 30274)]) #@29 (fn DOCUMENTS BATCH-SIZE) (defalias 'pdf-occur-create-batches #[514 "\300\211\203a\211@\211@\301A!\211@A\302=\203\303!\202A\211ZT\304\305!\n\245!\211\302\211W\203X\211_\\ T_S\\^BD\fB\262\f\210\211T\262\202-\266A\266\202\202\210\211\237\207" [nil pdf-info-normalize-page-range 0 pdf-info-number-of-pages ceiling float] 20 (#$ . 30466)]) #@184 Normalize list of documents. Replaces buffers with their associated filenames (if applicable) and ensures that every element looks like (FILENAME-OR-BUFFER . PAGES). (fn DOCUMENTS) (defalias 'pdf-occur-normalize-documents #[257 "\300\301\302\"\303\304\305$\207" [cl-sort mapcar #[257 "\211:\204 \211C\262\300@!\203 \301@!\203 \301@!AB\262\211@;\203.\302@!AB\207\207" [bufferp buffer-file-name expand-file-name] 3 "\n\n(fn DOC)"] #[514 "\300!\203\f\301!\202 \300!\203\301!\202\231\207" [bufferp buffer-name] 5 "\n\n(fn A B)"] :key car] 6 (#$ . 30846)]) (provide 'pdf-occur)