emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/thumbs.el


From: Juanma Barranquero
Subject: [Emacs-diffs] Changes to emacs/lisp/thumbs.el
Date: Mon, 30 May 2005 05:41:49 -0400

Index: emacs/lisp/thumbs.el
diff -c emacs/lisp/thumbs.el:1.11 emacs/lisp/thumbs.el:1.12
*** emacs/lisp/thumbs.el:1.11   Wed May 25 14:08:33 2005
--- emacs/lisp/thumbs.el        Mon May 30 09:41:49 2005
***************
*** 302,319 ****
  
  (defun thumbs-thumbname (img)
    "Return a thumbnail name for the image IMG."
!   (concat thumbs-thumbsdir "/"
!         (subst-char-in-string
!          ?\  ?\_
!          (apply
!           'concat
!           (split-string
!            (expand-file-name img) "/")))))
  
  (defun thumbs-make-thumb (img)
    "Create the thumbnail for IMG."
!   (let* ((fn (expand-file-name img))
!        (tn (thumbs-thumbname img)))
      (if (or (not (file-exists-p tn))
            ;;  This is not the right fix, but I don't understand
            ;;  the external program or why it produces a geometry
--- 302,322 ----
  
  (defun thumbs-thumbname (img)
    "Return a thumbnail name for the image IMG."
!   (convert-standard-filename
!    (let ((filename (expand-file-name img)))
!      (format "%s/%08x-%s.jpg"
!              thumbs-thumbsdir
!              (sxhash filename)
!              (subst-char-in-string
!               ?\s ?\_
!               (apply
!                'concat
!                (split-string filename "/")))))))
  
  (defun thumbs-make-thumb (img)
    "Create the thumbnail for IMG."
!   (let ((fn (expand-file-name img))
!         (tn (thumbs-thumbname img)))
      (if (or (not (file-exists-p tn))
            ;;  This is not the right fix, but I don't understand
            ;;  the external program or why it produces a geometry
***************
*** 378,385 ****
      (unless (bobp) (newline))))
  
  (defun thumbs-show-thumbs-list (L &optional buffer-name same-window)
!   (when (not (display-images-p))
!     (error "Images are not supported in this Emacs session"))
    (funcall (if same-window 'switch-to-buffer 'pop-to-buffer)
           (or buffer-name "*THUMB-View*"))
    (let ((inhibit-read-only t))
--- 381,389 ----
      (unless (bobp) (newline))))
  
  (defun thumbs-show-thumbs-list (L &optional buffer-name same-window)
!   (unless (and (display-images-p)
!                (image-type-available-p 'jpeg))
!     (error "Required image type is not supported in this Emacs session"))
    (funcall (if same-window 'switch-to-buffer 'pop-to-buffer)
           (or buffer-name "*THUMB-View*"))
    (let ((inhibit-read-only t))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]