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

Lines Matching +refs:dired +refs:delete +refs:file

9 ;; This file is part of GNU Emacs.
22 ;; along with GNU Emacs; see the file COPYING. If not, write to the
32 ;; your images, use image-dired.el
51 ;; from dired, C-t m enter in thumbs-mode with all marked files
61 (require 'dired)
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
196 (file-name-as-directory (expand-file-name thumbs-temp-dir)))
198 (defun thumbs-temp-file ()
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)))
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)))
414 (defun thumbs-dired-show-marked ()
415 "In dired, make a thumbs buffer with marked files."
417 (thumbs-show-thumbs-list (dired-get-marked-files) nil t))
420 (defun thumbs-dired-show ()
421 "In dired, make a thumbs buffer with all files in current directory."
435 (concat "image-view-mode: " (file-name-nondirectory img)
442 (delete-region (point-min)(point-max))
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."
513 (defun thumbs-delete-images ()
517 (if (yes-or-no-p (format "Really delete %d files? " (length files)))
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)))
530 (delete-region (point) (1+ (point))))
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)))
561 (delete-region (point) (1+ (point))))
563 (delq file thumbs-marked-list)))))))
565 (display-warning 'file-error
578 (let ((img (cdr (nth (1- num) (thumbs-file-alist)))))
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)))
628 (delete-char 1)
638 (setq thumbs-marked-list (delete elt thumbs-marked-list))
640 (delete-char 1)
645 (mapc 'delete-file
656 (tmp (thumbs-temp-file)))
694 "Return the name of the image file name at point."
695 (get-text-property (point) 'thumb-image-file))
730 (thumbs-dired-show))
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)))
747 (defun thumbs-dired ()
748 "Use `dired' on the current thumbs directory."
750 (dired thumbs-current-dir))
760 (define-key map [delete] 'thumbs-delete-images)
766 (define-key map "d" 'thumbs-dired)
770 (define-key map "x" 'thumbs-delete-images)
806 (defun thumbs-dired-setroot ()
807 "In dired, call the setroot program on the image at point."
809 (thumbs-call-setroot-command (dired-get-filename)))
811 ;; Modif to dired mode map
812 (define-key dired-mode-map "\C-ta" 'thumbs-dired-show)
813 (define-key dired-mode-map "\C-tm" 'thumbs-dired-show-marked)
814 (define-key dired-mode-map "\C-tw" 'thumbs-dired-setroot)