| Server IP : 217.160.0.212 / Your IP : 216.73.216.141 Web Server : Apache System : Linux www 6.18.51-i1-ampere #1196 SMP Fri Sep 11 20:43:55 CEST 2026 aarch64 User : sws1073854427 ( 1073854427) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/share/emacs/28.2/lisp/ |
Upload File : |
;ELC
;;; Compiled
;;; in Emacs version 28.2
;;; with all optimizations.
(byte-code "\300\301!\210\300\302!\210\303\304\305\306\307\310\311\312&\210\313\314\315\316\317DD\320\321\322%\210\313\323\315\316\324DD\325\321\326%\210\313\327\315\316\330DD\331\321\332%\210\313\333\315\316\334DD\335\321\332%\210\313\336\315\316\337DD\340\321\332%\210\313\341\315\316\342DD\343\321\326\307\344&\210\313\345\315\316\346DD\347\321\326%\210\313\350\315\316\351DD\352\321\332%\210\313\353\315\316\354DD\355\321\332%\210\313\356\315\316\357DD\360\321\361%\210\313\362\315\316\363DD\364\321\332%\210\313\365\315\316\366DD\367\321\322%\210\313\370\315\316\371DD\372\321\326%\207" [require dired cl-lib custom-declare-group thumbs nil "Thumbnails previewer." :version "22.1" :group multimedia custom-declare-variable thumbs-thumbsdir funcall function #[0 "\300\301!\207" [locate-user-emacs-file "thumbs"] 2 #1=""] "Directory to store thumbnails." :type directory thumbs-geometry #[0 "\300\207" ["100x100"] 1 #1#] "Size of thumbnails." string thumbs-per-line #[0 "\300\207" [4] 1 #1#] "Number of thumbnails per line to show in directory." integer thumbs-max-image-number #[0 "\300\207" [16] 1 #1#] "Maximum number of images initially displayed in thumbs buffer." thumbs-thumbsdir-max-size #[0 "\300\207" [50000000] 1 #1#] "Maximum size for thumbnails directory.\nWhen it reaches that size (in bytes), a warning is sent." thumbs-conversion-program #[0 "\301=\203 \302\207\303\207" [system-type windows-nt "convert.exe" "convert"] 2 #1#] "Name of conversion program for thumbnails generation.\nThis must be the ImageMagick \"convert\" utility." "28.1" thumbs-setroot-command #[0 "\300\207" ["xloadimage -onroot -fullscreen *"] 1 #1#] "Command to set the root window." thumbs-relief #[0 "\300\207" [5] 1 #1#] "Size of button-like border around thumbnails." thumbs-margin #[0 "\300\207" [2] 1 #1#] "Size of the margin around thumbnails.\nThis is where you see the cursor." thumbs-thumbsdir-auto-clean #[0 "\300\207" [t] 1 #1#] "If set, delete older file in the thumbnails directory.\nDeletion is done at load time when the directory size is bigger\nthan `thumbs-thumbsdir-max-size'." boolean thumbs-image-resizing-step #[0 "\300\207" [10] 1 #1#] "Step by which to resize image as a percentage." thumbs-temp-dir #[0 "\207" [temporary-file-directory] 1 #1#] "Temporary directory to use.\nDefaults to `temporary-file-directory'. Leaving it to\nthis value can let another user see some of your images." thumbs-temp-prefix #[0 "\300\207" ["emacsthumbs"] 1 #1#] "Prefix to add to temp files."] 8)
#@38 Temporary filename of current image.
(defvar thumbs-current-tmp-filename nil (#$ . 2587))
(make-variable-buffer-local 'thumbs-current-tmp-filename)
#@28 Filename of current image.
(defvar thumbs-current-image-filename nil (#$ . 2741))
(make-variable-buffer-local 'thumbs-current-image-filename)
#@52 Counter for showing extra images in thumbs buffer.
(defvar thumbs-extra-images 1 (#$ . 2889))
(byte-code "\300\301!\210\302\301\303\304#\207" [make-variable-buffer-local thumbs-extra-images put permanent-local t] 4)
#@24 Size of current image.
(defvar thumbs-current-image-size nil (#$ . 3111))
#@26 Number of current image.
(defvar thumbs-image-num nil (#$ . 3191))
(make-variable-buffer-local 'thumbs-image-num)
#@61 Name of buffer containing thumbnails associated with image.
(defvar thumbs-buffer nil (#$ . 3311))
(make-variable-buffer-local 'thumbs-buffer)
#@20 Current directory.
(defvar thumbs-current-dir nil (#$ . 3460))
#@23 List of marked files.
(defvar thumbs-marked-list nil (#$ . 3529))
(byte-code "\300\301!\210\302\301\303\304#\207" [make-variable-buffer-local thumbs-marked-list put permanent-local t] 4)
(defalias 'thumbs-temp-dir #[0 "\301\302!!\207" [thumbs-temp-dir file-name-as-directory expand-file-name] 3])
(byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put thumbs-temp-dir speed -1 put byte-optimizer byte-compile-inline-expand] 5)
#@50 Return a unique temporary filename for an image.
(defalias 'thumbs-temp-file #[0 "\302\303\304\305!! \306\307!$\207" [thumbs-temp-dir thumbs-temp-prefix format "%s%s-%s.jpg" file-name-as-directory expand-file-name cl-gensym "T"] 6 (#$ . 3974)])
#@122 Return the current thumbnails directory (from `thumbs-thumbsdir').
Create the thumbnails directory if it does not exist.
(defalias 'thumbs-thumbsdir #[0 "\301\302!!\303!\204 \304\305\"\210\306\307!\210)\207" [thumbs-thumbsdir file-name-as-directory expand-file-name file-directory-p make-directory t message "Creating thumbnails directory"] 3 (#$ . 4227)])
#@179 Clean the thumbnails directory.
If the total size of all files in `thumbs-thumbsdir' is bigger than
`thumbs-thumbsdir-max-size', files are deleted until the max size is
reached.
(defalias 'thumbs-cleanup-thumbsdir #[0 "\302!\205B \303\304\305\306\300 \307\310 #\"\311\"\312\313\304\314\"\"\211 V\205@ \315\316@AA@\"\210\317@AA@!\210\211@A@Z\262A\262\202 \266\202\207" [thumbs-thumbsdir thumbs-thumbsdir-max-size file-directory-p sort mapcar #[257 "\300!\211\3018\262\3028\262E\207" [file-attributes 4 7] 6 "\n\n(fn F)"] directory-files t image-file-name-regexp #[514 "\300@@\"\207" [time-less-p] 5 "\n\n(fn L1 L2)"] apply + #[257 "\211A@\207" [] 2 "\n\n(fn X)"] message "Deleting file %s" delete-file] 7 (#$ . 4597)])
(byte-code "\203 \301 \210\301\207" [thumbs-thumbsdir-auto-clean thumbs-cleanup-thumbsdir] 1)
#@441 Call the convert program.
FILEIN is the input file,
FILEOUT is the output file,
ACTION is the command to send to convert.
Optional arguments are:
ARG any arguments to the ACTION command,
OUTPUT-FORMAT is the file format to output (default is jpeg),
ACTION-PREFIX is the symbol to place before the ACTION command
(defaults to `-' but can sometimes be `+').
(fn FILEIN FILEOUT ACTION &optional ARG OUTPUT-FORMAT ACTION-PREFIX)
(defalias 'thumbs-call-convert #[1539 "\301\302\211\211\206\n \303 \206 \304
\305\306\f\206 \307#& \207" [thumbs-conversion-program call-process nil "-" "" format "%s:%s" "jpeg"] 19 (#$ . 5436)])
#@57 New image (a cons of width x height).
(fn S INCREMENT)
(defalias 'thumbs-new-image-size #[514 "\211_\301@@_\302\245\\!\301AA_\302\245\\!B\207" [thumbs-image-resizing-step round 100] 8 (#$ . 6089)])
#@180 Resize image in current buffer.
If SIZE is specified use it. Otherwise make the image larger or
smaller according to whether INCREMENT is 1 or -1.
(fn &optional INCREMENT SIZE)
(defalias 'thumbs-resize-image-1 #[512 "\304 \206 \305\n\"\306 \307 \210\310\206 \311\312@!\313\312A!Q$\210\212\314\315\316#\210)\211\211)\207" [buffer-read-only thumbs-current-tmp-filename thumbs-current-image-size thumbs-current-image-filename nil thumbs-new-image-size thumbs-temp-file erase-buffer thumbs-call-convert "sample" number-to-string "x" thumbs-insert-image jpeg 0] 13 (#$ . 6303)])
#@78 Resize image interactively to specified WIDTH and HEIGHT.
(fn WIDTH HEIGHT)
(defalias 'thumbs-resize-image #[514 "\300\301B\"\207" [thumbs-resize-image-1 nil] 6 (#$ . 6899) "nWidth: \nnHeight: "])
#@25 Resize image (smaller).
(defalias 'thumbs-shrink-image #[0 "\300\301!\207" [thumbs-resize-image-1 -1] 2 (#$ . 7105) nil])
#@24 Resize image (bigger).
(defalias 'thumbs-enlarge-image #[0 "\300\301!\207" [thumbs-resize-image-1 1] 2 (#$ . 7233) nil])
#@54 Return a thumbnail name for the image IMG.
(fn IMG)
(defalias 'thumbs-thumbname #[257 "\300\301!\302\303\304 \305!\306\307\310\311\312\313\n\314\"\"#$\262!\207" [convert-standard-filename expand-file-name format "%s%08x-%s.jpg" thumbs-thumbsdir sxhash subst-char-in-string 32 95 apply concat split-string "/"] 15 (#$ . 7360)])
#@41 Create the thumbnail for IMG.
(fn IMG)
(defalias 'thumbs-make-thumb #[257 "\301!\302!\303!\204 \304\305$\210\207" [thumbs-geometry expand-file-name thumbs-thumbname file-exists-p thumbs-call-convert "sample"] 8 (#$ . 7698)])
#@48 Return image type from filename IMG.
(fn IMG)
(defalias 'thumbs-image-type #[257 "\300\301\"\203 \302\207\300\303\"\203 \304\207\300\305\"\203 \306\207\300\307\"\203$ \310\207\300\311\"\203- \312\207\300\313\"\2036 \314\207\300\315\"\203? \316\207\300\317\"\205G \320\207" [string-match ".*\\.jpe?g\\'" jpeg ".*\\.xpm\\'" xpm ".*\\.xbm\\'" xbm ".*\\.pbm\\'" pbm ".*\\.gif\\'" gif ".*\\.bmp\\'" bmp ".*\\.png\\'" png ".*\\.tiff?\\'" tiff] 4 (#$ . 7937)])
#@12
(fn IMG)
(defalias 'thumbs-file-size #[257 "\300\301\302\303!\304FC!\305\"\306\307@!!\310\306\307A!!Q\207" [image-size find-image :type thumbs-image-type :file t number-to-string round "x"] 7 (#$ . 8409)])
#@42 Display the thumbnail for IMG.
(fn IMG)
(defalias 'thumbs-find-thumb #[257 "\300\301!!\207" [find-file thumbs-make-thumb] 4 (#$ . 8627) "f"])
#@230 Insert image IMG at point.
TYPE and RELIEF will be used in constructing the image; see `image'
in the emacs-lisp manual for further documentation.
If MARKED is non-nil, the image is marked.
(fn IMG TYPE RELIEF &optional MARKED)
(defalias 'thumbs-insert-image #[1027 "\302\303\304\305\306\205 \307\310\257\311!\210\312\301!\210\313\314\"\211\207" [thumbs-margin thumbs-current-image-size image :type :file :relief :conversion disabled :margin insert-image make-local-variable image-size t] 15 (#$ . 8778)])
#@110 Insert the thumbnail for IMG at point.
If MARKED is non-nil, the image is marked.
(fn IMG &optional MARKED)
(defalias 'thumbs-insert-thumb #[513 "\301\302!\303$\210\304`S`\305\306\307!\310BBBB#\207" [thumbs-relief thumbs-insert-image thumbs-make-thumb jpeg add-text-properties thumb-image-file help-echo file-name-nondirectory (rear-nonsticky help-echo)] 10 (#$ . 9305)])
#@54 Insert all thumbnails into thumbs buffer.
(fn LIST)
(defalias 'thumbs-do-thumbs-insertion #[257 "\304G\211 _Z\305\"\210\211\2032 \211@\306\211\n\235\"\210\307T\211\262\"\304U\203+ \310 \210A\266\202\202 \210o\204: \310 \210\211\304V\205C \311\312!\207" [thumbs-max-image-number thumbs-extra-images thumbs-marked-list thumbs-per-line 0 nbutlast thumbs-insert-thumb mod newline message "Type + to display more images."] 10 (#$ . 9690)])
#@39
(fn LIST &optional DIR SAME-WINDOW)
(defalias 'thumbs-show-thumbs-list #[769 "\304 \203 \305\306!\204 \307\310!\210\211\203 \311\202 \312\203\"