From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mathias Dahl Newsgroups: gmane.emacs.devel Subject: Re: thumbs.el and transparency Date: Mon, 30 Jan 2006 23:16:40 +0100 Message-ID: References: <17366.53124.274532.548329@kahikatea.snap.net.nz> <87y814vhxj.fsf@jurta.org> <17367.17105.271024.157799@kahikatea.snap.net.nz> <17369.17978.521026.397616@kahikatea.snap.net.nz> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1138659567 11835 80.91.229.2 (30 Jan 2006 22:19:27 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 30 Jan 2006 22:19:27 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 30 23:19:27 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1F3hMH-0004bp-FQ for ged-emacs-devel@m.gmane.org; Mon, 30 Jan 2006 23:18:49 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F3hPE-0000fW-QU for ged-emacs-devel@m.gmane.org; Mon, 30 Jan 2006 17:21:53 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1F3hOI-0000XP-6C for emacs-devel@gnu.org; Mon, 30 Jan 2006 17:20:54 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1F3hO4-0000RW-25 for emacs-devel@gnu.org; Mon, 30 Jan 2006 17:20:53 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F3hO3-0000R3-F5 for emacs-devel@gnu.org; Mon, 30 Jan 2006 17:20:39 -0500 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1F3hMP-0005q6-SK for emacs-devel@gnu.org; Mon, 30 Jan 2006 17:18:58 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1F3hKZ-00049m-G3 for emacs-devel@gnu.org; Mon, 30 Jan 2006 23:17:04 +0100 Original-Received: from 1-1-3-38a.gml.gbg.bostream.se ([82.182.110.147]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 30 Jan 2006 23:17:03 +0100 Original-Received: from brakjoller by 1-1-3-38a.gml.gbg.bostream.se with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 30 Jan 2006 23:17:03 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 50 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 1-1-3-38a.gml.gbg.bostream.se User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:G9jzQjvARD0fLp22jH/1AmftMTY= X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:49794 Archived-At: Mathias Dahl writes: > "Richard M. Stallman" writes: > >> (defun tumme-show-all-from-dir (dir) >> "Make a preview buffer for all images in DIR and display it. >> >> I am having trouble following the code of this--it is quite complex. >> Does it create a dired buffer? Or does it create something else >> instead of a dired buffer? > > It creates a buffer called *tumme* with thumbnails of all image files > in DIR, just like what happens if you mark files in dired and press > `C-t d' (`tumme-display-thumbs'), but skipping the dired step, for > convenience. A lot of people, including you, seem to have missed this > feature from thumbs.el and I wanted to make a quick hack to see if it > was possible to do. And it was, quite easily. The "only" problem with > it, which `thumbs' have too AFAIK, is that it does not generate the > thumbnails "in the background" (asynchronously or whatever). > I just wrote another version that did not require any change in `tumme-display-thumbs' and which also has the benefit of opening dired, so that you get full integration: (defcustom tumme-show-all-from-dir-max-files 50 "*Maximum number of files to show using`tumme-show-all-from-dir'. before warning the user." :type 'integer :group 'tumme) (defun tumme-show-all-from-dir (dir) (interactive "DDir: ") ;; Create dired buffer so that we can, if we want ;; use the nice integrations between tumme and dired. (dired dir) (dired-mark-files-regexp (image-file-name-regexp)) (let ((files (dired-get-marked-files))) (if (or (<= (length files) tumme-show-all-from-dir-max-files) (and (> (length files) tumme-show-all-from-dir-max-files) (y-or-n-p (format "Directory contains more than %d image files. Proceed? " tumme-show-all-from-dir-max-files)))) (progn (tumme-display-thumbs) (switch-to-buffer tumme-thumbnail-buffer)) (message "Cancelled.")))) /Mathias