;ELC ;;; Compiled by cyd@localhost on Mon Apr 23 22:20:53 2007 ;;; from file /home/cyd/emacs/lisp/image-dired.el ;;; in Emacs version 22.0.99 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. (if (and (boundp 'emacs-version) (< (aref emacs-version (1- (length emacs-version))) ?A) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19.29"))) (error "`image-dired.el' was compiled for Emacs 19.29 or later")) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301!\210\300\302!\210\300\303!\210\304\305\306\307\310\311\312\313&\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] 8) #@46 Directory where thumbnail images are stored. (custom-declare-variable 'image-dired-dir '"~/.emacs.d/image-dired/" '(#$ . 835) :type 'string :group 'image-dired) #@554 How to store image-dired's thumbnail files. Image-Dired can store thumbnail files in one of two ways and this is controlled by this variable. "Use image-dired dir" means that the thumbnails are stored in a central directory. "Per directory" means that each thumbnail is stored in a subdirectory called ".image-dired" in the same directory where the image file is. "Thumbnail Managing Standard" means that the thumbnails are stored and generated according to the Thumbnail Managing Standard that allows sharing of thumbnails across different programs. (custom-declare-variable 'image-dired-thumbnail-storage ''use-image-dired-dir '(#$ . 1003) :type '(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)) :group 'image-dired) #@70 Database file where file names and their associated tags are stored. (custom-declare-variable 'image-dired-db-file '"~/.emacs.d/image-dired/.image-dired_db" '(#$ . 1876) :type 'string :group 'image-dired) #@56 Name of temporary image file used by various commands. (custom-declare-variable 'image-dired-temp-image-file '"~/.emacs.d/image-dired/.image-dired_temp" '(#$ . 2087) :type 'string :group 'image-dired) #@163 Directory to store generated gallery html pages. This path needs to be "shared" to the public so that it can access the index.html page that image-dired creates. (custom-declare-variable 'image-dired-gallery-dir '"~/.emacs.d/image-dired/.image-dired_gallery" '(#$ . 2295) :type 'string :group 'image-dired) #@167 URL where the full size images are to be found. Note that this path has to be configured in your web server. Image-Dired expects to find pictures in this directory. (custom-declare-variable 'image-dired-gallery-image-root-url '"http://your.own.server/image-diredpics" '(#$ . 2609) :type 'string :group 'image-dired) #@167 URL where the thumbnail images are to be found. Note that this path has to be configured in your web server. Image-Dired expects to find pictures in this directory. (custom-declare-variable 'image-dired-gallery-thumb-image-root-url '"http://your.own.server/image-diredthumbs" '(#$ . 2933) :type 'string :group 'image-dired) #@101 Executable used to create thumbnail. Used together with `image-dired-cmd-create-thumbnail-options'. (custom-declare-variable 'image-dired-cmd-create-thumbnail-program '"convert" '(#$ . 3265) :type 'string :group 'image-dired) #@369 Format of command used to create thumbnail image. Available options are %p which is replaced by `image-dired-cmd-create-thumbnail-program', %w which is replaced by `image-dired-thumb-width', %h which is replaced by `image-dired-thumb-height', %f which is replaced by the file name of the original image and %t which is replaced by the file name of the thumbnail file. (custom-declare-variable 'image-dired-cmd-create-thumbnail-options '"%p -size %wx%h \"%f\" -resize %wx%h +profile \"*\" jpeg:\"%t\"" '(#$ . 3498) :type 'string :group 'image-dired) #@108 Executable used to create temporary image. Used together with `image-dired-cmd-create-temp-image-options'. (custom-declare-variable 'image-dired-cmd-create-temp-image-program '"convert" '(#$ . 4054) :type 'string :group 'image-dired) #@391 Format of command used to create temporary image for display window. Available options are %p which is replaced by `image-dired-cmd-create-temp-image-program', %w and %h which is replaced by the calculated max size for width and height in the image display window, %f which is replaced by the file name of the original image and %t which is replaced by the file name of the temporary file. (custom-declare-variable 'image-dired-cmd-create-temp-image-options '"%p -size %wx%h \"%f\" -resize %wx%h +profile \"*\" jpeg:\"%t\"" '(#$ . 4295) :type 'string :group 'image-dired) #@93 The file name of the `pngnq' program. It quantizes colors of PNG images down to 256 colors. (custom-declare-variable 'image-dired-cmd-pngnq-program '(executable-find "pngnq") '(#$ . 4873) :type '(choice (const :tag "Not Set" nil) string) :group 'image-dired) #@185 The file name of the `pngcrush' program. It optimizes the compression of PNG images. Also it adds PNG textual chunks with the information required by the Thumbnail Managing Standard. (custom-declare-variable 'image-dired-cmd-pngcrush-program '(executable-find "pngcrush") '(#$ . 5139) :type '(choice (const :tag "Not Set" nil) string) :group 'image-dired) #@76 Command to create thumbnails according to the Thumbnail Managing Standard. (custom-declare-variable '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"))) '(#$ . 5502) :type 'string :group 'image-dired) #@101 Executable used to rotate thumbnail. Used together with `image-dired-cmd-rotate-thumbnail-options'. (custom-declare-variable 'image-dired-cmd-rotate-thumbnail-program '"mogrify" '(#$ . 6560) :type 'string :group 'image-dired) #@332 Format of command used to rotate thumbnail image. Available options are %p which is replaced by `image-dired-cmd-rotate-thumbnail-program', %d which is replaced by the number of (positive) degrees to rotate the image, normally 90 or 270 (for 90 degrees right and left), %t which is replaced by the file name of the thumbnail file. (custom-declare-variable 'image-dired-cmd-rotate-thumbnail-options '"%p -rotate %d \"%t\"" '(#$ . 6793) :type 'string :group 'image-dired) #@105 Executable used to rotate original image. Used together with `image-dired-cmd-rotate-original-options'. (custom-declare-variable 'image-dired-cmd-rotate-original-program '"jpegtran" '(#$ . 7270) :type 'string :group 'image-dired) #@381 Format of command used to rotate original image. Available options are %p which is replaced by `image-dired-cmd-rotate-original-program', %d which is replaced by the number of (positive) degrees to rotate the image, normally 90 or 270 (for 90 degrees right and left), %o which is replaced by the original image file name and %t which is replaced by `image-dired-temp-image-file'. (custom-declare-variable 'image-dired-cmd-rotate-original-options '"%p -rotate %d -copy all -outfile %t \"%o\"" '(#$ . 7507) :type 'string :group 'image-dired) #@39 Temporary file for rotate operations. (custom-declare-variable 'image-dired-temp-rotate-image-file '"~/.emacs.d/image-dired/.image-dired_rotate_temp" '(#$ . 8053) :type 'string :group 'image-dired) #@178 Confirm overwrite of original file after rotate operation. If non-nil, ask user for confirmation before overwriting the original file with `image-dired-temp-rotate-image-file'. (custom-declare-variable 'image-dired-rotate-original-ask-before-overwrite 't '(#$ . 8258) :type 'boolean :group 'image-dired) #@105 Program used to write EXIF data to image. Used together with `image-dired-cmd-write-exif-data-options'. (custom-declare-variable 'image-dired-cmd-write-exif-data-program '"exiftool" '(#$ . 8569) :type 'string :group 'image-dired) #@258 Format of command used to write EXIF data. Available options are %p which is replaced by `image-dired-cmd-write-exif-data-program', %f which is replaced by the image file name, %t which is replaced by the tag name and %v which is replaced by the tag value. (custom-declare-variable 'image-dired-cmd-write-exif-data-options '"%p -%t=\"%v\" \"%f\"" '(#$ . 8806) :type 'string :group 'image-dired) #@111 Program used to read EXIF data to image. Used together with `image-dired-cmd-read-exif-data-program-options'. (custom-declare-variable 'image-dired-cmd-read-exif-data-program '"exiftool" '(#$ . 9208) :type 'string :group 'image-dired) #@218 Format of command used to read EXIF data. Available options are %p which is replaced by `image-dired-cmd-write-exif-data-options', %f which is replaced by the image file name and %t which is replaced by the tag name. (custom-declare-variable 'image-dired-cmd-read-exif-data-options '"%p -s -s -s -%t \"%f\"" '(#$ . 9450) :type 'string :group 'image-dired) #@93 List of "hidden" tags. Used by `image-dired-gallery-generate' to leave out "hidden" images. (custom-declare-variable 'image-dired-gallery-hidden-tags '(list "private" "hidden" "pending") '(#$ . 9812) :type '(repeat string) :group 'image-dired) #@124 Size of thumbnails, in pixels. This is the default size for both `image-dired-thumb-width' and `image-dired-thumb-height'. (custom-declare-variable 'image-dired-thumb-size '(if (eq 'standard image-dired-thumbnail-storage) 128 100) '(#$ . 10063) :type 'integer :group 'image-dired) #@33 Width of thumbnails, in pixels. (custom-declare-variable 'image-dired-thumb-width 'image-dired-thumb-size '(#$ . 10350) :type 'integer :group 'image-dired) #@34 Height of thumbnails, in pixels. (custom-declare-variable 'image-dired-thumb-height 'image-dired-thumb-size '(#$ . 10512) :type 'integer :group 'image-dired) #@47 Size of button-like border around thumbnails. (custom-declare-variable 'image-dired-thumb-relief '2 '(#$ . 10676) :type 'integer :group 'image-dired) #@73 Size of the margin around thumbnails. This is where you see the cursor. (custom-declare-variable 'image-dired-thumb-margin '2 '(#$ . 10832) :type 'integer :group 'image-dired) #@389 Default method for line-up of thumbnails in thumbnail buffer. Used by `image-dired-display-thumbs' and other functions that needs to line-up thumbnails. Dynamic means to use the available width of the window containing the thumbnail buffer, Fixed means to use `image-dired-thumbs-per-row', Interactive is for asking the user, and No line-up means that no automatic line-up will be done. (custom-declare-variable 'image-dired-line-up-method ''dynamic '(#$ . 11015) :type '(choice :tag "Default line-up method" (const :tag "Dynamic" dynamic) (const :tag "Fixed" fixed) (const :tag "Interactive" interactive) (const :tag "No line-up" none)) :group 'image-dired) #@58 Number of thumbnails to display per row in thumb buffer. (custom-declare-variable 'image-dired-thumbs-per-row '3 '(#$ . 11681) :type 'integer :group 'image-dired) #@143 Number to be used to correct image display window width. Change if the default (1) does not work (i.e. if the image does not completely fit). (custom-declare-variable 'image-dired-display-window-width-correction '1 '(#$ . 11851) :type 'integer :group 'image-dired) #@144 Number to be used to correct image display window height. Change if the default (0) does not work (i.e. if the image does not completely fit). (custom-declare-variable 'image-dired-display-window-height-correction '0 '(#$ . 12123) :type 'integer :group 'image-dired) #@138 The current state of the tracking and mirroring. For more information, see the documentation for `image-dired-toggle-movement-tracking'. (custom-declare-variable 'image-dired-track-movement 't '(#$ . 12397) :type 'boolean :group 'image-dired) #@467 Append thumbnails in thumbnail buffer when browsing. If non-nil, using `image-dired-next-line-and-display' and `image-dired-previous-line-and-display' will leave a trail of thumbnail images in the thumbnail buffer. If you enable this and want to clean the thumbnail buffer because it is filled with too many thumbmnails, just call `image-dired-display-thumb' to display only the image at point. This value can be toggled using `image-dired-toggle-append-browsing'. (custom-declare-variable 'image-dired-append-when-browsing 'nil '(#$ . 12647) :type 'boolean :group 'image-dired) #@297 If non-nil, display properties for dired file when browsing. Used by `image-dired-next-line-and-display', `image-dired-previous-line-and-display' and `image-dired-mark-and-display-next'. If the database file is large, this can slow down image browsing in dired and you might want to turn it off. (custom-declare-variable 'image-dired-dired-disp-props 't '(#$ . 13234) :type 'boolean :group 'image-dired) #@199 Display format for thumbnail properties. %b is replaced with associated dired buffer name, %f with file name (without path) of original image file, %t with the list of tags and %c with the comment. (custom-declare-variable 'image-dired-display-properties-format '"%b: %f (%t): %c" '(#$ . 13645) :type 'string :group 'image-dired) #@120 Name of external viewer. Including parameters. Used when displaying original image from `image-dired-thumbnail-mode'. (custom-declare-variable 'image-dired-external-viewer '(cond ((executable-find "display")) ((executable-find "xli")) ((executable-find "qiv") "qiv -t")) '(#$ . 13982) :type 'string :group 'image-dired) #@87 Name of main image directory, if any. Used by `image-dired-copy-with-exif-file-name'. (custom-declare-variable 'image-dired-main-image-directory '"~/pics/" '(#$ . 14309) :type 'string :group 'image-dired) #@97 Maximum number of files to show using `image-dired-show-all-from-dir'. before warning the user. (custom-declare-variable 'image-dired-show-all-from-dir-max-files '50 '(#$ . 14520) :type 'integer :group 'image-dired) #@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 (#$ . 14743)]) #@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 (#$ . 15121)]) #@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 (#$ . 15397)]) #@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 (#$ . 15848)]) #@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=\203C\305 !\307\313\314\n!!!\315\316\313\305\317 !!\320\321\n!! \203<\322 P\202=\323\324\n!%*\207\325=\205\\\305 !\315\326\314\n!\320\321\n!!\324\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-sans-extension file-name-nondirectory "_" "" file-name-extension per-directory "%s.image-dired/%s.thumb.%s"] 7 (#$ . 16496)]) #@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\323 B\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 (#$ . 17526)]) #@74 Insert thumbnails before file names of marked files in the dired buffer. (defalias 'image-dired-dired-insert-marked-thumbs #[nil "\306\211\211\211\307 \306\212eb\210\310 \306\311#\205\312 \211??\f\203\211\fb\210\313 \314 \315!\306\316\306\317\320\321``T\"\"\"?\205k\322\"\210\316\306\317\323\321``T\"\"\"@\324\325#\210\324\326#,B\fb\210\327y\210\f\306\211\223\210\310 \306\311#\205\204\312 \211\204$) \203\223\210\202\330\313 \314 \315!\306\316\306\317\330\321``T\"\"\"\204\327\322\"\210\316\306\317\331\321``T\"\"\"@\324\325#\210\324\326#\210,.\313 \210\332\333\334\306\311$\207" [results found case-fold-search buffer-read-only next-position regexp nil dired-marker-regexp re-search-forward t point-marker dired-move-to-filename dired-get-filename image-dired-get-thumbnail-image delq mapcar #[#1=(o) "\301\302\"\207" [o overlay-get put-image] 3] overlays-in put-image #[#2=(o) "\301\302\"\205\207" [o overlay-get put-image] 3] overlay-put image-file thumb-file 1 #[#1# "\301\302\"\207" [o overlay-get put-image] 3] #[#2# "\301\302\"\205\207" [o overlay-get put-image] 3] add-hook dired-after-readin-hook image-dired-dired-after-readin-hook image-pos overlay] 8 (#$ . 18515) nil]) #@163 Relocate existing thumbnail overlays in dired buffer after reverting. Move them to their corresponding files if they are still exist. Otherwise, delete overlays. (defalias 'image-dired-dired-after-readin-hook #[nil "\300\301\302ed\"\"\207" [mapc #[(overlay) "\303\304\"\205 \303\301\"\305 !\211\203\306\n\211#\202\307!*\207" [overlay image-file image-pos overlay-get put-image dired-goto-file move-overlay delete-overlay] 5] overlays-in] 5 (#$ . 19785)]) #@54 Move to next dired line and display thumbnail image. (defalias 'image-dired-next-line-and-display #[nil "\302\303!\210\304\305\305#\210 \205\306 \207" [image-dired-append-when-browsing image-dired-dired-disp-props dired-next-line 1 image-dired-display-thumbs t image-dired-dired-display-properties] 4 (#$ . 20257) nil]) #@58 Move to previous dired line and display thumbnail image. (defalias 'image-dired-previous-line-and-display #[nil "\302\303!\210\304\305\305#\210 \205\306 \207" [image-dired-append-when-browsing image-dired-dired-disp-props dired-previous-line 1 image-dired-display-thumbs t image-dired-dired-display-properties] 4 (#$ . 20586) nil]) #@44 Toggle `image-dired-append-when-browsing'. (defalias 'image-dired-toggle-append-browsing #[nil "?\301\302\203 \303\202\304\"\207" [image-dired-append-when-browsing message "Append browsing %s." "on" "off"] 3 (#$ . 20927) nil]) #@62 Mark current file in dired and display next thumbnail image. (defalias 'image-dired-mark-and-display-next #[nil "\302\303!\210\304\305\305#\210 \205\306 \207" [image-dired-append-when-browsing image-dired-dired-disp-props dired-mark 1 image-dired-display-thumbs t image-dired-dired-display-properties] 4 (#$ . 21166) nil]) #@40 Toggle `image-dired-dired-disp-props'. (defalias 'image-dired-toggle-dired-display-properties #[nil "?\301\302\203 \303\202\304\"\207" [image-dired-dired-disp-props message "Dired display properties %s." "on" "off"] 3 (#$ . 21498) nil]) #@33 Image-Dired's thumbnail buffer. (defvar image-dired-thumbnail-buffer "*image-dired*" (#$ . 21747)) #@59 Create thumb buffer and set `image-dired-thumbnail-mode'. (defalias 'image-dired-create-thumbnail-buffer #[nil "\304!r q\210\305 \306=\204\306 \210) )\207" [image-dired-thumbnail-buffer buf buffer-read-only major-mode get-buffer-create t image-dired-thumbnail-mode] 2 (#$ . 21852)]) #@50 Where larger versions of the images are display. (defvar image-dired-display-image-buffer "*image-dired-display-image*" (#$ . 22146)) #@71 Create image display buffer and set `image-dired-display-image-mode'. (defalias 'image-dired-create-display-image-buffer #[nil "\304!r q\210\305 \306=\204\306 \210) )\207" [image-dired-display-image-buffer buf buffer-read-only major-mode get-buffer-create t image-dired-display-image-mode] 2 (#$ . 22286)]) #@29 Saved window configuration. (defvar image-dired-saved-window-configuration nil (#$ . 22604)) #@527 Open directory DIR and create a default window configuration. Convenience command that: - Opens dired in folder DIR - Splits windows in most useful (?) way - Set `truncate-lines' to t After the command has finished, you would typically mark some image files in dired and type \[image-dired-display-thumbs] (`image-dired-display-thumbs'). If called with prefix argument ARG, skip splitting of windows. The current window configuration is saved and can be restored by calling `image-dired-restore-window-configuration'. (defalias 'image-dired-dired-with-window-configuration #[(dir &optional arg) "\306 \307 \310 \311 !\210\312 \210\f?\2052\313 \210\314\212\315\316!\210\317 !\210\320 \210\315\316!\210\317!\210\315\321!)*\207" [buf2 buf image-dired-saved-window-configuration dir arg truncate-lines image-dired-create-thumbnail-buffer image-dired-create-display-image-buffer current-window-configuration dired delete-other-windows split-window-horizontally t other-window 1 switch-to-buffer split-window-vertically -2] 2 (#$ . 22704) "DDirectory: \nP"]) #@142 Restore window configuration. Restore any changes to the window configuration made by calling `image-dired-dired-with-window-configuration'. (defalias 'image-dired-restore-window-configuration #[nil "\203\301!\207\302\303!\207" [image-dired-saved-window-configuration set-window-configuration message "No saved window configuration"] 2 (#$ . 23778) nil]) #@888 Display thumbnails of all marked files, in `image-dired-thumbnail-buffer'. If a thumbnail image does not exist for a file, it is created on the fly. With prefix argument ARG, display only thumbnail for file at point (this is useful if you have marked some files but want to show another one). Recommended usage is to split the current frame horizontally so that you have the dired buffer in the left window and the `image-dired-thumbnail-buffer' buffer in the right window. With optional argument APPEND, append thumbnail to thumbnail buffer instead of erasing it first. Option argument DO-NOT-POP controls if `pop-to-buffer' should be used or not. If non-nil, use `display-buffer' instead of `pop-to-buffer'. This is used from functions like `image-dired-next-line-and-display' and `image-dired-previous-line-and-display' where we do not want the thumbnail buffer to be selected. (defalias 'image-dired-display-thumbs #[(&optional arg append do-not-pop) "\306 \307\211\211\211\211\211\203\310 C\202\311 prq\210\312\2044\313 \210\2027db\210\314\315 \"\210)\316=\203J\317 \210\202n\320=\203W\321 \210\202n\322=\203d\323 \210\202n\324=\204n\317 \210)\203{\325!\202\326!.\207" [beg dired-buf count files thumb-name curr-file image-dired-create-thumbnail-buffer nil dired-get-filename dired-get-marked-files t erase-buffer mapcar #[(curr-file) "\303!\304 !\204\305 \"\306U\204\307\310\"\207\311 \n#\207" [curr-file thumb-name dired-buf image-dired-thumb-name file-exists-p image-dired-create-thumb 0 message "Thumb could not be created for file %s" image-dired-insert-thumbnail] 4] dynamic image-dired-line-up-dynamic fixed image-dired-line-up interactive image-dired-line-up-interactive none display-buffer pop-to-buffer buf arg inhibit-read-only append image-dired-line-up-method do-not-pop image-dired-thumbnail-buffer] 7 (#$ . 24144) "P"]) #@205 Make a preview buffer for all images in DIR and display it. If the number of files in DIR matching `image-file-name-regexp' exceeds `image-dired-show-all-from-dir-max-files', a warning will be displayed. (defalias 'image-dired-show-all-from-dir #[(dir) "\304!\210\305\306 !\210\307 \211G\nX\204# G\nV\203,\310\311\312\n\"!\203,\313 \210\314 !\202/\315\316!)\207" [dir files image-dired-show-all-from-dir-max-files image-dired-thumbnail-buffer dired dired-mark-files-regexp image-file-name-regexp dired-get-marked-files y-or-n-p format "Directory contains more than %d image files. Proceed? " image-dired-display-thumbs pop-to-buffer message "Cancelled."] 5 (#$ . 26056) "DDir: "]) (byte-code "\300\301\302\"\210\300\303\302\"\207" [defalias image-dired image-dired-show-all-from-dir tumme] 3) #@151 Write file tags to database. Write each file and tag in FILE-TAGS to the database. FILE-TAGS is an alist in the following form: ((FILE . TAG) ... ) (defalias 'image-dired-write-tags #[(file-tags) "\306\211\211 \307\310\311!!\312\216r\fq\210\313 !\210\306\211\203l@\211@Aeb\210\314\315\316 \"\306\317#\203Y`\320 \210\321\315\322\"\n\317#\204c\306\210\315\322\"c\210\202cdb\210\315\323 #c\210A\211\204#+\306r\fq\210~\210\324ed \306\325%\210.\207" [tag file end image-dired-db-file #1=#:temp-buffer #2=#:temp-file nil get-buffer-create generate-new-buffer-name " *temp file*" ((byte-code "\301!\203\n\302!\210\301\207" [#1# buffer-name kill-buffer] 2)) insert-file-contents search-forward-regexp format "^%s.*$" t beginning-of-line search-forward ";%s" "\n%s;%s" write-region 0 file-tags elt #3=#:--cl-dolist-temp--] 7 (#$ . 26863)]) #@52 For all FILES, remove TAG from the image database. (defalias 'image-dired-remove-tag #[(files tag) "\212\305\211\211\306 !\f<\204\f;\203\fC\202\307\310!\210\311\312\f\"\210\313 \210\314 !,\207" [start buf end image-dired-db-file files nil find-file error "Files must be a string or a list of strings!" mapcar #[(file) "eb\210\303\304\305\"\306\307#\205I\306\210`\310 \210\303\304\311\n\" \307#\205I\312\224\312\225|\210\306\210`\310 \210\313\314 \307#?\205I\315\312!\210m\205I\316\317!\205I\320\312!\207" [file end tag search-forward-regexp format "^%s" nil t beginning-of-line "\\(;%s\\)" 1 search-forward ";" kill-line looking-at "^$" delete-backward-char] 4] save-buffer kill-buffer] 3 (#$ . 27739)]) #@55 Read all tags for image FILE from the image database. (defalias 'image-dired-list-tags #[(file) "\212\305\211\306\307 !eb\210\310\311\312\f\"\305\313#\203D\305\210`\314 \210\315\316\n\313#\203D\315\317\n\313#\203@\315\316\n\313#\203D`\n{\202D`\n{\320 !\210\321\316\",\207" [tags buf end image-dired-db-file file nil "" find-file search-forward-regexp format "^%s" t beginning-of-line search-forward ";" "comment:" kill-buffer split-string] 4 (#$ . 28470)]) #@67 Tag marked file(s) in dired. With prefix ARG, tag file at point. (defalias 'image-dired-tag-files #[(arg) "\304\305!\306\211 \203\307 C\202\310 \311\312\313\"!+\207" [files curr-file tag arg read-string "Tags to add (separate tags with a semicolon): " nil dired-get-filename dired-get-marked-files image-dired-write-tags mapcar #[(x) " B\207" [x tag] 2]] 4 (#$ . 28947) "P"]) #@24 Tag current thumbnail. (defalias 'image-dired-tag-thumbnail #[nil "\301\302!\303\304 BC!\210)\305\306\307\304 !\"\207" [tag read-string "Tags to add (separate tags with a semicolon): " image-dired-write-tags image-dired-original-file-name image-dired-update-property tags image-dired-list-tags] 4 (#$ . 29341) nil]) #@91 Remove tag for selected file(s). With prefix argument ARG, remove tag from file at point. (defalias 'image-dired-delete-tag #[(arg) "\303\304!\305\n\203\306 C\202\307 \310 \"*\207" [files tag arg read-string "Tag to remove: " nil dired-get-filename dired-get-marked-files image-dired-remove-tag] 3 (#$ . 29665) "P"]) #@28 Remove tag from thumbnail. (defalias 'image-dired-tag-thumbnail-remove #[nil "\301\302!\303\304 \"\210)\305\306\307\304 !\"\207" [tag read-string "Tag to remove: " image-dired-remove-tag image-dired-original-file-name image-dired-update-property tags image-dired-list-tags] 4 (#$ . 29997) nil]) #@65 Get original file name for thumbnail or display image at point. (defalias 'image-dired-original-file-name #[nil "\300`\301\"\207" [get-text-property original-file-name] 3 (#$ . 30300)]) #@39 Get associated dired buffer at point. (defalias 'image-dired-associated-dired-buffer #[nil "\300`\301\"\207" [get-text-property associated-dired-buffer] 3 (#$ . 30492)]) #@36 Return window where buffer BUF is. (defalias 'image-dired-get-buffer-window #[(buf) "\300\301\302\303#\207" [get-window-with-predicate #[(window) "\302! \232\207" [window buf window-buffer] 2] nil t] 4 (#$ . 30668)]) #@188 Track the original file in the associated dired buffer. See documentation for `image-dired-toggle-movement-tracking'. Interactive use only useful if `image-dired-track-movement' is nil. (defalias 'image-dired-track-original-file #[nil "p\303 \304 \305 !\2057\2057\306! q\210eb\210\307\310\311#\204+\312\313!\210\2025\314 \210\315\316 !`\"\210\nq+\207" [file-name dired-buf old-buf image-dired-associated-dired-buffer image-dired-original-file-name buffer-live-p file-name-nondirectory search-forward nil t message "Could not track file" dired-move-to-filename set-window-point image-dired-get-buffer-window] 4 (#$ . 30893) nil]) #@275 Turn on and off `image-dired-track-movement'. Tracking of the movements between thumbnail and dired buffer so that they are "mirrored" in the dired buffer. When this is on, moving around in the thumbnail or dired buffer will find the matching position in the other buffer. (defalias 'image-dired-toggle-movement-tracking #[nil "?\301\302\203 \303\202\304\"\207" [image-dired-track-movement message "Tracking %s" "on" "off"] 3 (#$ . 31541) nil]) #@167 Track current dired file's thumb in `image-dired-thumbnail-buffer'. This is almost the same as what `image-dired-track-original-file' does, but the other way around. (defalias 'image-dired-track-thumbnail #[nil "\305 p\306\211\307\f!\205G\fq\210eb\210m\2048\2048\310`\311\"\211\203. \230\203.\312\204\313u\210\202\203E\314\315 `\"\210\316 \210\nq,\207" [found prop-val old-buf file image-dired-thumbnail-buffer dired-get-filename nil get-buffer get-text-property original-file-name t 1 set-window-point image-dired-thumbnail-window image-dired-display-thumb-properties] 4 (#$ . 32000)]) #@129 Call `dired-next-line', then track thumbnail. This can safely replace `dired-next-line'. With prefix argument, move ARG lines. (defalias 'image-dired-dired-next-line #[(&optional arg) "\302\206\303!\210 \205\304 \207" [arg image-dired-track-movement dired-next-line 1 image-dired-track-thumbnail] 2 (#$ . 32614) "P"]) #@137 Call `dired-previous-line', then track thumbnail. This can safely replace `dired-previous-line'. With prefix argument, move ARG lines. (defalias 'image-dired-dired-previous-line #[(&optional arg) "\302\206\303!\210 \205\304 \207" [arg image-dired-track-movement dired-previous-line 1 image-dired-track-thumbnail] 2 (#$ . 32945) "P"]) #@116 Move to next image and display properties. Optional prefix ARG says how many images to move; default is one image. (defalias 'image-dired-forward-image #[(&optional arg) "\306\206\307 \310 \fW\203Bm\2047\212\306u\210m\204)\311 \204)\306u\210\202`\311 )\2037\nb\210\202;\312\313!\210 T\211\202 , \203J\314 \210\315 \207" [arg steps pos i #1=#:--cl-dotimes-temp-- image-dired-track-movement nil 1 0 image-dired-image-at-point-p error "At last image" image-dired-track-original-file image-dired-display-thumb-properties] 3 (#$ . 33292) "p"]) #@120 Move to previous image and display properties. Optional prefix ARG says how many images to move; default is one image. (defalias 'image-dired-backward-image #[(&optional arg) "\306\206\307 \310 \fW\203Bo\2047\212\311u\210o\204)\312 \204)\311u\210\202`\312 )\2037\nb\210\202;\313\314!\210 T\211\202 , \203J\315 \210\316 \207" [arg steps pos i #1=#:--cl-dotimes-temp-- image-dired-track-movement nil 1 0 -1 image-dired-image-at-point-p error "At first image" image-dired-track-original-file image-dired-display-thumb-properties] 3 (#$ . 33857) "p"]) #@43 Move to next line and display properties. (defalias 'image-dired-next-line #[nil "\301\302!\210\303 \204\f\304 \210\203\305 \210\306 \207" [image-dired-track-movement next-line 1 image-dired-image-at-point-p image-dired-backward-image image-dired-track-original-file image-dired-display-thumb-properties] 2 (#$ . 34430) nil]) #@47 Move to previous line and display properties. (defalias 'image-dired-previous-line #[nil "\301\302!\210\303 \204\f\304 \210\203\305 \210\306 \207" [image-dired-track-movement previous-line 1 image-dired-image-at-point-p image-dired-backward-image image-dired-track-original-file image-dired-display-thumb-properties] 2 (#$ . 34766) nil]) #@168 Format display properties. BUF is the associated dired buffer, FILE is the original image file name, PROPS is a list of tags and COMMENT is the image files's comment. (defalias 'image-dired-format-properties-string #[(buf file props comment) "\305\306 \206\307B\310\nB\311\312 !\206\307B\313\f\206\307BF\"\207" [image-dired-display-properties-format buf file props comment format-spec 98 "" 102 116 princ 99] 7 (#$ . 35115)]) #@48 Display thumbnail properties in the echo area. (defalias 'image-dired-display-thumb-properties #[nil "m?\205*\304\305 !\306\307 !\310\311\312`\313\"\314#\312`\300\"\211\205)\315\316\n $!,\207" [comment props dired-buf file-name file-name-nondirectory image-dired-original-file-name buffer-name image-dired-associated-dired-buffer mapconcat princ get-text-property tags ", " message image-dired-format-properties-string] 8 (#$ . 35554)]) #@54 Check whether file on current line is marked or not. (defalias 'image-dired-dired-file-marked-p #[nil "\212\300 \210\301\302!)?\207" [beginning-of-line looking-at "^ .*$"] 2 (#$ . 36005)]) #@238 Modify mark in dired buffer. This is quite ugly but I don't know how to implemented in a better way. COMMAND is one of 'mark for marking file in dired, 'unmark for unmarking file in dired or 'flag for flagging file for delete in dired. (defalias 'image-dired-modify-mark-on-thumb-original-file #[(command) "\303 \304 \203 \204\305\306!\202drq\210\305 !\210\307 !eb\210\310 \311\312#\205c\n\313=\2037\314\315!\202c\n\316=\203C\317\315!\202c\n\320=\203Z\321 \203T\317\315!\202c\314\315!\202c\n\322=\205c\323\315!)*\207" [dired-buf file-name command image-dired-original-file-name image-dired-associated-dired-buffer message "No image, or image with correct properties, at point." file-name-nondirectory search-forward nil t mark dired-mark 1 unmark dired-unmark toggle image-dired-dired-file-marked-p flag dired-flag-file-deletion] 4 (#$ . 36201)]) #@54 Mark original image file in associated dired buffer. (defalias 'image-dired-mark-thumb-original-file #[nil "\300\301!\210\302 \207" [image-dired-modify-mark-on-thumb-original-file mark image-dired-forward-image] 2 (#$ . 37075) nil]) #@56 Unmark original image file in associated dired buffer. (defalias 'image-dired-unmark-thumb-original-file #[nil "\300\301!\210\302 \207" [image-dired-modify-mark-on-thumb-original-file unmark image-dired-forward-image] 2 (#$ . 37314) nil]) #@67 Flag original image file for deletion in associated dired buffer. (defalias 'image-dired-flag-thumb-original-file #[nil "\300\301!\210\302 \207" [image-dired-modify-mark-on-thumb-original-file flag image-dired-forward-image] 2 (#$ . 37559) nil]) #@64 Toggle mark on original image file in associated dired buffer. (defalias 'image-dired-toggle-mark-thumb-original-file #[nil "\300\301!\207" [image-dired-modify-mark-on-thumb-original-file toggle] 2 (#$ . 37811) nil]) #@145 Jump to the dired buffer associated with the current image file. You probably want to use this together with `image-dired-track-original-file'. (defalias 'image-dired-jump-original-dired-buffer #[nil "\303 \304\211\305\n!\211\203$\306 \307 !\211\232\204\310!\210\311 !\202'\312\313!+\207" [frame window buf image-dired-associated-dired-buffer nil image-dired-get-buffer-window selected-frame window-frame select-frame-set-input-focus select-window message "Associated dired buffer not visible"] 4 (#$ . 38035) nil]) #@27 Jump to thumbnail buffer. (defalias 'image-dired-jump-thumbnail-buffer #[nil "\302 \303\211\203\304 \305 !\211\232\204\306!\210\307 !\202!\310\311!*\207" [frame window image-dired-thumbnail-window nil selected-frame window-frame select-frame-set-input-focus select-window message "Thumbnail buffer not visible"] 4 (#$ . 38567) nil]) #@42 Keymap for `image-dired-thumbnail-mode'. (defvar image-dired-thumbnail-mode-map (make-sparse-keymap) (#$ . 38915)) #@62 Keymap for line-up commands in `image-dired-thumbnail-mode'. (defvar image-dired-thumbnail-mode-line-up-map (make-sparse-keymap) (#$ . 39036)) #@58 Keymap for tag commands in `image-dired-thumbnail-mode'. (defvar image-dired-thumbnail-mode-tag-map (make-sparse-keymap) (#$ . 39185)) #@49 Define keymap for `image-dired-thumbnail-mode'. (defalias 'image-dired-define-thumbnail-mode-keymap #[nil "\303\304\305#\210\303\306\307#\210\303\310\311#\210\303\312\313#\210\303\314\305#\210\303\315\307#\210\303\316\311#\210\303\317\313#\210\303\320\321#\210\303\322\321#\210\303\323\324#\210\303\325\326#\210\303\327\330#\210\303\331\332#\210\303\333 #\210\303 \333\334#\210\303 \335\336#\210\303 \337\340#\210\303\341\n#\210\303\n\341\342#\210\303\n\343\344#\210\303\345\346#\210\303\347\350#\210\303\351\352#\210\303\343\353#\210\303\354\355#\210\303\356\357#\210\303\360\361#\210\303\362\363#\210\303\364\365#\210\303\366\367#\210\303\370\371#\210\303\372\373#\210\303\374\375#\210\303\376\377#\210\303\201@\201A#\210\303\201B\201C#\210\303\201D\201E\201F\201E!B#\210\303\201G\201H#\210\303\201I\201J#\210\303\201K\201L#\210\303\201M\201N#\210\303\201O\201P#\210\303\201Q\201R#\210\303\201S\201T#\210\303\201U\201V#\210\303\201W\201X#\210\303\201Y\201Z#\210\303\201[\201\\#\210\303\201]\201^#\210\303\201_\201`#\210\303\201a\201b#\210\303\201c\201d#\210\303\201e\201f#\210\303\201g\201h#\210\303\201i\201j#\210\303\201k\201l#\210\303\201m\201n#\207" [image-dired-thumbnail-mode-map image-dired-thumbnail-mode-line-up-map image-dired-thumbnail-mode-tag-map define-key [right] image-dired-forward-image [left] image-dired-backward-image [up] image-dired-previous-line [down] image-dired-next-line "" "" "" "" "d" image-dired-flag-thumb-original-file [delete] "m" image-dired-mark-thumb-original-file "u" image-dired-unmark-thumb-original-file "." image-dired-track-original-file [tab] image-dired-jump-original-dired-buffer "g" image-dired-line-up-dynamic "f" image-dired-line-up "i" image-dired-line-up-interactive "t" image-dired-tag-thumbnail "r" image-dired-tag-thumbnail-remove " " image-dired-display-thumbnail-original-image [C-return] image-dired-thumbnail-display-external "l" image-dired-rotate-thumbnail-left image-dired-rotate-thumbnail-right "L" image-dired-rotate-original-left "R" image-dired-rotate-original-right "D" image-dired-thumbnail-set-image-description "" image-dired-delete-char " " image-dired-display-next-thumbnail-original "" image-dired-display-previous-thumbnail-original "c" image-dired-comment-thumbnail "q" image-dired-kill-buffer-and-window [mouse-2] image-dired-mouse-display-image [mouse-1] image-dired-mouse-select-thumbnail [C-down-mouse-1] undefined [C-mouse-1] image-dired-mouse-toggle-mark [menu-bar image-dired] "Image-Dired" make-sparse-keymap [menu-bar image-dired image-dired-kill-buffer-and-window] ("Quit" . image-dired-kill-buffer-and-window) [menu-bar image-dired image-dired-delete-char] ("Delete thumbnail from buffer" . image-dired-delete-char) [menu-bar image-dired image-dired-tag-thumbnail-remove] ("Remove tag from thumbnail" . image-dired-tag-thumbnail-remove) [menu-bar image-dired image-dired-tag-thumbnail] ("Tag thumbnail" . image-dired-tag-thumbnail) [menu-bar image-dired image-dired-comment-thumbnail] ("Comment thumbnail" . image-dired-comment-thumbnail) [menu-bar image-dired image-dired-refresh-thumb] ("Refresh thumb" . image-dired-refresh-thumb) [menu-bar image-dired image-dired-line-up-dynamic] ("Dynamic line up" . image-dired-line-up-dynamic) [menu-bar image-dired image-dired-line-up] ("Line up thumbnails" . image-dired-line-up) [menu-bar image-dired image-dired-rotate-thumbnail-left] ("Rotate thumbnail left" . image-dired-rotate-thumbnail-left) [menu-bar image-dired image-dired-rotate-thumbnail-right] ("Rotate thumbnail right" . image-dired-rotate-thumbnail-right) [menu-bar image-dired image-dired-rotate-original-left] ("Rotate original left" . image-dired-rotate-original-left) [menu-bar image-dired image-dired-rotate-original-right] ("Rotate original right" . image-dired-rotate-original-right) [menu-bar image-dired image-dired-toggle-movement-tracking] ("Toggle movement tracking on/off" . image-dired-toggle-movement-tracking) [menu-bar image-dired image-dired-jump-original-dired-buffer] ("Jump to dired buffer" . image-dired-jump-original-dired-buffer) [menu-bar image-dired image-dired-track-original-file] ("Track original" . image-dired-track-original-file) [menu-bar image-dired image-dired-flag-thumb-original-file] ("Flag original for deletion" . image-dired-flag-thumb-original-file) [menu-bar image-dired image-dired-unmark-thumb-original-file] ("Unmark original" . image-dired-unmark-thumb-original-file) [menu-bar image-dired image-dired-mark-thumb-original-file] ("Mark original" . image-dired-mark-thumb-original-file) [menu-bar image-dired image-dired-thumbnail-display-external] ("Display in external viewer" . image-dired-thumbnail-display-external) [menu-bar image-dired image-dired-display-thumbnail-original-image] ("Display image" . image-dired-display-thumbnail-original-image)] 6 (#$ . 39326)]) #@46 Keymap for `image-dired-display-image-mode'. (defvar image-dired-display-image-mode-map (make-sparse-keymap) (#$ . 44251)) #@53 Define keymap for `image-dired-display-image-mode'. (defalias 'image-dired-define-display-image-mode-keymap #[nil "\301\302\303#\210\301\304\305#\210\301\306\307#\210\301\310\311\312\311!B#\210\301\313\314#\210\301\315\316#\210\301\317\320#\207" [image-dired-display-image-mode-map define-key "q" image-dired-kill-buffer-and-window "f" image-dired-display-current-image-full "s" image-dired-display-current-image-sized [menu-bar image-dired] "Image-Dired" make-sparse-keymap [menu-bar image-dired image-dired-kill-buffer-and-window] ("Quit" . image-dired-kill-buffer-and-window) [menu-bar image-dired image-dired-display-current-image-sized] ("Display original, sized to fit" . image-dired-display-current-image-sized) [menu-bar image-dired image-dired-display-current-image-full] ("Display original, full size" . image-dired-display-current-image-full)] 6 (#$ . 44380)]) #@37 Display current image in full size. (defalias 'image-dired-display-current-image-full #[nil "\301 \211\203\302\303\"\210\304\305!\202\306\307!)\207" [file image-dired-original-file-name image-dired-display-image t message "Full size image displayed" error "No original file name at point"] 4 (#$ . 45265) nil]) #@58 Display current image in sized to fit window dimensions. (defalias 'image-dired-display-current-image-sized #[nil "\301 \211\203\302!\210\303\304!\202\305\306!)\207" [file image-dired-original-file-name image-dired-display-image message "Full size image displayed" error "No original file name at point"] 3 (#$ . 45588) nil]) (byte-code "\302\303N\204\f\304\302\303\305#\210\306\307!\204\304\307\310\311#\210\307B\312\307!\204(\313\307\314 \"\210\306\315!\2044\304\315\310\311#\210\315B\312\315!\204D\313\315\316 \"\210\304\301\310\311#\210\301B\312\301!\204^\313\301\317\301\320\"\210 \"\210\304\311\321\320#\207" [current-load-list image-dired-thumbnail-mode-abbrev-table image-dired-thumbnail-mode-hook variable-documentation put "Hook run when entering image-dired-thumbnail mode.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" boundp image-dired-thumbnail-mode-map definition-name image-dired-thumbnail-mode default-boundp set-default make-sparse-keymap image-dired-thumbnail-mode-syntax-table make-syntax-table define-abbrev-table nil derived-mode-parent] 5) #@290 Browse and manipulate thumbnail images using dired. Use `image-dired-dired' and `image-dired-setup-dired-keybindings' to get a nice setup to start with. This mode runs the hook `image-dired-thumbnail-mode-hook', as the final step during initialization. \{image-dired-thumbnail-mode-map} (defalias 'image-dired-thumbnail-mode #[nil "\306\300!\210\307\310 \210\311\312\313 !\210\314\f!\210 \315 \210\316\317!\210)\320\321!\203*\321\322!\207\323\322!\207" [delay-mode-hooks major-mode mode-name image-dired-thumbnail-mode-map image-dired-thumbnail-mode-syntax-table image-dired-thumbnail-mode-abbrev-table make-local-variable t kill-all-local-variables image-dired-thumbnail-mode "image-dired-thumbnail" use-local-map set-syntax-table image-dired-define-thumbnail-mode-keymap message "image-dired-thumbnail-mode enabled" fboundp run-mode-hooks image-dired-thumbnail-mode-hook run-hooks local-abbrev-table] 2 (#$ . 46760) nil]) (byte-code "\302\303N\204\f\304\302\303\305#\210\306\307!\204\304\307\310\311#\210\307B\312\307!\204(\313\307\314 \"\210\306\315!\2044\304\315\310\311#\210\315B\312\315!\204D\313\315\316 \"\210\304\301\310\311#\210\301B\312\301!\204^\313\301\317\301\320\"\210 \"\210\304\311\321\320#\207" [current-load-list image-dired-display-image-mode-abbrev-table image-dired-display-image-mode-hook variable-documentation put "Hook run when entering image-dired-image-display mode.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" boundp image-dired-display-image-mode-map definition-name image-dired-display-image-mode default-boundp set-default make-sparse-keymap image-dired-display-image-mode-syntax-table make-syntax-table define-abbrev-table nil derived-mode-parent] 5) #@223 Mode for displaying and manipulating original image. Resized or in full-size. This mode runs the hook `image-dired-display-image-mode-hook', as the final step during initialization. \{image-dired-display-image-mode-map} (defalias 'image-dired-display-image-mode #[nil "\306\300!\210\307\310 \210\311\312\313 !\210\314\f!\210 \315 \210\316\317!\210)\320\321!\203*\321\322!\207\323\322!\207" [delay-mode-hooks major-mode mode-name image-dired-display-image-mode-map image-dired-display-image-mode-syntax-table image-dired-display-image-mode-abbrev-table make-local-variable t kill-all-local-variables image-dired-display-image-mode "image-dired-image-display" use-local-map set-syntax-table image-dired-define-display-image-mode-keymap message "image-dired-display-image-mode enabled" fboundp run-mode-hooks image-dired-display-image-mode-hook run-hooks local-abbrev-table] 2 (#$ . 48556) nil]) #@167 Setup easy-to-use keybindings for the commands to be used in dired mode. Note that n, p and and will be hijacked and bound to `image-dired-dired-x-line'. (defalias 'image-dired-setup-dired-keybindings #[nil "\301\302\303#\210\301\304\305#\210\301\306\303#\210\301\307\305#\210\301\310\311#\210\301\312\313#\210\301\314\315#\210\301\316\317#\210\301\320\321#\210\301\322\323#\210\301\324\325#\210\301\326\327#\210\301\330\331#\210\301\332\333#\210\301\334\335#\210\301\336\337#\210\301\340\341#\210\301\342\343\344\343!B#\210\301\345\346#\210\301\347\350#\210\301\351\352#\210\301\353\354#\210\301\355\356#\210\301\357\360#\210\301\361\362#\210\301\363\364#\210\301\365\366#\210\301\367\370#\210\301\371\372#\210\301\373\374#\210\301\375\376#\210\301\377\201@#\210\301\201A\201B#\210\301\201C\201D#\210\301\201E\201F#\210\301\201G\201H#\207" [dired-mode-map define-key "p" image-dired-dired-previous-line "n" image-dired-dired-next-line [up] [down] [33554446] image-dired-next-line-and-display [33554448] image-dired-previous-line-and-display [33554445] image-dired-mark-and-display-next "d" image-dired-display-thumbs "t" image-dired-tag-files "r" image-dired-delete-tag [tab] image-dired-jump-thumbnail-buffer "i" image-dired-dired-display-image "x" image-dired-dired-display-external "a" image-dired-display-thumbs-append "." image-dired-display-thumb "c" image-dired-dired-comment-files "f" image-dired-mark-tagged-files [menu-bar image-dired] "Image-Dired" make-sparse-keymap [menu-bar image-dired image-dired-copy-with-exif-file-name] ("Copy with EXIF file name" . image-dired-copy-with-exif-file-name) [menu-bar image-dired image-dired-dired-comment-files] ("Comment files" . image-dired-dired-comment-files) [menu-bar image-dired image-dired-mark-tagged-files] ("Mark tagged files" . image-dired-mark-tagged-files) [menu-bar image-dired image-dired-delete-tag] ("Remove tag from files" . image-dired-delete-tag) [menu-bar image-dired image-dired-tag-files] ("Tag files" . image-dired-tag-files) [menu-bar image-dired image-dired-jump-thumbnail-buffer] ("Jump to thumbnail buffer" . image-dired-jump-thumbnail-buffer) [menu-bar image-dired image-dired-toggle-movement-tracking] ("Toggle movement tracking" . image-dired-toggle-movement-tracking) [menu-bar image-dired image-dired-toggle-append-browsing] ("Toggle append browsing" . image-dired-toggle-append-browsing) [menu-bar image-dired image-dired-toggle-disp-props] ("Toggle display properties" . image-dired-toggle-dired-display-properties) [menu-bar image-dired image-dired-dired-display-external] ("Display in external viewer" . image-dired-dired-display-external) [menu-bar image-dired image-dired-dired-display-image] ("Display image" . image-dired-dired-display-image) [menu-bar image-dired image-dired-display-thumb] ("Display this thumbnail" . image-dired-display-thumb) [menu-bar image-dired image-dired-display-thumbs-append] ("Display thumbnails append" . image-dired-display-thumbs-append) [menu-bar image-dired image-dired-display-thumbs] ("Display thumbnails" . image-dired-display-thumbs) [menu-bar image-dired image-dired-create-thumbs] ("Create thumbnails for marked files" . image-dired-create-thumbs) [menu-bar image-dired image-dired-mark-and-display-next] ("Mark and display next" . image-dired-mark-and-display-next) [menu-bar image-dired image-dired-previous-line-and-display] ("Display thumb for previous file" . image-dired-previous-line-and-display) [menu-bar image-dired image-dired-next-line-and-display] ("Display thumb for next file" . image-dired-next-line-and-display)] 6 (#$ . 49464) nil]) #@172 Create thumbnail images for all marked files in dired. With prefix argument ARG, create thumbnails even if they already exist (i.e. use this to refresh your thumbnails). (defalias 'image-dired-create-thumbs #[(&optional arg) "\304\211\211\211\305 \306\307 \",\207" [count files thumb-name curr-file nil dired-get-marked-files mapcar #[(curr-file) "\303!\n\203 \304 \210\305 !\203\n\205$\306\303!\"\307U?\205$\310\311!\207" [curr-file thumb-name arg image-dired-thumb-name clear-image-cache file-exists-p image-dired-create-thumb 0 error "Thumb could not be created"] 4]] 4 (#$ . 53121) "P"]) #@18 Slideshow timer. (defvar image-dired-slideshow-timer nil (#$ . 53734)) #@49 Keeping track on number of images in slideshow. (defvar image-dired-slideshow-count 0 (#$ . 53811)) #@45 Number of pictures to display in slideshow. (defvar image-dired-slideshow-times 0 (#$ . 53917)) #@75 Step to next file, if `image-dired-slideshow-times' has not been reached. (defalias 'image-dired-slideshow-step #[nil " W\203\302\303T\"\210T\304 \207\305 \207" [image-dired-slideshow-count image-dired-slideshow-times message "%s" image-dired-next-line-and-display image-dired-slideshow-stop] 3 (#$ . 54019)]) #@82 Start slideshow. Ask user for number of images to show and the delay in between. (defalias 'image-dired-slideshow-start #[nil "\304\305\306\307!!\305\306\310\311\"!\312\304\n\313#\211)\207" [image-dired-slideshow-count image-dired-slideshow-times repeat image-dired-slideshow-timer 0 string-to-number read-string "How many: " "Delay, in seconds. Decimals are accepted : " "1" run-with-timer image-dired-slideshow-step] 4 (#$ . 54341) nil]) #@19 Cancel slideshow. (defalias 'image-dired-slideshow-stop #[nil "\301!\207" [image-dired-slideshow-timer cancel-timer] 2 (#$ . 54791) nil]) #@61 Remove current thumbnail from thumbnail buffer and line up. (defalias 'image-dired-delete-char #[nil "\301\302\303!\210\304\305!\205\302\303!)\207" [inhibit-read-only t delete-char 1 looking-at " "] 2 (#$ . 54936) nil]) #@54 Append thumbnails to `image-dired-thumbnail-buffer'. (defalias 'image-dired-display-thumbs-append #[nil "\300\301\302\211#\207" [image-dired-display-thumbs nil t] 4 (#$ . 55165) nil]) #@66 Shorthand for `image-dired-display-thumbs' with prefix argument. (defalias 'image-dired-display-thumb #[nil "\300\301\302\301#\207" [image-dired-display-thumbs t nil] 4 (#$ . 55355) nil]) #@103 Line up thumbnails according to `image-dired-thumbs-per-row'. See also `image-dired-line-up-dynamic'. (defalias 'image-dired-line-up #[nil "\303eb\210\304 \204m\204\305\306!\210\202m\204,\307u\210\304 \204m\204\305\306!\210\202eb\210\310m\204`\307u\210\n\306U\203D\311c\210\2021\312c\210 T\211\nSU\2031m\2041\307u\210\311c\210\310\2021)eb)\207" [inhibit-read-only count image-dired-thumbs-per-row t image-dired-image-at-point-p delete-char 1 nil 0 "\n" " "] 3 (#$ . 55550) nil]) #@75 Line up thumbnails images dynamically. Calculate how many thumbnails fit. (defalias 'image-dired-line-up-dynamic #[nil "\306 \307\310 !\211\n\211\\\311\\ \211\\\311\\\\\f\\\\\245\312 +\207" [char-width width image-dired-thumb-relief image-dired-thumb-margin image-dired-thumb-width image-dired-thumbs-per-row frame-char-width image-dired-window-width-pixels image-dired-thumbnail-window 0 image-dired-line-up] 5 (#$ . 56058) nil]) #@93 Line up thumbnails interactively. Ask user how many thumbnails should be displayed per row. (defalias 'image-dired-line-up-interactive #[nil "\301\302\303!!\211\304V\204\305\306!\202\307 )\207" [image-dired-thumbs-per-row string-to-number read-string "How many thumbs per row: " 0 message "Number must be greater than 0" image-dired-line-up] 4 (#$ . 56499) nil]) #@70 Display original image for thumbnail at point using external viewer. (defalias 'image-dired-thumbnail-display-external #[nil "\304 \305 \204\306\307!\202%\204\306\310!\202%\311 \312\211\211\n\313\314 #&)\207" [file shell-file-name shell-command-switch image-dired-external-viewer image-dired-original-file-name image-dired-image-at-point-p message "No thumbnail at point" "No original file name found" call-process nil format "%s \"%s\""] 10 (#$ . 56873) nil]) #@49 Display file at point using an external viewer. (defalias 'image-dired-dired-display-external #[nil "\304 \305 \306\211\211\n\307\310 #&)\207" [file shell-file-name shell-command-switch image-dired-external-viewer dired-get-filename call-process nil format "%s \"%s\""] 10 (#$ . 57350) nil]) #@35 Calculate WINDOW width in pixels. (defalias 'image-dired-window-width-pixels #[(window) "\301!\302 _\207" [window window-width frame-char-width] 2 (#$ . 57651)]) #@36 Calculate WINDOW height in pixels. (defalias 'image-dired-window-height-pixels #[(window) "\301!S\302 _\207" [window window-height frame-char-height] 2 (#$ . 57820)]) #@68 Return window where `image-dired-display-image-buffer' is visible. (defalias 'image-dired-display-window #[nil "\300\301\302\303#\207" [get-window-with-predicate #[(window) "\302\303!! \232\207" [window image-dired-display-image-buffer buffer-name window-buffer] 3] nil t] 4 (#$ . 57994)]) #@64 Return window where `image-dired-thumbnail-buffer' is visible. (defalias 'image-dired-thumbnail-window #[nil "\300\301\302\303#\207" [get-window-with-predicate #[(window) "\302\303!! \232\207" [window image-dired-thumbnail-buffer buffer-name window-buffer] 3] nil t] 4 (#$ . 58291)]) #@57 Return window where associated dired buffer is visible. (defalias 'image-dired-associated-dired-buffer-window #[nil "\301\302 \203\303 \304\305!\202\306\307!)\207" [buf nil image-dired-image-at-point-p image-dired-associated-dired-buffer get-window-with-predicate #[(window) "\302! \232\207" [window buf window-buffer] 2] error "No thumbnail image at point"] 2 (#$ . 58582)]) #@65 Return width, in pixels, of image-dired's image display window. (defalias 'image-dired-display-window-width #[nil "\301\302 !Z\207" [image-dired-display-window-width-correction image-dired-window-width-pixels image-dired-display-window] 2 (#$ . 58971)]) #@66 Return height, in pixels, of image-dired's image display window. (defalias 'image-dired-display-window-height #[nil "\301\302 !Z\207" [image-dired-display-window-height-correction image-dired-window-height-pixels image-dired-display-window] 2 (#$ . 59232)]) #@403 Display image FILE in image buffer. Use this when you want to display the image, semi sized, in a new window. The image is sized to fit the display window (using a temporary file, don't worry). Because of this, it will not be as quick as opening it directly, but on most modern systems it should feel snappy enough. If optional argument ORIGINAL-SIZE is non-nil, display image in its original size. (defalias 'image-dired-display-image #[(file &optional original-size) "\306!\307\211\211\211\306!\204N\310 \311 \312\313 B\314\fB\315 B\316B\317 B\257\"\320!\307\211\211\"\n&\211\321U\204U\322\323!\210\202U\324 \325#\210r\326 q\210\325#\327 \210\330 \210\331\332\321\211$\210eb\210\333\334\".\207" [image-dired-temp-image-file ret command height width new-file expand-file-name nil image-dired-display-window-width image-dired-display-window-height format-spec 112 119 104 102 116 call-process 0 error "Could not resize image" copy-file t image-dired-create-display-image-buffer erase-buffer clear-image-cache image-dired-insert-image jpeg image-dired-update-property original-file-name file original-size image-dired-cmd-create-temp-image-options image-dired-cmd-create-temp-image-program shell-file-name shell-command-switch inhibit-read-only] 9 (#$ . 59498)]) #@197 Display current thumbnail's original image in display buffer. See documentation for `image-dired-display-image' for more information. With prefix argument ARG, display image in its original size. (defalias 'image-dired-display-thumbnail-original-image #[(&optional arg) "\304  \305\230\204\306\307!\202/\310 \204\306\311!\202/\204$\306\312!\202/\313 \210\314\n!\210\315 \")\207" [file major-mode image-dired-display-image-buffer arg image-dired-original-file-name "image-dired-thumbnail-mode" message "Not in image-dired-thumbnail-mode" image-dired-image-at-point-p "No thumbnail at point" "No original file name found" image-dired-create-display-image-buffer display-buffer image-dired-display-image] 3 (#$ . 60805) "P"]) #@163 Display current image file. See documentation for `image-dired-display-image' for more information. With prefix argument ARG, display image in its original size. (defalias 'image-dired-dired-display-image #[(&optional arg) "\302 \210\303!\210\304\305 \"\207" [image-dired-display-image-buffer arg image-dired-create-display-image-buffer display-buffer image-dired-display-image dired-get-filename] 3 (#$ . 61546) "P"]) #@59 Return true if there is a image-dired thumbnail at point. (defalias 'image-dired-image-at-point-p #[nil "\300`\301\"\207" [get-text-property image-dired-thumbnail] 3 (#$ . 61973)]) #@35 Rotate thumbnail DEGREES degrees. (defalias 'image-dired-rotate-thumbnail #[(degrees) "\306 \204 \307\310!\207\311\312 !\313\314\n\315 B\316\fB\317\320 !BE\"\321 \313\211\211&\210\322 *\207" [command file image-dired-cmd-rotate-thumbnail-options image-dired-cmd-rotate-thumbnail-program degrees shell-file-name image-dired-image-at-point-p message "No thumbnail at point" image-dired-thumb-name image-dired-original-file-name nil format-spec 112 100 116 expand-file-name call-process clear-image-cache shell-command-switch] 7 (#$ . 62160)]) #@293 Rotate thumbnail left (counter clockwise) 90 degrees. The result of the rotation is displayed in the image display area and a confirmation is needed before the original image files is overwritten. This confirmation can be turned off using `image-dired-rotate-original-ask-before-overwrite'. (defalias 'image-dired-rotate-thumbnail-left #[nil "\300\301!\207" [image-dired-rotate-thumbnail "270"] 2 (#$ . 62716) nil]) #@294 Rotate thumbnail counter right (clockwise) 90 degrees. The result of the rotation is displayed in the image display area and a confirmation is needed before the original image files is overwritten. This confirmation can be turned off using `image-dired-rotate-original-ask-before-overwrite'. (defalias 'image-dired-rotate-thumbnail-right #[nil "\300\301!\207" [image-dired-rotate-thumbnail "90"] 2 (#$ . 63140) nil]) #@52 Force creation of new image for current thumbnail. (defalias 'image-dired-refresh-thumb #[nil "\301 \302 \210\303\304!\")\207" [file image-dired-original-file-name clear-image-cache image-dired-create-thumb image-dired-thumb-name] 4 (#$ . 63564) nil]) #@40 Rotate original image DEGREES degrees. (defalias 'image-dired-rotate-original #[(degrees) "\306 \204 \307\310!\207\311 \312\211\313\314\n\"\204\315\316!\210\317 \320\fB\321 B\322\323\n!B\324BF\"\325\312\211\211 &\326U\204E\315\327!\202i\330!\210!\203U\331\332!\204Z!\204f\333\n\334#\210\335 \202i\330\n!+\207" [temp-file command file image-dired-cmd-rotate-original-options image-dired-cmd-rotate-original-program degrees image-dired-image-at-point-p message "No image at point" image-dired-original-file-name nil string-match ".[jJ][pP[eE]?[gG]$" error "Only JPEG images can be rotated!" format-spec 112 100 111 expand-file-name 116 call-process 0 "Could not rotate image" image-dired-display-image y-or-n-p "Rotate to temp file OK. Overwrite original image? " copy-file t image-dired-refresh-thumb image-dired-temp-rotate-image-file shell-file-name shell-command-switch image-dired-rotate-original-ask-before-overwrite] 7 (#$ . 63825)]) #@60 Rotate original image left (counter clockwise) 90 degrees. (defalias 'image-dired-rotate-original-left #[nil "\300\301!\207" [image-dired-rotate-original "270"] 2 (#$ . 64797) nil]) #@53 Rotate original image right (clockwise) 90 degrees. (defalias 'image-dired-rotate-original-right #[nil "\300\301!\207" [image-dired-rotate-original "90"] 2 (#$ . 64985) nil]) #@353 Use the image's EXIF information to return a unique file name. The file name should be unique as long as you do not take more than one picture per second. The original file name is suffixed at the end for traceability. The format of the returned file name is YYYY_MM_DD_HH_MM_DD_ORIG_FILE_NAME.jpg. Used from `image-dired-copy-with-exif-file-name'. (defalias 'image-dired-get-exif-file-name #[(file) "\303\211\304\305\306\n!\"\204\307\310\311\312\313\306\n!!8\"\202$\314\306\n!\315\"\304\316 \"\2035\317\320\303\211 $\202$\321\322 \203@\323\202A\320\324\n!$*\207" [no-exif-data-found data file nil string-match ".[Jj][Pp][Ee]?[Gg]$" expand-file-name t format-time-string "%Y:%m:%d %H:%M:%S" 5 file-attributes image-dired-get-exif-data "DateTimeOriginal" "[ :]" replace-match "_" format "%s%s%s" "_noexif_" file-name-nondirectory] 6 (#$ . 65167)]) #@153 Set the ImageDescription EXIF tag for the original image. If the image already has a value for this tag, it is used as the default value at the prompt. (defalias 'image-dired-thumbnail-set-image-description #[nil "\302 \204 \303\304!\207\305 \306\307\"\310\307\311\312 \"#\313=\203$\303\314!\202'\315\316!*\207" [file old-value image-dired-image-at-point-p message "No thumbnail at point" image-dired-original-file-name image-dired-get-exif-data "ImageDescription" image-dired-set-exif-data read-string "Value of ImageDescription: " 0 "Successfully wrote ImageDescription tag." error "Could not write ImageDescription tag"] 6 (#$ . 66038) nil]) #@52 In FILE, set EXIF tag TAG-NAME to value TAG-VALUE. (defalias 'image-dired-set-exif-data #[(file tag-name tag-value) "\306\307 \310\nB\311\312 !B\313\fB\314 BF\"\315\306\211\211&)\207" [command image-dired-cmd-write-exif-data-options image-dired-cmd-write-exif-data-program file tag-name tag-value nil format-spec 112 102 expand-file-name 116 118 call-process shell-file-name shell-command-switch] 7 (#$ . 66696)]) #@38 From FILE, return EXIF tag TAG-NAME. (defalias 'image-dired-get-exif-data #[(file tag-name) "\306\307!\310\211\311 \312\fB\313 B\314BE\"r\nq\210ed|\210\315\310\316\310 &\317=\2046\320\321!\210\202Neb\210\322\323\310\316#\203J\324\325\310\316#\210\2029ed{)+\207" [tag-value command buf image-dired-cmd-read-exif-data-options image-dired-cmd-read-exif-data-program file get-buffer-create "*image-dired-get-exif-data*" nil format-spec 112 102 116 call-process t 0 error "Could not get EXIF tag" search-forward-regexp "[\n ]" replace-match "" tag-name shell-file-name shell-command-switch] 7 (#$ . 67124)]) #@587 Copy file with unique name to main image directory. Copy current or all marked files in dired to a new file in your main image directory, using a file name generated by `image-dired-get-exif-file-name'. A typical usage for this if when copying images from a digital camera into the image directory. Typically, you would open up the folder with the incoming digital images, mark the files to be copied, and execute this function. The result is a couple of new files in `image-dired-main-image-directory' called 2005_05_08_12_52_00_dscn0319.jpg, 2005_05_08_14_27_45_dscn0320.jpg etc. (defalias 'image-dired-copy-with-exif-file-name #[nil "\302\303 \304\305\"*\207" [files new-name nil dired-get-marked-files mapcar #[(curr-file) "\303\304\305\306!!\307 !#\310\311 \n#\210\312 \n\"\207" [image-dired-main-image-directory curr-file new-name format "%s/%s" file-name-as-directory expand-file-name image-dired-get-exif-file-name message "Copying %s to %s" copy-file] 5]] 3 (#$ . 67751) nil]) #@67 In thubnail buffer, move to next thumbnail and display the image. (defalias 'image-dired-display-next-thumbnail-original #[nil "\300 \210\301 \207" [image-dired-forward-image image-dired-display-thumbnail-original-image] 1 (#$ . 68752) nil]) #@47 Move to previous thumbnail and display image. (defalias 'image-dired-display-previous-thumbnail-original #[nil "\300 \210\301 \207" [image-dired-backward-image image-dired-display-thumbnail-original-image] 1 (#$ . 69000) nil]) #@151 Write file comments to database. Write file comments to one or more files. FILE-COMMENTS is an alist on the following form: ((FILE . COMMENT) ... ) (defalias 'image-dired-write-comments #[(file-comments) "\306\211\211\211\211 \307\310\311!!\312\216rq\210\313 !\210\306\211\203\225@\211@Aeb\210\314\315\316 \"\306\317#\203\202`\320 \210\321\322\f\317#\203h\323\224\321\324\f\317#\203b`S\202d\f \n|\210\320 \210\321\324\f\317#\204y\306\210\324c\210\315\325\"c\210\202\214db\210\315\326 #c\210A\211\204*+\306rq\210~\210\327ed\306\323%\210. \207" [comment file comment-end-pos comment-beg-pos end image-dired-db-file nil get-buffer-create generate-new-buffer-name " *temp file*" ((byte-code "\301!\203\n\302!\210\301\207" [#1=#:temp-buffer buffer-name kill-buffer] 2)) insert-file-contents search-forward-regexp format "^%s.*$" t beginning-of-line search-forward ";comment:" 0 ";" "comment:%s;" "\n%s;comment:%s" write-region #1# #2=#:temp-file file-comments elt #3=#:--cl-dolist-temp--] 7 (#$ . 69234)]) #@54 Update text property PROP with value VALUE at point. (defalias 'image-dired-update-property #[(prop value) "\303\304``T \n$)\207" [inhibit-read-only prop value t put-text-property] 5 (#$ . 70294)]) #@50 Add comment to current or marked files in dired. (defalias 'image-dired-dired-comment-files #[nil "\301 \302\303\304\305 \"!)\207" [comment image-dired-read-comment image-dired-write-comments mapcar #[(curr-file) " B\207" [curr-file comment] 2] dired-get-marked-files] 4 (#$ . 70499) nil]) #@55 Add comment to current thumbnail in thumbnail buffer. (defalias 'image-dired-comment-thumbnail #[nil "\302 \303!\304 BC!\210\305\301 \"\210*\306 \207" [file comment image-dired-original-file-name image-dired-read-comment image-dired-write-comments image-dired-update-property image-dired-display-thumb-properties] 3 (#$ . 70797) nil]) #@112 Read comment for an image. Read comment for an image, optionally using old comment from FILE as initial value. (defalias 'image-dired-read-comment #[(&optional file) "\301\302\205 \303!\"\207" [file read-string "Comment: " image-dired-get-comment] 5 (#$ . 71143)]) #@28 Get comment for file FILE. (defalias 'image-dired-get-comment #[(file) "\212\306\211\211\211\211\307 !eb\210\310\311\312\"\306\313#\203D\306\210`\314 \210\315\316\f\313#\203D`\315\317\f\313#\203>`S\202@\f\n {\320 !\210.\207" [comment comment-end-pos comment-beg-pos buf end image-dired-db-file nil find-file search-forward-regexp format "^%s" t beginning-of-line search-forward ";comment:" ";" kill-buffer file] 5 (#$ . 71417)]) #@356 Use regexp to mark files with matching tag. A `tag' is a keyword, a piece of meta data, associated with an image file and stored in image-dired's database file. This command lets you input a regexp and this will be matched against all tags on all image files in the database file. The files that have a matching tags will be marked in the dired buffer. (defalias 'image-dired-mark-tagged-files #[nil "\305\306!\307\310\211\212\311\f!eb\210\312\313 \314Q\310\315#\203(\316\317\320!C \"\202\321!\210\322\323 \"\210)\324\325\n\",\207" [buf files hits tag image-dired-db-file read-string "Mark tagged files (regexp): " 0 nil find-file search-forward-regexp "\\(^[^;\n]+\\);.*" ".*$" t append match-string 1 kill-buffer mapcar #[(curr-file) "\303\304!!\303\305 !!\230\205&\306 !eb\210\307\310\311 \"\312\313#\205&\nT\314\315!\207" [default-directory curr-file hits file-name-as-directory expand-file-name file-name-directory file-name-nondirectory search-forward-regexp format "\\s %s$" nil t dired-mark 1] 4] message "%d files with matching tag marked."] 4 (#$ . 71873) nil]) #@151 Use mouse EVENT, call `image-dired-display-image' to display image. Track this in associated dired buffer if `image-dired-track-movement' is non-nil. (defalias 'image-dired-mouse-display-image #[(event) "\305\306 !\210 \211:\203\307 8:\203\307\202\310 8\202$\311 `\312\313F)\314\n8\206=\310\n8:\203:\310\n8@\202=\310\n8)b\210\315  \203J\316 \210\317 \210\320\f!\210\321!)\207" [file event position image-dired-track-movement image-dired-display-image-buffer nil mouse-set-point 2 1 selected-window (0 . 0) 0 5 image-dired-original-file-name image-dired-track-original-file image-dired-create-display-image-buffer display-buffer image-dired-display-image] 5 (#$ . 72969) "e"]) #@126 Use mouse EVENT to select thumbnail image. Track this in associated dired buffer if `image-dired-track-movement' is non-nil. (defalias 'image-dired-mouse-select-thumbnail #[(event) "\304\305 !\210 \211:\203\306 8:\203\306\202\307 8\202$\310 `\311\312F)\313\n8\206=\307\n8:\203:\307\n8@\202=\307\n8)b\210 \203G\314 \210)\315 \207" [file event position image-dired-track-movement nil mouse-set-point 2 1 selected-window (0 . 0) 0 5 image-dired-track-original-file image-dired-display-thumb-properties] 5 (#$ . 73668) "e"]) #@135 Use mouse EVENT to toggle dired mark for thumbnail. Track this in associated dired buffer if `image-dired-track-movement' is non-nil. (defalias 'image-dired-mouse-toggle-mark #[(event) "\304\305 !\210 \211:\203\306 8:\203\306\202\307 8\202$\310 `\311\312F)\313\n8\206=\307\n8:\203:\307\n8@\202=\307\n8)b\210 \203G\314 \210)\315 \207" [file event position image-dired-track-movement nil mouse-set-point 2 1 selected-window (0 . 0) 0 5 image-dired-track-original-file image-dired-toggle-mark-thumb-original-file] 5 (#$ . 74210) "e"]) #@53 Display properties for dired file in the echo area. (defalias 'image-dired-dired-display-properties #[nil "\305 \306!\307p!\310\311\312!\313#\314! \205#\315\316\n \f$!-\207" [file file-name dired-buf props comment dired-get-filename file-name-nondirectory buffer-name mapconcat princ image-dired-list-tags ", " image-dired-get-comment message image-dired-format-properties-string] 6 (#$ . 74762) nil]) #@35 List to store tag-file structure. (defvar image-dired-tag-file-list nil (#$ . 75180)) #@35 List to store file-tag structure. (defvar image-dired-file-tag-list nil (#$ . 75272)) #@30 List to store file comments. (defvar image-dired-file-comment-list nil (#$ . 75364)) #@36 Add relation between TAG and FILE. (defalias 'image-dired-add-to-tag-file-list #[(tag file) "\304 \203*\305\n \"\211\203 \235?\2050 AB\241\2020 \n D AB\241\2020\n DC\211)\207" [curr image-dired-tag-file-list tag file nil assoc] 3 (#$ . 75455)]) #@423 Helper function used from `image-dired-create-gallery-lists'. Add TAG to FILE in one list and FILE to TAG in the other. Lisp structures look like the following: image-dired-file-tag-list: (("filename1" "tag1" "tag2" "tag3" ...) ("filename2" "tag1" "tag2" "tag3" ...) ...) image-dired-tag-file-list: (("tag1" "filename1" "filename2" "filename3" ...) ("tag2" "filename1" "filename2" "filename3" ...) ...) (defalias 'image-dired-add-to-tag-file-lists #[(tag file) "\305 \203%\306\n \"\211\203 AB\241\210\202* \n D AB\241\210\202*\n DC\f\203R\306 \f\"\211\203G\n\235?\205X\nAB\241\202X\f \nD\fAB\241\202X \nDC\211)\207" [curr image-dired-file-tag-list file tag image-dired-tag-file-list nil assoc] 3 (#$ . 75719)]) #@240 Helper function used from `image-dired-create-gallery-lists'. For FILE, add COMMENT to list. Lisp structure looks like the following: image-dired-file-comment-list: (("filename1" . "comment1") ("filename2" . "comment2") ...) (defalias 'image-dired-add-to-file-comment-list #[(file comment) "\203\303 \"?\205 \nBAB\241\207 \nBC\211\207" [image-dired-file-comment-list file comment assoc] 3 (#$ . 76476)]) #@64 Create temporary lists used by `image-dired-gallery-generate'. (defalias 'image-dired-create-gallery-lists #[nil "\306!\307\211\211\211\307\211\307eb\210\310\311\307\312#\203I\307\210`\313 \210`\314\315\f\307#\2046\316\317!\210\320 \f{\315\"\211@\321\322 A\"\210\202\323 !\210-\324\325\"\211\207" [image-dired-db-file row-tags file beg end buf find-file nil search-forward-regexp "^." t beginning-of-line search-forward ";" error "Something is really wrong, check format of database" split-string mapc #[(x) "\302\303\"\204\f\304 \"\207\305 \306\307\"\"\207" [x file string-match "^comment:\\(.*\\)" image-dired-add-to-tag-file-lists image-dired-add-to-file-comment-list match-string 1] 5] kill-buffer sort #[(x y) "@ @\231\207" [x y] 2] image-dired-tag-file-list image-dired-file-tag-list image-dired-file-comment-list] 6 (#$ . 76909)]) #@44 Return t if image FILE has a "hidden" tag. (defalias 'image-dired-hidden-p #[(file) "\303\304\305\306 \n\"A\"\210)\207" [hidden file image-dired-file-tag-list nil mapc #[(tag) " \235\205 \303\211\207" [tag image-dired-gallery-hidden-tags hidden t] 2] assoc] 5 (#$ . 77783)]) #@175 Generate gallery pages. First we create a couple of Lisp structures from the database to make it easier to generate, then HTML-files are created in `image-dired-gallery-dir' (defalias 'image-dired-gallery-generate #[nil "\306=\203\n\307\310!\210\311 \210 \312\211\211\211\211\211\211\211\211!\"#$%&\313'!\203<\314'!\204A\307\315!\210\202A\316'!\210\317\320\321'\"!\"\322 \210\323c\210\324c\210\325c\210\320\326\327 \"c\210\330c\210\331%\332\333&\"\210\331%\332\334&\"\210\335c\210\336c\210\337 \210\340\"!.\n\207" [image-dired-thumbnail-storage image-dired-tag-file-list tag-link-list tag-link file-tags comment per-directory error "Currently, gallery generation is not supported when using per-directory thumbnail file storage" image-dired-create-gallery-lists nil file-exists-p file-directory-p "Variable image-dired-gallery-dir is not a directory" make-directory find-file format "%s/index.html" erase-buffer "\n" " \n" "

Image-Dired Gallery

\n" "

\n Gallery generated %s\n

\n" current-time-string "

Tag index

\n" 1 mapc #[(curr) "@\211\n\235?\205(\306\307 # \203\310 \fBC\"\202$ \fBC T\211\207" [curr tag image-dired-gallery-hidden-tags count tag-link tag-link-list format "%s" append] 5] #[(curr) "@\211\n\235?\205J\306\307\310 \"A\"c\210\311\306\312\f #!\313 \210\314c\210\315c\210\316c\210\306\317 \"c\210\320\321A\"\210\316c\210\322c\210\323c\210\324 \210\325!\210 T\211\207" [curr tag image-dired-gallery-hidden-tags tag-link-list image-dired-gallery-dir count format " %s
\n" assoc find-file "%s/%s.html" erase-buffer "\n" " \n" "

Index

\n" "

Images with tag "%s"

" mapc #[(file) "\306!?\205F\307\310 \311!\n\311\312!!&c\210\313 \"A\211\203+\307\314\f\"c\210\202.\315c\210\313 \"\211G\316V\205F\317c\210\320\321\"\210\322c\207" [file image-dired-gallery-image-root-url image-dired-gallery-thumb-image-root-url image-dired-file-comment-list comment image-dired-file-tag-list image-dired-hidden-p format "\n" file-name-nondirectory image-dired-thumb-name assoc "
\n%s
\n" "
\n" 2 "[ " mapc #[(extra-tag) " \232?\205\n\232?\205\304\305\306 \"A\"c\207" [extra-tag tag file tag-link-list format "%s " assoc] 5] "]
\n" file-tags] 8] " \n" "\n" save-buffer kill-buffer tag-buf] 6] " \n" "" save-buffer kill-buffer tag-buf index-buf tag curr count tags image-dired-gallery-dir] 10 (#$ . 78070) nil]) #@60 Kill the current buffer and, if possible, also the window. (defalias 'image-dired-kill-buffer-and-window #[nil "p\301\302\303\217\210\304!)\207" [buffer nil (byte-code "\300\301 !\207" [delete-window selected-window] 2) ((error)) kill-buffer] 3 (#$ . 80672) nil]) #@49 List to keep track of meta data in edit buffer. (defvar image-dired-widget-list nil (#$ . 80944)) #@130 Edit comment and tags of current or marked image files. Edit comment and tags for all marked image files in an easy-to-use form. (defalias 'image-dired-dired-edit-comment-and-tags #[nil "\306\307 \310\311!\210\312 \210\313\314!\210\315\316 \210)\317 \210\320\321!\210\306\211\211\2112 \3063\2114\203\2134@3\3223!2\3232!\324 !\210\320\325!\210\326\327\330\331\332\333\334\3353!\206W\336&\320\337!\210\326\327\330\331\332\333\334\340\341\3423!\343#\206q\336&\3443\f EC\"\320\345!\2104A\2114\2040.\320\346!\210\326\347\350\351\352$\210\320\353!\210\326\347\350\354\355$\210\320\346!\210\3565!\210\357 \210\360\361!)\207" [image-dired-widget-list files inhibit-read-only tag-widget comment-widget img nil dired-get-marked-files switch-to-buffer "*Image-Dired Edit Meta Data*" kill-all-local-variables make-local-variable widget-example-repeat t erase-buffer remove-overlays widget-insert "\nEdit comments and tags for each image. Separate multiple tags\nwith a comma. Move forward between fields using TAB or RET.\nMove to the previous field using backtab (S-TAB). Save by\nactivating the Save button at the bottom of the form or cancel\nthe operation by activating the Cancel button.\n\n" image-dired-thumb-name create-image insert-image "\n\nComment: " widget-create editable-field :size 60 :format "%v " :value image-dired-get-comment "" "\nTags: " mapconcat #[(tag) "\207" [tag] 1] image-dired-list-tags "," append "\n\n" "\n" push-button :notify #[(&rest ignore) "\300 \210\301 \210\302\303!\207" [image-dired-save-information-from-widgets bury-buffer message "Done."] 2] "Save" " " #[(&rest ignore) "\300 \210\301\302!\207" [bury-buffer message "Operation canceled."] 2] "Cancel" use-local-map widget-setup widget-forward 1 thumb-file file #1=#:--cl-dolist-temp-- widget-keymap] 12 (#$ . 81049) nil]) #@231 Save information found in `image-dired-widget-list'. Use the information in `image-dired-widget-list' to save comments and tags to their respective image file. Internal function used by `image-dired-dired-edit-comment-and-tags'. (defalias 'image-dired-save-information-from-widgets #[nil "\306\211\211\211\211\307\310\311 \"!\210\312 \306\211\203^@\211@\313\211AA)@!\314\n\315\"\211\306\211\203T@\fBBA\211\204?*A\211\204\306*!-\207" [lst tag-list tag-string comment file image-dired-widget-list nil image-dired-write-comments mapcar #[(widget) "@\304\211A@)! B\207" [widget file x comment widget-value] 3] image-dired-write-tags widget-value split-string "," widget #1=#:--cl-dolist-temp-- x tag #2=#:--cl-dolist-temp--] 5 (#$ . 82898)]) (provide 'image-dired)