1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-04-22 05:51:11 -07:00

Add new command image-dired-copy-filename-as-kill

* lisp/image/image-dired.el
(image-dired-copy-filename-as-kill): New command.
(image-dired-thumbnail-mode-map): Bind above new command to "w".
This commit is contained in:
Stefan Kangas 2022-09-25 00:37:40 +02:00
parent b2283409fb
commit 97d7f8c737
2 changed files with 13 additions and 0 deletions

View file

@ -2098,6 +2098,11 @@ It removes all marks from all files in the thumbnail and the
associated Dired buffer, and is bound to 'U' in the thumbnail and
display buffer.
---
*** New command 'image-dired-copy-filename-as-kill'.
It copies the name of the marked or current image to the kill ring,
and is bound to "w" in the thumbnail buffer.
---
*** New command 'image-dired-wallpaper-set'.
This command sets the desktop background to the image at point in the

View file

@ -924,6 +924,7 @@ You probably want to use this together with
"SPC" #'image-dired-display-next-thumbnail-original
"DEL" #'image-dired-display-previous-thumbnail-original
"c" #'image-dired-comment-thumbnail
"w" #'image-dired-copy-filename-as-kill
"W" #'image-dired-wallpaper-set
;; Mouse
@ -1278,6 +1279,13 @@ overwritten. This confirmation can be turned off using
(image-dired-update-property 'comment comment))
(image-dired--update-header-line))
(defun image-dired-copy-filename-as-kill (&optional arg)
"Copy names of marked (or next ARG) files into the kill ring.
This works as `dired-copy-filename-as-kill' (which see)."
(interactive "P" image-dired-thumbnail-mode)
(image-dired--with-dired-buffer
(dired-copy-filename-as-kill arg)))
;;; Mouse support