"Track the original file in the associated Dired buffer.
See `image-dired-toggle-movement-tracking'. Interactive use is
only useful if `image-dired-track-movement' is nil."
- (interactive nil image-dired-thumbnail-mode image-dired-display-image-mode)
+ (interactive nil image-dired-thumbnail-mode image-dired-image-mode)
(let ((file-name (image-dired-original-file-name)))
(image-dired--with-dired-buffer
(if (not (dired-goto-file file-name))
they are \"mirrored\" in the dired buffer. When this is on, moving
around in the thumbnail or dired buffer will find the matching
position in the other buffer."
- (interactive nil image-dired-thumbnail-mode image-dired-display-image-mode)
+ (interactive nil image-dired-thumbnail-mode image-dired-image-mode)
(setq image-dired-track-movement (not image-dired-track-movement))
(message "Movement tracking %s" (if image-dired-track-movement "on" "off")))
'(image-dired--thumb-update-mark-at-point))
,(when maybe-next
'(if image-dired-marking-shows-next
- (image-dired-display-next-thumbnail-original)
+ (image-dired-display-next)
(image-dired-forward-image)))))
(defun image-dired-mark-thumb-original-file ()
"Mark original image file in associated Dired buffer."
- (interactive nil image-dired-thumbnail-mode image-dired-display-image-mode)
+ (interactive nil image-dired-thumbnail-mode image-dired-image-mode)
(image-dired--do-mark-command t t
(dired-mark 1)))
(defun image-dired-unmark-thumb-original-file ()
"Unmark original image file in associated Dired buffer."
- (interactive nil image-dired-thumbnail-mode image-dired-display-image-mode)
+ (interactive nil image-dired-thumbnail-mode image-dired-image-mode)
(image-dired--do-mark-command t t
(dired-unmark 1)))
(defun image-dired-flag-thumb-original-file ()
"Flag original image file for deletion in associated Dired buffer."
- (interactive nil image-dired-thumbnail-mode image-dired-display-image-mode)
+ (interactive nil image-dired-thumbnail-mode image-dired-image-mode)
(image-dired--do-mark-command t t
(dired-flag-file-deletion 1)))
(defun image-dired-unmark-all-marks ()
"Remove all marks from all files in associated Dired buffer.
Also update the marks in the thumbnail buffer."
- (interactive nil image-dired-thumbnail-mode image-dired-display-image-mode)
+ (interactive nil image-dired-thumbnail-mode image-dired-image-mode)
(image-dired--do-mark-command nil t
(dired-unmark-all-marks))
(image-dired--with-thumbnail-buffer
"t t" #'image-dired-tag-thumbnail
"t r" #'image-dired-tag-thumbnail-remove
- "RET" #'image-dired-display-thumbnail-original-image
+ "RET" #'image-dired-display-this
"C-<return>" #'image-dired-thumbnail-display-external
"L" #'image-dired-rotate-original-left
"D" #'image-dired-thumbnail-set-image-description
"S" #'image-dired-slideshow-start
"C-d" #'image-dired-delete-char
- "SPC" #'image-dired-display-next-thumbnail-original
- "DEL" #'image-dired-display-previous-thumbnail-original
+ "SPC" #'image-dired-display-next
+ "DEL" #'image-dired-display-previous
"c" #'image-dired-comment-thumbnail
"w" #'image-dired-copy-filename-as-kill
"W" #'image-dired-wallpaper-set
:menu
'("Image-Dired"
- ["Display image" image-dired-display-thumbnail-original-image]
+ ["Display image" image-dired-display-this]
["Display in external viewer" image-dired-thumbnail-display-external]
["Jump to Dired buffer" image-dired-jump-original-dired-buffer]
"---"
["Refresh thumb" image-dired-refresh-thumb])
["Quit" quit-window]))
-(defvar-keymap image-dired-display-image-mode-map
- :doc "Keymap for `image-dired-display-image-mode'."
- "S" #'image-dired-slideshow-start
- "SPC" #'image-dired-display-next-thumbnail-original
- "DEL" #'image-dired-display-previous-thumbnail-original
- "n" #'image-dired-display-next-thumbnail-original
- "p" #'image-dired-display-previous-thumbnail-original
- "m" #'image-dired-mark-thumb-original-file
- "d" #'image-dired-flag-thumb-original-file
- "u" #'image-dired-unmark-thumb-original-file
- "U" #'image-dired-unmark-all-marks
- ;; Disable keybindings from `image-mode-map' that doesn't make sense here.
- "o" nil) ; image-save
-
(define-derived-mode image-dired-thumbnail-mode
special-mode "image-dired-thumbnail"
"Browse and manipulate thumbnail images using Dired.
;; Use approximately as much vertical spacing as horizontal.
(setq-local line-spacing (frame-char-width)))
-(define-derived-mode image-dired-display-image-mode
+\f
+;;; image-dired-image-mode
+
+(define-obsolete-variable-alias 'image-dired-display-image-mode-map
+ 'image-dired-image-mode-map "29.1")
+(defvar-keymap image-dired-image-mode-map
+ :doc "Keymap for `image-dired-image-mode'."
+ "S" #'image-dired-slideshow-start
+ "SPC" #'image-dired-display-next
+ "DEL" #'image-dired-display-previous
+ "n" #'image-dired-display-next
+ "p" #'image-dired-display-previous
+ "m" #'image-dired-mark-thumb-original-file
+ "d" #'image-dired-flag-thumb-original-file
+ "u" #'image-dired-unmark-thumb-original-file
+ "U" #'image-dired-unmark-all-marks
+ ;; Disable keybindings from `image-mode-map' that doesn't make sense here.
+ "o" nil) ; image-save
+
+(define-derived-mode image-dired-image-mode
image-mode "image-dired-image-display"
"Mode for displaying and manipulating original image.
Resized or in full-size."
"Step to the next image in a slideshow."
(if-let ((buf (get-buffer image-dired-thumbnail-buffer)))
(with-current-buffer buf
- (image-dired-display-next-thumbnail-original))
+ (image-dired-display-next))
(image-dired--slideshow-stop)))
(defun image-dired--slideshow-start-timer ()
the next image.
With a negative prefix argument, prompt user for the delay."
- (interactive "P" image-dired-thumbnail-mode image-dired-display-image-mode)
+ (interactive "P" image-dired-thumbnail-mode image-dired-image-mode)
(let ((delay
(cond ((not arg)
image-dired-slideshow-delay)
(format-prompt "Delay, in seconds. Decimals are accepted"
delay))
delay))))))
- (image-dired-display-thumbnail-original-image)
+ (image-dired-display-this)
(setq image-dired--slideshow-current-delay delay)
(add-hook 'post-command-hook 'image-dired--slideshow-stop)))
(message (substitute-command-keys
(format
(concat
- "\\[image-dired-display-next-thumbnail-original] next, "
- "\\[image-dired-display-previous-thumbnail-original] previous, "
- "\\[image-dired-display-thumbnail-original-image] pause/unpause, "
+ "\\[image-dired-display-next] next, "
+ "\\[image-dired-display-previous] previous, "
+ "\\[image-dired-display-this] pause/unpause, "
"any other command to stop%s")
(or suffix "")))))
(cond
((memq this-command
'( image-dired-slideshow-start
- image-dired-display-next-thumbnail-original
- image-dired-display-previous-thumbnail-original))
+ image-dired-display-next
+ image-dired-display-previous))
(image-dired--slideshow-start-timer)
(image-dired--slideshow-show-message))
- ((eq this-command 'image-dired-display-thumbnail-original-image)
+ ((eq this-command 'image-dired-display-this)
(let ((pause image-dired--slideshow-timer))
(if pause
(image-dired--slideshow-stop-timer)
(defun image-dired-display-image (file &optional _ignored)
"Display image FILE in the image buffer window.
-If it is an image, the window will use `image-dired-display-image-mode'
+If it is an image, the window will use `image-dired-image-mode'
which is based on `image-mode'."
(declare (advertised-calling-convention (file) "29.1"))
(setq file (expand-file-name file))
(pop-to-buffer buf)
(rename-buffer image-dired-display-image-buffer)
(if (string-match (image-file-name-regexp) file)
- (image-dired-display-image-mode)
+ (image-dired-image-mode)
;; Support visiting PDF files.
(normal-mode))
(select-window cur-win))))
-(defun image-dired-display-thumbnail-original-image (&optional arg)
+(defun image-dired-display-this (&optional arg)
"Display current thumbnail's original image in display buffer.
See documentation for `image-dired-display-image' for more information.
With prefix argument ARG, display image in its original size."
(t
(image-dired-display-image file arg)))))
-(defun image-dired-display-next-thumbnail-original (&optional arg)
+(defun image-dired-display-next (&optional arg)
"Move to the next image in the thumbnail buffer and display it.
With prefix ARG, move that many thumbnails."
- (interactive "p" image-dired-thumbnail-mode image-dired-display-image-mode)
+ (interactive "p" image-dired-thumbnail-mode image-dired-image-mode)
(image-dired--with-thumbnail-buffer
(image-dired-forward-image arg t)
- (image-dired-display-thumbnail-original-image)))
+ (image-dired-display-this)))
-(defun image-dired-display-previous-thumbnail-original (arg)
+(defun image-dired-display-previous (arg)
"Move to the previous image in the thumbnail buffer and display it.
With prefix ARG, move that many thumbnails."
- (interactive "p" image-dired-thumbnail-mode image-dired-display-image-mode)
- (image-dired-display-next-thumbnail-original (- arg)))
+ (interactive "p" image-dired-thumbnail-mode image-dired-image-mode)
+ (image-dired-display-next (- arg)))
\f
;;; Misc commands
(defun image-dired-toggle-mark-thumb-original-file ()
"Toggle mark on original image file in associated Dired buffer."
(declare (obsolete nil "29.1"))
- (interactive nil image-dired-thumbnail-mode image-dired-display-image-mode)
+ (interactive nil image-dired-thumbnail-mode image-dired-image-mode)
(image-dired--do-mark-command nil t
(if (image-dired-dired-file-marked-p)
(dired-unmark 1)
#'image-dired--update-header-line "29.1")
(define-obsolete-function-alias 'image-dired-delete-marked
#'image-dired-do-flagged-delete "29.1")
+(define-obsolete-function-alias 'image-dired-display-image-mode
+ #'image-dired-image-mode "29.1")
+(define-obsolete-function-alias 'image-dired-display-thumbnail-original-image
+ #'image-dired-display-this "29.1")
+(define-obsolete-function-alias 'image-dired-display-next-thumbnail-original
+ #'image-dired-display-next "29.1")
+(define-obsolete-function-alias 'image-dired-display-previous-thumbnail-original
+ #'image-dired-display-previous "29.1")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;; TEST-SECTION ;;;;;;;;;;;