• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/emacs-93/emacs/lisp/

Lines Matching +defs:temp +defs:file +defs:name

9 ;; This file is part of GNU Emacs.
22 ;; along with GNU Emacs; see the file COPYING. If not, write to the
124 "If set, delete older file in the thumbnails directory.
135 (defcustom thumbs-temp-dir temporary-file-directory
137 Defaults to `temporary-file-directory'. Leaving it to
142 (defcustom thumbs-temp-prefix "emacsthumbs"
143 "Prefix to add to temp files."
187 The name is made by appending a number to PREFIX, default \"G\"."
195 (defsubst thumbs-temp-dir ()
196 (file-name-as-directory (expand-file-name thumbs-temp-dir)))
198 (defun thumbs-temp-file ()
201 (thumbs-temp-dir)
202 thumbs-temp-prefix
208 (let ((thumbs-thumbsdir (file-name-as-directory
209 (expand-file-name thumbs-thumbsdir))))
210 (unless (file-directory-p thumbs-thumbsdir)
224 (let ((fattribs-list (file-attributes f)))
226 (directory-files (thumbs-thumbsdir) t (image-file-name-regexp)))
231 (message "Deleting file %s" (cadr (cdar files-list))))
232 (delete-file (cadr (cdar files-list)))
243 FILEIN is the input file,
244 FILEOUT is the output file,
248 OUTPUT-FORMAT is the file format to output (default is jpeg),
259 (call-process shell-file-name nil nil nil shell-command-switch command)))
276 (tmp (thumbs-temp-file)))
302 "Return a thumbnail name for the image IMG."
304 (let ((filename (expand-file-name img)))
316 (let ((fn (expand-file-name img))
318 (if (or (not (file-exists-p tn))
322 ;;; (not (equal (thumbs-file-size tn) thumbs-geometry))
338 (defun thumbs-file-size (img)
340 (find-image `((:type ,(thumbs-image-type img) :file ,img))) t)))
348 (find-file (thumbs-make-thumb img)))
356 :file ,img
370 `(thumb-image-file ,img
371 help-echo ,(file-name-nondirectory img)
406 Optional argument REG to select file matching a regexp,
410 (directory-files dir t (or reg (image-file-name-regexp)))
434 (setq mode-name
435 (concat "image-view-mode: " (file-name-nondirectory img)
470 (shell-quote-argument (expand-file-name img))
487 (defun thumbs-file-alist ()
502 (defun thumbs-file-list ()
503 "Make a list of file names for all images in thumb buffer."
518 (let ((thumbs-file-list (thumbs-file-alist))
524 (delete-file x)
525 (delete-file (thumbs-thumbname x)))
526 (file-error (setq failure t)))
528 (when (rassoc x thumbs-file-list)
529 (goto-char (car (rassoc x thumbs-file-list)))
536 (interactive "FRename to file or directory: ")
539 (if (and (not (file-directory-p newfile))
541 (if (file-exists-p newfile)
542 (error "Renaming marked files to file name `%s'" newfile)
545 (let ((thumbs-file-list (thumbs-file-alist))
547 (dolist (file files)
550 (if (file-directory-p newfile)
551 (rename-file file
552 (expand-file-name
553 (file-name-nondirectory file)
555 (rename-file file newfile))
556 (file-error (setq failure t)
557 (push file failures)))
559 (when (rassoc file thumbs-file-list)
560 (goto-char (car (rassoc file thumbs-file-list)))
563 (delq file thumbs-marked-list)))))))
565 (display-warning 'file-error
578 (let ((img (cdr (nth (1- num) (thumbs-file-alist)))))
580 (setq mode-name
581 (concat "image-view-mode: " (file-name-nondirectory img)
594 (number (length (thumbs-file-alist))))
602 (number (length (thumbs-file-alist))))
615 (files (thumbs-file-list)))
644 ;; cleaning of old temp files
645 (mapc 'delete-file
646 (directory-files (thumbs-temp-dir) t thumbs-temp-prefix))
656 (tmp (thumbs-temp-file)))
694 "Return the name of the image file name at point."
695 (get-text-property (point) 'thumb-image-file))
703 (thumbs-show-name))
711 (thumbs-show-name))
717 (thumbs-show-name))
723 (thumbs-show-name))
732 (defun thumbs-show-name ()
733 "Show the name of the current file."
736 (and f (message "%s [%s]" f (thumbs-file-size f)))))
743 (sa (read-from-minibuffer "Save image file as: "
745 (copy-file f sa)))
771 (define-key map "s" 'thumbs-show-name)