GNU bug report logs -
#49988
27.2; visible marks in the thumbnail buffer
Previous Next
Reported by: Peter Münster <pm <at> a16n.net>
Date: Tue, 10 Aug 2021 21:05:02 UTC
Severity: normal
Found in version 27.2
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 49988 in the body.
You can then email your comments to 49988 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#49988
; Package
emacs
.
(Tue, 10 Aug 2021 21:05:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Peter Münster <pm <at> a16n.net>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Tue, 10 Aug 2021 21:05:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hi,
It would be nice, if the marks were visible in
image-dired-thumbnail-mode.
Here is a patch, that uses a background color for the thumbnails:
* lisp/image-dired.el (image-dired-thumb-update-marks): New function that
makes the marks visible in the thumbnail buffer.
diff --git a/lisp/image-dired.el b/lisp/image-dired.el
index 8a065f2e6f..eb2b092059 100644
--- a/lisp/image-dired.el
+++ b/lisp/image-dired.el
@@ -460,6 +460,17 @@ This is where you see the cursor."
:type 'integer
:group 'image-dired)
+(defcustom image-dired-thumb-visible-marks nil
+ "Make marks visible in thumbnail buffer.
+If non-nil, apply `image-dired-thumb-mark-color' to background of marked images."
+ :type 'boolean
+ :group 'image-dired)
+
+(defcustom image-dired-thumb-mark-color "orange"
+ "Background-color for marked images in thumbnail buffer."
+ :type 'string
+ :group 'image-dired)
+
(defcustom image-dired-line-up-method 'dynamic
"Default method for line-up of thumbnails in thumbnail buffer.
Used by `image-dired-display-thumbs' and other functions that needs
@@ -2311,6 +2322,32 @@ non-nil."
(image-dired-track-original-file))
(image-dired-display-thumb-properties))
+(defun image-dired-thumb-file-marked-p ()
+ "Check if file is marked in associated dired buffer."
+ (let ((file-name (image-dired-original-file-name))
+ (dired-buf (image-dired-associated-dired-buffer)))
+ (if (and dired-buf file-name)
+ (with-current-buffer dired-buf
+ (if (dired-goto-file file-name)
+ (image-dired-dired-file-marked-p))))))
+
+(defun image-dired-thumb-update-marks ()
+ "Update the marks in the thumbnail buffer."
+ ;; TODO: only called by image-dired-mouse-toggle-mark but there are
+ ;; certainly other places, where it should be called too.
+ (when image-dired-thumb-visible-marks
+ (with-current-buffer image-dired-thumbnail-buffer
+ (save-excursion
+ (goto-char (point-min))
+ (let ((inhibit-read-only t))
+ (while (not (eobp))
+ (if (image-dired-thumb-file-marked-p)
+ (add-face-text-property
+ (point) (1+ (point))
+ (list :background image-dired-thumb-mark-color))
+ (remove-text-properties (point) (1+ (point)) '(face nil)))
+ (forward-char)))))))
+
(defun image-dired-mouse-toggle-mark-1 ()
"Toggle dired mark for current thumbnail.
Track this in associated dired buffer if `image-dired-track-movement' is
@@ -2335,7 +2372,8 @@ non-nil."
(forward-char))))
(mouse-set-point event)
(goto-char (posn-point (event-end event)))
- (image-dired-mouse-toggle-mark-1)))
+ (image-dired-mouse-toggle-mark-1))
+ (image-dired-thumb-update-marks))
(defun image-dired-dired-display-properties ()
"Display properties for dired file in the echo area."
What do think about that?
--
Peter
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#49988
; Package
emacs
.
(Wed, 11 Aug 2021 12:05:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 49988 <at> debbugs.gnu.org (full text, mbox):
Peter Münster <pm <at> a16n.net> writes:
> Here is a patch, that uses a background color for the thumbnails:
Thanks; applied to Emacs 28, but with some changes -- I made the colour
into a face.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
bug marked as fixed in version 28.1, send any further explanations to
49988 <at> debbugs.gnu.org and Peter Münster <pm <at> a16n.net>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Wed, 11 Aug 2021 12:05:03 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 09 Sep 2021 11:24:10 GMT)
Full text and
rfc822 format available.
This bug report was last modified 3 years and 282 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.