help-gnu-emacs
[Top][All Lists]
Advanced

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

RE: viewing random list of files in dired


From: Drew Adams
Subject: RE: viewing random list of files in dired
Date: Sun, 18 Jan 2009 09:00:46 -0800

> > >> is it possible to view a random list of files with dired ?
> > >>
> > >> What I really want is to examine a couple 100 of images from
> > >> different directories as thumbnails with associated filename.
> > >> The names come from the command line. None of the programs I
> > >> have tried (gthumb,gqview,xzgv,feh) can do it.
> ...
> > By random I ment that the files have no particular common property
> > (like coming from the same directory).
> > Creating links in a new directory seems to be the best bet. After
> > the frustration from trying 5 different programs settled down, I
> > modified dired-image to accept a list of files. While the results
> > are pleasing, it just takes to long for > 1000 files.
> 
> Yes, and you don't need to create symlinks or otherwise 
> modify your file system.
> 
> If you use Icicles, you can define a set of arbitrary file or 
> directory names and later open Dired for just that set. You can
> save the set persistently, if you like.
> 
> You can create the list of file names any way you like - it's 
> just a list of names. The names could originally "come from the
> command line", for instance. 
> 
> You can also create or add to such a set of file names using 
> the files that are marked in Dired buffers.
> 
> http://www.emacswiki.org/emacs/Icicles_-_Dired_Enhancements


I should add that you can also do this without Icicles - Icicles just makes
things easier.

Function `dired' will accept a list of file names as its first argument. That is
the key here. This is all you need, to open Dired using a list `file-names':

(dired (cons (generate-new-buffer-name "My Dired")
             (nreverse (mapcar (lambda (file)
                                 (if (file-name-absolute-p file)
                                     (expand-file-name file)
                                   file))
                               file-names))))






reply via email to

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