• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/emacs-92/emacs/lisp/

Lines Matching +defs:thumb +defs:name

54 ;; using the file name format ORIGNAME.thumb.ORIGEXT.  For example
55 ;; ~/.emacs.d/image-dired/myimage01.thumb.jpg. The "database" is for
58 ;; file-name-non-directory;comment:comment-text;tag1;tag2;tag3;...;tagN
75 ;; "unique" file names using `image-dired-get-exif-file-name' (used by
76 ;; `image-dired-copy-with-exif-file-name').
146 ;; * Rewrite `image-dired-modify-mark-on-thumb-original-file' to be
215 (defcustom image-dired-gallery-thumb-image-root-url
235 `image-dired-thumb-width', %h which is replaced by `image-dired-thumb-height',
236 %f which is replaced by the file name of the original image and %t
237 which is replaced by the file name of the thumbnail file."
254 %f which is replaced by the file name of the original image and %t which
255 is replaced by the file name of the temporary file."
260 "The file name of the `pngnq' program.
266 "The file name of the `pngcrush' program.
320 \(for 90 degrees right and left), %t which is replaced by the file name
339 original image file name and %t which is replaced by
369 image file name, %t which is replaced by the tag name and %v
386 by the image file name and %t which is replaced by the tag name."
397 (defcustom image-dired-thumb-size (if (eq 'standard image-dired-thumbnail-storage) 128 100)
399 This is the default size for both `image-dired-thumb-width' and `image-dired-thumb-height'."
403 (defcustom image-dired-thumb-width image-dired-thumb-size
408 (defcustom image-dired-thumb-height image-dired-thumb-size
413 (defcustom image-dired-thumb-relief 2
418 (defcustom image-dired-thumb-margin 2
439 "Number of thumbnails to display per row in thumb buffer."
470 just call `image-dired-display-thumb' to display only the image at point.
486 %b is replaced with associated dired buffer name, %f with file name
506 Used by `image-dired-copy-with-exif-file-name'."
519 (let ((image-dired-dir (file-name-as-directory
520 (expand-file-name image-dired-dir))))
537 (unless (string-match (image-file-name-regexp) file)
539 (let ((thumb-file (image-dired-thumb-name file)))
540 (unless (and (file-exists-p thumb-file)
542 (float-time (nth 5 (file-attributes thumb-file)))))
543 (image-dired-create-thumb file thumb-file))
544 (create-image thumb-file)
546 ;; :file thumb-file
547 ;; :relief image-dired-thumb-relief :margin image-dired-thumb-margin)
550 (defun image-dired-insert-thumbnail (file original-file-name
560 image-dired-thumb-relief
561 image-dired-thumb-margin)
566 'original-file-name original-file-name
568 'tags (image-dired-list-tags original-file-name)
570 'comment (image-dired-get-comment original-file-name)))))
572 (defun image-dired-thumb-name (file)
573 "Return thumbnail file name for FILE.
575 name will vary. For central thumbnail file storage, make a
576 MD5-hash of the image file's directory name and add that to make
577 the thumbnail file name unique. For per-directory storage, just
578 add a subdirectory. For standard storage, produce the file name
581 (expand-file-name
583 (md5 (concat "file://" (expand-file-name file))) ".png")))
585 (let* ((f (expand-file-name file))
588 ;; thumbnail file name need not be that
591 (md5 (file-name-as-directory (file-name-directory f)))))
592 (format "%s%s%s.thumb.%s"
593 (file-name-as-directory (expand-file-name (image-dired-dir)))
594 (file-name-sans-extension (file-name-nondirectory f))
596 (file-name-extension f))))
598 (let ((f (expand-file-name file)))
599 (format "%s.image-dired/%s.thumb.%s"
600 (file-name-directory f)
601 (file-name-sans-extension (file-name-nondirectory f))
602 (file-name-extension f))))))
604 (defun image-dired-create-thumb (original-file thumbnail-file)
606 (let* ((width (int-to-string image-dired-thumb-width))
607 (height (int-to-string image-dired-thumb-height))
627 (setq thumbnail-dir (file-name-directory thumbnail-file))))
630 (call-process shell-file-name nil nil nil shell-command-switch command)))
639 (thumb-file (image-dired-get-thumbnail-image image-file))
645 (put-image thumb-file image-pos)
651 (overlay-put overlay 'thumb-file thumb-file)))
719 "Create thumb buffer and set `image-dired-thumbnail-mode'."
810 curr-file thumb-name files count dired-buf beg)
822 (setq thumb-name (image-dired-thumb-name curr-file))
823 (if (and (not (file-exists-p thumb-name))
824 (not (= 0 (image-dired-create-thumb curr-file thumb-name))))
826 (image-dired-insert-thumbnail thumb-name curr-file dired-buf)))
845 If the number of files in DIR matching `image-file-name-regexp'
850 (dired-mark-files-regexp (image-file-name-regexp))
963 (image-dired-write-tags (list (cons (image-dired-original-file-name) tag))))
965 'tags (image-dired-list-tags (image-dired-original-file-name))))
983 (image-dired-remove-tag (image-dired-original-file-name) tag))
985 'tags (image-dired-list-tags (image-dired-original-file-name))))
987 (defun image-dired-original-file-name ()
988 "Get original file name for thumbnail or display image at point."
989 (get-text-property (point) 'original-file-name))
1009 (file-name (image-dired-original-file-name)))
1010 (when (and (buffer-live-p dired-buf) file-name)
1011 (setq file-name (file-name-nondirectory file-name))
1014 (if (not (search-forward file-name nil t))
1032 "Track current dired file's thumb in `image-dired-thumbnail-buffer'.
1044 (get-text-property (point) 'original-file-name))
1052 (image-dired-display-thumb-properties))
1092 (image-dired-display-thumb-properties))
1113 (image-dired-display-thumb-properties))
1124 (image-dired-display-thumb-properties))
1139 (image-dired-display-thumb-properties))
1144 name, PROPS is a list of tags and COMMENT is the image files's
1154 (defun image-dired-display-thumb-properties ()
1157 (let ((file-name (file-name-nondirectory (image-dired-original-file-name)))
1158 (dired-buf (buffer-name (image-dired-associated-dired-buffer)))
1164 (if file-name
1168 file-name
1178 (defun image-dired-modify-mark-on-thumb-original-file (command)
1184 (let ((file-name (image-dired-original-file-name))
1186 (if (not (and dired-buf file-name))
1189 (message file-name)
1190 (setq file-name (file-name-nondirectory file-name))
1192 (if (search-forward file-name nil t)
1201 (defun image-dired-mark-thumb-original-file ()
1204 (image-dired-modify-mark-on-thumb-original-file 'mark)
1207 (defun image-dired-unmark-thumb-original-file ()
1210 (image-dired-modify-mark-on-thumb-original-file 'unmark)
1213 (defun image-dired-flag-thumb-original-file ()
1216 (image-dired-modify-mark-on-thumb-original-file 'flag)
1219 (defun image-dired-toggle-mark-thumb-original-file ()
1222 (image-dired-modify-mark-on-thumb-original-file 'toggle))
1274 (define-key image-dired-thumbnail-mode-map "d" 'image-dired-flag-thumb-original-file)
1276 'image-dired-flag-thumb-original-file)
1277 (define-key image-dired-thumbnail-mode-map "m" 'image-dired-mark-thumb-original-file)
1278 (define-key image-dired-thumbnail-mode-map "u" 'image-dired-unmark-thumb-original-file)
1360 [menu-bar image-dired image-dired-refresh-thumb]
1361 '("Refresh thumb" . image-dired-refresh-thumb))
1395 [menu-bar image-dired image-dired-flag-thumb-original-file]
1396 '("Flag original for deletion" . image-dired-flag-thumb-original-file))
1398 [menu-bar image-dired image-dired-unmark-thumb-original-file]
1399 '("Unmark original" . image-dired-unmark-thumb-original-file))
1401 [menu-bar image-dired image-dired-mark-thumb-original-file]
1402 '("Mark original" . image-dired-mark-thumb-original-file))
1447 (let ((file (image-dired-original-file-name)))
1452 (error "No original file name at point"))))
1457 (let ((file (image-dired-original-file-name)))
1462 (error "No original file name at point"))))
1505 (define-key dired-mode-map "\C-t." 'image-dired-display-thumb)
1513 (define-key dired-mode-map [menu-bar image-dired image-dired-copy-with-exif-file-name]
1514 '("Copy with EXIF file name" . image-dired-copy-with-exif-file-name))
1549 [menu-bar image-dired image-dired-display-thumb]
1550 '("Display this thumbnail" . image-dired-display-thumb))
1567 '("Display thumb for previous file" . image-dired-previous-line-and-display))
1570 '("Display thumb for next file" . image-dired-next-line-and-display)))
1577 (let (curr-file thumb-name files count)
1581 (setq thumb-name (image-dired-thumb-name curr-file))
1587 (if (or (not (file-exists-p thumb-name))
1589 (if (not (= 0 (image-dired-create-thumb curr-file
1590 (image-dired-thumb-name curr-file))))
1646 (defun image-dired-display-thumb ()
1688 (+ (* 2 image-dired-thumb-relief)
1689 (* 2 image-dired-thumb-margin)
1690 image-dired-thumb-width char-width))))
1706 (let ((file (image-dired-original-file-name)))
1710 (message "No original file name found")
1711 (call-process shell-file-name nil nil nil shell-command-switch
1719 (call-process shell-file-name nil nil nil shell-command-switch
1735 (equal (buffer-name (window-buffer window)) image-dired-display-image-buffer))
1742 (equal (buffer-name (window-buffer window)) image-dired-thumbnail-buffer))
1776 (let ((new-file (expand-file-name image-dired-temp-image-file))
1779 (setq file (expand-file-name file))
1793 (setq ret (call-process shell-file-name nil nil nil
1797 (setq image-type (image-type-from-file-name file))
1805 (image-dired-update-property 'original-file-name file)))))
1812 (let ((file (image-dired-original-file-name)))
1818 (message "No original file name found")
1842 (let ((file (image-dired-thumb-name (image-dired-original-file-name)))
1849 (cons ?t (expand-file-name file)))))
1850 (call-process shell-file-name nil nil nil shell-command-switch command)
1873 (defun image-dired-refresh-thumb ()
1876 (let ((file (image-dired-original-file-name)))
1878 (image-dired-create-thumb file (image-dired-thumb-name file))))
1884 (let ((file (image-dired-original-file-name))
1893 (cons ?o (expand-file-name file))
1895 (if (not (= 0 (call-process shell-file-name nil nil nil
1905 (image-dired-refresh-thumb))
1918 (defun image-dired-get-exif-file-name (file)
1919 "Use the image's EXIF information to return a unique file name.
1920 The file name should be unique as long as you do not take more than
1921 one picture per second. The original file name is suffixed at the end
1922 for traceability. The format of the returned file name is
1924 `image-dired-copy-with-exif-file-name'."
1926 (if (not (string-match "\.[Jj][Pp][Ee]?[Gg]$" (expand-file-name file)))
1932 (nth 5 (file-attributes (expand-file-name file))))))
1933 (setq data (image-dired-get-exif-data (expand-file-name file)
1941 (file-name-nondirectory file))))
1950 (let* ((file (image-dired-original-file-name))
1959 (defun image-dired-set-exif-data (file tag-name tag-value)
1966 (cons ?f (expand-file-name file))
1967 (cons ?t tag-name)
1969 (call-process shell-file-name nil nil nil shell-command-switch command)))
1971 (defun image-dired-get-exif-data (file tag-name)
1980 (cons ?t tag-name))))
1983 (if (not (eq (call-process shell-file-name nil t nil
1994 (defun image-dired-copy-with-exif-file-name ()
1995 "Copy file with unique name to main image directory.
1997 main image directory, using a file name generated by
1998 `image-dired-get-exif-file-name'. A typical usage for this if when
2008 (let (new-name
2012 (setq new-name
2014 (file-name-as-directory
2015 (expand-file-name image-dired-main-image-directory))
2016 (image-dired-get-exif-file-name curr-file)))
2017 (message "Copying %s to %s" curr-file new-name)
2018 (copy-file curr-file new-name))
2090 (let* ((file (image-dired-original-file-name))
2094 (image-dired-display-thumb-properties))
2154 (when (string= (file-name-as-directory
2155 (expand-file-name default-directory))
2156 (file-name-as-directory
2157 (file-name-directory curr-file)))
2158 (setq curr-file (file-name-nondirectory curr-file))
2174 (setq file (image-dired-original-file-name))
2191 (image-dired-display-thumb-properties))
2203 (image-dired-toggle-mark-thumb-original-file))
2209 (file-name (file-name-nondirectory file))
2210 (dired-buf (buffer-name (current-buffer)))
2216 (if file-name
2220 file-name
2405 (file-name-nondirectory file)
2406 image-dired-gallery-thumb-image-root-url
2407 (file-name-nondirectory (image-dired-thumb-name file)) file))
2418 ;; Only insert if not file name or the main tag
2474 (let (thumb-file img comment-widget tag-widget)
2478 (setq thumb-file (image-dired-thumb-name file)
2479 img (create-image thumb-file))
2566 ;; (directory-files (image-dired-dir) t ".+\.thumb\..+$"))
2587 ;; (string-match (image-file-name-regexp) filename))