Function: image-dired-track-thumbnail

image-dired-track-thumbnail is a byte-compiled function defined in image-dired.el.gz.

Signature

(image-dired-track-thumbnail)

Documentation

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.

Source Code

;; Defined in /usr/src/emacs/lisp/image-dired.el.gz
(defun image-dired-track-thumbnail ()
  "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."
  (let ((file (dired-get-filename))
        prop-val found window)
    (when (get-buffer image-dired-thumbnail-buffer)
      (with-current-buffer image-dired-thumbnail-buffer
        (goto-char (point-min))
        (while (and (not (eobp))
                    (not found))
          (if (and (setq prop-val
                         (get-text-property (point) 'original-file-name))
                   (string= prop-val file))
              (setq found t))
          (if (not found)
              (forward-char 1)))
        (when found
          (if (setq window (image-dired-thumbnail-window))
              (set-window-point window (point)))
          (image-dired-display-thumb-properties))))))