;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\301\302!\210\301\303!\210\301\304!\210\301\305!\210\301\306!\210\301\307!\210\301\310!\210\301\311!\210\301\312!\210\313\314\315\316\317\320%\210\321\322\323\324\325DD\326\317\314\327\330&\210\321\331\323\324\332DD\333\317\314\327\334&\210\321\335\323\324\336DD\337\317\314\327\340&\210\341\331\342\343#\210\341\335\342\343#\210\321\342\323\324\344DD\345\317\314\327\346\347\350\351\352\353\354\355\356\357\360\"B\257\361\362\257\362F\362\257\362\351\352\363\364\257\351\352\365\366\257\351\352\367\370\257\351\352\371\372 \257\351\352\373\374\n\257\351\352\375\376 \257\257\266\210&\210\321\377\323\324\201@DD\201A\317\314\327\330&\210\321\201B\323\324\201CDD\201D\317\314\327\324&\210\321\201E\323\324\201FDD\201G\317\314\327\201H&\210\321\201I\323\324\201JDD\201K\317\314\327\201L&\210\321\201M\323\324\201NDD\201O\317\314\327\201L&\210\321\201P\323\324\201QDD\201R\317\314\327&\207" [display-buffer--action-custom-type require pdf-view pdf-info pdf-cache pdf-misc facemenu faces org tablist cl-lib custom-declare-group pdf-annot nil "Annotation support for PDF documents." :group pdf-tools custom-declare-variable pdf-annot-activate-handler-functions funcall function #[0 "\300\207" [nil] 1] "A list of functions to activate a annotation.\n\nThe functions on this hook will be called when some annotation is\nactivated, usually by a mouse-click. Each one is called with the\nannotation as a single argument and it should return a non-nil\nvalue if it has `handled' it. If no such function exists, the\ndefault handler `pdf-annot-default-handler' will be\ncalled.\n\nThis hook is meant to allow for custom annotations. FIXME:\nImplement and describe basic org example." :type hook pdf-annot-default-text-annotation-properties #[0 "\300\207" [nil] 1] "Alist of initial properties for new text annotations." (alist :key-type symbol :value-type sexp) pdf-annot-default-markup-annotation-properties #[0 "\300\207" [nil] 1] "Alist of initial properties for new markup annotations." (alist :key-type symbol :value-type sexp) make-obsolete-variable pdf-annot-default-annotation-properties "0.90" #[0 "\301\302BD\303B\207" [user-full-name t label ((text (icon . "Note") (color . "#ff0000")) (highlight (color . "yellow")) (squiggly (color . "orange")) (strike-out (color . "red")) (underline (color . "blue")))] 3] "An alist of initial properties for new annotations.\n\nThe alist contains a sub-alist for each of the currently available\nannotation types, i.e. text, highlight, squiggly, strike-out and\nunderline. Additionally a sub-alist with a key of t acts as a default\nentry.\n\nEach of these sub-alists contain default property-values of newly\nadded annotations of its respective type.\n\nSome of the most important properties and their types are label\n(a string), contents (a string), color (a color) and, for\ntext-annotations only, icon (one of the standard icon-types, see\n`pdf-annot-standard-text-icons').\n\nFor example a value of\n\n ((t (color . \"red\")\n (label . \"Joe\")\n (highlight (color . \"green\"))\n\nwould use a green color for highlight and a red one for other\nannotations. Additionally the label for all annotations is set\nto \"Joe\"." (cons :tag "Label" (const label) string) (cons :tag "Contents" (const contents) string) (cons :tag "Color" (const color) color) cons :tag "Icon" (const icon) choice mapcar #[257 "\300D\207" [const] 3 "\n\n(fn ICON)"] ("Note" "Comment" "Key" "Help" "NewParagraph" "Paragraph" "Insert" "Cross" "Circle") (repeat :tag "Other properties" (cons :tag "Property" (symbol :tag "Key ") (sexp :tag "Value"))) set "All Annotations" (const t) "Text Annotations" (const text) "Highlight Annotations" (const highlight) "Underline Annotations" (const underline) "Squiggly Annotations" (const squiggly) "Strike-out Annotations" (const strike-out) pdf-annot-print-annotation-functions #[0 "\300\207" [(pdf-annot-print-annotation-latex-maybe)] 1] "A alist of functions for printing annotations, e.g. for the tooltip.\n\nThe functions receive the annotation as single argument and\nshould return either a string or nil. The first string returned\nwill be used.\n\nIf all of them return nil, the default function\n`pdf-annot-print-annotation-default' is used." pdf-annot-latex-string-predicate #[0 "\300\207" [#[257 "\211\205\300\301\"\207" [string-match "\\`[[:space:]\n]*[$\\]"] 4 "\n\n(fn STR)"]] 1] "A predicate for recognizing LaTeX fragments.\n\nIt receives a string and should return non-nil, if string is a\nLaTeX fragment." pdf-annot-latex-header #[0 "\301P\207" [org-format-latex-header "\n\\setlength{\\textwidth}{12cm}"] 2] "Header used when latex compiling annotations.\n\nThe default value is `org-format-latex-header' + \"\\n\\\\setlength{\\\\textwidth}{12cm}\"." string pdf-annot-tweak-tooltips #[0 "\300\207" [t] 1] "Whether this package should tweak some settings regarding tooltips.\n\nIf this variable has a non-nil value,\n\n`x-gtk-use-system-tooltips' is set to nil if appropriate, in\norder to display text properties;\n\n`tooltip-hide-delay' is set to infinity, in order to not being\nannoyed while reading the annotations." boolean pdf-annot-activate-created-annotations #[0 "\300\207" [nil] 1] "Whether to activate (i.e. edit) created annotations." pdf-annot-attachment-display-buffer-action #[0 "\300\207" [nil] 1] "The display action used when displaying attachments."] 26) #@36 Complete list of annotation types. (defconst pdf-annot-annotation-types '(3d caret circle file free-text highlight ink line link movie poly-line polygon popup printer-mark screen sound square squiggly stamp strike-out text trap-net underline unknown watermark widget) (#$ . 5539)) (byte-code "\301\302\303\304\305DD\306\307\310\311\312\313\314\"B&\207" [pdf-annot-annotation-types custom-declare-variable pdf-annot-list-listed-types funcall function #[0 "\300 \203\301\302\303\304\305\306\257\207\301\302D\207" [pdf-info-markup-annotations-p text file squiggly highlight underline strike-out] 6] "A list of annotation types displayed in the list buffer." :group pdf-annot :type set mapcar #[257 "\300D\207" [const] 3 "\n\n(fn TYPE)"]] 11) #@49 A list of recently used colors for annotations. (defvar pdf-annot-color-history nil (#$ . 6290)) #@542 Functions to call, when an annotation was modified. A function on this hook should accept one argument: A CLOSURE containing inserted, changed and deleted annotations. It may access theses annotations by calling CLOSURE with one of these arguments: `:inserted' The list of recently added annotations. `:deleted' The list of recently deleted annotations. `:changed' The list of recently changed annotations. `t' The union of recently added, deleted or changed annotations. `nil' Just returns nil. Any other argument signals an error. (defvar pdf-annot-modified-functions nil (#$ . 6394)) (make-variable-buffer-local 'pdf-annot-modified-functions) #@212 The Size of text and file annotations in PDF points. These values are hard-coded in poppler. And while the size of these annotations may be changed, i.e. the edges property, it has no effect on the rendering. (defconst pdf-annot-text-annotation-size '(24 . 24) (#$ . 7055)) #@42 List of defined markup annotation types. (defconst pdf-annot-markup-annotation-types '(text link free-text line square circle polygon poly-line highlight underline squiggly strike-out stamp caret ink file sound) (#$ . 7337)) #@58 A list of standard icon properties for text annotations. (defconst pdf-annot-standard-text-icons '("Note" "Comment" "Key" "Help" "NewParagraph" "Paragraph" "Insert" "Cross" "Circle") (#$ . 7568)) #@109 Non-nil, if running `pdf-annot-modified-functions' should be inhibited after some annotation has changed. (defvar pdf-annot-inhibit-modification-hooks nil (#$ . 7771)) #@152 A plist of not yet propagated modifications. It contains three entries :change, :delete and :insert. Each one having a list of annotations as value. (defvar pdf-annot-delayed-modified-annotations nil (#$ . 7948)) (make-variable-buffer-local 'pdf-annot-delayed-modified-annotations) #@60 Alist mapping attachment ids to unique relative filenames. (defvar pdf-annot--attachment-file-alist nil (#$ . 8238)) (make-variable-buffer-local 'pdf-annot--attachment-file-alist) #@279 Execute BODY joining multiple modifications. The effect is, that `pdf-annot-modified-functions' will be called only once at the end of BODY. BODY should not modify annotations in a different then the current buffer, because that won't run the hooks properly. (fn &rest BODY) (defalias 'pdf-annot-with-atomic-modifications '(macro . #[128 "\300\301\302\303\304BED\305BB\207" [unwind-protect save-current-buffer let ((pdf-annot-inhibit-modification-hooks t)) progn ((pdf-annot-run-modified-hooks))] 7 (#$ . 8425)])) (byte-code "\300\301\302\303#\304\301\305\306#\210\307\310\311\312\313DD\314\315\316\317\320&\207" [function-put pdf-annot-with-atomic-modifications lisp-indent-function 0 put edebug-form-spec t custom-declare-variable pdf-annot-minor-mode-map-prefix funcall function #[0 "\300\207" [""] 1] "The prefix to use for `pdf-annot-minor-mode-map'.\n\nSetting this after the package was loaded has no effect." :group pdf-annot :type key-sequence] 9) #@41 Keymap used for `pdf-annot-minor-mode'. (defvar pdf-annot-minor-mode-map (byte-code "\301 \301 \302#\210\302\303\304#\210\302\305\306#\210\307 \203J\302\310\311#\210\302\312\313#\210\314 \203J\302\315\316#\210\302\317\320#\210\302\321\322#\210\302\323\324#\210\302\325\326#\210\207" [pdf-annot-minor-mode-map-prefix make-sparse-keymap define-key "l" pdf-annot-list-annotations "a" pdf-annot-attachment-dired pdf-info-writable-annotations-p "D" pdf-annot-delete "t" pdf-annot-add-text-annotation pdf-info-markup-annotations-p "m" pdf-annot-add-markup-annotation "s" pdf-annot-add-squiggly-markup-annotation "u" pdf-annot-add-underline-markup-annotation "o" pdf-annot-add-strikeout-markup-annotation "h" pdf-annot-add-highlight-markup-annotation] 6) (#$ . 9395)) #@109 Non-nil if Pdf-Annot minor mode is enabled. Use the command `pdf-annot-minor-mode' to change this variable. (defvar pdf-annot-minor-mode nil (#$ . 10178)) (make-variable-buffer-local 'pdf-annot-minor-mode) #@623 Support for PDF Annotations. This is a minor mode. If called interactively, toggle the `Pdf-Annot 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-annot-minor-mode'. The mode's hook is called both when the mode is enabled and when it is disabled. \{pdf-annot-minor-mode-map} (fn &optional ARG) (defalias 'pdf-annot-minor-mode #[256 "\306 \307=\203 ?\202\247\203\310W\203\311\202\312\313\301!\2031\314\300 \"\2031\300 B\203b\n\203C\313\303!\203A\311\315\316\317\320\"\210\321\322\323\311\312$\210\324\325!\203l\326 >\204l\326 B\202l\327\317!\210\330\322\323\312#\210\331\312!\210\332\333\203z\334\202{\335\"\210\336\337!\203\235\306 \203\217\211\306 \232\203\235\340\341\203\231\342\202\232\343\344#\210\210\345 \210\207" [pdf-annot-minor-mode local-minor-modes pdf-annot-tweak-tooltips x-gtk-use-system-tooltips tooltip-hide-delay savehist-minibuffer-history-variables current-message toggle 1 nil t boundp delq 3600 pdf-view-add-hotspot-function pdf-annot-hotspot-function 9 add-hook pdf-info-close-document-hook pdf-annot-attachment-delete-base-directory featurep savehist pdf-annot-color-history pdf-view-remove-hotspot-function remove-hook pdf-view-redisplay run-hooks pdf-annot-minor-mode-hook pdf-annot-minor-mode-on-hook pdf-annot-minor-mode-off-hook called-interactively-p any message "Pdf-Annot minor mode %sabled%s" "en" "dis" " in current buffer" force-mode-line-update] 7 (#$ . 10391) (byte-code "\203\n\301!\202 \302C\207" [current-prefix-arg prefix-numeric-value toggle] 2)]) (defvar pdf-annot-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-annot-minor-mode-map pdf-annot-minor-mode-hook variable-documentation put "Hook run after entering or leaving `pdf-annot-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-annot-minor-mode boundp] 6) #@61 Create a appropriate context menu for annotation A. (fn A) (defalias 'pdf-annot-create-context-menu #[257 "\300 \301 \203\302\303\304\305\306\307\"\310BBB#\210\302\311\304\312\306\313\"\314BBB#\210\315!\203<\302\316\304\317\320!\321BBB#\210\302\322\304\323\324!\325BBB#\210\302\326\304\327\306\330\"\331BBB#\210\207" [make-sparse-keymap pdf-info-writable-annotations-p define-key [delete-annotation] menu-item "Delete annotation" make-closure #[0 "\301\300!\210\302\303!\207" [V0 pdf-annot-delete message "Annotation deleted"] 2 nil nil] (:help "Delete this annotation.") [goto-annotation] "List annotation" #[0 "\301\300\302\"\210\303 \210\304\300!\207" [V0 pdf-annot-show-annotation t pdf-annot-list-annotations pdf-annot-list-goto-annotation] 3 nil nil] (:help "Find this annotation in the list buffer.") pdf-annot-text-annotation-p [change-text-icon] "Change icon" pdf-annot-create-icon-submenu (:help "Change the appearance of this annotation.") [change-color] "Change color" pdf-annot-create-color-submenu (:help "Change the appearance of this annotation.") [activate-annotation] "Activate" #[0 "\301\300!\207" [V0 pdf-annot-activate-annotation] 2 nil nil] (:help "Activate this annotation.")] 10 (#$ . 12782)]) #@10 (fn A) (defalias 'pdf-annot-create-color-submenu #[257 "\301 \302\303\304\305\306\307\"E#\210\310\311!\312G\313Z]\"\211\203>\211@\302\314\315\316\317\"!!\304\306\320\n#E#\210A\266\202\202\210\207" [pdf-annot-color-history make-sparse-keymap define-key [color-chooser] menu-item "Choose ..." make-closure #[0 "\301\302\303\304\305!\211\306\307\300\"M\210\310D\262#\207" [V0 list-colors-display nil "*Choose annotation color*" make-symbol "xcallback" make-closure #[257 "\302\300\303#\210\211\304 \"B\305\306!\207" [V0 pdf-annot-color-history pdf-annot-put color remove quit-window t] 5 "\n\n(fn COLOR)"] function] 8 nil nil] butlast reverse 0 12 vector intern format "color-%s" #[0 "\302\300\303\301#\207" [V0 V1 pdf-annot-put color] 4 nil nil]] 13 (#$ . 14026)]) #@10 (fn A) (defalias 'pdf-annot-create-icon-submenu #[257 "\301 \302!\211\203)\211@\303\304\305\306\307\"!!\310\311\312\n#E#\210A\266\202\202\210\207" [pdf-annot-standard-text-icons make-sparse-keymap reverse define-key vector intern format "icon-%s" menu-item make-closure #[0 "\302\300\303\301#\207" [V0 V1 pdf-annot-put icon] 4 nil nil]] 13 (#$ . 14818)]) #@242 Create a annotation from ALIST in BUFFER. ALIST should be a property list as returned by `pdf-cache-getannots'. BUFFER should be the buffer of the corresponding PDF document. It defaults to the current buffer. (fn ALIST &optional BUFFER) (defalias 'pdf-annot-create #[513 "\300\206pBB\207" [buffer] 4 (#$ . 15194)]) #@305 Return a list of annotations on PAGES of TYPES in BUFFER. See `pdf-info-normalize-pages' for valid values of PAGES. TYPES may be a symbol or list of symbols denoting annotation types. PAGES defaults to all pages, TYPES to all types and BUFFER to the current buffer. (fn &optional PAGES TYPES BUFFER) (defalias 'pdf-annot-getannots #[768 "\300!\210\211\204 p\262<\204C\262r\211q\210\301\302!\211\203=\211@\203/\303\304\">\2036\305!B\262A\266\202\202\210\211\262)\207" [pdf-util-assert-pdf-buffer nil pdf-info-getannots pdf-annot-get type pdf-annot-create] 9 (#$ . 15524)]) #@28 (fn ID &optional BUFFER) (defalias 'pdf-annot-getannot #[513 "\300\301\"\"\207" [pdf-annot-create pdf-info-getannot] 6 (#$ . 16128)]) #@108 Get annotation A's value of PROPERTY. Return DEFAULT, if value is nil. (fn A PROPERTY &optional DEFAULT) (defalias 'pdf-annot-get #[770 "\236A\206\211\207" [] 5 (#$ . 16274)]) #@275 Set annotation A's PROPERTY to VALUE. Unless VALUE is `equal' to the current value, sets A's buffer's modified flag and runs the hook `pdf-annot-modified-functions'. Signals an error, if PROPERTY is not modifiable. Returns the modified annotation. (fn A PROPERTY VALUE) (defalias 'pdf-annot-put #[771 "\211\300\"\232\2042\301\"\204\302\303\"\210r\304!q\210\305\306\307!BC\"!\262\310\311!\210\312\313\"\210)\207" [pdf-annot-get pdf-annot-property-modifiable-p error "Property `%s' is read-only for this annotation" pdf-annot-get-buffer pdf-annot-create pdf-info-editannot pdf-annot-get-id set-buffer-modified-p t pdf-annot-run-modified-hooks :change] 8 (#$ . 16463)]) (byte-code "\300\301\302\303#\300\207" [function-put pdf-annot-put lisp-indent-function 2] 4) #@423 Run `pdf-annot-modified-functions' using OPERATION on ANNOTATIONS. OPERATION should be one of nil, :change, :insert or :delete. If nil, annotations should be empty. Redisplay modified pages. If `pdf-annot-inhibit-modification-hooks' in non-nil, this just saves ANNOTATIONS and does not call the hooks until later, when the variable is nil and this function is called again. (fn &optional OPERATION &rest ANNOTATIONS) (defalias 'pdf-annot-run-modified-hooks #[384 "\302>\204 \303\304\"\210\204\211\203\303\305!\210\203G\306\"\211\203?\211@\307\310\311$\2033\2026\211B\262A\266\202\202 \210\312#\210 ?\205\204\306\313\"\314\315\316\"\306\317\"\"\306\320\"\321\211\310\311$\310\311$\315\322%\314\323\"\205\202\315\324\"\216\325\326\")\266\206\207" [pdf-annot-delayed-modified-annotations pdf-annot-inhibit-modification-hooks (nil :insert :change :delete) error "Invalid operation: %s" "Missing operation argument" plist-get cl-member :test pdf-annot-equal plist-put :change mapcar make-closure #[257 "\301\300\302\303$@\206 \211\207" [V0 cl-member :test pdf-annot-equal] 6 "\n\n(fn A)"] :insert :delete cl-union #[257 "\211\304\267\202\305\301!\207\305\300!\207\305\302!\207\305\303!\207" [V0 V1 V2 V3 #s(hash-table size 3 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (:inserted 6 :changed 10 :deleted 14)) copy-sequence] 3 "\n\n(fn ARG)"] #[257 "\300\301\"\207" [pdf-annot-get page] 4 "\n\n(fn A)"] #[0 "\302\303\304\300\"\207" [V0 pdf-annot-delayed-modified-annotations nil apply pdf-view-redisplay-pages] 3] run-hook-with-args pdf-annot-modified-functions] 12 (#$ . 17250)]) #@161 Return non-nil, if annotations A1 and A2 are equal. Two annotations are equal, if they belong to the same buffer and have identical id properties. (fn A1 A2) (defalias 'pdf-annot-equal #[514 "\300!\300!=\205\301!\301!=\207" [pdf-annot-get-buffer pdf-annot-get-id] 5 (#$ . 18906)]) #@39 Return annotation A's buffer. (fn A) (defalias 'pdf-annot-get-buffer #[257 "\300\301\"\207" [pdf-annot-get buffer] 4 (#$ . 19201)]) #@45 Return id property of annotation A. (fn A) (defalias 'pdf-annot-get-id #[257 "\300\301\"\207" [pdf-annot-get id] 4 (#$ . 19341)]) #@47 Return type property of annotation A. (fn A) (defalias 'pdf-annot-get-type #[257 "\300\301\"\207" [pdf-annot-get type] 4 (#$ . 19479)]) #@170 Return a list of EDGES used for display for annotation A. This returns a list of (LEFT TOP RIGHT BOT) demarking the rectangles of the page where A is rendered. (fn A) (defalias 'pdf-annot-get-display-edges #[257 "\300\301\"\206\f\300\302\"C\207" [pdf-annot-get markup-edges edges] 4 (#$ . 19624)]) #@148 Delete annotation A. Sets A's buffer's modified flag and runs the hook `pdf-annot-modified-functions'. This function always returns nil. (fn A) (defalias 'pdf-annot-delete #[257 "r\300!q\210\301\302!!\210\303\304!\210\305\306\"\210)\307\310!\203 \311\312!\210\313\207" [pdf-annot-get-buffer pdf-info-delannot pdf-annot-get-id set-buffer-modified-p t pdf-annot-run-modified-hooks :delete called-interactively-p any message "Annotation deleted" nil] 4 (#$ . 19934) (byte-code "\300\301!C\207" [pdf-annot-read-annotation "Click on the annotation you wish to delete"] 2)]) #@10 (fn A) (defalias 'pdf-annot-text-annotation-p #[257 "\300\301\"\302=\207" [pdf-annot-get type text] 4 (#$ . 20516)]) #@10 (fn A) (defalias 'pdf-annot-markup-annotation-p #[257 "\301\302\">??\207" [pdf-annot-markup-annotation-types pdf-annot-get type] 4 (#$ . 20642)]) #@19 (fn A PROPERTY) (defalias 'pdf-annot-property-modifiable-p #[514 "\211\300>\206\301!\203\211\302>\206\303!\205\211\304>\207" [(edges color flags contents) pdf-annot-markup-annotation-p (label opacity popup popup-is-open) pdf-annot-text-annotation-p (icon is-open)] 4 (#$ . 20798)]) #@10 (fn A) (defalias 'pdf-annot-activate-annotation #[257 "\300\301\"\206\n\302!\207" [run-hook-with-args-until-success pdf-annot-activate-handler-functions pdf-annot-default-activate-handler] 4 (#$ . 21098)]) #@10 (fn A) (defalias 'pdf-annot-default-activate-handler #[257 "\300!\203\n\301!\207\302!\207" [pdf-annot-has-attachment-p pdf-annot-pop-to-attachment pdf-annot-edit-contents] 3 (#$ . 21315)]) #@61 Return non-nil if annotation A's has data attached. (fn A) (defalias 'pdf-annot-has-attachment-p #[257 "\300\301\"\302=\207" [pdf-annot-get type file] 4 (#$ . 21516)]) #@145 Retrieve annotation A's attachment. The DO-SAVE argument is given to `pdf-info-getattachment-from-annot', which see. (fn A &optional DO-SAVE) (defalias 'pdf-annot-get-attachment #[513 "\300!\204 \301\302\"\210\303\304!\305!#\207" [pdf-annot-has-attachment-p error "Annotation has no data attached: %s" pdf-info-getattachment-from-annot pdf-annot-get-id pdf-annot-get-buffer] 7 (#$ . 21693)]) #@51 Return the base directory for saving attachments. (defalias 'pdf-annot-attachment-base-directory #[0 "\300\301!\302!\204 \303!\210\207" [pdf-util-expand-file-name "attachments" file-exists-p make-directory] 3 (#$ . 22099)]) #@58 Delete all saved attachment files of the current buffer. (defalias 'pdf-annot-attachment-delete-base-directory #[0 "\301\302\303 \304\"\207" [pdf-annot--attachment-file-alist nil delete-directory pdf-annot-attachment-base-directory t] 3 (#$ . 22332)]) #@68 Return a unique absolute filename for ATTACHMENT. (fn ATTACHMENT) (defalias 'pdf-annot-attachment-unique-filename #[257 "\301\236A\206\302\303\236A\304\"A\206G\305\306\307!\310!P\311 \"\312!\307Q\313\314\"\203>\315\316T\211\262$\262\202'BB\266\204\317!\320!\204U\321\322\"\210\207" [pdf-annot--attachment-file-alist filename "attachment" id assoc expand-file-name file-name-as-directory "." file-name-sans-extension pdf-annot-attachment-base-directory file-name-extension 0 rassoc format "%s-%d.%s" file-name-directory file-exists-p make-directory t] 12 (#$ . 22591)]) #@352 Save ATTACHMENT's data to a unique filename and return it's name. If REGENERATE-P is non-nil, copy attachment's file even if the copy already exists. Signal an error, if ATTACHMENT has no, or a non-existing, `file' property, i.e. it was retrieved with an unset do-save argument. See `pdf-info-getattachments' (fn ATTACHMENT &optional REGENERATE-P) (defalias 'pdf-annot-attachment-save #[513 "\300\236A\211\203\301!\204\302\303!\210\304!\204\301!\204)\305\306\211\307\211&\210\207" [file file-exists-p error "Attachment's file property is invalid" pdf-annot-attachment-unique-filename copy-file nil t] 11 (#$ . 23199)]) #@121 Find annotation A's attachment in a buffer, without selecting it. Signals an error, if A has no data attached. (fn A) (defalias 'pdf-annot-find-attachment-noselect #[257 "\300\301\"\302\303\"\216\304\305!!)\207" [pdf-annot-get-attachment t make-closure #[0 "\301\300\236A\211\205\302!\205\303!\207" [V0 file file-exists-p delete-file] 3] find-file-noselect pdf-annot-attachment-save] 5 (#$ . 23843)]) #@250 List all attachments in a dired buffer. If REGENERATE-P is non-nil, create attachment's files even if they already exist. Interactively REGENERATE-P is non-nil if a prefix argument was given. Return the dired buffer. (fn &optional REGENERATE-P) (defalias 'pdf-annot-attachment-dired #[256 "\300\301!C\302\303\"\216\304\305\306\"\211\203$\211@\307\301\"\242B\240\210A\266\202\202 \210\211\242\211\2039\211@\310\"\210A\266\202\202'\210\211\242\204C\311\312!\210\313\314 !)\207" [pdf-info-getattachments t make-closure #[0 "\300\242\211\205\"\211@\301\236A\211\203\302!\203\303!\210\210A\266\202\202\207" [V0 file file-exists-p delete-file] 5] pdf-annot-getannots nil file pdf-annot-get-attachment pdf-annot-attachment-save error "Document has no data attached" dired pdf-annot-attachment-base-directory] 8 (#$ . 24262) (list current-prefix-arg)]) #@316 Display file annotation A's data in a buffer. DISPLAY-ACTION should be a valid `display-buffer' action. If nil, `pdf-annot-attachment-display-buffer-action' is used. Select the window, if SELECT-WINDOW-P is non-nil. Return the window attachment is displayed in. (fn A &optional DISPLAY-ACTION SELECT-WINDOW-P) (defalias 'pdf-annot-display-attachment #[769 "\301!\302\206\n\"\203\303!\210\207" [pdf-annot-attachment-display-buffer-action pdf-annot-find-attachment-noselect display-buffer select-window] 7 (#$ . 25142) (byte-code "\300\301!C\207" [pdf-annot-read-annotation "Select a file annotation by clicking on it"] 2)]) #@70 Display annotation A's attachment in a window and select it. (fn A) (defalias 'pdf-annot-pop-to-attachment #[257 "\300\301\302#\207" [pdf-annot-display-attachment nil t] 5 (#$ . 25785) (byte-code "\300\301!C\207" [pdf-annot-read-annotation "Select a file annotation by clicking on it"] 2)]) #@189 Return the position of annotation A in image coordinates. IMAGE-SIZE should be a cons (WIDTH . HEIGHT) and defaults to the page-image of the selected window. (fn A &optional IMAGE-SIZE) (defalias 'pdf-annot-image-position #[513 "\211\204 \300 \210\301 \262\302\303\304\"\"\211@A@B\207" [pdf-util-assert-pdf-window pdf-view-image-size pdf-util-scale pdf-annot-get edges] 6 (#$ . 26085)]) #@139 Set annotation A's position to X,Y in image coordinates. See `pdf-annot-image-position' for IMAGE-SIZE. (fn A X Y &optional IMAGE-SIZE) (defalias 'pdf-annot-image-set-position #[1027 "\211\204 \300 \210\301 \262\302\303\"\304@!\245\304A!\245\3058@Z\3068A@Z\307\310Z^]\307\310Z^]\311 \303\312\211F#\207" [pdf-util-assert-pdf-window pdf-view-image-size pdf-annot-get edges float 2 3 0 1 pdf-annot-put -1] 18 (#$ . 26486)]) #@159 Return the size of annotation A in image coordinates. Returns (WIDTH . HEIGHT). See `pdf-annot-image-position' for IMAGE-SIZE. (fn A &optional IMAGE-SIZE) (defalias 'pdf-annot-image-size #[513 "\211\204 \300 \210\301 \262\302\303\304\"\"\3058@Z\3068A@ZB\207" [pdf-util-assert-pdf-window pdf-view-image-size pdf-util-scale pdf-annot-get edges 2 3] 6 (#$ . 26934)]) #@148 Set annotation A's size in image to WIDTH and/or HEIGHT. See `pdf-annot-image-position' for IMAGE-SIZE. (fn A &optional WIDTH HEIGHT IMAGE-SIZE) (defalias 'pdf-annot-image-set-size #[1025 "\211\204 \300 \210\301 \262\302\303\"\205\304@!\245\205#\304A!\245\305\303@A@\203;@\\\202?\3068\203NA@\\\202R\307 8F#\207" [pdf-util-assert-pdf-window pdf-view-image-size pdf-annot-get edges float pdf-annot-put 2 3] 15 (#$ . 27316)]) #@297 Return annotation at POS in the selected window. POS should be an absolute image position as a cons (X . Y). Alternatively POS may also be an event position, in which case `posn-window' and `posn-object-x-y' is used to find the image position. Return nil, if no annotation was found. (fn POS) (defalias 'pdf-annot-at-position #[257 "\300\301!\203\211@\262\262\3028\262\262\303 r\304\305\"\216\203&\306!\210\307\310\311\300\"!\312 @\313@!\245A\313A!\245B\314\304\315\"\"\206M\316\317!\266\205*\207" [nil posnp 8 internal--before-save-selected-window make-closure #[0 "\301\300!\207" [V0 internal--after-save-selected-window] 2] select-window pdf-annot-getannots image-mode-window-get page pdf-view-image-size float cl-some #[257 "\301\302\303\300\"\304!\"\205 \211\207" [V0 cl-some make-closure #[257 "\301\300\"\207" [V0 pdf-util-edges-inside-p] 4 "\n\n(fn E)"] pdf-annot-get-display-edges] 5 "\n\n(fn A)"] error "No annotation at this position"] 12 (#$ . 27784)]) #@369 Start moving an annotation at EVENT's position. EVENT should be a mouse event originating the request and is used as a reference point. ANNOT is the annotation to operate on and defaults to the annotation at EVENT's start position. This function does not return until the operation is completed, i.e. a non mouse-movement event is read. (fn EVENT &optional ANNOT) (defalias 'pdf-annot-mouse-move #[513 "\302\303!\211@\262!\210\304\303!\211@\262!\210\303!\3058\262\206#\306!\211\204,\307\310\"\210\311!@@ZAAZB\312 \313\211C\314\315\316%!\210\211\242\203[ \203[\317 !\211\242\262\203e\320 \210)\266\313\207" [make-pointer-invisible unread-command-events pdf-util-assert-pdf-window event-start select-window 8 pdf-annot-at-position error "No annotation at this position: %s" pdf-annot-image-position selected-window nil internal--track-mouse make-closure #[0 "\306\307C\310 C\311\312 \211\211\242\313=\262\203\214\"\307X\203s\303\314\240\210\302\315!\211@\262=\203i\315!\211\3168\262\206;\317!\262\242\320=\203i\314\211\211\315!\3218\262\322\300@\301@ZA\301AZ#\210\323 \210+\266\324\262#\210\312\324\211\205\202\307\"]#\206\207\211\262\202 \211\205\231\325C\"\211\207" [V0 V1 V2 V3 pdf-cache-image-inihibit pdf-annot-inhibit-modification-hooks 0.1 0 float-time #[770 "\211\203 \240\210\300 \240\210\242\242\\\300 Z\207" [float-time] 5 "\n\n(fn SECONDS TIMESTAMP &optional SECS)"] read-event mouse-movement t event-start 7 posn-string image 8 pdf-annot-image-set-position pdf-view-redisplay nil append pdf-view-inhibit-hotspots unread-command-events] 14] butlast pdf-annot-run-modified-hooks] 16 (#$ . 28786) "@e"]) #@67 Create image hotspots for page PAGE of size SIZE. (fn PAGE SIZE) (defalias 'pdf-annot-hotspot-function #[514 "\300\301\302\303\304\"\305!\"\"\207" [apply nconc mapcar make-closure #[257 "\301\302\"\303=?\205\304\300\"\207" [V0 pdf-annot-get type link pdf-annot-create-hotspots] 4 "\n\n(fn A)"] pdf-annot-getannots] 8 (#$ . 30497)]) #@64 Return a list of image hotspots for annotation A. (fn A SIZE) (defalias 'pdf-annot-create-hotspots #[514 "\300!\301\302!\303#\304\305\"\306>\307\211\203>\211@\310@A@B\3118\3128BBB\313\314\315\316 !FEB\262A\266\202\202\210\317#\210\207" [pdf-annot-get-id pdf-util-scale pdf-annot-get-display-edges round pdf-annot-get type (file text) nil rect 2 3 pointer hand help-echo pdf-annot-print-annotation pdf-annot-create-hotspot-binding] 15 (#$ . 30843)]) #@33 (fn ID MOVEABLE-P ANNOTATION) (defalias 'pdf-annot-create-hotspot-binding #[771 "\300\301\302\"\303\304\"\"\210\203\300\301\305\"\303\306\"\"\210\300\301\307\"\303\310\"\"\210\300\301\311\"\312\"\207" [local-set-key vector mouse-1 make-closure #[0 "\301\300!\207" [V0 pdf-annot-activate-annotation] 2 nil nil] down-mouse-1 #[257 "\301\300\"\207" [V0 pdf-annot-mouse-move] 4 "\n\n(fn EV)" "@e"] down-mouse-3 #[0 "\301\302\300!!\207" [V0 popup-menu pdf-annot-create-context-menu] 3 nil "@"] t pdf-util-image-map-mouse-event-proxy] 8 (#$ . 31321)]) #@208 Make annotation A visible. Turn to A's page in WINDOW, and scroll it if necessary. If HIGHLIGHT-P is non-nil, visually distinguish annotation A from other annotations. (fn A &optional HIGHLIGHT-P WINDOW) (defalias 'pdf-annot-show-annotation #[769 "\301 r\302\303\"\216\203\304!\210\305 \210\306\307\"\310 \311\307\312\"U\204&\313!\210\314!\203S\315\316\317@\320\321\322BBB#\323 \324\325\326 \n\n#\327\206O\330&!\210\331\332@!!\262\266\202*\207" [pdf-view-image-relief internal--before-save-selected-window make-closure #[0 "\301\300!\207" [V0 internal--after-save-selected-window] 2] select-window pdf-util-assert-pdf-window pdf-annot-get page pdf-view-image-size image-mode-window-get nil pdf-view-goto-page pdf-annot-get-display-edges pdf-view-display-image create-image pdf-cache-renderpage-highlight "white" "steel blue" 0.35 pdf-view-image-type t :map pdf-view-apply-hotspot-functions :relief 0 pdf-util-scroll-to-edges pdf-util-scale-relative-to-pixel] 17 (#$ . 31887)]) #@85 Let the user choose a annotation a mouse click using PROMPT. (fn &optional PROMPT) (defalias 'pdf-annot-read-annotation #[256 "\300\301\206\302!!\207" [pdf-annot-at-position pdf-util-read-image-position "Choose a annotation by clicking on it"] 4 (#$ . 32898)]) #@1153 Creates and adds a new annotation of type TYPE to the document. TYPE determines the kind of annotation to add and maybe one of `text', `squiggly', `underline', `strike-out' or `highlight'. EDGES determines where the annotation will appear on the page. If type is `text', this should be a single list of (LEFT TOP RIGHT BOT). Though, in this case only LEFT and TOP are used, since the size of text annotations is fixed. Otherwise EDGES may be a list of such elements. All values should be image relative coordinates, i.e. in the range [0;1]. PROPERTY-ALIST is a list of annotation properties, which will be put on the created annotation. PAGE determines the page of the annotation. It defaults to the page currently displayed in the selected window. Signal an error, if PROPERTY-ALIST contains non-modifiable properties or PAGE is nil and the selected window does not display a PDF document or creating annotations of type TYPE is not supported. Set buffers modified flag and calls `pdf-annot-activate-annotation' if `pdf-annot-activate-created-annotations' is non-nil. Return the new annotation. (fn TYPE EDGES &optional PROPERTY-ALIST PAGE) (defalias 'pdf-annot-add-annotation #[1026 "\211C\301 >\204\302\303\"\210\211\242\204\304 \210\211\305\306\307\"\240\210\242:\204(C\262\310=\2039G\311V\2039\302\312!\210\313\314\242\310=\203J@\202Y\313\315\313\316\317\320\321\n\"\f\"\"\"\307\n\310=?\205f &\322!\203\214\3231\200\324\"\211\2620\210\202\214\325!\210\326@A\"\266\327!\262\330\331!\210\332\333\"\210\203\242\334!\210\207" [pdf-annot-activate-created-annotations pdf-info-creatable-annotation-types error "Unsupported annotation type: %s" pdf-util-assert-pdf-window image-mode-window-get page nil text 1 "Edges argument should be a single edge-list for text annotations" apply pdf-info-addannot pdf-util-edges-union append mapcar make-closure #[257 "\301\300\242\"\207" [V0 pdf-info-getselection] 4 "\n\n(fn E)"] pdf-annot-get-id (error) pdf-info-editannot pdf-info-delannot signal pdf-annot-create set-buffer-modified-p t pdf-annot-run-modified-hooks :insert pdf-annot-activate-annotation] 16 (#$ . 33171)]) #@665 Add a new text annotation at POS in the selected window. POS should be a image position object or a cons (X . Y), both being image coordinates. ICON determines how the annotation is displayed and should be listed in `pdf-annot-standard-text-icons'. Any other value is ok as well, but will render the annotation invisible. Adjust X and Y accordingly, if the position would render the annotation off-page. Merge ICON as a icon property with PROPERTY-ALIST and `pdf-annot-default-text-annotation-properties' and apply the result to the created annotation. See also `pdf-annot-add-annotation'. Return the new annotation. (fn POS &optional ICON PROPERTY-ALIST) (defalias 'pdf-annot-add-text-annotation #[769 "\304 \210\305!\203\3068\262\262\307 @A\310Y\203$@W\204+\311\312C\"\210\211\310Y\2038\211AW\204?\311\312C\"\210\313\314\"\211@@^\240\210\211AA^\241\210\310@\\@Z]Z\262\310A\\AZ]Z\262\315\316\317\320\211F!\321 \205\203\322\nBC \316\n\236A\323\n\236A\324 @BC&#\207" [pdf-annot-text-annotation-size pdf-annot-default-text-annotation-properties pdf-annot-default-annotation-properties pdf-annot-color-history pdf-util-assert-pdf-window posnp 8 pdf-view-image-size 0 signal args-out-of-range pdf-util-scale-points-to-pixel round pdf-annot-add-annotation text pdf-util-scale-pixel-to-relative -1 pdf-annot-merge-alists icon t color] 18 (#$ . 35352) (byte-code "\300\301!\211\211@\262\302!\210C\207" [pdf-util-read-image-position "Click where a new text annotation should be added ..." select-window] 4)]) #@11 (fn EV) (defalias 'pdf-annot-mouse-add-text-annotation #[257 "\301\242\302=\203\303\304\303!\210\305\306!)\202\307!!\207" [echo-keystrokes pdf-annot-add-text-annotation menu-bar nil message pdf-util-read-image-position "Click where a new text annotation should be added ..." event-start] 4 (#$ . 36916) "@e"]) #@531 Add a new markup annotation in the selected window. LIST-OF-EDGES determines the marked up area and should be a list of (LEFT TOP RIGHT BOT), each value a relative coordinate. TYPE should be one of `squiggly', `underline', `strike-out' or `highlight'. Merge COLOR as a color property with PROPERTY-ALIST and `pdf-annot-default-markup-annotation-properties' and apply the result to the created annotation. See also `pdf-annot-add-annotation'. Return the new annotation. (fn LIST-OF-EDGES TYPE &optional COLOR PROPERTY-ALIST) (defalias 'pdf-annot-add-markup-annotation #[1026 "\303 \210\304\305\205\306BC \236A\307 \236A\n\205$\306\n@BC\310&\311\312\313\"$\207" [pdf-annot-default-markup-annotation-properties pdf-annot-default-annotation-properties pdf-annot-color-history pdf-util-assert-pdf-window pdf-annot-add-annotation pdf-annot-merge-alists color t ((color . "#ffff00")) image-mode-window-get page nil] 15 (#$ . 37242) (byte-code "\300\301!\302\303\304\305\301$\211\306\232\203\307\202\310!\262\311 E\207" [pdf-view-active-region t completing-read "Markup type (default highlight): " ("squiggly" "highlight" "underline" "strike-out") nil "" highlight intern pdf-annot-read-color] 6)]) #@151 Add a new squiggly annotation in the selected window. See also `pdf-annot-add-markup-annotation'. (fn LIST-OF-EDGES &optional COLOR PROPERTY-ALIST) (defalias 'pdf-annot-add-squiggly-markup-annotation #[769 "\300\301$\207" [pdf-annot-add-markup-annotation squiggly] 8 (#$ . 38465) (byte-code "\300\301!C\207" [pdf-view-active-region t] 2)]) #@152 Add a new underline annotation in the selected window. See also `pdf-annot-add-markup-annotation'. (fn LIST-OF-EDGES &optional COLOR PROPERTY-ALIST) (defalias 'pdf-annot-add-underline-markup-annotation #[769 "\300\301$\207" [pdf-annot-add-markup-annotation underline] 8 (#$ . 38817) (byte-code "\300\301!C\207" [pdf-view-active-region t] 2)]) #@153 Add a new strike-out annotation in the selected window. See also `pdf-annot-add-markup-annotation'. (fn LIST-OF-EDGES &optional COLOR PROPERTY-ALIST) (defalias 'pdf-annot-add-strikeout-markup-annotation #[769 "\300\301$\207" [pdf-annot-add-markup-annotation strike-out] 8 (#$ . 39172) (byte-code "\300\301!C\207" [pdf-view-active-region t] 2)]) #@152 Add a new highlight annotation in the selected window. See also `pdf-annot-add-markup-annotation'. (fn LIST-OF-EDGES &optional COLOR PROPERTY-ALIST) (defalias 'pdf-annot-add-highlight-markup-annotation #[769 "\300\301$\207" [pdf-annot-add-markup-annotation highlight] 8 (#$ . 39529) (byte-code "\300\301!C\207" [pdf-view-active-region t] 2)]) #@114 Read and return a color using PROMPT. Offer `pdf-annot-color-history' as default values. (fn &optional PROMPT) (defalias 'pdf-annot-read-color #[256 "\304\305\306\307\236A\307 \236AD\"\n\"\310\311\206\312\203\"\310\313@\"\202#\314# \315\316#\317!)\207" [pdf-annot-default-markup-annotation-properties pdf-annot-default-text-annotation-properties pdf-annot-color-history completing-read-function append delq nil color format "%s%s: " "Color" " (default %s)" "" make-closure #[2050 "\301\302\300&\207" [V0 V1 pdf-annot-color-history] 17 "\n\n(fn PROMPT COLLECTION &optional PREDICATE REQUIRE-MATCH INITIAL-INPUT HIST DEF INHERIT-INPUT-METHOD)"] read-color] 8 (#$ . 39884)]) #@139 Merge ALISTS into a single one. Suppresses successive duplicate entries of keys after the first occurrence in ALISTS. (fn &rest ALISTS) (defalias 'pdf-annot-merge-alists #[128 "\300\301\302\"\211\203\211@\211@\236\204\211B\262A\266\202\202\210\211\237\207" [nil apply append] 6 (#$ . 40590)]) #@65 Pretty print annotation A's property PROPERTY. (fn A PROPERTY) (defalias 'pdf-annot-print-property #[514 "\300\"\301\267\2029\302\206\303\304\205\305D#\207\211\211\204!\306\207\307!\207\211\206A\310\207\211\2060\311\312\313\314\315_!\"\207\312\316\206@\303\"\207" [pdf-annot-get #s(hash-table size 5 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (color 10 created 26 modified 26 subject 37 opacity 43)) propertize "" face :background "No date" current-time-string "No subject" 1.0 format "%d%%" round 100 "%s"] 9 (#$ . 40902)]) #@36 Pretty print annotation A. (fn A) (defalias 'pdf-annot-print-annotation #[257 "\300\301\"\206\n\302!\207" [run-hook-with-args-until-success pdf-annot-print-annotation-functions pdf-annot-print-annotation-default] 4 (#$ . 41473)]) #@174 Default pretty printer for annotation A. The result consists of a header (as printed with `pdf-annot-print-annotation-header') a newline and A's contents property. (fn A) (defalias 'pdf-annot-print-annotation-default #[257 "\300!\301\302\303\"Q\207" [pdf-annot-print-annotation-header "\n" pdf-annot-get contents] 6 (#$ . 41714)]) #@57 Emit a suitable header string for annotation A. (fn A) (defalias 'pdf-annot-print-annotation-header #[257 "\300\301\"\302=\2031\303!\304\305\306\236A\206\307\310\236A\203*\304\311\312\310\236A!\"\202+\313#\262\202@\304\314\315\316\317\320\321\"\322\"\323#\"\324\325\326\327\330\331\330&\262\324\332#\207" [pdf-annot-get type file pdf-annot-get-attachment format "File attachment `%s' of %s" filename "unnamed" size "size %s" file-size-human-readable "unknown size" "%s" mapconcat identity mapcar make-closure #[257 "\301\300\"\207" [V0 pdf-annot-print-property] 4 "\n\n(fn PROPERTY)"] (subject label modified) ";" propertize face header-line intangible t read-only display] 10 (#$ . 42055)]) #@106 Maybe print annotation A's content as a LaTeX fragment. See `pdf-annot-latex-string-predicate'. (fn A) (defalias 'pdf-annot-print-annotation-latex-maybe #[257 "\301!\205\302\303\"!\205\304!\207" [pdf-annot-latex-string-predicate functionp pdf-annot-get contents pdf-annot-print-annotation-latex] 5 (#$ . 42776)]) #@197 Print annotation A's content as a LaTeX fragment. This compiles A's contents as a LaTeX fragment and puts the resulting image as a display property on the contents, prefixed by a header. (fn A) (defalias 'pdf-annot-print-annotation-latex #[257 "\305C\306\307\"\216r\310!q\210\311\312\"\313!\311\314\"\315\316\317$!\320\321\305$\322\323!\324\n!\2046\325\n!\210\211\204~\326\327\305\330#\240\210\331\332\333\"r\211q\210\306\334\"\216\335\242 \333$\210*\210\336\242!\262\211G\337V\203{\211\340\341O\342\232\203{\343\321$\210\202~\305\262\344\203\230\345\346\347\350 \333\351\f\206\223\321%#\202\244\345\346\345\352\353\354#P#Q*\266\205*\207" [pdf-annot-latex-header org-format-latex-header temporary-file-directory org-format-latex-options pdf-view-image-relief nil make-closure #[0 "\300\242\205\301\300\242!\205\302\300\242!\207" [V0 file-exists-p delete-file] 2] pdf-annot-get-buffer pdf-annot-get page pdf-annot-print-annotation-header contents sxhash format "pdf-annot-print-annotation-latex%s%s%s" pdf-cache-lookup-image 0 pdf-util-expand-file-name "pdf-annot-print-annotation-latex" file-directory-p make-directory make-temp-file "pdf-annot" ".png" generate-new-buffer " *temp*" t #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] org-create-formula-image pdf-util-munch-file 3 1 4 "PNG" pdf-cache-put-image "\n" propertize display create-image pdf-view-image-type :relief "Failed to compile latex fragment\n" face error] 18 (#$ . 43106)]) (defvar pdf-annot-edit-contents--annotation nil nil) (byte-code "\300\301!\210\302\301\303\304#\207" [make-variable-buffer-local pdf-annot-edit-contents--annotation put permanent-local t] 4) (defvar pdf-annot-edit-contents--buffer nil nil) (byte-code "\301\302!\210\303\304\305\306\307DD\310\311\312\313\306&\210\303\314\305\306\315DD\316\311\312\313&\207" [display-buffer--action-custom-type make-variable-buffer-local pdf-annot-edit-contents--buffer custom-declare-variable pdf-annot-edit-contents-setup-function funcall function #[0 "\300\207" [#[257 "\301\302\"!\203 \303\202\304\305!?\205\211 \207" [pdf-annot-latex-string-predicate pdf-annot-get contents latex-mode text-mode derived-mode-p] 5 "\n\n(fn A)"]] 1] "A function for setting up, e.g. the major-mode, of the edit buffer.\n\nThe function receives one argument, the annotation whose contents\nis about to be edited in this buffer.\n\nThe default value turns on `latex-mode' if\n`pdf-annot-latex-string-predicate' returns non-nil on the\nannotation's contents and otherwise `text-mode'. " :group pdf-annot :type pdf-annot-edit-contents-display-buffer-action #[0 "\300\207" [((display-buffer-reuse-window display-buffer-split-below-and-attach) (inhibit-same-window . t) (window-height . 0.25))] 1] "Display action when showing the edit buffer."] 8) (defvar pdf-annot-edit-contents-minor-mode-map (byte-code "\301 \302\"\210\303\304\305#\210\303\306\307#\210\207" [text-mode-map make-sparse-keymap set-keymap-parent define-key "" pdf-annot-edit-contents-commit "" pdf-annot-edit-contents-abort] 5)) #@137 Non-nil if Pdf-Annot-Edit-Contents minor mode is enabled. Use the command `pdf-annot-edit-contents-minor-mode' to change this variable. (defvar pdf-annot-edit-contents-minor-mode nil (#$ . 46200)) (make-variable-buffer-local 'pdf-annot-edit-contents-minor-mode) #@642 Active when editing the contents of annotations. This is a minor mode. If called interactively, toggle the `Pdf-Annot-Edit-Contents 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-annot-edit-contents-minor-mode'. The mode's hook is called both when the mode is enabled and when it is disabled. (fn &optional ARG) (defalias 'pdf-annot-edit-contents-minor-mode #[256 "\302 \303=\203 ?\202\247\203\304W\203\305\202\306\307\301!\2031\310\300 \"\2031\300 B\203<\311\312\313\314!\"\210\315\316\203F\317\202G\320\"\210\321\322!\203i\302 \203[\211\302 \232\203i\311\323\203e\324\202f\325\326#\210\210\327 \210\207" [pdf-annot-edit-contents-minor-mode local-minor-modes current-message toggle 1 nil t boundp delq message "%s" substitute-command-keys "Press \\[pdf-annot-edit-contents-commit] to commit your changes, \\[pdf-annot-edit-contents-abort] to abandon them." run-hooks pdf-annot-edit-contents-minor-mode-hook pdf-annot-edit-contents-minor-mode-on-hook pdf-annot-edit-contents-minor-mode-off-hook called-interactively-p any "Pdf-Annot-Edit-Contents minor mode %sabled%s" "en" "dis" " in current buffer" force-mode-line-update] 6 (#$ . 46469) (byte-code "\203\n\301!\202 \302C\207" [current-prefix-arg prefix-numeric-value toggle] 2)]) (defvar pdf-annot-edit-contents-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%\210\303\312\314\315#\207" [pdf-annot-edit-contents-minor-mode-map pdf-annot-edit-contents-minor-mode-hook variable-documentation put "Hook run after entering or leaving `pdf-annot-edit-contents-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-annot-edit-contents-minor-mode boundp permanent-local t] 6) #@34 (fn DO-SAVE &optional DO-KILL) (defalias 'pdf-annot-edit-contents-finalize #[513 "\300 \2032\301=\203'\302 \303\304\"\216\305p\306\307 #\210\310\311!\203\"\312 \210)\210\202.\203.\312 \210\313\306!\210\314 \211\205F\211@\315\"\210A\266\202\2024\207" [buffer-modified-p ask current-window-configuration make-closure #[0 "\301\300!\207" [V0 set-window-configuration] 2] display-buffer nil selected-frame y-or-n-p "Save changes to this annotation ?" pdf-annot-edit-contents-save-annotation set-buffer-modified-p get-buffer-window-list quit-window] 7 (#$ . 48705)]) (defalias 'pdf-annot-edit-contents-save-annotation #[0 "\205\301\302\303ed\"#\210\304\305!\207" [pdf-annot-edit-contents--annotation pdf-annot-put contents buffer-substring-no-properties set-buffer-modified-p nil] 6]) (defalias 'pdf-annot-edit-contents-commit #[0 "\300\301!\207" [pdf-annot-edit-contents-finalize t] 2 nil nil]) (defalias 'pdf-annot-edit-contents-abort #[0 "\300\301\302\"\207" [pdf-annot-edit-contents-finalize nil t] 3 nil nil]) #@10 (fn A) (defalias 'pdf-annot-edit-contents-noselect #[257 "r\304!q\210\305!\203\211 =\204rq\210\306\307!\210)\305!\2042r\310\311\312\313 \"!q\210\314\315!\210p)rq\210\316\317 \210\212\320\321\"c\210)\322\323!\210)\211 !\210p*\207" [pdf-annot-edit-contents--buffer pdf-annot-edit-contents--annotation inhibit-read-only pdf-annot-edit-contents-setup-function pdf-annot-get-buffer buffer-live-p pdf-annot-edit-contents-finalize ask get-buffer-create format "*Edit Annotation %s*" buffer-name pdf-annot-edit-contents-minor-mode 1 t erase-buffer pdf-annot-get contents set-buffer-modified-p nil] 5 (#$ . 49740)]) #@10 (fn A) (defalias 'pdf-annot-edit-contents #[257 "\301\302\303!\"!\207" [pdf-annot-edit-contents-display-buffer-action select-window display-buffer pdf-annot-edit-contents-noselect] 5 (#$ . 50370)]) #@11 (fn EV) (defalias 'pdf-annot-edit-contents-mouse #[257 "\300!\3018\262\211\205\302!\211\204\303\304!\210\305!\207" [event-start 8 pdf-annot-at-position error "No annotation at this position" pdf-annot-edit-contents] 5 (#$ . 50578) "@e"]) (byte-code "\301\302\303\304\305DD\306\307\310\311&\210\301\312\303\304\313DD\314\311\315\316\317\307\310& \210\301\320\303\304\321DD\322\307\310\311\323&\207" [display-buffer--action-custom-type custom-declare-variable pdf-annot-list-display-buffer-action funcall function #[0 "\300\207" [((display-buffer-reuse-window display-buffer-pop-up-window) (inhibit-same-window . t))] 1] "Display action used when displaying the list buffer." :group pdf-annot :type pdf-annot-list-format #[0 "\300\207" [((page . 3) (type . 10) (label . 24) (date . 24))] 1] "Annotation properties visible in the annotation list.\n\nIt should be a list of (PROPERTIZE. WIDTH), where PROPERTY is a\nsymbol naming one of supported properties to list and WIDTH its\ndesired column-width.\n\nCurrently supported properties are page, type, label, date and contents." (alist :key-type (symbol)) :options ((page (integer :value 3 :tag "Column Width")) (type (integer :value 10 :tag "Column Width")) (label (integer :value 24 :tag "Column Width")) (date (integer :value 24 :tag "Column Width")) (contents (integer :value 56 :tag "Column Width"))) pdf-annot-list-highlight-type #[0 "\300\207" [nil] 1] "Whether to highlight \"Type\" column annotation list with annotation color." boolean] 10) (defvar pdf-annot-list-buffer nil nil) (make-variable-buffer-local 'pdf-annot-list-buffer) (defvar pdf-annot-list-document-buffer nil nil) (make-variable-buffer-local 'pdf-annot-list-document-buffer) (defvar pdf-annot-list-mode-map (byte-code "\300 \301\302\303#\210\301\304\305#\210\207" [make-sparse-keymap define-key "" pdf-annot-list-follow-minor-mode " " pdf-annot-list-display-annotation-from-id] 5)) #@120 Return a list of completion candidates for annotation property PROPERTY. Return nil, if not available. (fn PROPERTY) (defalias 'pdf-annot-property-completions #[257 "\211\301\267\202 \302 \207\303!\207\304\207" [pdf-annot-standard-text-icons #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (color 6 icon 9)) pdf-util-color-completions copy-sequence nil] 3 (#$ . 52508)]) #@168 Compare annotations A1 and A2. Return non-nil if A1's page is less than A2's one or if they belong to the same page and A1 is displayed above/left of A2. (fn A1 A2) (defalias 'pdf-annot-compare-annotations #[514 "\300\301\"\300\301\"W\206=U\205=\302\303!@\304\"\302\303!@\305\"A@A@W\206;A@A@U\205;@@X\266\202\207" [pdf-annot-get page pdf-util-scale pdf-annot-get-display-edges (1000 . 1000) (1000 . 1000)] 8 (#$ . 52927)]) (defalias 'pdf-annot-list-entries #[0 "\302!\204\n\303\304!\210\305\306\307\310\311 #\312\"\"\207" [pdf-annot-list-document-buffer pdf-annot-list-listed-types buffer-live-p error "No PDF document associated with this buffer" mapcar pdf-annot-list-create-entry sort pdf-annot-getannots nil pdf-annot-compare-annotations] 7]) #@10 (fn A) (defalias 'pdf-annot--make-entry-formatter #[257 "\300\301\"\207" [make-closure #[257 "\211@A\302\303\304\267\202B\305\300\306\"\207\305\300\307\"\207\211\305\300\310\"!\207\311\305\300\312\"!\"\207\313\300\314\"\305\300\315\" \203A\316\317\320\321 !F#\207\207\322\323\324#\205K\325\207" [V0 pdf-annot-list-highlight-type #[257 "\300\301\"\302V\203 \301\207\303\207" [color-distance "black" 292485 "white"] 4 "\n\n(fn NAME)"] #[257 "\300\301\302\303\211%\207" [replace-regexp-in-string "\n" " " t] 7 "\n\n(fn STR)"] #s(hash-table size 5 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (date 12 page 17 label 22 contents 29 type 39)) pdf-annot-print-property modified page label truncate-string-to-width contents pdf-annot-get color type propertize face :background :foreground error "cl-ecase failed: %s, %s" (date page label contents type) nil] 15 "\n\n(fn FMT)"]] 4 (#$ . 53703)]) #@67 Create a `tabulated-list-entries' entry for annotation A. (fn A) (defalias 'pdf-annot-list-create-entry #[257 "\301!\302\303\304!\"!D\207" [pdf-annot-list-format pdf-annot-get-id vconcat mapcar pdf-annot--make-entry-formatter] 6 (#$ . 54634)]) (defvar pdf-annot-list-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-annot-list-mode-hook variable-documentation put "Hook run after entering Annots 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-annot-list-mode-map definition-name pdf-annot-list-mode] 4) (defvar pdf-annot-list-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-annot-list-mode-abbrev-table pdf-annot-list-mode-map variable-documentation put purecopy "Keymap for `pdf-annot-list-mode'." boundp pdf-annot-list-mode-syntax-table definition-name pdf-annot-list-mode (lambda (def-tmp-var) (defvar pdf-annot-list-mode-syntax-table def-tmp-var)) make-syntax-table "Syntax table for `pdf-annot-list-mode'." (lambda (def-tmp-var) (defvar pdf-annot-list-mode-abbrev-table def-tmp-var)) define-abbrev-table nil "Abbrev table for `pdf-annot-list-mode'." derived-mode-parent tablist-mode] 5) #@527 Major mode derived from `tablist-mode' by `define-derived-mode'. It inherits all of the parent's attributes, but has its own keymap, abbrev table and syntax table: `pdf-annot-list-mode-map', `pdf-annot-list-mode-abbrev-table' and `pdf-annot-list-mode-syntax-table' which more-or-less shadow tablist-mode's corresponding tables. In addition to any hooks its parent mode might have run, this mode runs the hook `pdf-annot-list-mode-hook', as the final or penultimate step during initialization. \{pdf-annot-list-mode-map} (defalias 'pdf-annot-list-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 %\331\332\333\"\334&\335\336'\"!(\337)\266\316 *\"\210\327 !\210\340'\236\203\207\341+\342 \210)\343\344!\207" [delay-mode-hooks major-mode mode-name pdf-annot-list-mode-map pdf-annot-list-mode-syntax-table pdf-annot-list-mode-abbrev-table make-local-variable t tablist-mode pdf-annot-list-mode "Annots" 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 #[514 "\300A@\301H!\300A@\301H!W\207" [string-to-number 0] 6 "\n\n(fn A B)"] make-closure #[257 "\211@A\301=\203\302\303\300\304BBB\207\305\306!!\307\310\307\257\207" [V0 page "Pg." 3 (:read-only t :right-alight t) capitalize symbol-name t :read-only] 8 "\n\n(fn FORMAT)"] pdf-annot-list-entries vconcat mapcar 2 type (not (== "Type" "link")) tabulated-list-init-header run-mode-hooks pdf-annot-list-mode-hook local-abbrev-table tabulated-list-entries pdf-annot-list-format tabulated-list-format tabulated-list-padding tablist-mode-map tablist-current-filter] 6 (#$ . 56161) nil]) #@70 List annotations in a dired like buffer. \{pdf-annot-list-mode-map} (defalias 'pdf-annot-list-annotations #[0 "\305 \210pr\306\307\310\311\312 !\"!q\210\313\314!\204\314 \210\211\315 \210\316\317\"\320prq\210\211)\210\321p\f\"\210\322 \210\323 \210)\324\325\326\327\330$\210\324\331\326\327\330$\207" [pdf-annot-list-document-buffer tablist-context-window-function tablist-operations-function pdf-annot-list-buffer pdf-annot-list-display-buffer-action pdf-util-assert-pdf-buffer get-buffer-create format "*%s's annots*" file-name-sans-extension buffer-name derived-mode-p pdf-annot-list-mode tabulated-list-print make-closure #[257 "\301\300\"\207" [V0 pdf-annot-list-context-function] 4 "\n\n(fn ID)"] pdf-annot-list-operation-function pop-to-buffer tablist-move-to-major-column tablist-display-context-window add-hook pdf-info-close-document-hook pdf-annot-list-update nil t pdf-annot-modified-functions] 6 (#$ . 58075) nil]) #@10 (fn A) (defalias 'pdf-annot-list-goto-annotation #[257 "r\301!q\210\302!\203\303!\204\304 \210\305\303!!r\306\307\"\216\310@\311\"\210eb\210\312!m\204F\211\313\314\2068`\315\"\262=\204F\313y\210\202,\211\313\314\206N`\315\"\262=\204Z\316\317!\210\320`!\203d\321\322!\210\323 \262*\262)\207" [pdf-annot-list-buffer pdf-annot-get-buffer buffer-live-p get-buffer-window pdf-annot-list-annotations internal--before-with-selected-window make-closure #[0 "\301\300!\207" [V0 internal--after-with-selected-window] 2] select-window norecord pdf-annot-get-id nil get-text-property tabulated-list-id error "Unable to find annotation" invisible-p tablist-suspend-filter t tablist-move-to-major-column] 8 (#$ . 59019)]) #@21 (fn &optional FN) (defalias 'pdf-annot-list-update #[256 "\302!\205rq\210 \204\303 \210\304 )\207" [pdf-annot-list-buffer tablist-edit-column-minor-mode buffer-live-p tablist-revert tablist-context-window-update] 3 (#$ . 59759)]) #@18 (fn ID BUFFER) (defalias 'pdf-annot-list-context-function #[514 "r\301\302!q\210\303\304p\"\210\305\306 \210\203\212\307\310\"!c\210)\311\312!*\207" [inhibit-read-only get-buffer-create "*Contents*" set-window-buffer nil t erase-buffer pdf-annot-print-annotation pdf-annot-getannot read-only-mode 1] 6 (#$ . 60003)]) #@22 (fn OP &rest ARGS) (defalias 'pdf-annot-list-operation-function #[385 "\302\267\202\244\303\207\211\211G\304U\203\211\242\202\305\306\307GD\"\310!\205Crq\210\311\216r\312\313\314\"\211\205@\211@\315!\210A\266\202\202/\262,\207\211\211G\304U\203Q\211\242\202X\305\306\316GD\"\310!\204b\317\320!\210\314\"\321 r\322\323\"\216\324!\206x\325!*\262\326rq\210\327!\210\330 \262)\211\330 D>?\205\243\331\332\"\211\205\241\211AA\330 \240\262\207\317\333\334#\205\255\326\207" [pdf-annot-list-document-buffer pdf-annot-inhibit-modification-hooks #s(hash-table size 3 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (supported-operations 6 delete 8 find-entry 68)) (delete find-entry) 1 signal wrong-number-of-arguments (ids) buffer-live-p #[0 "\300 \207" [pdf-annot-run-modified-hooks] 1] t mapcar pdf-annot-getannot pdf-annot-delete (id) error "No PDF document associated with this buffer" internal--before-save-selected-window make-closure #[0 "\301\300!\207" [V0 internal--after-save-selected-window] 2] get-buffer-window display-buffer nil pdf-annot-activate-annotation selected-window window-parameter quit-restore "cl-ecase failed: %s, %s" (supported-operations delete find-entry)] 11 (#$ . 60334)]) (defvar pdf-annot-list-display-annotation--timer nil) #@11 (fn ID) (defalias 'pdf-annot-list-display-annotation-from-id #[257 "\211\205%\302!\204\303\304!\210\305 !\203\306 !\210\307\310\311\312\313\"%\211\207" [pdf-annot-list-document-buffer pdf-annot-list-display-annotation--timer buffer-live-p error "PDF buffer was killed" timerp cancel-timer run-with-idle-timer 0.1 nil #[514 "\300!\205%\301\302!\206\303\304\"!r\305\306\"\216\307@\310\"\210\311\312\"*\262\207" [buffer-live-p internal--before-with-selected-window get-buffer-window display-buffer (nil (inhibit-same-window . t)) make-closure #[0 "\301\300!\207" [V0 internal--after-with-selected-window] 2] select-window norecord pdf-annot-show-annotation t] 6 "\n\n(fn BUFFER A)"] pdf-annot-getannot] 9 (#$ . 61649) (byte-code "\300\301\206`\302\"\262C\207" [nil get-text-property tabulated-list-id] 4)]) #@133 Non-nil if Pdf-Annot-List-Follow minor mode is enabled. Use the command `pdf-annot-list-follow-minor-mode' to change this variable. (defvar pdf-annot-list-follow-minor-mode nil (#$ . 62487)) (make-variable-buffer-local 'pdf-annot-list-follow-minor-mode) #@22 (fn &optional ARG) (defalias 'pdf-annot-list-follow-minor-mode #[256 "\302 \303=\203 ?\202\247\203\304W\203\305\202\306\307\301!\2031\310\300 \"\2031\300 B\311\312!\204;\313\314!\210\203]\315\316\317\305\306$\210\305\320\206M`\321\"\262\211\203Y\317!\210\210\202c\322\316\317\306#\210\323\324\203m\325\202n\326\"\210\327\330!\203\220\302 \203\202\211\302 \232\203\220\331\332\203\214\333\202\215\334\335#\210\210\336 \210\207" [pdf-annot-list-follow-minor-mode local-minor-modes current-message toggle 1 nil t boundp delq derived-mode-p pdf-annot-list-mode error "No in pdf-annot-list-mode." add-hook tablist-selection-changed-functions pdf-annot-list-display-annotation-from-id get-text-property tabulated-list-id remove-hook run-hooks pdf-annot-list-follow-minor-mode-hook pdf-annot-list-follow-minor-mode-on-hook pdf-annot-list-follow-minor-mode-off-hook called-interactively-p any message "Pdf-Annot-List-Follow minor mode %sabled%s" "en" "dis" " in current buffer" force-mode-line-update] 7 (#$ . 62747) (byte-code "\203\n\301!\202 \302C\207" [current-prefix-arg prefix-numeric-value toggle] 2)]) (defvar pdf-annot-list-follow-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%\210\314\315!\207" [pdf-annot-list-follow-minor-mode-map pdf-annot-list-follow-minor-mode-hook variable-documentation put "Hook run after entering or leaving `pdf-annot-list-follow-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-annot-list-follow-minor-mode boundp provide pdf-annot] 6)