?
Current Path : /usr/share/emacs/24.3/lisp/ |
Linux gator3171.hostgator.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 |
Current File : //usr/share/emacs/24.3/lisp/image-dired.elc |
;ELC ;;; Compiled by mockbuild@buildfarm06-new.corp.cloudlinux.com on Fri Oct 11 10:06:22 2024 ;;; from file /builddir/build/BUILD/emacs-24.3/lisp/image-dired.el ;;; in Emacs version 24.3.1 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. ;;; This file does not contain utf-8 non-ASCII characters, ;;; and so can be loaded in Emacs versions earlier than 23. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301!\210\300\302!\210\300\303!\210\304\305\306\307\310\311\312\313&\210\314\315\316\317\320\321\312\305&\210\314\322\323\324\320\325\312\305&\210\314\326\327\330\320\321\312\305&\210\314\331\332\333\320\321\312\305&\210\314\334\335\336\320\321\312\305&\210\314\337\340\341\320\321\312\305&\210\314\342\343\344\320\321\312\305&\210\314\345\346\347\320\321\312\305&\210\314\350\351\352\320\321\312\305&\210\314\353\346\354\320\321\312\305&\210\314\355\351\356\320\321\312\305&\210\314\357\360\361\320\362\312\305&\210\314\363\364\365\320\366\312\305&\210\314\367\370\371\320\321\312\305&\210\314\372\373\374\320\321\312\305&\210\314\375\376\377\320\321\312\305&\210\314\201@ \201A \201B \320\321\312\305&\210\314\201C \201D \201E \320\321\312\305&\210\314\201F \201G \201H \320\321\312\305&\210\314\201I \201J \201K \320\201L \312\305&\210\314\201M \201N \201O \320\321\312\305&\210\314\201P \201Q \201R \320\321\312\305&\210\314\201S \201N \201T \320\321\312\305&\210\314\201U \201V \201W \320\321\312\305&\210\314\201X \201Y \201Z \320\201[ \312\305&\210\314\201\\ \201] \201^ \320\201_ \312\305&\210\314\201` \201\\ \201a \320\201_ \312\305&\210\314\201b \201\\ \201c \320\201_ \312\305&\210\314\201d \201e \201f \320\201_ \312\305&\210\314\201g \201e \201h \320\201_ \312\305&\210\314\201i \201j \201k \320\201l \312\305&\210\314\201m \201n \201o \320\201_ \312\305&\210\314\201p \201q \201r \320\201_ \312\305&\210\314\201s \201t \201u \320\201_ \312\305&\210\314\201v \201J \201w \320\201L \312\305&\210\314\201x \306\201y \320\201L \312\305&\210\314\201z \201J \201{ \320\201L \312\305&\210\314\201| \201} \201~ \320\321\312\305&\210\314\201 \201\200 \201\201 \320\321\312\305&\210\314\201\202 \201\203 \201\204 \320\321\312\305&\210\314\201\205 \201\206 \201\207 \320\201_ \312\305&\207" [require dired format-spec widget custom-declare-group image-dired nil "Use dired to browse your images as thumbnails, and more." :prefix "image-dired-" :group multimedia custom-declare-variable image-dired-dir (locate-user-emacs-file "image-dired/") "Directory where thumbnail images are stored." :type string image-dired-thumbnail-storage 'use-image-dired-dir "How to store image-dired's thumbnail files.\nImage-Dired can store thumbnail files in one of two ways and this is\ncontrolled by this variable. \"Use image-dired dir\" means that the\nthumbnails are stored in a central directory. \"Per directory\"\nmeans that each thumbnail is stored in a subdirectory called\n\".image-dired\" in the same directory where the image file is.\n\"Thumbnail Managing Standard\" means that the thumbnails are\nstored and generated according to the Thumbnail Managing Standard\nthat allows sharing of thumbnails across different programs." (choice :tag "How to store thumbnail files" (const :tag "Thumbnail Managing Standard" standard) (const :tag "Use image-dired-dir" use-image-dired-dir) (const :tag "Per-directory" per-directory)) image-dired-db-file (expand-file-name ".image-dired_db" image-dired-dir) "Database file where file names and their associated tags are stored." image-dired-temp-image-file (expand-file-name ".image-dired_temp" image-dired-dir) "Name of temporary image file used by various commands." image-dired-gallery-dir (expand-file-name ".image-dired_gallery" image-dired-dir) "Directory to store generated gallery html pages.\nThis path needs to be \"shared\" to the public so that it can access\nthe index.html page that image-dired creates." image-dired-gallery-image-root-url "http://your.own.server/image-diredpics" "URL where the full size images are to be found.\nNote that this path has to be configured in your web server. Image-Dired\nexpects to find pictures in this directory." image-dired-gallery-thumb-image-root-url "http://your.own.server/image-diredthumbs" "URL where the thumbnail images are to be found.\nNote that this path has to be configured in your web server. Image-Dired\nexpects to find pictures in this directory." image-dired-cmd-create-thumbnail-program "convert" "Executable used to create thumbnail.\nUsed together with `image-dired-cmd-create-thumbnail-options'." image-dired-cmd-create-thumbnail-options "%p -size %wx%h \"%f\" -resize \"%wx%h>\" -strip jpeg:\"%t\"" "Format of command used to create thumbnail image.\nAvailable options are %p which is replaced by\n`image-dired-cmd-create-thumbnail-program', %w which is replaced by\n`image-dired-thumb-width', %h which is replaced by `image-dired-thumb-height',\n%f which is replaced by the file name of the original image and %t\nwhich is replaced by the file name of the thumbnail file." image-dired-cmd-create-temp-image-program "Executable used to create temporary image.\nUsed together with `image-dired-cmd-create-temp-image-options'." image-dired-cmd-create-temp-image-options "Format of command used to create temporary image for display window.\nAvailable options are %p which is replaced by\n`image-dired-cmd-create-temp-image-program', %w and %h which is replaced by\nthe calculated max size for width and height in the image display window,\n%f which is replaced by the file name of the original image and %t which\nis replaced by the file name of the temporary file." image-dired-cmd-pngnq-program (executable-find "pngnq") "The file name of the `pngnq' program.\nIt quantizes colors of PNG images down to 256 colors." (choice (const :tag "Not Set" nil) string) image-dired-cmd-pngcrush-program (executable-find "pngcrush") "The file name of the `pngcrush' program.\nIt optimizes the compression of PNG images. Also it adds PNG textual chunks\nwith the information required by the Thumbnail Managing Standard." (choice (const :tag "Not Set" nil) string) image-dired-cmd-create-standard-thumbnail-command (concat image-dired-cmd-create-thumbnail-program " " "-size %wx%h \"%f\" " (unless (or image-dired-cmd-pngcrush-program image-dired-cmd-pngnq-program) (concat "-set \"Thumb::MTime\" \"%m\" " "-set \"Thumb::URI\" \"file://%f\" " "-set \"Description\" \"Thumbnail of file://%f\" " "-set \"Software\" \"" (emacs-version) "\" ")) "-thumbnail \"%wx%h>\" png:\"%t\"" (if image-dired-cmd-pngnq-program (concat " ; " image-dired-cmd-pngnq-program " -f \"%t\"" (unless image-dired-cmd-pngcrush-program " ; mv %q %t"))) (if image-dired-cmd-pngcrush-program (concat (unless image-dired-cmd-pngcrush-program " ; cp %t %q") " ; " image-dired-cmd-pngcrush-program " -q " "-text b \"Description\" \"Thumbnail of file://%f\" " "-text b \"Software\" \"" (emacs-version) "\" " "-text b \"Thumb::MTime\" \"%m\" " "-text b \"Thumb::URI\" \"file://%f\" " "%q %t" " ; rm %q"))) "Command to create thumbnails according to the Thumbnail Managing Standard." image-dired-cmd-rotate-thumbnail-program "mogrify" "Executable used to rotate thumbnail.\nUsed together with `image-dired-cmd-rotate-thumbnail-options'." image-dired-cmd-rotate-thumbnail-options "%p -rotate %d \"%t\"" "Format of command used to rotate thumbnail image.\nAvailable options are %p which is replaced by\n`image-dired-cmd-rotate-thumbnail-program', %d which is replaced by the\nnumber of (positive) degrees to rotate the image, normally 90 or 270\n(for 90 degrees right and left), %t which is replaced by the file name\nof the thumbnail file." image-dired-cmd-rotate-original-program "jpegtran" "Executable used to rotate original image.\nUsed together with `image-dired-cmd-rotate-original-options'." image-dired-cmd-rotate-original-options "%p -rotate %d -copy all -outfile %t \"%o\"" "Format of command used to rotate original image.\nAvailable options are %p which is replaced by\n`image-dired-cmd-rotate-original-program', %d which is replaced by the\nnumber of (positive) degrees to rotate the image, normally 90 or\n270 (for 90 degrees right and left), %o which is replaced by the\noriginal image file name and %t which is replaced by\n`image-dired-temp-image-file'." image-dired-temp-rotate-image-file (expand-file-name ".image-dired_rotate_temp" image-dired-dir) "Temporary file for rotate operations." image-dired-rotate-original-ask-before-overwrite t "Confirm overwrite of original file after rotate operation.\nIf non-nil, ask user for confirmation before overwriting the\noriginal file with `image-dired-temp-rotate-image-file'." boolean image-dired-cmd-write-exif-data-program "exiftool" "Program used to write EXIF data to image.\nUsed together with `image-dired-cmd-write-exif-data-options'." image-dired-cmd-write-exif-data-options "%p -%t=\"%v\" \"%f\"" "Format of command used to write EXIF data.\nAvailable options are %p which is replaced by\n`image-dired-cmd-write-exif-data-program', %f which is replaced by\nthe image file name, %t which is replaced by the tag name and %v\nwhich is replaced by the tag value." image-dired-cmd-read-exif-data-program "Program used to read EXIF data to image.\nUsed together with `image-dired-cmd-read-exif-data-program-options'." image-dired-cmd-read-exif-data-options "%p -s -s -s -%t \"%f\"" "Format of command used to read EXIF data.\nAvailable options are %p which is replaced by\n`image-dired-cmd-write-exif-data-program', %f which is replaced\nby the image file name and %t which is replaced by the tag name." image-dired-gallery-hidden-tags (list "private" "hidden" "pending") "List of \"hidden\" tags.\nUsed by `image-dired-gallery-generate' to leave out \"hidden\" images." (repeat string) image-dired-thumb-size (if (eq 'standard image-dired-thumbnail-storage) 128 100) "Size of thumbnails, in pixels.\nThis is the default size for both `image-dired-thumb-width'\nand `image-dired-thumb-height'." integer image-dired-thumb-width "Width of thumbnails, in pixels." image-dired-thumb-height "Height of thumbnails, in pixels." image-dired-thumb-relief 2 "Size of button-like border around thumbnails." image-dired-thumb-margin "Size of the margin around thumbnails.\nThis is where you see the cursor." image-dired-line-up-method 'dynamic "Default method for line-up of thumbnails in thumbnail buffer.\nUsed by `image-dired-display-thumbs' and other functions that needs\nto line-up thumbnails. Dynamic means to use the available width of\nthe window containing the thumbnail buffer, Fixed means to use\n`image-dired-thumbs-per-row', Interactive is for asking the user,\nand No line-up means that no automatic line-up will be done." (choice :tag "Default line-up method" (const :tag "Dynamic" dynamic) (const :tag "Fixed" fixed) (const :tag "Interactive" interactive) (const :tag "No line-up" none)) image-dired-thumbs-per-row 3 "Number of thumbnails to display per row in thumb buffer." image-dired-display-window-width-correction 1 "Number to be used to correct image display window width.\nChange if the default (1) does not work (i.e. if the image does not\ncompletely fit)." image-dired-display-window-height-correction 0 "Number to be used to correct image display window height.\nChange if the default (0) does not work (i.e. if the image does not\ncompletely fit)." image-dired-track-movement "The current state of the tracking and mirroring.\nFor more information, see the documentation for\n`image-dired-toggle-movement-tracking'." image-dired-append-when-browsing "Append thumbnails in thumbnail buffer when browsing.\nIf non-nil, using `image-dired-next-line-and-display' and\n`image-dired-previous-line-and-display' will leave a trail of thumbnail\nimages in the thumbnail buffer. If you enable this and want to clean\nthe thumbnail buffer because it is filled with too many thumbnails,\njust call `image-dired-display-thumb' to display only the image at point.\nThis value can be toggled using `image-dired-toggle-append-browsing'." image-dired-dired-disp-props "If non-nil, display properties for dired file when browsing.\nUsed by `image-dired-next-line-and-display',\n`image-dired-previous-line-and-display' and `image-dired-mark-and-display-next'.\nIf the database file is large, this can slow down image browsing in\ndired and you might want to turn it off." image-dired-display-properties-format "%b: %f (%t): %c" "Display format for thumbnail properties.\n%b is replaced with associated dired buffer name, %f with file name\n(without path) of original image file, %t with the list of tags and %c\nwith the comment." image-dired-external-viewer (cond ((executable-find "display")) ((executable-find "xli")) ((executable-find "qiv") "qiv -t")) "Name of external viewer.\nIncluding parameters. Used when displaying original image from\n`image-dired-thumbnail-mode'." image-dired-main-image-directory "~/pics/" "Name of main image directory, if any.\nUsed by `image-dired-copy-with-exif-file-name'." image-dired-show-all-from-dir-max-files 50 "Maximum number of files to show using `image-dired-show-all-from-dir'\nbefore warning the user."] 8) #@91 Run BODY in a temp buffer containing `image-dired-db-file'. Return the last form in BODY. (defalias 'image-dired--with-db-file '(macro . #[(&rest body) "\301\302BB\207" [body with-temp-buffer (if (file-exists-p image-dired-db-file) (insert-file-contents image-dired-db-file))] 3 (#$ . 13303)])) #@130 Return the current thumbnails directory (from variable `image-dired-dir'). Create the thumbnails directory if it does not exist. (defalias 'image-dired-dir #[nil "\301\302!!\303!\204 \304\305\"\210\306\307!\210)\207" [image-dired-dir file-name-as-directory expand-file-name file-directory-p make-directory t message "Creating thumbnails directory"] 3 (#$ . 13606)]) #@69 Insert image FILE of image TYPE, using RELIEF and MARGIN, at point. (defalias 'image-dired-insert-image #[(file type relief margin) "\305\306\307 \310\n\311\257 \312\f!)\207" [type file relief margin i image :type :file :relief :margin insert-image] 9 (#$ . 13984)]) #@65 Return the image descriptor for a thumbnail of image file FILE. (defalias 'image-dired-get-thumbnail-image #[(file) "\302\303 \"\204 \304\305\"\210\306!\307 !\203) \310\311\312!8!\310\311\312 !8!X\204. \313 \"\210\314 !)\207" [file thumb-file string-match image-file-name-regexp error "%s is not a valid image file" image-dired-thumb-name file-exists-p float-time 5 file-attributes image-dired-create-thumb create-image] 5 (#$ . 14260)]) #@98 Insert thumbnail image FILE. Add text properties ORIGINAL-FILE-NAME and ASSOCIATED-DIRED-BUFFER. (defalias 'image-dired-insert-thumbnail #[(file original-file-name associated-dired-buffer) "\306\211`\307\n\310=\203 \311\202 \312\f $\210`\313 \314\315\316\317\320\321!\322\323\324\325!\257\f#*\207" [end beg file image-dired-thumbnail-storage image-dired-thumb-relief image-dired-thumb-margin nil image-dired-insert-image standard png jpeg add-text-properties image-dired-thumbnail t original-file-name associated-dired-buffer tags image-dired-list-tags mouse-face highlight comment image-dired-get-comment] 16 (#$ . 14711)]) #@407 Return thumbnail file name for FILE. Depending on the value of `image-dired-thumbnail-storage', the file name will vary. For central thumbnail file storage, make a MD5-hash of the image file's directory name and add that to make the thumbnail file name unique. For per-directory storage, just add a subdirectory. For standard storage, produce the file name according to the Thumbnail Managing Standard. (defalias 'image-dired-thumb-name #[(file) "\304=\203 \305\306\307\310\305 !P!\311Q!\207\312=\203A \305 !\307\313\314\n!!!\315\316\313\305\317 !!\320\n!\203: \321P\202; \322\323\n!%*\207\324=\205X \305 !\315\325\314\n!\320\n!\323\n!$)\207" [image-dired-thumbnail-storage file f md5-hash standard expand-file-name "~/.thumbnails/normal/" md5 "file://" ".png" use-image-dired-dir file-name-as-directory file-name-directory format "%s%s%s.thumb.%s" image-dired-dir file-name-base "_" "" file-name-extension per-directory "%s.image-dired/%s.thumb.%s"] 7 (#$ . 15359)]) #@65 For ORIGINAL-FILE, create thumbnail image named THUMBNAIL-FILE. (defalias 'image-dired-create-thumb #[(original-file thumbnail-file) "\306!\306\n!\307\310\311\312\313\f!8!\"\314\315\316# \317!\320=\203( \"\202* #\321$B\322 B\323B\324 B\325\fB\326 B\327B\257\"%\330&\331\332!\211&!\204_ \333\334!\210\335&!\210\336'\330\211\211(%&.\207" [image-dired-thumb-width width image-dired-thumb-height height original-file modif-time int-to-string format "%.0f" float-time 5 file-attributes replace-regexp-in-string ".png\\'" "-nq8.png" format-spec standard 112 119 104 109 102 113 116 nil file-exists-p file-name-directory message "Creating thumbnail directory." make-directory call-process thumbnail-file thumbnail-nq8-file image-dired-thumbnail-storage image-dired-cmd-create-standard-thumbnail-command image-dired-cmd-create-thumbnail-options image-dired-cmd-create-thumbnail-program command thumbnail-dir shell-file-name shell-command-switch] 10 (#$ . 16345)]) #@294 Toggle thumbnails in front of file names in the dired buffer. If no marked file could be found, insert or hide thumbnails on the current line. ARG, if non-nil, specifies the files to use instead of the marked files. If ARG is an integer, use the next ARG (or previous -ARG, if ARG<0) files. (defalias 'image-dired-dired-toggle-marked-thumbs #[(&optional arg) "\306\307\211\211\f\203\301 \f\250\203' \310\f\311\"\210\f\312W\203\"