emacs-bug-tracker
[Top][All Lists]
Advanced

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

[Emacs-bug-tracker] bug#5270: closed (23.1.90; `image-dired-dired-insert


From: GNU bug Tracking System
Subject: [Emacs-bug-tracker] bug#5270: closed (23.1.90; `image-dired-dired-insert-marked-thumbs' doesn't toggle thumbs visibility)
Date: Tue, 25 May 2010 17:49:01 +0000

Your message dated Tue, 25 May 2010 20:46:56 +0300
with message-id <address@hidden>
and subject line Re: [PATCH] * lisp/image-dired.el 
(image-dired-dired-insert-marked-thumbs) Insert thumbnails before file names of 
marked files in the dired buffer.
has caused the GNU bug report #5270,
regarding 23.1.90; `image-dired-dired-insert-marked-thumbs' doesn't toggle 
thumbs visibility
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
5270: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=5270
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: bug#5270: 23.1.90; `image-dired-dired-insert-marked-thumbs' doesn't toggle thumbs visibility Date: Fri, 25 Dec 2009 10:06:06 +0100 User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1.90 (gnu/linux)
Hi, when hitting C-t t in dired `image-dired-dired-insert-marked-thumbs'
doesnt toggle visibility of thumbs.
To do that, once thumbs are visible we have to kill the dired buffer and
reopen it again.

This function fix that:

,----
| (defun image-dired-dired-insert-marked-thumbs ()
|   "Insert or hide thumbnails before file names of marked files in the dired 
buffer."
|   (interactive)
|   (dired-map-over-marks
|    (let* ((image-pos  (dired-move-to-filename))
|           (image-file (dired-get-filename))
|           (thumb-file (image-dired-get-thumbnail-image image-file))
|           overlay)
|      ;; If image is not already added, then add it.
|      (let ((cur-ov (overlays-in (point) (1+ (point)))))
|        (if cur-ov
|            (delete-overlay (car cur-ov))
|            (put-image thumb-file image-pos)
|            (setq overlay (loop for o in (overlays-in (point) (1+ (point)))
|                             when (overlay-get o 'put-image) collect o into ov
|                             finally return (car ov)))
|            (overlay-put overlay 'image-file image-file)
|            (overlay-put overlay 'thumb-file thumb-file))))
|    nil)
|   (add-hook 'dired-after-readin-hook 'image-dired-dired-after-readin-hook nil 
t))
`----

Each time you hit C-t t, it show or hide thumbs.


In GNU Emacs 23.1.90.1 (i686-pc-linux-gnu, GTK+ Version 2.18.5)
 of 2009-12-20 on tux
Windowing system distributor `The X.Org Foundation', version 11.0.10605000
configured using `configure  '--prefix=/usr' '--build=i686-pc-linux-gnu' 
'--host=i686-pc-linux-gnu' '--mandir=/usr/share/man' 
'--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc' 
'--localstatedir=/var/lib' '--program-suffix=-emacs-23-cvs' 
'--infodir=/usr/share/info/emacs-23-cvs' '--with-sound' '--with-x' 
'--without-gconf' '--without-toolkit-scroll-bars' '--with-gif' '--with-jpeg' 
'--with-png' '--with-rsvg' '--with-tiff' '--with-xpm' '--with-xft' 
'--without-libotf' '--without-m17n-flt' '--with-x-toolkit=gtk' 
'--without-hesiod' '--without-kerberos' '--without-kerberos5' '--with-gpm' 
'--with-dbus' 'build_alias=i686-pc-linux-gnu' 'host_alias=i686-pc-linux-gnu' 
'CFLAGS=-march=i686 -pipe -O2' 'LDFLAGS=-Wl,-O1''

--- End Message ---
--- Begin Message --- Subject: Re: [PATCH] * lisp/image-dired.el (image-dired-dired-insert-marked-thumbs) Insert thumbnails before file names of marked files in the dired buffer. Date: Tue, 25 May 2010 20:46:56 +0300 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (x86_64-pc-linux-gnu)
> Yes we already talk about using "toggle" as name and i completely forget
> that, so yes it is better to rename to
> `image-dired-dired-toggle-marked-thumbs'.

Thanks for the patch, it's now committed.

> feel free also to write docstring in better english if something
> is incorrect.(E.g Explaining better how to use (+/-)prefix arg maybe).

I copied part of the docstring from `dired-map-over-marks' :)

-- 
Juri Linkov
http://www.jurta.org/emacs/


--- End Message ---

reply via email to

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